Changeset 5082 for LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_cloudth.F90
- Timestamp:
- Jul 19, 2024, 5:41:58 PM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_cloudth.F90
r4910 r5082 79 79 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 80 80 81 IF (iflag_cloudth_vert .GE.1) THEN81 IF (iflag_cloudth_vert>=1) THEN 82 82 CALL cloudth_vert(ngrid,klev,ind2, & 83 83 & ztv,po,zqta,fraca, & … … 117 117 do ind1=1,ngrid 118 118 119 if ((ztv(ind1,1) .gt.ztv(ind1,2)).and.(fraca(ind1,ind2).gt.1.e-10)) then119 if ((ztv(ind1,1)>ztv(ind1,2)).and.(fraca(ind1,ind2)>1.e-10)) then 120 120 121 121 zqenv(ind1)=(po(ind1)-fraca(ind1,ind2)*zqta(ind1,ind2))/(1.-fraca(ind1,ind2)) … … 186 186 187 187 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 188 if (ctot(ind1,ind2) .lt.1.e-10) then188 if (ctot(ind1,ind2)<1.e-10) then 189 189 ctot(ind1,ind2)=0. 190 190 qcloud(ind1)=zqsatenv(ind1,ind2) … … 227 227 qltot(ind1,ind2)=sigma1s*((exp(-1.*xenv**2)/sqrt2pi)+xenv*sqrt(2.)*cenv(ind1,ind2)) 228 228 229 if (ctot(ind1,ind2) .lt.1.e-3) then229 if (ctot(ind1,ind2)<1.e-3) then 230 230 ctot(ind1,ind2)=0. 231 231 qcloud(ind1)=zqsatenv(ind1,ind2) … … 347 347 do ind1=1,ngrid 348 348 349 if ((ztv(ind1,1) .gt.ztv(ind1,2)).and.(fraca(ind1,ind2).gt.1.e-10)) then349 if ((ztv(ind1,1)>ztv(ind1,2)).and.(fraca(ind1,ind2)>1.e-10)) then 350 350 351 351 zqenv(ind1)=(po(ind1)-fraca(ind1,ind2)*zqta(ind1,ind2))/(1.-fraca(ind1,ind2)) … … 510 510 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 511 511 512 if (cenv(ind1,ind2) .lt.1.e-10.or.cth(ind1,ind2).lt.1.e-10) then512 if (cenv(ind1,ind2)<1.e-10.or.cth(ind1,ind2)<1.e-10) then 513 513 ctot(ind1,ind2)=0. 514 514 qcloud(ind1)=zqsatenv(ind1,ind2) … … 554 554 qltot(ind1,ind2)=sigma1s*((exp(-1.*xenv**2)/sqrt2pi)+xenv*sqrt(2.)*cenv(ind1,ind2)) 555 555 556 if (ctot(ind1,ind2) .lt.1.e-3) then556 if (ctot(ind1,ind2)<1.e-3) then 557 557 ctot(ind1,ind2)=0. 558 558 qcloud(ind1)=zqsatenv(ind1,ind2) … … 651 651 INTEGER :: ind1,l, ig 652 652 653 IF (iflag_cloudth_vert .GE.1) THEN653 IF (iflag_cloudth_vert>=1) THEN 654 654 CALL cloudth_vert_v3(ngrid,klev,ind2, & 655 655 & ztv,po,zqta,fraca, & … … 694 694 do ind1=1,ngrid 695 695 696 if ((ztv(ind1,1) .gt.ztv(ind1,2)).and.(fraca(ind1,ind2).gt.1.e-10)) then696 if ((ztv(ind1,1)>ztv(ind1,2)).and.(fraca(ind1,ind2)>1.e-10)) then 697 697 698 698 zqenv(ind1)=(po(ind1)-fraca(ind1,ind2)*zqta(ind1,ind2))/(1.-fraca(ind1,ind2)) … … 759 759 qltot(ind1,ind2)=fraca(ind1,ind2)*qlth(ind1,ind2)+(1.-1.*fraca(ind1,ind2))*qlenv(ind1,ind2) 760 760 761 if (ctot(ind1,ind2) .lt.1.e-10) then761 if (ctot(ind1,ind2)<1.e-10) then 762 762 ctot(ind1,ind2)=0. 763 763 qcloud(ind1)=zqsatenv(ind1,ind2) … … 790 790 qltot(ind1,ind2)=sigma1s*((exp(-1.*xenv**2)/sqrt2pi)+xenv*sqrt2*cenv(ind1,ind2)) 791 791 792 if (ctot(ind1,ind2) .lt.1.e-3) then792 if (ctot(ind1,ind2)<1.e-3) then 793 793 ctot(ind1,ind2)=0. 794 794 qcloud(ind1)=zqsatenv(ind1,ind2) … … 926 926 do ind1=1,ngrid 927 927 928 if ((ztv(ind1,1) .gt.ztv(ind1,2)).and.(fraca(ind1,ind2).gt.1.e-10)) then !Thermal and environnement928 if ((ztv(ind1,1)>ztv(ind1,2)).and.(fraca(ind1,ind2)>1.e-10)) then !Thermal and environnement 929 929 930 930 zqenv(ind1)=(po(ind1)-fraca(ind1,ind2)*zqta(ind1,ind2))/(1.-fraca(ind1,ind2)) !qt = a*qtth + (1-a)*qtenv … … 978 978 ENDIF 979 979 sigma1s = sigma1s_fraca + sigma1s_ratqs 980 IF (iflag_ratqs .eq.11) then980 IF (iflag_ratqs==11) then 981 981 sigma1s = ratqs(ind1,ind2)*po(ind1)*aenv 982 982 ENDIF … … 1073 1073 IntJ=0.5*senv*(1-erf(xenv2))+(sigma1s/sqrt2pi)*exp_xenv2 1074 1074 IntJ_CF=0.5*(1.-1.*erf(xenv2)) 1075 if (deltasenv .lt. 1.e-10) then1075 if (deltasenv < 1.e-10) then 1076 1076 qlenv(ind1,ind2)=IntJ 1077 1077 cenv_vol(ind1,ind2)=IntJ_CF … … 1089 1089 IntJ=0.5*sth*(1-erf(xth2))+(sigma2s/sqrt2pi)*exp_xth2 1090 1090 IntJ_CF=0.5*(1.-1.*erf(xth2)) 1091 if (deltasth .lt.1.e-10) then1091 if (deltasth < 1.e-10) then 1092 1092 qlth(ind1,ind2)=IntJ 1093 1093 cth_vol(ind1,ind2)=IntJ_CF … … 1158 1158 1159 1159 ! if (ctot(ind1,ind2).lt.1.e-10) then 1160 if (cenv(ind1,ind2) .lt.1.e-10.or.cth(ind1,ind2).lt.1.e-10) then1160 if (cenv(ind1,ind2)<1.e-10.or.cth(ind1,ind2)<1.e-10) then 1161 1161 ctot(ind1,ind2)=0. 1162 1162 ctot_vol(ind1,ind2)=0. … … 1201 1201 qltot(ind1,ind2)=sigma1s*((exp(-1.*xenv**2)/sqrt2pi)+xenv*sqrt(2.)*cenv(ind1,ind2)) 1202 1202 1203 if (ctot(ind1,ind2) .lt.1.e-3) then1203 if (ctot(ind1,ind2)<1.e-3) then 1204 1204 ctot(ind1,ind2)=0. 1205 1205 qcloud(ind1)=zqsatenv(ind1,ind2) … … 1338 1338 !Both thermal and environment in the gridbox 1339 1339 !------------------------------------------------------------------------------- 1340 IF ((ztv(ind1,1) .gt.ztv(ind1,2)).and.(fraca(ind1,ind2).gt.1.e-10)) THEN1340 IF ((ztv(ind1,1)>ztv(ind1,2)).and.(fraca(ind1,ind2)>1.e-10)) THEN 1341 1341 !-------------------------------------------- 1342 1342 !calcul de qsat_env … … 1409 1409 !Incloud Condensed water qcloud 1410 1410 !-------------------------------------------- 1411 if (ctot_surf(ind1,ind2) .lt.1.e-10) then1411 if (ctot_surf(ind1,ind2) < 1.e-10) then 1412 1412 ctot_vol(ind1,ind2)=0. 1413 1413 ctot_surf(ind1,ind2)=0. … … 1470 1470 !Incloud Condensed water qcloud 1471 1471 !-------------------------------------------- 1472 if (ctot_surf(ind1,ind2) .lt.1.e-8) then1472 if (ctot_surf(ind1,ind2) < 1.e-8) then 1473 1473 ctot_vol(ind1,ind2)=0. 1474 1474 ctot_surf(ind1,ind2)=0. … … 1623 1623 1624 1624 DO ind1=1,klon 1625 IF ((temp(ind1) .LT. RTT) .AND. (temp(ind1) .GT.temp_nowater) &1625 IF ((temp(ind1) < RTT) .AND. (temp(ind1) > temp_nowater) & 1626 1626 .AND. (ind2<=klev-2) & 1627 .AND. (frac_th(ind1) .GT.min_frac_th_cld)) THEN1627 .AND. (frac_th(ind1)>min_frac_th_cld)) THEN 1628 1628 mpc_bl_points(ind1,ind2)=1 1629 1629 ELSE … … 1661 1661 1662 1662 1663 IF (frac_th(ind1) .GT.min_frac_th_cld) THEN !Thermal and environnement1663 IF (frac_th(ind1)>min_frac_th_cld) THEN !Thermal and environnement 1664 1664 1665 1665 ! unlike in the other cloudth routine, … … 1700 1700 1701 1701 sigma1s = sigma1s_fraca + sigma1s_ratqs 1702 IF (iflag_ratqs .eq.11) then1702 IF (iflag_ratqs==11) then 1703 1703 sigma1s = ratqs(ind1)*qt(ind1)*aenv 1704 1704 ENDIF … … 1732 1732 IntJ_CF=0.5*(1.-1.*erf(xenv2)) 1733 1733 1734 IF (deltasenv .LT. 1.e-10) THEN1734 IF (deltasenv < 1.e-10) THEN 1735 1735 qcenv(ind1)=IntJ 1736 1736 cenv_vol(ind1)=IntJ_CF … … 1743 1743 qcenv(ind1)=IntJ+IntI1+IntI2+IntI3 1744 1744 cenv_vol(ind1)=IntJ_CF+IntI1_CF+IntI3_CF 1745 IF (Tbefenv(ind1) .LT.temp_nowater) THEN1745 IF (Tbefenv(ind1) < temp_nowater) THEN 1746 1746 ! freeze all droplets in cirrus temperature regime 1747 1747 icefracenv(ind1)=1. … … 1756 1756 IntJ_CF=0.5*(1.-1.*erf(xth2)) 1757 1757 1758 IF (deltasth .LT.1.e-10) THEN1758 IF (deltasth < 1.e-10) THEN 1759 1759 qcth(ind1)=IntJ 1760 1760 cth_vol(ind1)=IntJ_CF … … 1767 1767 qcth(ind1)=IntJ+IntI1+IntI2+IntI3 1768 1768 cth_vol(ind1)=IntJ_CF+IntI1_CF+IntI3_CF 1769 IF (Tbefth(ind1) .LT.temp_nowater) THEN1769 IF (Tbefth(ind1) < temp_nowater) THEN 1770 1770 ! freeze all droplets in cirrus temperature regime 1771 1771 icefracth(ind1)=1. … … 1777 1777 ctot_vol(ind1)=frac_th(ind1)*cth_vol(ind1)+(1.-1.*frac_th(ind1))*cenv_vol(ind1) 1778 1778 1779 IF (cenv(ind1) .LT.min_neb_th.and.cth(ind1).LT.min_neb_th) THEN1779 IF (cenv(ind1)<min_neb_th.and.cth(ind1)<min_neb_th) THEN 1780 1780 ctot(ind1)=0. 1781 1781 ctot_vol(ind1)=0. … … 1786 1786 qcloud(ind1)=qctot(ind1)/ctot(ind1)+qslenv(ind1) 1787 1787 qincloud(ind1)=qctot(ind1)/ctot(ind1) 1788 IF (qctot(ind1) .GT.0) THEN1788 IF (qctot(ind1) > 0) THEN 1789 1789 icefrac(ind1)=(frac_th(ind1)*qcth(ind1)*icefracth(ind1)+(1.-1.*frac_th(ind1))*qcenv(ind1)*icefracenv(ind1))/qctot(ind1) 1790 1790 icefrac(ind1)=max(min(1.,icefrac(ind1)), 0.) … … 1812 1812 1813 1813 1814 IF (ctot(ind1) .LT.min_neb_th) THEN1814 IF (ctot(ind1)<min_neb_th) THEN 1815 1815 ctot(ind1)=0. 1816 1816 qcloud(ind1)=qslenv(ind1) … … 2178 2178 2179 2179 2180 IF (iflag_topthermals .GT.0) THEN ! uppermost thermals levels2180 IF (iflag_topthermals > 0) THEN ! uppermost thermals levels 2181 2181 2182 2182 Dv=0.0001*0.211*(p0/pres(ind2))*((temp(ind2)/T0)**1.94) ! water vapor diffusivity in air, SI … … 2231 2231 fp2=0. 2232 2232 fp1=0. 2233 IF (fraca(ind2p1) .GT.0.) THEN2233 IF (fraca(ind2p1) > 0.) THEN 2234 2234 fp2=-qith(ind2p2)*rho(ind2p2)*vith(ind2p2)*fraca(ind2p2)! flux defined positive upward 2235 2235 fp1=-qith(ind2p1)*rho(ind2p1)*vith(ind2p1)*fraca(ind2p1) … … 2240 2240 ! Calculation in a top-to-bottom loop 2241 2241 2242 IF (fm_therm(ind1,ind2p1) .GT.0.) THEN2242 IF (fm_therm(ind1,ind2p1) > 0.) THEN 2243 2243 qi= 1./fm_therm(ind1,ind2p1)* & 2244 2244 (deltazlev(ind2p1)*(-rim_term-dep_term-det_term-precip_term) + &
Note: See TracChangeset
for help on using the changeset viewer.