Changeset 1026 for LMDZ4/trunk
- Timestamp:
- Oct 24, 2008, 5:09:39 PM (16 years ago)
- Location:
- LMDZ4/trunk/libf/phylmd
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/trunk/libf/phylmd/calltherm.F90
r987 r1026 8 8 & ,fm_therm,entr_therm,detr_therm,zqasc,clwcon0,lmax,ratqscth, & 9 9 & ratqsdiff,zqsatth,Ale_bl,Alp_bl,lalim_conv,wght_th, & 10 & zmax0,f0 )10 & zmax0,f0,zw2,fraca) 11 11 12 12 USE dimphy … … 39 39 REAL wght_th(klon,klev) 40 40 INTEGER lalim_conv(klon) 41 REAL zw2(klon,klev+1),fraca(klon,klev+1) 41 42 42 43 !FH Update Thermiques … … 50 51 real fmc_therm(klon,klev+1),zqasc(klon,klev) 51 52 real zqla(klon,klev) 53 real zqta(klon,klev) 52 54 real wmax_sec(klon) 53 55 real zmax_sec(klon) … … 187 189 & ,r_aspect_thermals,l_mix_thermals,w2di_thermals & 188 190 & ,tau_thermals) 189 ! CALL calcul_sec_entr(klon,klev,zdt190 ! s ,pplay,paprs,pphi,zlev,debut191 ! s ,u_seri,v_seri,t_seri,q_seri192 ! s ,zmax_sec,wmax_sec,zw_sec,lmix_sec193 ! s ,r_aspect_thermals,l_mix_thermals,w2di_thermals194 ! s ,tau_thermals,3)195 ! CALL thermcell_pluie_detr(klon,klev,zdt &196 ! & ,pplay,paprs,pphi,zlev,debut &197 ! & ,u_seri,v_seri,t_seri,q_seri &198 ! & ,d_u_the,d_v_the,d_t_the,d_q_the &199 ! & ,zfm_therm,zentr_therm,zqla,lmax &200 ! & ,zmax_sec,wmax_sec,zw_sec,lmix_sec &201 ! & ,ratqscth,ratqsdiff,zqsatth &202 ! & ,r_aspect_thermals,l_mix_thermals,w2di_thermals &203 ! & ,tau_thermals)204 191 else if (iflag_thermals.ge.13) then 205 192 CALL thermcell_main(itap,klon,klev,zdt & … … 207 194 & ,u_seri,v_seri,t_seri,q_seri & 208 195 & ,d_u_the,d_v_the,d_t_the,d_q_the & 209 & ,zfm_therm,zentr_therm,zdetr_therm,zq la,lmax &196 & ,zfm_therm,zentr_therm,zdetr_therm,zqasc,zqla,lmax & 210 197 & ,ratqscth,ratqsdiff,zqsatth & 211 198 & ,r_aspect_thermals,l_mix_thermals & 212 199 & ,tau_thermals,Ale,Alp,lalim_conv,wght_th & 213 & ,zmax0,f0 )200 & ,zmax0,f0,zw2,fraca) 214 201 endif 215 202 … … 231 218 entr_therm(:,k)=entr_therm(:,k) & 232 219 & +zentr_therm(:,k)*fact(:) 220 detr_therm(:,k)=detr_therm(:,k) & 221 & +zdetr_therm(:,k)*fact(:) 233 222 ENDDO 234 223 fm_therm(:,klev+1)=0. -
LMDZ4/trunk/libf/phylmd/thermcell.h
r987 r1026 3 3 integer w2di_thermals,isplit 4 4 integer iflag_coupl,iflag_clos,iflag_wake 5 integer iflag_thermals_ed,iflag_thermals_optflux 5 6 6 7 common/ctherm1/iflag_thermals,nsplit_thermals … … 8 9 common/ctherm3/w2di_thermals 9 10 common/ctherm4/iflag_coupl,iflag_clos,iflag_wake 11 common/ctherm5/iflag_thermals_ed,iflag_thermals_optflux 12 10 13 !$OMP THREADPRIVATE(/ctherm1/,/ctherm2/,/ctherm3/,/ctherm4/) -
LMDZ4/trunk/libf/phylmd/thermcell_closure.F90
r972 r1026 1 1 SUBROUTINE thermcell_closure(ngrid,nlay,r_aspect,ptimestep,rho, & 2 & zlev,lalim,alim_star, zmax_sec,wmax_sec,zmax,wmax,f,lev_out)2 & zlev,lalim,alim_star,alim_star_tot,zmax_sec,wmax_sec,zmax,wmax,f,lev_out) 3 3 4 4 !------------------------------------------------------------------------- … … 8 8 9 9 #include "iniprint.h" 10 #include "thermcell.h" 10 11 INTEGER ngrid,nlay 11 12 INTEGER ig,k … … 15 16 INTEGER lalim(ngrid) 16 17 REAL alim_star(ngrid,nlay) 18 REAL alim_star_tot(ngrid) 17 19 REAL rho(ngrid,nlay) 18 20 REAL zlev(ngrid,nlay) … … 48 50 stop 49 51 endif 50 if ((zmax_sec(ig).gt.1.e-10).and.( 1.eq.1)) then51 f(ig)=wmax_sec(ig) /(max(500.,zmax_sec(ig))*r_aspect &52 if ((zmax_sec(ig).gt.1.e-10).and.(iflag_thermals_ed.eq.0)) then 53 f(ig)=wmax_sec(ig)*alim_star_tot(ig)/(max(500.,zmax_sec(ig))*r_aspect & 52 54 & *alim_star2(ig)) 53 55 ! f(ig)=f(ig)+(f0(ig)-f(ig))*exp((-ptimestep/ & 54 56 ! & zmax_sec(ig))*wmax_sec(ig)) 57 print*,'closure dry',f(ig),wmax_sec(ig),alim_star_tot(ig),zmax_sec(ig) 55 58 else 56 f(ig)=wmax(ig) /zdenom59 f(ig)=wmax(ig)*alim_star_tot(ig)/zdenom 57 60 ! f(ig)=f(ig)+(f0(ig)-f(ig))*exp((-ptimestep/ & 58 61 ! & zmax(ig))*wmax(ig)) 62 print*,'closure moist',f(ig),wmax(ig),alim_star_tot(ig),zmax(ig) 59 63 endif 60 64 endif -
LMDZ4/trunk/libf/phylmd/thermcell_flux2.F90
r987 r1026 12 12 IMPLICIT NONE 13 13 #include "iniprint.h" 14 #include "thermcell.h" 14 15 15 16 INTEGER ig,l … … 45 46 REAL fomass_max,alphamax 46 47 save fomass_max,alphamax 47 !$OMP THREADPRIVATE(fomass_max,alphamax)48 48 49 49 fomass_max=0.5 … … 202 202 !Test sur fraca croissant 203 203 !------------------------------------------------------------------------- 204 if ( 1.eq.1) then204 if (iflag_thermals_optflux==0) then 205 205 ! do l=1,klev 206 206 do ig=1,ngrid … … 228 228 !test sur flux de masse croissant 229 229 !------------------------------------------------------------------------- 230 if ( 1.eq.1) then230 if (iflag_thermals_optflux==0) then 231 231 ! do l=1,klev 232 232 do ig=1,ngrid -
LMDZ4/trunk/libf/phylmd/thermcell_height.F90
r938 r1026 7 7 IMPLICIT NONE 8 8 #include "iniprint.h" 9 #include "thermcell.h" 9 10 10 11 INTEGER ig,l … … 23 24 REAL zmax0(ngrid) 24 25 REAL zmix(ngrid) 26 REAL num(ngrid) 27 REAL denom(ngrid) 25 28 26 29 REAL zlevinter(ngrid) … … 70 73 zlevinter(ig)=zlev(ig,1) 71 74 enddo 75 76 if (iflag_thermals_ed.ge.1) then 77 78 num(:)=0. 79 denom(:)=0. 80 do ig=1,ngrid 81 do l=1,nlay 82 num(ig)=num(ig)+zw2(ig,l)*zlev(ig,l)*(zlev(ig,l+1)-zlev(ig,l)) 83 denom(ig)=denom(ig)+zw2(ig,l)*(zlev(ig,l+1)-zlev(ig,l)) 84 enddo 85 enddo 86 do ig=1,ngrid 87 if (denom(ig).gt.1.e-10) then 88 zmax(ig)=2.*num(ig)/denom(ig) 89 zmax0(ig)=zmax(ig) 90 endif 91 enddo 92 93 else 94 72 95 do ig=1,ngrid 73 96 ! calcul de zlevinter … … 80 103 zmax0(ig)=zmax(ig) 81 104 enddo 105 106 107 endif 108 !endif iflag_thermals_ed 82 109 ! 83 110 ! def de zmix continu (profil parabolique des vitesses) -
LMDZ4/trunk/libf/phylmd/thermcell_init.F90
r972 r1026 7 7 IMPLICIT NONE 8 8 #include "iniprint.h" 9 #include "thermcell.h" 9 10 10 11 INTEGER l,ig … … 34 35 lalim(ig)=1 35 36 enddo 37 38 if (iflag_thermals_ed.ge.1) then 39 !si la première couche est instable, on declenche un thermique 40 do ig=1,ngrid 41 if (ztv(ig,1).gt.ztv(ig,2)) then 42 lmin(ig)=1 43 lalim(ig)=2 44 alim_star(ig,1)=1. 45 alim_star_tot(ig)=alim_star(ig,1) 46 print*,'init',alim_star(ig,1),alim_star_tot(ig) 47 else 48 lmin(ig)=1 49 lalim(ig)=1 50 alim_star(ig,1)=0. 51 alim_star_tot(ig)=0. 52 endif 53 enddo 54 55 else 56 !else iflag_thermals_ed=0 ancienne def de l alim 36 57 37 58 !on ne considere que les premieres couches instables … … 131 152 enddo 132 153 154 !on remet alim_star_tot a 1 155 do ig=1,ngrid 156 alim_star_tot(ig)=1. 157 enddo 158 159 endif 160 !endif iflag_thermals_ed 133 161 return 134 162 end -
LMDZ4/trunk/libf/phylmd/thermcell_main.F90
r987 r1026 6 6 & ,pu,pv,pt,po & 7 7 & ,pduadj,pdvadj,pdtadj,pdoadj & 8 & ,fm0,entr0,detr0,zq la,lmax &8 & ,fm0,entr0,detr0,zqta,zqla,lmax & 9 9 & ,ratqscth,ratqsdiff,zqsatth & 10 10 & ,r_aspect,l_mix,tau_thermals & 11 11 & ,Ale_bl,Alp_bl,lalim_conv,wght_th & 12 & ,zmax0, f0 )12 & ,zmax0, f0,zw2,fraca) 13 13 14 14 USE dimphy 15 USE comgeomphy , ONLY:rlond,rlatd 15 16 IMPLICIT NONE 16 17 … … 41 42 42 43 #include "dimensions.h" 43 !#include "dimphy.h"44 44 #include "YOMCST.h" 45 45 #include "YOETHF.h" … … 82 82 INTEGER lmax(klon),lmin(klon),lalim(klon) 83 83 INTEGER lmix(klon) 84 INTEGER lmix_bis(klon) 84 85 real linter(klon) 85 86 real zmix(klon) 86 real zmax(klon),zw2(klon,klev+1),ztva(klon,klev) 87 real zmax(klon),zw2(klon,klev+1),ztva(klon,klev),zw_est(klon,klev+1) 88 ! real fraca(klon,klev) 89 87 90 real zmax_sec(klon) 88 real w_est(klon,klev+1)89 91 !on garde le zmax du pas de temps precedent 90 92 real zmax0(klon) … … 118 120 real vardiff 119 121 real ratqsdiff(klon,klev) 120 integer isplit,nsplit121 parameter (nsplit=10)122 data isplit/0/123 save isplit124 !$OMP THREADPRIVATE(isplit)125 122 126 123 logical sorties … … 183 180 entr0=0. 184 181 detr0=0. 182 183 184 ! #define wrgrads_thermcell 185 #undef wrgrads_thermcell 186 #ifdef wrgrads_thermcell 187 ! Initialisation des sorties grads pour les thermiques. 188 ! Pour l'instant en 1D sur le point igout. 189 ! Utilise par thermcell_out3d.h 190 str10='therm' 191 call inigrads(1,1,rlond(igout),1.,-180.,180.,jjm, & 192 & rlatd(igout),-90.,90.,1.,llm,pplay(igout,:),1., & 193 & ptimestep,str10,'therm ') 194 #endif 195 196 197 185 198 endif 186 199 … … 409 422 !IM 140508 CALL thermcell_plume(ngrid,nlay,ptimestep,ztv,zthl,po,zl,rhobarz, & 410 423 CALL thermcell_plume(itap,ngrid,nlay,ptimestep,ztv,zthl,po,zl,rhobarz, & 411 & zlev,pplev,pphi,zpspsk,l_mix,r_aspect,alim_star, &424 & zlev,pplev,pphi,zpspsk,l_mix,r_aspect,alim_star,alim_star_tot, & 412 425 & lalim,zmax_sec,f0,detr_star,entr_star,f_star,ztva, & 413 & ztla,zqla,zqta,zha,zw2,zqsatth,lmix,linter,lev_out) 426 & ztla,zqla,zqta,zha,zw2,zw_est,zqsatth,lmix,lmix_bis,linter & 427 & ,lev_out,lunout1,igout) 414 428 if (prt_level.ge.1) print*,'apres thermcell_plume ',lev_out 415 429 … … 445 459 ! Fermeture,determination de f 446 460 !------------------------------------------------------------------------------- 461 ! 462 !avant closure: on redéfinit lalim, alim_star_tot et alim_star 463 ! do ig=1,klon 464 ! do l=2,lalim(ig) 465 ! alim_star(ig,l)=entr_star(ig,l) 466 ! entr_star(ig,l)=0. 467 ! enddo 468 ! enddo 447 469 448 470 CALL thermcell_closure(ngrid,nlay,r_aspect,ptimestep,rho, & 449 & zlev,lalim,alim_star, zmax_sec,wmax_sec,zmax,wmax,f,lev_out)471 & zlev,lalim,alim_star,alim_star_tot,zmax_sec,wmax_sec,zmax,wmax,f,lev_out) 450 472 451 473 if(prt_level.ge.1)print*,'thermcell_closure apres thermcell_closure' … … 757 779 ! print*,'15 OK convect8' 758 780 759 isplit=isplit+1760 761 762 #ifdef und763 if (prt_level.ge.1) print*,'thermcell_main sorties 1D'764 #include "thermcell_out1d.h"765 #endif766 767 768 #define troisD769 #undef troisD770 781 if (prt_level.ge.1) print*,'thermcell_main sorties 3D' 771 #ifdef troisD782 #ifdef wrgrads_thermcell 772 783 #include "thermcell_out3d.h" 773 784 #endif -
LMDZ4/trunk/libf/phylmd/thermcell_plume.F90
r972 r1026 1 1 SUBROUTINE thermcell_plume(itap,ngrid,klev,ptimestep,ztv,zthl,po,zl,rhobarz, & 2 & zlev,pplev,pphi,zpspsk,l_mix,r_aspect,alim_star, &2 & zlev,pplev,pphi,zpspsk,l_mix,r_aspect,alim_star,alim_star_tot, & 3 3 & lalim,zmax_sec,f0,detr_star,entr_star,f_star,ztva, & 4 & ztla,zqla,zqta,zha,zw2,zqsatth,lmix,linter,lev_out) 4 & ztla,zqla,zqta,zha,zw2,w_est,zqsatth,lmix,lmix_bis,linter & 5 & ,lev_out,lunout1,igout) 5 6 6 7 !-------------------------------------------------------------------------- … … 14 15 #include "FCTTRE.h" 15 16 #include "iniprint.h" 17 #include "thermcell.h" 16 18 17 19 INTEGER itap 18 20 INTEGER lunout1,igout 19 21 INTEGER ngrid,klev 20 22 REAL ptimestep … … 36 38 integer lev_out ! niveau pour les print 37 39 real zcon2(ngrid) 40 41 real alim_star_tot(ngrid) 38 42 39 43 REAL ztva(ngrid,klev) … … 67 71 REAL zqla_est(ngrid,klev) 68 72 REAL zqsatth(ngrid,klev) 73 REAL zta_est(ngrid,klev) 69 74 70 75 REAL linter(ngrid) … … 81 86 PARAMETER (DDT0=.01) 82 87 logical Zsat 88 REAL fact_gamma,fact_epsilon 89 REAL c2(ngrid,klev) 83 90 84 91 Zsat=.false. … … 86 93 RLvCp = RLVTT/RCPD 87 94 95 if (iflag_thermals_ed==0) then 96 fact_gamma=1. 97 fact_epsilon=1. 98 else if (iflag_thermals_ed==1) then 99 fact_gamma=1. 100 fact_epsilon=1. 101 else if (iflag_thermals_ed==2) then 102 fact_gamma=1. 103 fact_epsilon=2. 104 endif 105 88 106 do l=1,klev 89 107 do ig=1,ngrid … … 94 112 enddo 95 113 114 !CR: attention test couche alim 115 ! do l=2,klev 116 ! do ig=1,ngrid 117 ! alim_star(ig,l)=0. 118 ! enddo 119 ! enddo 96 120 !AM:initialisations du thermique 97 121 do k=1,klev … … 141 165 linter(ig)=1. 142 166 lmix(ig)=1 167 lmix_bis(ig)=2 143 168 wmaxa(ig)=0. 144 169 enddo … … 212 237 & /(f_star(ig,2)+alim_star(ig,2))**2+ & 213 238 & 2.*RG*(ztva(ig,2)-ztv(ig,2))/ztv(ig,2) & 239 ! & *1./3. & 214 240 & *(zlev(ig,3)-zlev(ig,2)) 215 241 endif … … 253 279 ztva_est(ig,l) = ztla(ig,l-1)*zpspsk(ig,l)+RLvCp*zqla_est(ig,l) 254 280 ztva_est(ig,l) = ztva_est(ig,l)/zpspsk(ig,l) 281 zta_est(ig,l)=ztva_est(ig,l) 255 282 ztva_est(ig,l) = ztva_est(ig,l)*(1.+RETV*(zqta(ig,l-1) & 256 283 & -zqla_est(ig,l))-zqla_est(ig,l)) … … 260 287 & /(f_star(ig,l)+alim_star(ig,l))**2+ & 261 288 & 2.*RG*(ztva_est(ig,l)-ztv(ig,l))/ztv(ig,l) & 289 ! & *1./3. & 262 290 & *(zlev(ig,l+1)-zlev(ig,l)) 263 291 if (w_est(ig,l+1).lt.0.) then … … 268 296 !======================= 269 297 298 !CR:on vire les modifs 299 if (iflag_thermals_ed==0) then 270 300 271 301 ! Modifications du calcul du detrainement. … … 523 553 if (prt_level.ge.20) print*,'coucou calcul detr 450: ig, l', ig, l 524 554 555 endif ! iflag_thermals_ed==0 556 557 !CR:nvlle def de entr_star et detr_star 558 if (iflag_thermals_ed>=1) then 559 ! if (l.lt.lalim(ig)) then 560 ! if (l.lt.2) then 561 ! entr_star(ig,l)=0. 562 ! detr_star(ig,l)=0. 563 ! else 564 ! if (0.001.gt.(RG*(ztva_est(ig,l)-ztv(ig,l))/ztv(ig,l))/(2.*w_est(ig,l+1)))) then 565 ! entr_star(ig,l)=0.001*f_star(ig,l)*(zlev(ig,l+1)-zlev(ig,l)) 566 ! else 567 ! entr_star(ig,l)= & 568 ! & f_star(ig,l)/(2.*w_est(ig,l+1)) & 569 ! & *RG*(ztva_est(ig,l)-ztv(ig,l))/ztv(ig,l)) & 570 ! & *(zlev(ig,l+1)-zlev(ig,l)) 571 572 573 entr_star(ig,l)=MAX(0.*f_star(ig,l)*(zlev(ig,l+1)-zlev(ig,l)), & 574 & f_star(ig,l)/(2.*w_est(ig,l+1)) & 575 & *RG*(ztva_est(ig,l)-ztv(ig,l))/ztv(ig,l) & 576 & *(zlev(ig,l+1)-zlev(ig,l))) & 577 & +0.0001*f_star(ig,l)*(zlev(ig,l+1)-zlev(ig,l)) 578 579 if (((ztva_est(ig,l)-ztv(ig,l)).gt.1.e-10).and.(l.le.lmix_bis(ig))) then 580 alim_star_tot(ig)=alim_star_tot(ig)+entr_star(ig,l) 581 lalim(ig)=lmix_bis(ig) 582 print*,'alim_star_tot',alim_star_tot(ig),entr_star(ig,l) 583 endif 584 585 if (((ztva_est(ig,l)-ztv(ig,l)).gt.1.e-10).and.(l.le.lmix_bis(ig))) then 586 ! c2(ig,l)=2500000.*zqla_est(ig,l)/(1004.*zta_est(ig,l)) 587 c2(ig,l)=0.001 588 detr_star(ig,l)=MAX(0.*f_star(ig,l)*(zlev(ig,l+1)-zlev(ig,l)), & 589 & c2(ig,l)*f_star(ig,l)*(zlev(ig,l+1)-zlev(ig,l)) & 590 & -f_star(ig,l)/(2.*w_est(ig,l+1)) & 591 & *RG*(ztva_est(ig,l)-ztv(ig,l))/ztv(ig,l) & 592 & *(zlev(ig,l+1)-zlev(ig,l))) & 593 & +0.0001*f_star(ig,l)*(zlev(ig,l+1)-zlev(ig,l)) 594 595 else 596 ! c2(ig,l)=2500000.*zqla_est(ig,l)/(1004.*zta_est(ig,l)) 597 c2(ig,l)=0.003 598 599 detr_star(ig,l)=MAX(0.*f_star(ig,l)*(zlev(ig,l+1)-zlev(ig,l)), & 600 & c2(ig,l)*f_star(ig,l)*(zlev(ig,l+1)-zlev(ig,l)) & 601 & -f_star(ig,l)/(2.*w_est(ig,l+1)) & 602 & *RG*(ztva_est(ig,l)-ztv(ig,l))/ztv(ig,l) & 603 & *(zlev(ig,l+1)-zlev(ig,l))) & 604 & +0.0002*f_star(ig,l)*(zlev(ig,l+1)-zlev(ig,l)) 605 endif 606 607 608 ! detr_star(ig,l)=detr_star(ig,l)*3. 609 ! if (l.lt.lalim(ig)) then 610 ! entr_star(ig,l)=0. 611 ! endif 612 ! if (l.lt.2) then 613 ! entr_star(ig,l)=0. 614 ! detr_star(ig,l)=0. 615 ! endif 616 617 618 ! endif 619 ! else if ((ztva_est(ig,l)-ztv(ig,l)).gt.1.e-10) then 620 ! entr_star(ig,l)=MAX(0.,0.8*f_star(ig,l)/(2.*w_est(ig,l+1)) & 621 ! & *RG*(ztva_est(ig,l)-ztv(ig,l))/ztv(ig,l)) & 622 ! & *(zlev(ig,l+1)-zlev(ig,l)) 623 ! detr_star(ig,l)=0.002*f_star(ig,l) & 624 ! & *(zlev(ig,l+1)-zlev(ig,l)) 625 ! else 626 ! entr_star(ig,l)=0.001*f_star(ig,l) & 627 ! & *(zlev(ig,l+1)-zlev(ig,l)) 628 ! detr_star(ig,l)=MAX(0.,-0.2*f_star(ig,l)/(2.*w_est(ig,l+1)) & 629 ! & *RG*(ztva_est(ig,l)-ztv(ig,l))/ztv(ig,l)) & 630 ! & *(zlev(ig,l+1)-zlev(ig,l)) & 631 ! & +0.002*f_star(ig,l) & 632 ! & *(zlev(ig,l+1)-zlev(ig,l)) 633 ! endif 634 635 endif ! iflag_thermals_ed==1 636 525 637 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 526 638 ! FH inutile si on conserve comme on l'a fait plus haut entr=detr … … 533 645 ! 534 646 !prise en compte du detrainement et de l entrainement dans le calcul du flux 647 535 648 f_star(ig,l+1)=f_star(ig,l)+alim_star(ig,l)+entr_star(ig,l) & 536 649 & -detr_star(ig,l) … … 597 710 zw2(ig,l+1)=zw2(ig,l)* & 598 711 & ((f_star(ig,l))**2) & 599 & /(f_star(ig,l+1)+detr_star(ig,l))**2+ & 712 ! Tests de Catherine 713 ! & /(f_star(ig,l+1)+detr_star(ig,l))**2+ & 714 & /(f_star(ig,l+1)+detr_star(ig,l)-entr_star(ig,l)*(1.-fact_epsilon))**2+ & 600 715 & 2.*RG*(ztva(ig,l)-ztv(ig,l))/ztv(ig,l) & 716 & *fact_gamma & 601 717 & *(zlev(ig,l+1)-zlev(ig,l)) 602 718 !prise en compte des forces de pression que qd flottabilité<0 719 ! zw2(ig,l+1)=zw2(ig,l)* & 720 ! & 1./(1.+2.*entr_star(ig,l)/f_star(ig,l)) + & 721 ! & (f_star(ig,l))**2 & 722 ! & /(f_star(ig,l)+entr_star(ig,l))**2+ & 723 ! & (f_star(ig,l)-2.*entr_star(ig,l))**2/(f_star(ig,l)+2.*entr_star(ig,l))**2+ & 724 ! & /(f_star(ig,l+1)+detr_star(ig,l)-entr_star(ig,l)*(1.-2.))**2+ & 725 ! & /(f_star(ig,l)**2+2.*2.*detr_star(ig,l)*f_star(ig,l)+2.*entr_star(ig,l)*f_star(ig,l))+ & 726 ! & 2.*RG*(ztva(ig,l)-ztv(ig,l))/ztv(ig,l) & 727 ! & *1./3. & 728 ! & *(zlev(ig,l+1)-zlev(ig,l)) 729 730 ! write(30,*),l+1,zw2(ig,l+1)-zw2(ig,l), & 731 ! & -2.*entr_star(ig,l)/f_star(ig,l)*zw2(ig,l), & 732 ! & 2.*RG*(ztva(ig,l)-ztv(ig,l))/ztv(ig,l)*(zlev(ig,l+1)-zlev(ig,l)) 733 734 735 ! zw2(ig,l+1)=zw2(ig,l)* & 736 ! & (2.-2.*entr_star(ig,l)/f_star(ig,l)) & 737 ! & -zw2(ig,l-1)+ & 738 ! & 2.*RG*(ztva(ig,l)-ztv(ig,l))/ztv(ig,l) & 739 ! & *1./3. & 740 ! & *(zlev(ig,l+1)-zlev(ig,l)) 741 603 742 endif 604 743 endif … … 614 753 endif 615 754 616 755 ! if ((zw2(ig,l).gt.0.).and. (zw2(ig,l+1).le.0.)) then 617 756 if (zw2(ig,l+1).lt.0.) then 618 757 linter(ig)=(l*(zw2(ig,l+1)-zw2(ig,l)) & … … 625 764 if (wa_moy(ig,l+1).gt.wmaxa(ig)) then 626 765 ! lmix est le niveau de la couche ou w (wa_moy) est maximum 766 !on rajoute le calcul de lmix_bis 767 if (zqla(ig,l).lt.1.e-10) then 768 lmix_bis(ig)=l+1 769 endif 627 770 lmix(ig)=l+1 628 771 wmaxa(ig)=wa_moy(ig,l+1) … … 631 774 enddo 632 775 776 !on remplace a* par e* ds premiere couche 777 ! if (iflag_thermals_ed.ge.1) then 778 ! do ig=1,ngrid 779 ! do l=2,klev 780 ! if (l.lt.lalim(ig)) then 781 ! alim_star(ig,l)=entr_star(ig,l) 782 ! endif 783 ! enddo 784 ! enddo 785 ! do ig=1,ngrid 786 ! lalim(ig)=lmix_bis(ig) 787 ! enddo 788 ! endif 789 if (iflag_thermals_ed.ge.1) then 790 do ig=1,ngrid 791 do l=2,lalim(ig) 792 alim_star(ig,l)=entr_star(ig,l) 793 entr_star(ig,l)=0. 794 enddo 795 enddo 796 endif 633 797 if (prt_level.ge.20) print*,'coucou calcul detr 470: ig, l', ig, l 634 #ifdef troisD635 call wrgradsfi(1,klev,zqla_est,'ql_es ','ql_es ')636 call wrgradsfi(1,klev,entr_star1,'e_st1 ','e_st1 ')637 call wrgradsfi(1,klev,entr_star2,'e_st2 ','e_st2 ')638 call wrgradsfi(1,klev,detr_stara,'d_sta ','d_sta ')639 call wrgradsfi(1,klev,detr_starb,'d_stb ','d_stb ')640 call wrgradsfi(1,klev,detr_starc,'d_stc ','d_stc ')641 call wrgradsfi(1,klev,zqla0 ,'zqla0 ','zqla0 ')642 call wrgradsfi(1,klev,detr_star0,'d_st0 ','d_st0 ')643 call wrgradsfi(1,klev,detr_star1,'d_st1 ','d_st1 ')644 call wrgradsfi(1,klev,detr_star2,'d_st2 ','d_st2 ')645 #endif646 798 647 799 ! print*,'thermcell_plume OK'
Note: See TracChangeset
for help on using the changeset viewer.