Changeset 852 for LMDZ4/trunk/libf/phytherm/thermcell_plume.F90
- Timestamp:
- Oct 11, 2007, 3:43:42 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/trunk/libf/phytherm/thermcell_plume.F90
r814 r852 1 1 SUBROUTINE thermcell_plume(ngrid,klev,ztv,zthl,po,zl,rhobarz, & 2 2 & zlev,pplev,pphi,zpspsk,l_mix,r_aspect,alim_star, & 3 & l entr,zmax_sec,f0,detr_star,entr_star,f_star,ztva, &3 & lalim,zmax_sec,f0,detr_star,entr_star,f_star,ztva, & 4 4 & ztla,zqla,zqta,zha,zw2,zqsatth,lmix,linter,lev_out) 5 5 … … 29 29 REAL l_mix 30 30 REAL r_aspect 31 INTEGER l entr(ngrid)31 INTEGER lalim(ngrid) 32 32 integer lev_out ! niveau pour les print 33 33 … … 133 133 !tests sur la definition du detr 134 134 !calcul de detr_star et entr_star 135 w_est(ig,3)=zw2(ig,2)* & 136 & ((f_star(ig,2))**2) & 137 & /(f_star(ig,2)+alim_star(ig,2))**2+ & 138 & 2.*RG*(ztva(ig,1)-ztv(ig,2))/ztv(ig,2) & 139 & *(zlev(ig,3)-zlev(ig,2)) 135 136 137 138 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 139 ! FH le test miraculeux de Catherine ? Le bout du tunel ? 140 ! w_est(ig,3)=zw2(ig,2)* & 141 ! & ((f_star(ig,2))**2) & 142 ! & /(f_star(ig,2)+alim_star(ig,2))**2+ & 143 ! & 2.*RG*(ztva(ig,1)-ztv(ig,2))/ztv(ig,2) & 144 ! & *(zlev(ig,3)-zlev(ig,2)) 145 ! if (l.gt.2) then 146 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 147 140 148 if (l.gt.2) then 149 w_est(ig,3)=zw2(ig,2)* & 150 & ((f_star(ig,2))**2) & 151 & /(f_star(ig,2)+alim_star(ig,2))**2+ & 152 & 2.*RG*(ztva(ig,2)-ztv(ig,2))/ztv(ig,2) & 153 & *(zlev(ig,3)-zlev(ig,2)) 154 155 141 156 !--------------------------------------------------------------------------- 142 157 !calcul de l entrainement et du detrainement lateral … … 217 232 !calcul de entr_star 218 233 ! 219 if (detr_star(ig,l).gt.f_star(ig,l)) then220 detr_star(ig,l)=f_star(ig,l)221 !a decommenter ou pas?222 ! entr_star(ig,l)=0.223 endif224 225 234 ! Deplacement du calcul de entr_star pour eviter d'avoir aussi 226 235 ! entr_star > fstar. 236 ! Redeplacer suite a la transformation du cas detr>f 227 237 ! FH 228 entr_star(ig,l)=0.4*detr_star(ig,l) 229 ! 238 if(l.gt.lalim(ig)) then 239 entr_star(ig,l)=0.4*detr_star(ig,l) 240 else 241 242 ! FH : 243 ! Cette ligne doit permettre de garantir qu'on a toujours un flux = 1 244 ! en haut de la couche d'alimentation. 245 ! A remettre en questoin a la premiere occasion mais ca peut aider a 246 ! ecrire un code robuste. 247 ! Que ce soit avec ca ou avec l'ancienne facon de faire (e* = 0 mais 248 ! d* non nul) on a une discontinuité de e* ou d* en haut de la couche 249 ! d'alimentation, ce qui n'est pas forcement heureux. 250 entr_star(ig,l)=max(detr_star(ig,l)-alim_star(ig,l),0.) 251 detr_star(ig,l)=entr_star(ig,l) 252 endif 253 254 ! 255 if (detr_star(ig,l).gt.f_star(ig,l)) then 256 257 ! Ce test est là entre autres parce qu'on passe par des valeurs 258 ! delirantes de detr_star. 259 ! ca vaut sans doute le coup de verifier pourquoi. 260 261 detr_star(ig,l)=f_star(ig,l) 262 if (l.gt.lalim(ig)+1) then 263 entr_star(ig,l)=0. 264 alim_star(ig,l)=0. 265 ! FH ajout pour forcer a stoper le thermique juste sous le sommet 266 ! de la couche (voir calcul de finter) 267 zw2(ig,l+1)=-1.e-10 268 linter(ig)=l+1 269 else 270 entr_star(ig,l)=detr_star(ig,l) 271 endif 272 endif 273 230 274 else 231 275 detr_star(ig,l)=0. 232 276 entr_star(ig,l)=0. 233 277 endif 278 279 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 280 ! FH inutile si on conserve comme on l'a fait plus haut entr=detr 281 ! dans la couche d'alimentation 234 282 !pas d entrainement dans la couche alim 235 if ((l.lt.lentr(ig))) then 236 entr_star(ig,l)=0. 237 endif 283 ! if ((l.le.lalim(ig))) then 284 ! entr_star(ig,l)=0. 285 ! endif 286 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 238 287 ! 239 288 !prise en compte du detrainement et de l entrainement dans le calcul du flux … … 308 357 ! 309 358 !initialisations pour le calcul de la hauteur du thermique, de l'inversion et de la vitesse verticale max 359 360 if (zw2(ig,l+1)>0. .and. zw2(ig,l+1).lt.1.e-10) then 361 ! stop'On tombe sur le cas particulier de thermcell_dry' 362 print*,'On tombe sur le cas particulier de thermcell_plume' 363 zw2(ig,l+1)=0. 364 linter(ig)=l+1 365 endif 366 367 310 368 if (zw2(ig,l+1).lt.0.) then 311 369 linter(ig)=(l*(zw2(ig,l+1)-zw2(ig,l)) & 312 370 & -zw2(ig,l))/(zw2(ig,l+1)-zw2(ig,l)) 313 371 zw2(ig,l+1)=0. 314 else 372 endif 373 315 374 wa_moy(ig,l+1)=sqrt(zw2(ig,l+1)) 316 endif 375 317 376 if (wa_moy(ig,l+1).gt.wmaxa(ig)) then 318 377 ! lmix est le niveau de la couche ou w (wa_moy) est maximum
Note: See TracChangeset
for help on using the changeset viewer.