calc_halflev Subroutine

public subroutine calc_halflev()

Uses

  • proc~~calc_halflev~~UsesGraph proc~calc_halflev calc_halflev module~modfields modfields proc~calc_halflev->module~modfields module~modglobal modglobal proc~calc_halflev->module~modglobal module~modsurfdata modsurfdata proc~calc_halflev->module~modsurfdata decomp_2d decomp_2d module~modfields->decomp_2d

Arguments

None

Called by

proc~~calc_halflev~~CalledByGraph proc~calc_halflev calc_halflev proc~readinitfiles readinitfiles proc~readinitfiles->proc~calc_halflev proc~thermodynamics thermodynamics proc~readinitfiles->proc~thermodynamics proc~thermodynamics->proc~calc_halflev program~dalesurban DALESURBAN program~dalesurban->proc~readinitfiles program~dalesurban->proc~thermodynamics

Source Code

  subroutine calc_halflev
    use modglobal, only : ib,ie,jb,je,kb,ke,kh,dzf,dzh,iadv_thl, iadv_qt, iadv_kappa
    use modfields, only : thl0,thl0h,qt0,qt0h
    use modsurfdata,only: qts,thls
    implicit none

    integer :: i,j,k


    !      do  k=kb+1,ke+kh
    do  k=kb,ke+kh
       do  j=jb,je
          do  i=ib,ie
             thl0h(i,j,k) = (thl0(i,j,k)*dzf(k-1)+thl0(i,j,k-1)*dzf(k))/(2*dzh(k))
          end do
       end do

    end do
        thl0h(ib:ie,jb:je,kb) = thls

    !      do  k=kb+1,ke+kh
    do  k=kb,ke+kh
       do  j=jb,je
          do  i=ib,ie
             qt0h(i,j,k)  = (qt0 (i,j,k)*dzf(k-1)+qt0 (i,j,k-1)*dzf(k))/(2*dzh(k))
          end do
       end do
    end do
          qt0h(ib:ie,jb:je,kb)  = qts

  end subroutine calc_halflev