SW-corner 2D north fold (+ fold-line projection); negate for a
true-vector component, copy for a scalar / vorticity.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(inout) | :: | fld(nxf,nyf) |
Corner field (nx_total+1, ny_total+1). |
||
| integer, | intent(in) | :: | nxf | |||
| integer, | intent(in) | :: | nyf | |||
| integer, | intent(in) | :: | nx_phys | |||
| integer, | intent(in) | :: | ny_phys | |||
| integer, | intent(in) | :: | ng | |||
| logical, | intent(in) | :: | negate |
|
||
| logical, | intent(in), | optional | :: | device_resident |
Exchange path only: |
subroutine fold_corner_2d(fld, nxf, nyf, nx_phys, ny_phys, ng, negate, device_resident) !! SW-corner 2D north fold (+ fold-line projection); `negate` for a !! true-vector component, copy for a scalar / vorticity. integer, intent(in) :: nxf, nyf, nx_phys, ny_phys, ng real(wp), intent(inout) :: fld(nxf, nyf) !! Corner field (nx_total+1, ny_total+1). logical, intent(in) :: negate !! `.true.` ⇒ negate (true vector); `.false.` ⇒ copy. logical, intent(in), optional :: device_resident !! Exchange path only: `.false.` ⇒ host arrays. if (ocean_fold_is_distributed()) then call ocean_fold_begin(fold_stagger_nrows(FOLD_STAG_CORNER, fx_ng)) call ocean_fold_pack(fld, nxf, nyf, FOLD_STAG_CORNER, device_resident) call ocean_fold_exchange(device_resident) call ocean_fold_unpack(fld, nxf, nyf, FOLD_STAG_CORNER, negate, device_resident) call ocean_fold_end() else call fold_north_corner(fld, nxf, nyf, nx_phys, ny_phys, ng, negate) end if end subroutine fold_corner_2d