Changeset 1312 for trunk/LMDZ.MARS/libf/phymars
- Timestamp:
- Jul 11, 2014, 11:48:09 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/physiq.F
r1292 r1312 5 5 $ ,pplev,pplay,pphi 6 6 $ ,pu,pv,pt,pq 7 $ , pw7 $ ,flxw 8 8 $ ,pdu,pdv,pdt,pdq,pdpsrf,tracerdyn) 9 9 … … 128 128 c ptdyn(ngrid,nlayer) | corresponding variables 129 129 c pqdyn(ngrid,nlayer,nq) | 130 c pw(ngrid,?) vertical velocity130 c flxw(ngrid,nlayer) vertical mass flux (kg/s) at layer lower boundary 131 131 c 132 132 c output: … … 159 159 c inputs: 160 160 c ------- 161 INTEGER ngrid,nlayer,nq 162 REAL ptimestep 163 REAL pplev(ngrid,nlayer+1),pplay(ngrid,nlayer) 164 REAL pphi(ngrid,nlayer) 165 REAL pu(ngrid,nlayer),pv(ngrid,nlayer) 166 REAL pt(ngrid,nlayer),pq(ngrid,nlayer,nq) 167 REAL pw(ngrid,nlayer) !Mars pvervel transmit par dyn3d 168 REAL zh(ngrid,nlayer) ! potential temperature (K) 169 LOGICAL firstcall,lastcall 170 171 REAL pday 172 REAL ptime 173 logical tracerdyn 161 INTEGER,INTENT(in) :: ngrid ! number of atmospheric columns 162 INTEGER,INTENT(in) :: nlayer ! number of atmospheric layers 163 INTEGER,INTENT(in) :: nq ! number of tracers 164 LOGICAL,INTENT(in) :: firstcall ! signals first call to physics 165 LOGICAL,INTENT(in) :: lastcall ! signals last call to physics 166 REAL,INTENT(in) :: pday ! number of elapsed sols since reference Ls=0 167 REAL,INTENT(in) :: ptime ! "universal time", given as fraction of sol (e.g.: 0.5 for noon) 168 REAL,INTENT(in) :: ptimestep ! physics timestep (s) 169 REAL,INTENT(in) :: pplev(ngrid,nlayer+1) ! inter-layer pressure (Pa) 170 REAL,INTENT(IN) :: pplay(ngrid,nlayer) ! mid-layer pressure (Pa) 171 REAL,INTENT(IN) :: pphi(ngrid,nlayer) ! geopotential at mid-layer (m2s-2) 172 REAL,INTENT(in) :: pu(ngrid,nlayer) ! zonal wind component (m/s) 173 REAL,INTENT(in) :: pv(ngrid,nlayer) ! meridional wind component (m/s) 174 REAL,INTENT(in) :: pt(ngrid,nlayer) ! temperature (K) 175 REAL,INTENT(in) :: pq(ngrid,nlayer,nq) ! tracers (.../kg_of_air) 176 REAL,INTENT(in) :: flxw(ngrid,nlayer) ! vertical mass flux (ks/s) 177 ! at lower boundary of layer 174 178 175 179 c outputs: 176 180 c -------- 177 181 c physical tendencies 178 REAL pdu(ngrid,nlayer),pdv(ngrid,nlayer) 179 REAL pdt(ngrid,nlayer),pdq(ngrid,nlayer,nq) 180 REAL pdpsrf(ngrid) ! surface pressure tendency 182 REAL,INTENT(out) :: pdu(ngrid,nlayer) ! zonal wind tendency (m/s/s) 183 REAL,INTENT(out) :: pdv(ngrid,nlayer) ! meridional wind tendency (m/s/s) 184 REAL,INTENT(out) :: pdt(ngrid,nlayer) ! temperature tendency (K/s) 185 REAL,INTENT(out) :: pdq(ngrid,nlayer,nq) ! tracer tendencies (../kg/s) 186 REAL,INTENT(out) :: pdpsrf(ngrid) ! surface pressure tendency (Pa/s) 187 LOGICAL,INTENT(out) :: tracerdyn ! signal to the dynamics to advect tracers or not 181 188 182 189 … … 273 280 REAL ztime_fin 274 281 REAL zdh(ngrid,nlayer) 282 REAL pw(ngrid,nlayer) ! vertical velocity (m/s) (>0 when downwards) 275 283 INTEGER length 276 284 PARAMETER (length=100) … … 569 577 endif 570 578 #endif 579 580 ! Compute vertical velocity (m/s) from vertical mass flux 581 ! w = F / (rho*area) and rho = r*T/P 582 ! but first linearly interpolate mass flux to mid-layers 583 do l=1,nlayer-1 584 pw(1:ngrid,l)=0.5*(flxw(1:ngrid,l)+flxw(1:ngrid,l+1)) 585 enddo 586 pw(1:ngrid,nlayer)=0.5*flxw(1:ngrid,nlayer) ! since flxw(nlayer+1)=0 587 do l=1,nlayer 588 pw(1:ngrid,l)=(pw(1:ngrid,l)*pplay(1:ngrid,l)) / & 589 (r*pt(1:ngrid,l)*area(1:ngrid)) 590 ! NB: here we use r and nor rnew since this diagnostic comes 591 ! from the dynamics 592 enddo 593 571 594 c----------------------------------------------------------------------- 572 595 c 2. Compute radiative tendencies :
Note: See TracChangeset
for help on using the changeset viewer.