Ignore:
Timestamp:
Jul 11, 2014, 11:48:09 AM (11 years ago)
Author:
emillour
Message:

Generic and Mars GCM:
LMDZ.COMMON dynamics sends mass flux to physics and not vertical velocity.
Add the computation of vertical velocity from input mass flux in the physics,
and also modify "old" LMDZ.GENERIC and LMDZ.MARS dynamics to be consistent.
EM

File:
1 edited

Legend:

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

    r1309 r1312  
    55                  pplev,pplay,pphi,        &
    66                  pu,pv,pt,pq,             &
    7                   pw,                      &
     7                  flxw,                    &
    88                  pdu,pdv,pdt,pdq,pdpsrf,tracerdyn)
    99 
     
    9898!    ptdyn(ngrid,nlayer)     / corresponding variables
    9999!    pqdyn(ngrid,nlayer,nq) /
    100 !    pw(ngrid,?)           vertical velocity
     100!    flxw(ngrid,nlayer)      vertical mass flux (kg/s) at layer lower boundary
    101101!
    102102!   output
     
    161161      real,intent(in) :: pt(ngrid,nlayer) ! temperature (K)
    162162      real,intent(in) :: pq(ngrid,nlayer,nq) ! tracers (.../kg_of_air)
    163       real,intent(in) :: pw(ngrid,nlayer)    ! vertical velocity (m/s)
    164 
     163      real,intent(in) :: flxw(ngrid,nlayer) ! vertical mass flux (ks/s)
     164                                            ! at lower boundary of layer
    165165
    166166
     
    210210      real aerosol(ngrid,nlayer,naerkind)
    211211      real zh(ngrid,nlayer)      ! potential temperature (K)
     212      real pw(ngrid,nlayer) ! vertical velocity (m/s) (>0 when downwards)
    212213
    213214      character*80 fichier
     
    803804      enddo
    804805
     806     ! Compute vertical velocity (m/s) from vertical mass flux
     807     ! w = F / (rho*area) and rho = r*T/P
     808     ! but first linearly interpolate mass flux to mid-layers
     809     do l=1,nlayer-1
     810       pw(1:ngrid,l)=0.5*(flxw(1:ngrid,l)+flxw(1:ngrid,l+1))
     811     enddo
     812     pw(1:ngrid,nlayer)=0.5*flxw(1:ngrid,nlayer) ! since flxw(nlayer+1)=0
     813     do l=1,nlayer
     814       pw(1:ngrid,l)=(pw(1:ngrid,l)*pplay(1:ngrid,l)) /  &
     815                     (r*pt(1:ngrid,l)*area(1:ngrid))
     816     enddo
    805817
    806818!-----------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.