timedepsurf Subroutine

private subroutine timedepsurf()

Uses

  • proc~~timedepsurf~~UsesGraph proc~timedepsurf timedepsurf module~modglobal modglobal proc~timedepsurf->module~modglobal module~modibmdata modibmdata proc~timedepsurf->module~modibmdata module~modmpi modmpi proc~timedepsurf->module~modmpi mpi mpi module~modmpi->mpi

Arguments

None

Called by

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

Source Code

  subroutine timedepsurf
    use modmpi,     only : myid
    use modglobal,  only : timee
    use modibmdata, only : bctfxm, bctfxp, bctfym, bctfyp, bctfz!, bctfzf
    implicit none
    integer t
    real fac

    if(.not.(ltimedepsurf)) return

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

    ! if ((myid == 0) .or. (myid == 1)) then
    !   write(*, *) "myid", myid, "t", t, "timee", timee, "timeflux(t)", timeflux(t)
    ! end if

    if (t .ne. ntimedepsurf) then
      fac = (timee-timeflux(t)) / (timeflux(t+1)-timeflux(t))
      bctfxm = bctfxmt(t) + fac * (bctfxmt(t+1) - bctfxmt(t))
      bctfxp = bctfxpt(t) + fac * (bctfxpt(t+1) - bctfxpt(t))
      bctfym = bctfymt(t) + fac * (bctfymt(t+1) - bctfymt(t))
      bctfyp = bctfypt(t) + fac * (bctfypt(t+1) - bctfypt(t))
      bctfz = bctfzt(t) + fac * (bctfzt(t+1) - bctfzt(t))
      !bctfzf = bctfzft(t) + fac * (bctfzft(t+1) - bctfzft(t))
   end if

    ! if ((myid == 0) .or. (myid == 1)) then
    !   write(*, *) "myid", myid, "bctfz", bctfz, "bctfzf", bctfzf
    ! end if

    return
  end subroutine timedepsurf