Changeset 2105 for trunk/LMDZ.GENERIC/libf/phystd/physiq_mod.F90
- Timestamp:
- Feb 18, 2019, 3:53:24 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/phystd/physiq_mod.F90
r2101 r2105 262 262 INTEGER zlcl(ngrid) 263 263 264 real,allocatable :: f0(:) ! Mass flux norm 265 save f0 ! 264 real,allocatable,save :: f0(:) ! Mass flux norm 265 real dqevap(ngrid,nlayer,nq) ! water tracer mass mixing ratio variations due to evaporation 266 real dtevap(ngrid,nlayer) ! temperature variation due to evaporation 267 real zqtherm(ngrid,nlayer,nq) ! vapor mass mixing ratio after evaporation 268 real zttherm(ngrid,nlayer) ! temperature after evaporation 266 269 real fm0(ngrid, nlayer+1) ! Mass flux 267 270 real entr0(ngrid, nlayer) ! Entrainment … … 1186 1189 1187 1190 IF (calltherm) THEN 1191 ! AB : we need to evaporate ice before calling thermcell_main 1192 IF (water) THEN 1193 CALL evap(ngrid,nlayer,nq,ptimestep,pt,pq,pdq,pdt,dqevap,dtevap,zqtherm,zttherm) 1194 ELSE 1195 zttherm(:,:) = pt(:,:) 1196 zqtherm(:,:,:) = pq(:,:,:) 1197 ENDIF 1198 1188 1199 ! AB: WARNING: if a plume stops, the parametrization never look above if somewhere the atmosphere is still unstable! 1189 1200 ! As is, there cannot be more than one plume by grid point by time step. … … 1324 1335 ! --------------------- 1325 1336 if (water) then 1326 1337 1327 1338 ! Water ice condensation in the atmosphere 1328 1339 if(watercond.and.(RLVTT.gt.1.e-8))then 1329 1330 dqmoist(1:ngrid,1:nlayer,1:nq)=0.1331 dtmoist(1:ngrid,1:nlayer)=0.1332 1340 1333 ! Moist Convective Adjustment. 1334 ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1335 call moistadj(ngrid,nlayer,nq,pt,pq,pdq,pplev,pplay,dtmoist,dqmoist,ptimestep,rneb_man) 1336 1337 pdq(1:ngrid,1:nlayer,igcm_h2o_vap) = pdq(1:ngrid,1:nlayer,igcm_h2o_vap) & 1338 + dqmoist(1:ngrid,1:nlayer,igcm_h2o_vap) 1339 pdq(1:ngrid,1:nlayer,igcm_h2o_ice) = pdq(1:ngrid,1:nlayer,igcm_h2o_ice) & 1340 + dqmoist(1:ngrid,1:nlayer,igcm_h2o_ice) 1341 pdt(1:ngrid,1:nlayer) = pdt(1:ngrid,1:nlayer)+dtmoist(1:ngrid,1:nlayer) 1342 1343 ! Test energy conservation. 1344 if(enertest)then 1341 if (.not.calltherm) then 1342 dqmoist(1:ngrid,1:nlayer,1:nq)=0. 1343 dtmoist(1:ngrid,1:nlayer)=0. 1344 1345 ! Moist Convective Adjustment. 1346 ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1347 call moistadj(ngrid,nlayer,nq,pt,pq,pdq,pplev,pplay,dtmoist,dqmoist,ptimestep,rneb_man) 1345 1348 1346 call planetwide_sumval(cpp*massarea(:,:)*dtmoist(:,:)/totarea_planet,dEtot) 1347 call planetwide_maxval(dtmoist(:,:),dtmoist_max) 1348 call planetwide_minval(dtmoist(:,:),dtmoist_min) 1349 madjdEz(:,:)=cpp*mass(:,:)*dtmoist(:,:) 1350 do ig=1,ngrid 1351 madjdE(ig) = cpp*SUM(mass(:,:)*dtmoist(:,:)) 1352 enddo 1353 1354 if (is_master) then 1355 print*,'In moistadj atmospheric energy change =',dEtot,' W m-2' 1356 print*,'In moistadj MAX atmospheric energy change =',dtmoist_max*ptimestep,'K/step' 1357 print*,'In moistadj MIN atmospheric energy change =',dtmoist_min*ptimestep,'K/step' 1358 endif 1359 1360 call planetwide_sumval(massarea(:,:)*dqmoist(:,:,igcm_h2o_vap)*ptimestep/totarea_planet+ & 1361 massarea(:,:)*dqmoist(:,:,igcm_h2o_ice)*ptimestep/totarea_planet,dWtot) 1362 if (is_master) print*,'In moistadj atmospheric water change =',dWtot,' kg m-2' 1363 1364 endif ! end of 'enertest' 1349 pdq(1:ngrid,1:nlayer,igcm_h2o_vap) = pdq(1:ngrid,1:nlayer,igcm_h2o_vap) & 1350 + dqmoist(1:ngrid,1:nlayer,igcm_h2o_vap) 1351 pdq(1:ngrid,1:nlayer,igcm_h2o_ice) = pdq(1:ngrid,1:nlayer,igcm_h2o_ice) & 1352 + dqmoist(1:ngrid,1:nlayer,igcm_h2o_ice) 1353 pdt(1:ngrid,1:nlayer) = pdt(1:ngrid,1:nlayer)+dtmoist(1:ngrid,1:nlayer) 1354 1355 ! Test energy conservation. 1356 if(enertest)then 1357 call planetwide_sumval(cpp*massarea(:,:)*dtmoist(:,:)/totarea_planet,dEtot) 1358 call planetwide_maxval(dtmoist(:,:),dtmoist_max) 1359 call planetwide_minval(dtmoist(:,:),dtmoist_min) 1360 madjdEz(:,:)=cpp*mass(:,:)*dtmoist(:,:) 1361 1362 do ig=1,ngrid 1363 madjdE(ig) = cpp*SUM(mass(:,:)*dtmoist(:,:)) 1364 enddo 1365 1366 if (is_master) then 1367 print*,'In moistadj atmospheric energy change =',dEtot,' W m-2' 1368 print*,'In moistadj MAX atmospheric energy change =',dtmoist_max*ptimestep,'K/step' 1369 print*,'In moistadj MIN atmospheric energy change =',dtmoist_min*ptimestep,'K/step' 1370 endif 1371 1372 call planetwide_sumval(massarea(:,:)*dqmoist(:,:,igcm_h2o_vap)*ptimestep/totarea_planet+ & 1373 massarea(:,:)*dqmoist(:,:,igcm_h2o_ice)*ptimestep/totarea_planet,dWtot) 1374 if (is_master) print*,'In moistadj atmospheric water change =',dWtot,' kg m-2' 1375 1376 endif ! end of 'enertest' 1377 endif 1365 1378 1366 1367 1379 ! Large scale condensation/evaporation. 1368 1380 ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Note: See TracChangeset
for help on using the changeset viewer.