Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/post_process/m_data_input.f90
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,17 @@ impure subroutine s_read_serial_data_files(t_step)
call s_assign_default_bc_type(bc_type)
end if

call s_read_grid_data_direction(t_step_dir, 'x', x_cb, dx, x_cc, m)
! Pass explicit slices so the dummy `dimension(-1:)` / `dimension(0:)` arguments map to the correct interior indices of the
! actual arrays. Without slicing, when offset_x%beg or buff_size > 0 (i.e. format=1 parallel 3D ranks), Fortran's
! assumed-shape re-mapping shifts the read by that many slots and leaves the last interior cells uninitialized - corrupting
! downstream ghost-cell extrapolation.
call s_read_grid_data_direction(t_step_dir, 'x', x_cb(-1:m), dx(0:m), x_cc(0:m), m)

if (n > 0) then
call s_read_grid_data_direction(t_step_dir, 'y', y_cb, dy, y_cc, n)
call s_read_grid_data_direction(t_step_dir, 'y', y_cb(-1:n), dy(0:n), y_cc(0:n), n)

if (p > 0) then
call s_read_grid_data_direction(t_step_dir, 'z', z_cb, dz, z_cc, p)
call s_read_grid_data_direction(t_step_dir, 'z', z_cb(-1:p), dz(0:p), z_cc(0:p), p)
end if
end if

Expand Down
Loading