Changeset 2143 for trunk/LMDZ.GENERIC/libf/phystd/thermcell_main.F90
- Timestamp:
- Jun 20, 2019, 4:11:54 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/phystd/thermcell_main.F90
r2132 r2143 49 49 50 50 USE thermcell_mod 51 USE tracer_h, ONLY: igcm_h2o_vap 52 USE print_control_mod, ONLY: lunout, prt_level 51 USE print_control_mod, ONLY: prt_level 53 52 54 53 IMPLICIT NONE … … 96 95 INTEGER lmix(ngrid) ! Layer in which plume vertical speed is maximal 97 96 INTEGER lmin(ngrid) ! First unstable layer 97 98 REAL zmix(ngrid) ! Altitude of maximal vertical speed 99 REAL zmax(ngrid) ! Maximal altitudes where plumes are active 100 REAL zmin(ngrid) ! Minimal altitudes where plumes are active 98 101 99 102 REAL zlay(ngrid,nlay) ! Layers altitudes … … 124 127 REAL zqa(ngrid,nlay,nq) ! q plume (ql=0, qv=qt) 125 128 129 REAL f_star(ngrid,nlay+1) ! Normalized mass flux 130 REAL entr_star(ngrid,nlay) ! Normalized entrainment (E* = e* dz) 131 REAL detr_star(ngrid,nlay) ! Normalized detrainment (D* = d* dz) 132 133 REAL fm(ngrid,nlay+1) ! Mass flux 134 REAL entr(ngrid,nlay) ! Entrainment (E = e dz) 135 REAL detr(ngrid,nlay) ! Detrainment (D = d dz) 136 137 REAL f(ngrid) ! Mass flux norm 138 REAL lambda ! Time relaxation coefficent 139 REAL fraca(ngrid,nlay+1) ! Updraft fraction 126 140 REAL linter(ngrid) ! Level (continuous) of maximal vertical speed 127 REAL zmix(ngrid) ! Altitude of maximal vertical speed128 REAL zmax(ngrid) ! Plume height129 141 REAL wmax(ngrid) ! Maximal vertical speed 130 142 REAL zw2(ngrid,nlay+1) ! Plume vertical speed 131 132 REAL fraca(ngrid,nlay+1) ! Updraft fraction133 134 REAL f_star(ngrid,nlay+1) ! Normalized mass flux135 REAL entr_star(ngrid,nlay) ! Normalized entrainment136 REAL detr_star(ngrid,nlay) ! Normalized detrainment137 138 REAL f(ngrid) ! Mass flux norm139 REAL fm(ngrid,nlay+1) ! Mass flux140 REAL entr(ngrid,nlay) ! Entrainment141 REAL detr(ngrid,nlay) ! Detrainment142 143 REAL lambda ! Time relaxation coefficent144 145 143 REAL zdthladj(ngrid,nlay) ! Potential temperature variations 146 144 REAL dummy(ngrid,nlay) ! Dummy argument for thermcell_dq() 147 148 CHARACTER (len=20) :: modname='thermcell_main'149 CHARACTER (len=80) :: abort_message150 145 151 146 !=============================================================================== … … 178 173 pdqadj(:,:,:) = 0.0 179 174 180 ! AB: Careful, hard-coded value from Earth tuned version of the thermal plume model!181 175 DO ig=1,ngrid 182 f0(ig) = max(f0(ig), 1.e-2) 183 ENDDO 184 185 IF (prt_level.ge.20) then 186 DO ig=1,ngrid 187 print *, 'ig,f0', ig, f0(ig) 188 ENDDO 189 ENDIF 176 ! AB: Careful: Hard-coded value from Earth version! 177 ! f0(ig) = max(f0(ig), 1.e-2) 178 ! AB: No pescribed minimal value for f0 179 f0(ig) = max(f0(ig), 0.) 180 ENDDO 190 181 191 182 !=============================================================================== … … 212 203 213 204 DO l=1,nlay 214 zlay(:,l) = pphi(:,l) /RG205 zlay(:,l) = pphi(:,l) / RG 215 206 ENDDO 216 207 … … 222 213 223 214 IF (prt_level.ge.10) THEN 224 write(lunout,*) 'WARNING: thermcell_main rhobarz(:,1)=rho(:,1)' 215 print *, 'WARNING: density in the first layer is equal to density at the first level!' 216 print *, 'rhobarz(:,1)', rhobarz(:,1) 217 print *, 'rho(:,1) ', rho(:,1) 225 218 ENDIF 226 219 … … 319 312 & zhl,zqt,zql,rhobarz,zlev,pplev,pphi,zpopsk, & 320 313 & detr_star,entr_star,f_star, & 321 & ztva,zhla,zqla,zqta,zta, 322 & zw2, zqsa,lmix,lmin)323 314 & ztva,zhla,zqla,zqta,zta,zqsa, & 315 & zw2,lmix,lmin) 316 324 317 !------------------------------------------------------------------------------- 325 318 ! Thermal plumes characteristics: zmax, zmix, wmax … … 327 320 328 321 ! AB: Careful, zw2 became its square root in thermcell_height! 329 CALL thermcell_height(ngrid,nlay,lmin,linter,lmix, zw2,&330 & zlev, lmax,zmax,zmix,wmax,f_star)322 CALL thermcell_height(ngrid,nlay,lmin,linter,lmix,lmax,zw2, & 323 & zlev,zmin,zmix,zmax,wmax,f_star) 331 324 332 325 !=============================================================================== … … 339 332 340 333 CALL thermcell_closure(ngrid,nlay,ptimestep,rho,zlev, & 341 & lmax,entr_star,zm ax,wmax,f)334 & lmax,entr_star,zmin,zmax,wmax,f) 342 335 343 336 IF (tau_thermals>1.) THEN … … 352 345 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 353 346 IF (.not. (f0(1).ge.0.) ) THEN 354 abort_message = '.not. (f0(1).ge.0.)'347 print *, 'ERROR: mass flux norm is not positive!' 355 348 print *, 'f0 =', f0(1) 356 CALL abort _physic(modname,abort_message,1)349 CALL abort 357 350 ENDIF 358 351 … … 393 386 DO l=2,nlay 394 387 DO ig=1,ngrid 395 IF (zw2(ig,l) .gt.0.) THEN388 IF (zw2(ig,l) > 0.) THEN 396 389 fraca(ig,l) = fm(ig,l) / (rhobarz(ig,l) * zw2(ig,l)) 397 390 ELSE … … 433 426 CALL thermcell_dq(ngrid,nlay,ptimestep,fm0,entr0,detr0,masse, & 434 427 & zu,pduadj,zua,lmin) 435 428 436 429 CALL thermcell_dq(ngrid,nlay,ptimestep,fm0,entr0,detr0,masse, & 437 430 & zv,pdvadj,zva,lmin) 438 431 432 ! CALL thermcell_dv2(ngrid,nlay,ptimestep,fm0,entr0,detr0,masse,fraca, & 433 ! & zmax,zmin,pu,pv,pduadj,pdvadj,zua,zva) 439 434 440 435 RETURN
Note: See TracChangeset
for help on using the changeset viewer.