nudge Subroutine

public subroutine nudge()

Uses

  • proc~~nudge~~UsesGraph proc~nudge nudge module~modfields modfields proc~nudge->module~modfields module~modglobal modglobal proc~nudge->module~modglobal module~modmpi modmpi proc~nudge->module~modmpi decomp_2d decomp_2d module~modfields->decomp_2d mpi mpi module~modmpi->mpi

Arguments

None

Called by

proc~~nudge~~CalledByGraph proc~nudge nudge program~dalesurban DALESURBAN program~dalesurban->proc~nudge

Source Code

  subroutine nudge
    use modglobal,  only : kb,ke,lmoist,ltempeq,lnudge,lnudgevel,tnudge,nnudge,numol,nsv
    use modfields,  only : thlp,qtp,svp,sv0av,thl0av,qt0av,up,vp,u0av,v0av,uprof,vprof,thlprof,qtprof,svprof
    use modmpi,     only : myid
    implicit none
    integer :: k, n

    if (lnudge .eqv. .false.) return

    if (lnudgevel) then
      do k=kb+nnudge,ke
         up(:,:,k) = up(:,:,k) - (u0av(k) - uprof(k)) / tnudge
         vp(:,:,k) = vp(:,:,k) - (v0av(k) - vprof(k)) / tnudge
      end do
    end if

    do n=1,nsv
      do k=kb+nnudge,ke
        svp(:,:,k,n) = svp(:,:,k,n) - (sv0av(k,n) - svprof(k,n)) / tnudge
      end do
    end do

    if (ltempeq) then
      do k=kb+nnudge,ke
       thlp(:,:,k) = thlp(:,:,k) - (thl0av(k) - thlprof(k)) / tnudge
      end do
    end if !ltempeq

    if (lmoist) then
      do k=kb+nnudge,ke
        qtp(:,:,k) = qtp(:,:,k) - (qt0av(k) - qtprof(k)) / tnudge
      end do
    end if !lmoist

  end subroutine nudge