timedepnudge Subroutine

private subroutine timedepnudge()

Uses

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

Arguments

None

Called by

proc~~timedepnudge~~CalledByGraph proc~timedepnudge timedepnudge proc~timedep timedep proc~timedep->proc~timedepnudge proc~inittimedep inittimedep proc~inittimedep->proc~timedep program~dalesurban DALESURBAN program~dalesurban->proc~timedep program~dalesurban->proc~inittimedep

Source Code

  subroutine timedepnudge
    use modfields,   only : thlprof, qtprof, uprof, vprof
    use modglobal,   only : timee,dzf,dzh,kb,ke,kh,kmax
    use modmpi,      only : myid

    implicit none
    integer t,k
    real fac

    if(.not.(ltimedepnudge)) return

    !---- interpolate ----
    do t=ntimedepnudge,1,-1
      if (timee .ge. timenudge(t)) then
        exit
      endif
    end do

    if (t .ne. ntimedepnudge) then
      fac = (timee - timenudge(t)) / (timenudge(t+1) - timenudge(t))
      thlprof = thlproft(:,t) + fac * (thlproft(:,t+1) - thlproft(:,t))
      qtprof  = qtproft (:,t) + fac * (qtproft (:,t+1) - qtproft (:,t))
      uprof   = uproft  (:,t) + fac * (uproft  (:,t+1) - uproft  (:,t))
      vprof   = vproft  (:,t) + fac * (vproft  (:,t+1) - vproft  (:,t))
    end if

    ! if ((myid == 0) .or. (myid == 1)) then
    !   write(*, *) "myid, t, timee, timenudge(t), thlproft(ke,t), thlproft(ke,t+1), thlprof(ke)"
    !   write(*, *) myid, t, timee, timenudge(t), thlproft(ke,t), thlproft(ke,t+1), thlprof(ke)
    ! end if
    !write(*, *) "myid, thlproft(k,t), thlprof(k)"
    !do k = kb,ke
        !write(*,*) myid, thlproft(k, t), thlprof(k)
    !end do

  return

  end subroutine timedepnudge