Changeset 1637


Ignore:
Timestamp:
Nov 30, 2016, 7:29:32 PM (8 years ago)
Author:
jvatant
Message:

Minor changes on dyn. diagnostics in physiq_mod.F90 - corrected zdtdyn, added zdudyn - JVO

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/libf/phystd/physiq_mod.F90

    r1626 r1637  
    344344      real zdtadj(ngrid,nlayer)                          ! Convadj Diagnostic.
    345345      real zdtdyn(ngrid,nlayer)                          ! Dynamical Heating (K/s).
     346      real zdudyn(ngrid,nlayer)                          ! Dynamical Zonal Wind tendency (m.s-2).
    346347      real,allocatable,dimension(:,:),save :: ztprevious ! Previous loop Atmospheric Temperature (K)                                                         ! Useful for Dynamical Heating calculation.
    347 !$OMP THREADPRIVATE(ztprevious)
     348      real,allocatable,dimension(:,:),save :: zuprevious ! Previous loop Zonal Wind (m.s-1)                                                                  ! Useful for Zonal Wind tendency calculation.
     349!$OMP THREADPRIVATE(ztprevious,zuprevious)
    348350
    349351      real reff(ngrid,nlayer)                       ! Effective dust radius (used if doubleq=T).
     
    469471        ALLOCATE(q2(ngrid,nlayer+1))
    470472        ALLOCATE(ztprevious(ngrid,nlayer))
     473        ALLOCATE(zuprevious(ngrid,nlayer))
    471474        ALLOCATE(cloudfrac(ngrid,nlayer))
    472475        ALLOCATE(totcloudfrac(ngrid))
     
    666669         qsurf_hist(:,:)=qsurf(:,:)
    667670
    668 !        Initialize variable for dynamical heating diagnostic.
    669 !        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     671!        Initialize variable for dynamical heating and zonal wind tendency diagnostic
     672!        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    670673         ztprevious(:,:)=pt(:,:)
     674         zuprevious(:,:)=pu(:,:)
    671675
    672676!        Set temperature just above condensation temperature (for Early Mars)
     
    16341638
    16351639      ! Diagnostic.
    1636       zdtdyn(1:ngrid,1:nlayer)     = pt(1:ngrid,1:nlayer)-ztprevious(1:ngrid,1:nlayer)
     1640      zdtdyn(1:ngrid,1:nlayer)     = (pt(1:ngrid,1:nlayer)-ztprevious(1:ngrid,1:nlayer)) / ptimestep
    16371641      ztprevious(1:ngrid,1:nlayer) = zt(1:ngrid,1:nlayer)
     1642
     1643      zdudyn(1:ngrid,1:nlayer)     = (pu(1:ngrid,1:nlayer)-zuprevious(1:ngrid,1:nlayer)) / ptimestep
     1644      zuprevious(1:ngrid,1:nlayer) = zu(1:ngrid,1:nlayer)
    16381645
    16391646      if(firstcall)then
    16401647         zdtdyn(1:ngrid,1:nlayer)=0.0
     1648         zdudyn(1:ngrid,1:nlayer)=0.0
    16411649      endif
    16421650
    16431651      ! Dynamical heating diagnostic.
    16441652      do ig=1,ngrid
    1645          fluxdyn(ig)= SUM(zdtdyn(ig,:) *mass(ig,:))*cpp/ptimestep
     1653         fluxdyn(ig)= SUM(zdtdyn(ig,:) *mass(ig,:))*cpp
    16461654      enddo
    16471655
Note: See TracChangeset for help on using the changeset viewer.