- Timestamp:
- Jul 24, 2024, 2:54:37 PM (8 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_alp.F90
r5103 r5116 103 103 real, parameter :: coef_m=1. ! On considère un rendement pour alp_bl_fluct_m 104 104 real, parameter :: coef_tke=1. ! On considère un rendement pour alp_bl_fluct_tke 105 real:: zdp105 REAL :: zdp 106 106 real, dimension(ngrid) :: alp_int,dp_int 107 107 real, dimension(ngrid) :: fm_tot … … 143 143 do l=1,nlay-1 144 144 do ig=1,ngrid 145 if (ok_lcl(ig)) then145 if (ok_lcl(ig)) THEN 146 146 !ATTENTION,zw2 calcule en pplev 147 ! if ((pplay(ig,l) .ge. pcon(ig)) .and. (pplay(ig,l+1) .le. pcon(ig))) then147 ! if ((pplay(ig,l) .ge. pcon(ig)) .and. (pplay(ig,l+1) .le. pcon(ig))) THEN 148 148 ! klcl(ig)=l 149 149 ! interp(ig)=(pcon(ig)-pplay(ig,klcl(ig)))/(pplay(ig,klcl(ig)+1)-pplay(ig,klcl(ig))) 150 150 ! endif 151 if ((pplev(ig,l) >= pcon(ig)) .and. (pplev(ig,l+1) <= pcon(ig))) then151 if ((pplev(ig,l) >= pcon(ig)) .and. (pplev(ig,l+1) <= pcon(ig))) THEN 152 152 klcl(ig)=l 153 153 interp(ig)=(pcon(ig)-pplev(ig,klcl(ig)))/(pplev(ig,klcl(ig)+1)-pplev(ig,klcl(ig))) … … 159 159 do ig =1,ngrid 160 160 !CR:REHABILITATION ZMAX CONTINU 161 if (ok_lcl(ig)) then161 if (ok_lcl(ig)) THEN 162 162 rhobarz0(ig)=rhobarz(ig,klcl(ig))+(rhobarz(ig,klcl(ig)+1) & 163 163 -rhobarz(ig,klcl(ig)))*interp(ig) … … 214 214 215 215 do ig=1,ngrid 216 if (ok_lcl(ig)) then216 if (ok_lcl(ig)) THEN 217 217 fraca0(ig)=fraca(ig,klcl(ig))+(fraca(ig,klcl(ig)+1) & 218 218 -fraca(ig,klcl(ig)))*interp(ig) … … 258 258 depth(ig)=zmax_moy(ig)-zlcl(ig) 259 259 hmin(ig)=hmincoef*zlcl(ig) 260 if (depth(ig)>=10.) then260 if (depth(ig)>=10.) THEN 261 261 s2(ig)=(hcoef*depth(ig)+hmin(ig))**2 262 262 n2(ig)=(1.-eps1)*fraca0(ig)*airephy(ig)/s2(ig) … … 275 275 276 276 !CR: calcul de strig 277 if (iflag_strig==0) then277 if (iflag_strig==0) THEN 278 278 strig(:)=s_trig 279 else if (iflag_strig==1) then279 else if (iflag_strig==1) THEN 280 280 do ig=1,ngrid 281 281 ! zcong_moy(ig)=zlcl(ig)+zmax_moy_coef*(zcong(ig)-zlcl(ig)) … … 283 283 strig(ig)=(zcong(ig)-zlcl(ig))**2 284 284 enddo 285 else if (iflag_strig==2) then285 else if (iflag_strig==2) THEN 286 286 do ig=1,ngrid 287 if (h_trig>zlcl(ig)) then287 if (h_trig>zlcl(ig)) THEN 288 288 strig(ig)=(h_trig-zlcl(ig))**2 289 289 else … … 296 296 reuler=exp(1.) 297 297 do ig=1,ngrid 298 if ( (depth(ig)>=10.) .and. (s_max(ig)>susqr2pi*reuler) ) then298 if ( (depth(ig)>=10.) .and. (s_max(ig)>susqr2pi*reuler) ) THEN 299 299 w_max(ig)=w0(ig)*(1.+sqrt(2.*log(s_max(ig)/susqr2pi)-log(2.*log(s_max(ig)/susqr2pi)))) 300 300 ale_bl_stat(ig)=0.5*w_max(ig)**2 … … 319 319 alp_bl_fluct_tke(ig)=3.*coef_m*rhobarz0(ig)*w0(ig)*fraca0(ig)*(therm_tke_max0(ig)-env_tke_max0(ig)) & 320 320 +3.*rhobarz0(ig)*w_conv(ig)*pbl_tke_max0(ig) 321 if (iflag_clos_bl>=2) then321 if (iflag_clos_bl>=2) THEN 322 322 alp_bl_conv(ig)=1.5*coef_m*rhobarz0(ig)*fraca0(ig)*(fraca0(ig)/(1.-fraca0(ig)))*w_conv(ig)* & 323 323 (w0(ig)**2) … … 371 371 do k=1,nlay 372 372 do ig=1,ngrid 373 if (k<=lalim_conv(ig).and.alim_star(ig,k)>1.e-10) then373 if (k<=lalim_conv(ig).and.alim_star(ig,k)>1.e-10) THEN 374 374 wght_th(ig,k)=alim_star(ig,k) 375 375 endif … … 380 380 !test pour prolonger la convection 381 381 do ig=1,ngrid 382 !v1d if ((alim_star(ig,1).lt.1.e-10).and.(therm)) then383 if ((alim_star(ig,1)<1.e-10)) then382 !v1d if ((alim_star(ig,1).lt.1.e-10).and.(therm)) THEN 383 if ((alim_star(ig,1)<1.e-10)) THEN 384 384 lalim_conv(ig)=1 385 385 wght_th(ig,1)=1. … … 399 399 do l=2,nlay 400 400 do ig=1,ngrid 401 if(l<=lmax(ig)) THEN401 IF(l<=lmax(ig)) THEN 402 402 zdp=pplay(ig,l-1)-pplay(ig,l) 403 403 alp_int(ig)=alp_int(ig)+0.5*rhobarz(ig,l)*wth3(ig,l)*zdp … … 407 407 enddo 408 408 409 if (iflag_coupl>=3 .and. iflag_coupl<=5) then409 if (iflag_coupl>=3 .and. iflag_coupl<=5) THEN 410 410 do ig=1,ngrid 411 411 !valeur integree de alp_bl * 0.5: 412 if (dp_int(ig)>0.) then412 if (dp_int(ig)>0.) THEN 413 413 alp_bl(ig)=alp_int(ig)/dp_int(ig) 414 414 endif … … 424 424 425 425 426 return426 RETURN 427 427 end 428 428 END MODULE lmdz_thermcell_alp
Note: See TracChangeset
for help on using the changeset viewer.