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