Changeset 2065 for trunk/LMDZ.GENERIC/libf
- Timestamp:
- Jan 11, 2019, 6:04:09 PM (6 years ago)
- Location:
- trunk/LMDZ.GENERIC/libf/phystd
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/phystd/physiq_mod.F90
r2060 r2065 262 262 INTEGER zlcl(ngrid) 263 263 264 real f0(ngrid)! Mass flux norm264 real,save :: f0(ngrid) ! Mass flux norm 265 265 real fm0(ngrid, nlayer+1) ! Mass flux 266 266 real entr0(ngrid, nlayer) ! Entrainment -
trunk/LMDZ.GENERIC/libf/phystd/thermcell_plume.F90
r2060 r2065 113 113 REAL zltdwn ! 114 114 REAL zltup ! useless here 115 REAL zbuoybis(ngrid,klev)116 115 117 116 LOGICAL active(ngrid) ! if the plume is active at ig,l (speed and incoming mass flux > 0 or l=lmin) … … 186 185 187 186 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 188 ! On pourrait n'appeler thermcell_alim que si la plume est active187 ! AB : On pourrait n'appeler thermcell_alim que si la plume est active 189 188 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 190 189 CALL thermcell_alim(iflag_thermals_alim,ngrid,klev,ztv,d_temp, & 191 & 190 & zlev,alim_star,lalim,lmin) 192 191 193 192 !============================================================================== … … 227 226 ! AB : we decide here if the plume is still active or not. When the plume's 228 227 ! first level is reached, we set active to "true". Otherwise, it is given 229 ! by w2, f_star, alim_star and entr_star.228 ! by zw2, f_star, alim_star and entr_star. 230 229 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 231 230 DO ig=1,ngrid … … 240 239 241 240 ztemp(:) = zpspsk(:,l) * ztla(:,l-1) 241 242 242 DO ig=1,ngrid 243 243 CALL watersat(ztemp(ig), pplev(ig,l), zqsat(ig)) … … 293 293 & + 0. * zbuoy(ig,l) 294 294 295 zbuoybis(ig,l) = RG * 0.5 * ( &296 & (ztva_est(ig,l) - ztv(ig,l+1)) / ztv(ig,l+1) &297 & + (ztva_est(ig,l) - ztv(ig,l)) / ztv(ig,l) )298 299 295 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 300 296 ! AB : initial formulae … … 306 302 ! w_est(ig,l+1) = Max(0.0001,exp(-zw2fact)*(w_est(ig,l)-zdw2bis)+zdw2) 307 303 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 308 ! AB : own derivation for w_est ( 2010 formula,e=d=0)304 ! AB : own derivation for w_est (Rio 2010 formula with e=d=0) 309 305 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 310 306 zw2fact = 2. * fact_epsilon * zdz … … 326 322 IF (active(ig)) THEN 327 323 328 zw2m = w_est(ig,l+1)329 324 zdz = zlev(ig,l+1) - zlev(ig,l) 330 331 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 332 ! AB : The following test is added to avoid NaN when w_est becomes negative. 333 ! zalpha value is of no importance because w_est > 0 means it will be the 334 ! last layer reached by the plume. 335 ! Then entr will vanished and detr be set to compensate exactly the 336 ! incoming mass flux in thermcell_flux. 337 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 338 IF (w_est(ig,l+1)>0.) THEN 339 zalpha = f0(ig) * f_star(ig,l) / sqrt(w_est(ig,l+1)) / rhobarz(ig,l) 325 zalpha = f0(ig) * f_star(ig,l) / sqrt(w_est(ig,l+1)) / rhobarz(ig,l) 326 327 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 328 ! AB : The next test is added to avoid a division by zero when w_est becomes 329 ! negative. 330 ! Indeed, entr and detr computed here are of no importance because w_est 331 ! <= 0 means it will be the last layer reached by the plume and then they 332 ! will be reset in thermcell_flux. 333 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 334 IF (w_est(ig,l+1).eq.0.) THEN 335 zw2m = 1. 340 336 ELSE 341 z alpha = 0.337 zw2m = w_est(ig,l+1) 342 338 ENDIF 343 339 344 340 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 345 ! AB : The following test is added to avoid a division by zero if there is no346 ! waterin the environment.341 ! AB : The next test is added to avoid a division by zero if there is no water 342 ! in the environment. 347 343 ! In the case where there is no water in the env. but water in the plume 348 344 ! (ascending from depth) we set the effect on detrainment equal to zero … … 351 347 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 352 348 IF (po(ig,l).lt.1.e-6) THEN 353 ! print *, 'WARNING: po=0 at level', l349 ! print *, 'WARNING: po=0 in layer',l,'!' 354 350 ! print *, 'po,zqta', po(ig,l), zqta(ig,l-1) 355 351 zdqt(ig,l) = 0.0 … … 424 420 DO ig=1,ngrid 425 421 IF (activetmp(ig)) THEN 426 ztla(ig,l) =(f_star(ig,l)*ztla(ig,l-1)+& ! ztla is set to TP in plume (mixed)427 & (alim_star(ig,l)+entr_star(ig,l))*zthl(ig,l))&428 & /(f_star(ig,l+1)+detr_star(ig,l))429 zqta(ig,l) =(f_star(ig,l)*zqta(ig,l-1)+& ! zqta is set to qt in plume (mixed)430 & (alim_star(ig,l)+entr_star(ig,l))*po(ig,l))&431 & /(f_star(ig,l+1)+detr_star(ig,l))422 ztla(ig,l) = (f_star(ig,l) * ztla(ig,l-1) & ! ztla is set to TP in plume (mixed) 423 & + (alim_star(ig,l) + entr_star(ig,l)) * zthl(ig,l)) & 424 & / (f_star(ig,l+1) + detr_star(ig,l)) 425 zqta(ig,l) = (f_star(ig,l) * zqta(ig,l-1) + & ! zqta is set to qt in plume (mixed) 426 & + (alim_star(ig,l) + entr_star(ig,l)) * po(ig,l)) & 427 & / (f_star(ig,l+1) + detr_star(ig,l)) 432 428 ENDIF 433 429 ENDDO … … 444 440 ! Calcul de la vitesse verticale zw2 apres le melange 445 441 !------------------------------------------------------------------------------ 446 447 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~448 ! AB : f_star(l+1)<=0 implies activetmp=F then plume stops449 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~450 442 451 443 DO ig=1,ngrid … … 462 454 463 455 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 464 ! AB : initial formula (integrated)456 ! AB : initial formula 465 457 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 466 458 ! zw2fact = fact_epsilon * 2. * zdz / (1. + betalpha) … … 469 461 ! zw2(ig,l+1) = Max(0.0001,exp(-zw2fact)*(zw2(ig,l)-zdw2)+zdw2) 470 462 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 471 ! AB : own integrated derivation for zw2 (2010 formula)463 ! AB : own derivation for zw2 (Rio 2010 formula) 472 464 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 473 465 zw2fact = 2. * (fact_epsilon * zdz + entr_star(ig,l) / f_star(ig,l)) … … 489 481 490 482 DO ig=1,ngrid 491 alim_star_tot(ig) =0.483 alim_star_tot(ig) = 0. 492 484 ENDDO 493 485
Note: See TracChangeset
for help on using the changeset viewer.