Width-parameterized centre-2D halo exchange. Identical algorithm to ocean_halo_centre_2d but operates on a wider ghost band ng_wide (>= oh_nghost). Fail-loud guards prevent ng_wide from exceeding the neighbour interior.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(inout) | :: | fld(oh_nx_local+2*ng_wide,oh_ny_local+2*ng_wide) |
Cell-centred 2D field (nx_local + 2ng_wide, ny_local + 2ng_wide) |
||
| integer, | intent(in) | :: | ng_wide |
Wide ghost cell width (>= oh_nghost) |
||
| logical, | intent(in), | optional | :: | device_resident |
If .false., operate on host memory. Default = .true. |
subroutine ocean_halo_centre_2d_wide(fld, ng_wide, device_resident) !! Width-parameterized centre-2D halo exchange. !! Identical algorithm to ocean_halo_centre_2d but operates on a !! wider ghost band ng_wide (>= oh_nghost). !! Fail-loud guards prevent ng_wide from exceeding the neighbour interior. integer, intent(in) :: ng_wide !! Wide ghost cell width (>= oh_nghost) real(wp), intent(inout) :: fld(oh_nx_local + 2*ng_wide, oh_ny_local + 2*ng_wide) !! Cell-centred 2D field (nx_local + 2*ng_wide, ny_local + 2*ng_wide) logical, intent(in), optional :: device_resident !! If .false., operate on host memory. Default = .true. call oh_count_centre_2d() call wide_halo_guards(ng_wide, "ocean_halo_centre_2d_wide") call ocean_halo_buffers_ensure_wide(ng_wide) call ocean_halo_centre_2d_impl(fld, ng_wide, device_resident) end subroutine ocean_halo_centre_2d_wide