Changeset 5238 for LMDZ6/trunk
- Timestamp:
- Oct 14, 2024, 5:21:07 PM (2 months ago)
- Location:
- LMDZ6/trunk/libf/phylmd
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/lmdz_lscp.F90
r5211 r5238 106 106 USE lmdz_lscp_tools, ONLY : icefrac_lscp, icefrac_lscp_turb 107 107 USE lmdz_lscp_tools, ONLY : fallice_velocity, distance_to_cloud_top 108 USE lmdz_lscp_condensation, ONLY : condensation_lognormal , condensation_ice_supersat108 USE lmdz_lscp_condensation, ONLY : condensation_lognormal_test, condensation_ice_supersat 109 109 USE lmdz_lscp_poprecip, ONLY : poprecip_precld, poprecip_postcld 110 110 … … 971 971 !--generalised lognormal condensation scheme (Bony and Emanuel 2001) 972 972 973 CALL condensation_lognormal ( &974 klon, Tbef, zq, zqs, gammasat, ratqs(:,k), &975 keepgoing, rneb(:,k), zqn, qvc)973 CALL condensation_lognormal_test( & 974 klon, klev, k, keepgoing, ratqs, gammasat, zq, zqs, & 975 zqn, qvc, rneb) 976 976 977 977 -
LMDZ6/trunk/libf/phylmd/lmdz_lscp_condensation.F90
r5210 r5238 8 8 9 9 CONTAINS 10 11 !********************************************************************************* 12 SUBROUTINE condensation_lognormal_test(klon,klev,k,keepgoing,ratqs, gammasat,zq, zqs, zqn, qvc, rneb) 13 14 15 IMPLICIT NONE 16 17 INTEGER, INTENT(IN) :: klon,klev,k 18 LOGICAL, INTENT(IN) , DIMENSION(klon) :: keepgoing ! .TRUE. if a new condensation loop should be computed 19 REAL, INTENT(IN), DIMENSION(klon,klev) :: ratqs 20 REAL, INTENT(IN), DIMENSION(klon) :: zq, zqs,gammasat 21 REAL, INTENT(INOUT), DIMENSION(klon) :: zqn, qvc 22 REAL, INTENT(INOUT), DIMENSION(klon,klev) :: rneb 23 24 REAL, DIMENSION(klon) :: zpdf_sig,zpdf_k,zpdf_delta ! lognormal parameters 25 REAL, DIMENSION(klon) :: Zpdf_a,zpdf_b,zpdf_e1,zpdf_e2 ! lognormal intermediate variables 26 INTEGER :: i 27 28 29 DO i=1,klon !todoan : check if loop in i is needed 30 31 IF (keepgoing(i)) THEN 32 33 zpdf_sig(i)=ratqs(i,k)*zq(i) 34 zpdf_k(i)=-sqrt(log(1.+(zpdf_sig(i)/zq(i))**2)) 35 zpdf_delta(i)=log(zq(i)/(gammasat(i)*zqs(i))) 36 zpdf_a(i)=zpdf_delta(i)/(zpdf_k(i)*sqrt(2.)) 37 zpdf_b(i)=zpdf_k(i)/(2.*sqrt(2.)) 38 zpdf_e1(i)=zpdf_a(i)-zpdf_b(i) 39 zpdf_e1(i)=sign(min(ABS(zpdf_e1(i)),5.),zpdf_e1(i)) 40 zpdf_e1(i)=1.-erf(zpdf_e1(i)) 41 zpdf_e2(i)=zpdf_a(i)+zpdf_b(i) 42 zpdf_e2(i)=sign(min(ABS(zpdf_e2(i)),5.),zpdf_e2(i)) 43 zpdf_e2(i)=1.-erf(zpdf_e2(i)) 44 45 IF (zpdf_e1(i).LT.1.e-10) THEN 46 rneb(i,k)=0. 47 zqn(i)=zqs(i) 48 !--AB grid-mean vapor in the cloud - we assume saturation adjustment 49 qvc(i) = 0. 50 ELSE 51 rneb(i,k)=0.5*zpdf_e1(i) 52 zqn(i)=zq(i)*zpdf_e2(i)/zpdf_e1(i) 53 !--AB grid-mean vapor in the cloud - we assume saturation adjustment 54 qvc(i) = rneb(i,k) * zqs(i) 55 ENDIF 56 57 ENDIF ! keepgoing 58 ENDDO ! loop on klon 59 60 61 END SUBROUTINE condensation_lognormal_test 62 10 63 11 64 !**********************************************************************************
Note: See TracChangeset
for help on using the changeset viewer.