halos Subroutine

public subroutine halos()

Uses

  • proc~~halos~~UsesGraph proc~halos halos decomp_2d decomp_2d proc~halos->decomp_2d module~modfields modfields proc~halos->module~modfields module~modglobal modglobal proc~halos->module~modglobal module~modfields->decomp_2d

Arguments

None

Calls

proc~~halos~~CallsGraph proc~halos halos exchange_halo_z exchange_halo_z proc~halos->exchange_halo_z proc~xm_periodic xm_periodic proc~halos->proc~xm_periodic proc~xq_periodic xq_periodic proc~halos->proc~xq_periodic proc~xs_periodic xs_periodic proc~halos->proc~xs_periodic proc~xt_periodic xT_periodic proc~halos->proc~xt_periodic proc~ym_periodic ym_periodic proc~halos->proc~ym_periodic proc~yq_periodic yq_periodic proc~halos->proc~yq_periodic proc~ys_periodic ys_periodic proc~halos->proc~ys_periodic proc~yt_periodic yT_periodic proc~halos->proc~yt_periodic

Called by

proc~~halos~~CalledByGraph proc~halos halos proc~readinitfiles readinitfiles proc~readinitfiles->proc~halos program~dalesurban DALESURBAN program~dalesurban->proc~halos program~dalesurban->proc~readinitfiles

Source Code

   subroutine halos

      use modglobal, only : ib, ie, ih, jb, je, jh, kb, ke, kh, ihc, jhc, khc, nsv, &
                            BCxm, BCym, BCxT, BCyT, BCxq, BCyq, BCxs, BCys, &
                            BCxm_periodic, BCxT_periodic, BCxq_periodic, BCxs_periodic, &
                            BCym_periodic, BCyT_periodic, BCyq_periodic, BCys_periodic, &
                            ibrank, ierank, jbrank, jerank
      use modfields, only : u0, v0, w0, um, vm, wm, thl0, thlm, qt0, qtm, sv0, svm, thl0c
      use decomp_2d, only : exchange_halo_z
      implicit none
      integer i, k, n

      call exchange_halo_z(u0)
      call exchange_halo_z(v0)
      call exchange_halo_z(w0)
      call exchange_halo_z(um)
      call exchange_halo_z(vm)
      call exchange_halo_z(wm)
      call exchange_halo_z(thl0)
      call exchange_halo_z(thlm)
      call exchange_halo_z(thl0c, opt_zlevel=(/ihc,jhc,khc/))
      call exchange_halo_z(qt0)
      call exchange_halo_z(qtm)
      do n = 1, nsv
         call exchange_halo_z(sv0(:, :, :, n), opt_zlevel=(/ihc,jhc,khc/))
         call exchange_halo_z(svm(:, :, :, n), opt_zlevel=(/ihc,jhc,khc/))
      enddo

      if (ibrank .and. ierank) then ! not parallelized in x
        if (BCxm == BCxm_periodic) call xm_periodic
        if (BCxT == BCxT_periodic) call xT_periodic
        if (BCxq == BCxq_periodic) call xq_periodic
        if (BCxs == BCxs_periodic) call xs_periodic
      end if

      if (jbrank .and. jerank) then ! not parallelized in x
        if (BCym == BCym_periodic) call ym_periodic
        if (BCyT == BCyT_periodic) call yT_periodic
        if (BCyq == BCyq_periodic) call yq_periodic
        if (BCys == BCys_periodic) call ys_periodic
      end if

    end subroutine halos