Re-fill every tracer’s ghost band from its owners: the halo exchange (MPI seams, and the local periodic wrap on an undecomposed periodic axis — the halo primitive does both), then the tripolar north fold on the rank that owns it. Thickness and velocity are left alone. Collective (every rank calls it).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(hgrid_t), | intent(in) | :: | grid | |||
| type(multilayer_state_t), | intent(inout) | :: | ms | |||
| type(ocean_bc_state_t), | intent(in), | optional | :: | bc |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private | :: | it |
subroutine refresh_tracer_ghosts(grid, ms, bc) !! Re-fill every tracer's ghost band from its owners: the halo !! exchange (MPI seams, and the local periodic wrap on an undecomposed !! periodic axis — the halo primitive does both), then the tripolar !! north fold on the rank that owns it. Thickness and velocity are !! left alone. Collective (every rank calls it). type(hgrid_t), intent(in) :: grid type(multilayer_state_t), intent(inout) :: ms type(ocean_bc_state_t), intent(in), optional :: bc integer :: it if (.not. allocated(ms%tracers)) return call profiler_start("ocean_comms_ml") do it = 1, size(ms%tracers) if (.not. allocated(ms%tracers(it)%hTr)) cycle call ocean_halo_centre(ms%tracers(it)%hTr, ms%nz_ml) end do call profiler_stop("ocean_comms_ml") if (present(bc)) then if (bc%north_fold) call ocean_fold_wrap_centre_3d_state(grid, bc, ms) end if end subroutine refresh_tracer_ghosts