poison_centre_3d Subroutine

private subroutine poison_centre_3d(fld, nxl, nyl, ng, nz, qnan, pw, pe, ps, pn)

Poison centre-type 3D ghost bands.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(inout) :: fld(nxl+2*ng,nyl+2*ng,nz)
integer, intent(in) :: nxl
integer, intent(in) :: nyl
integer, intent(in) :: ng
integer, intent(in) :: nz
real(kind=wp), intent(in) :: qnan
logical, intent(in) :: pw
logical, intent(in) :: pe
logical, intent(in) :: ps
logical, intent(in) :: pn

Called by

proc~~poison_centre_3d~~CalledByGraph proc~poison_centre_3d poison_centre_3d proc~ocean_poison_ghost_bands ocean_poison_ghost_bands proc~ocean_poison_ghost_bands->proc~poison_centre_3d proc~ocean_dyn_step_split ocean_dyn_step_split proc~ocean_dyn_step_split->proc~ocean_poison_ghost_bands proc~engine_step engine_step proc~engine_step->proc~ocean_dyn_step_split proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_step proc~rdb_ocean_step rdb_ocean_step proc~rdb_ocean_step->proc~engine_step proc~driver_run driver_run proc~driver_run->proc~driver_run_ocean

Variables

Type Visibility Attributes Name Initial
integer, private :: i
integer, private :: j
integer, private :: k
integer, private :: nxt
integer, private :: nyt

Source Code

   subroutine poison_centre_3d(fld, nxl, nyl, ng, nz, qnan, pw, pe, ps, pn)
      !! Poison centre-type 3D ghost bands.
      integer, intent(in) :: nxl, nyl, ng, nz
      real(wp), intent(inout) :: fld(nxl + 2*ng, nyl + 2*ng, nz)
      real(wp), intent(in) :: qnan
      logical, intent(in) :: pw, pe, ps, pn

      integer :: nxt, nyt, i, j, k

      nxt = nxl + 2*ng
      nyt = nyl + 2*ng

      ! West band: i = 1..ng
      if (pw) then
         do concurrent(k=1:nz, j=1:nyt, i=1:ng)
            fld(i, j, k) = qnan
         end do
      end if
      ! East band: i = ng+nxl+1..nxt
      if (pe) then
         do concurrent(k=1:nz, j=1:nyt, i=ng + nxl + 1:nxt)
            fld(i, j, k) = qnan
         end do
      end if
      ! South band: j = 1..ng
      if (ps) then
         do concurrent(k=1:nz, j=1:ng, i=1:nxt)
            fld(i, j, k) = qnan
         end do
      end if
      ! North band: j = ng+nyl+1..nyt
      if (pn) then
         do concurrent(k=1:nz, j=ng + nyl + 1:nyt, i=1:nxt)
            fld(i, j, k) = qnan
         end do
      end if
   end subroutine poison_centre_3d