Two-pass X-then-Y halo exchange for a 2D y-face field. Symmetric to face_x_2d with i↔j, x↔y.
Index map (ng=nghost, nyl=ny_local): Send NORTH (ng+1 per i-col): source j = nyl+1..ng+nyl+1 (last j = ng+nyl+1 is owned seam face; my j == north-nbr’s j_N + nyl) → fills north-nbr’s j = 1..ng+1 (south ghosts + seam-copy)
Recv FROM NORTH (ng per i-col): north-nbr sends j = ng+2..2*ng+1 → fills OUR north ghosts j = ng+nyl+2..ng+nyl+ng+1
Send SOUTH (ng per i-col): source j = ng+2..2*ng+1 Recv FROM SOUTH (ng+1 per i-col): fills OUR j = 1..ng+1
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(inout) | :: | fld(oh_nx_total,oh_ny_total+1) |
y-face field (nx_total, ny_total+1) |
||
| logical, | intent(in), | optional | :: | device_resident |
If .false., operate on host memory (no OpenACC directives). Default (.true.) is the normal device-resident path. |
subroutine ocean_halo_face_y_2d(fld, device_resident) !! Two-pass X-then-Y halo exchange for a 2D y-face field. !! Symmetric to face_x_2d with i↔j, x↔y. !! !! Index map (ng=nghost, nyl=ny_local): !! Send NORTH (ng+1 per i-col): source j = nyl+1..ng+nyl+1 !! (last j = ng+nyl+1 is owned seam face; my j == north-nbr's j_N + nyl) !! → fills north-nbr's j = 1..ng+1 (south ghosts + seam-copy) !! !! Recv FROM NORTH (ng per i-col): !! north-nbr sends j = ng+2..2*ng+1 → fills OUR north ghosts j = ng+nyl+2..ng+nyl+ng+1 !! !! Send SOUTH (ng per i-col): source j = ng+2..2*ng+1 !! Recv FROM SOUTH (ng+1 per i-col): fills OUR j = 1..ng+1 real(wp), intent(inout) :: fld(oh_nx_total, oh_ny_total + 1) !! y-face field (nx_total, ny_total+1) logical, intent(in), optional :: device_resident !! If .false., operate on host memory (no OpenACC directives). !! Default (.true.) is the normal device-resident path. call oh_count_face_y_2d() call ocean_halo_face_y_2d_impl(fld, oh_nghost, device_resident) end subroutine ocean_halo_face_y_2d