16 CNV_DQLDT, CNV_MFD, CNV_PRC3, CNV_UPDF, &
17 QI_ls, QL_ls, QI_con, QL_con, CF_LS, CF_con, &
18 FRLAND, PHYSPARAMS, ESTBLX, KHu, KHl, &
19 CONS_RUNIV, CONS_KAPPA, CONS_AIRMW, &
20 CONS_H2OMW, CONS_GRAV, CONS_ALHL, &
21 CONS_ALHF, CONS_PI, CONS_RGAS, &
22 CONS_CP, CONS_VIREPS, CONS_ALHS, &
23 CONS_TICE, CONS_RVAP, CONS_P00, do_moist_physics )
52 integer,
intent(in) :: im, jm, lm, do_moist_physics
53 real(8),
intent(in) :: dt, frland(im,jm), physparams(:)
54 real(8),
intent(in),
dimension(IM,JM,LM) :: cnv_dqldt, cnv_mfd, cnv_updf, cnv_prc3
56 real(8),
intent(in) :: estblx(:)
58 real(8),
intent(in),
dimension(IM,JM,0:LM) :: ple
59 integer,
intent(in),
dimension(IM,JM) :: khu, khl
62 real(8),
intent(in) :: cons_runiv, cons_kappa, cons_airmw
63 real(8),
intent(in) :: cons_h2omw, cons_grav, cons_alhl
64 real(8),
intent(in) :: cons_alhf, cons_pi, cons_rgas
65 real(8),
intent(in) :: cons_cp, cons_vireps, cons_alhs
66 real(8),
intent(in) :: cons_tice, cons_rvap, cons_p00
69 real(8),
intent(inout),
dimension(IM,JM,LM) :: th, q
70 real(8),
intent(inout),
dimension(IM,JM,LM) :: qi_ls, ql_ls, qi_con, ql_con, cf_con, cf_ls
75 integer :: i, j, k, l, ktop
77 real(8),
dimension (IM,JM,LM) :: ph, pih, mass, imass, t, dzet, qddf3, rh, dp, dm
78 real(8),
dimension (IM,JM,LM+1) :: zet
79 real(8),
dimension (IM,JM,0:LM) :: p, pi
80 real(8),
dimension (IM,JM,LM) :: qs, dqsdt, dqs
82 real(8),
dimension(IM,JM) :: vmip
86 real(8) :: alpha, alhx3, rhcrit
89 real(8),
parameter :: pi_0 = 4.*atan(1.)
90 real(8),
parameter :: rho_w = 1.0e3
94 real(8) :: cnv_beta,anv_beta,ls_beta,rh00,c_00,lwcrit,c_acc,c_ev_r,c_ev_s,cldvol2frc
95 real(8) :: rhsup_ice,shr_evap_fac,min_cld_water,cld_evp_eff,ls_sdqv2,ls_sdqv3,ls_sdqvt1
96 real(8) :: anv_sdqv2,anv_sdqv3,anv_sdqvt1,anv_to_ls,n_warm,n_ice,n_anvil,n_pbl
97 real(8) :: anv_icefall_c,ls_icefall_c,revap_off_p,cnvenvfc,wrhodep,t_ice_all,cnviceparam
98 real(8) :: cnvddrfc,anvddrfc,lsddrfc,minrhcrit,maxrhcrit,turnrhcrit,maxrhcritland
99 real(8) :: min_rl,min_ri,max_rl,max_ri,ri_anv
100 integer :: nsmax,disable_rad,icefrpwr,tanhrhcrit,fr_ls_wat,fr_ls_ice,fr_an_wat,fr_an_ice,pdfflag
102 real(8) :: lsenvfc, anvenvfc
103 real(8) :: qrn_cu, qsn_cu, qrn_an, qsn_an, qrn_ls, qsn_ls, qrn_cu_1d
104 real(8) :: qt_tmpi_1, qt_tmpi_2, qlt_tmp, qit_tmp
106 real(8) :: prn_above_cu_new, prn_above_an_new, prn_above_ls_new
107 real(8) :: prn_above_cu_old, prn_above_an_old, prn_above_ls_old
108 real(8) :: psn_above_cu_new, psn_above_an_new, psn_above_ls_new
109 real(8) :: psn_above_cu_old, psn_above_an_old, psn_above_ls_old
110 real(8) :: evap_dd_cu_above_new, evap_dd_an_above_new, evap_dd_ls_above_new
111 real(8) :: evap_dd_cu_above_old, evap_dd_an_above_old, evap_dd_ls_above_old
112 real(8) :: subl_dd_cu_above_new, subl_dd_an_above_new, subl_dd_ls_above_new
113 real(8) :: subl_dd_cu_above_old, subl_dd_an_above_old, subl_dd_ls_above_old
115 real(8) :: area_ls_prc1, area_upd_prc1, area_anv_prc1
116 real(8) :: tot_prec_upd, tot_prec_anv, tot_prec_ls, area_upd_prc, area_anv_prc, area_ls_prc
119 real(8) :: rhexcess, tpw, negtpw
122 integer :: ii, cloud_pertmod
124 real(8) :: ttraj, qtraj, qi_lstraj, qi_contraj, ql_lstraj, ql_contraj, cf_lstraj, cf_contraj, phtraj
125 real(8) :: tpert, qpert, qi_lspert, qi_conpert, ql_lspert, ql_conpert, cf_lspert, cf_conpert
126 real(8) :: jacobian(8,8), a(8,8)
131 real(8) :: totfilt_t, totfilt_ql, totfilt_qi
132 real(8) :: t_p_preall, ql_ls_p_preall, ql_con_p_preall, qi_ls_p_preall, qi_con_p_preall
135 real(8) :: sinkfilt_ql, sinkfilt_qi, sinkfilt_cf
136 real(8) :: t_p_presink, q_p_presink
137 real(8) :: ql_ls_p_presink, ql_con_p_presink
138 real(8) :: qi_ls_p_presink, qi_con_p_presink
139 real(8) :: cf_con_p_presink
146 cnv_beta = physparams(1)
147 anv_beta = physparams(2)
148 ls_beta = physparams(3)
151 lwcrit = physparams(6)
152 c_acc = physparams(7)
153 c_ev_r = physparams(8)
154 c_ev_s = physparams(56)
155 cldvol2frc = physparams(9)
156 rhsup_ice = physparams(10)
157 shr_evap_fac = physparams(11)
158 min_cld_water = physparams(12)
159 cld_evp_eff = physparams(13)
160 nsmax = int( physparams(14) )
161 ls_sdqv2 = physparams(15)
162 ls_sdqv3 = physparams(16)
163 ls_sdqvt1 = physparams(17)
164 anv_sdqv2 = physparams(18)
165 anv_sdqv3 = physparams(19)
166 anv_sdqvt1 = physparams(20)
167 anv_to_ls = physparams(21)
168 n_warm = physparams(22)
169 n_ice = physparams(23)
170 n_anvil = physparams(24)
171 n_pbl = physparams(25)
172 disable_rad = int( physparams(26) )
173 anv_icefall_c = physparams(28)
174 ls_icefall_c = physparams(29)
175 revap_off_p = physparams(30)
176 cnvenvfc = physparams(31)
177 wrhodep = physparams(32)
178 t_ice_all = physparams(33) + cons_tice
179 cnviceparam = physparams(34)
180 icefrpwr = int( physparams(35) + .001 )
181 cnvddrfc = physparams(36)
182 anvddrfc = physparams(37)
183 lsddrfc = physparams(38)
184 tanhrhcrit = int( physparams(41) )
185 minrhcrit = physparams(42)
186 maxrhcrit = physparams(43)
187 turnrhcrit = physparams(45)
188 maxrhcritland = physparams(46)
189 fr_ls_wat = int( physparams(47) )
190 fr_ls_ice = int( physparams(48) )
191 fr_an_wat = int( physparams(49) )
192 fr_an_ice = int( physparams(50) )
193 min_rl = physparams(51)
194 min_ri = physparams(52)
195 max_rl = physparams(53)
196 max_ri = physparams(54)
197 ri_anv = physparams(55)
198 pdfflag = int(physparams(57))
200 t_ice_max = cons_tice
203 prn_above_cu_new = 0.
204 prn_above_an_new = 0.
205 prn_above_ls_new = 0.
206 psn_above_cu_new = 0.
207 psn_above_an_new = 0.
208 psn_above_ls_new = 0.
209 evap_dd_cu_above_new = 0.
210 evap_dd_an_above_new = 0.
211 evap_dd_ls_above_new = 0.
212 subl_dd_cu_above_new = 0.
213 subl_dd_an_above_new = 0.
214 subl_dd_ls_above_new = 0.
218 ph = 0.5*(p(:,:,0:lm-1) + p(:,:,1:lm ) )
221 pi = (p /1000.)**(cons_rgas/cons_cp)
222 pih = (ph/1000.)**(cons_rgas/cons_cp)
228 call dqsat_bac(dqsdt,qs,t,ph,im,jm,lm,estblx,cons_h2omw,cons_airmw)
234 mass = ( p(:,:,1:lm) - p(:,:,0:lm-1) )*100./cons_grav
238 dzet(:,:,1:lm) = th(:,:,1:lm) * (pi(:,:,1:lm) - pi(:,:,0:lm-1)) * cons_cp/cons_grav
243 zet(:,:,k) = zet(:,:,k+1)+dzet(:,:,k)
246 WHERE ( zet(:,:,1:lm) < 3000. )
247 qddf3 = -( zet(:,:,1:lm)-3000. ) * zet(:,:,1:lm) * mass
254 vmip(i,j) = sum( qddf3(i,j,:) )
258 qddf3(:,:,k) = qddf3(:,:,k) / vmip
262 dp = ( ple(:,:,1:lm)-ple(:,:,0:lm-1) )
263 dm = dp*(1./cons_grav)
271 t_p_preall = t(i, j, k)
272 ql_ls_p_preall = ql_ls(i, j, k)
273 ql_con_p_preall = ql_con(i, j, k)
274 qi_ls_p_preall = qi_ls(i, j, k)
275 qi_con_p_preall = qi_con(i, j, k)
295 qrn_cu_1d = cnv_prc3(i,j,k)
367 alpha =
max( alpha , 1.0 - rh00 )
401 t_p_presink = t(i,j,k)
402 q_p_presink = q(i,j,k)
403 qi_ls_p_presink = qi_ls(i,j,k)
404 qi_con_p_presink = qi_con(i,j,k)
405 ql_ls_p_presink = ql_ls(i,j,k)
406 ql_con_p_presink = ql_con(i,j,k)
407 cf_con_p_presink = cf_con(i,j,k)
411 cf_tot = cf_ls(i,j,k) + cf_con(i,j,k)
412 IF ( cf_tot > 1.00 )
THEN 413 cf_ls(i,j,k) = cf_ls(i,j,k)*(1.00 / cf_tot )
414 cf_con(i,j,k) = cf_con(i,j,k)*(1.00 / cf_tot )
416 cf_tot = cf_ls(i,j,k) + cf_con(i,j,k)
523 if ( t(i,j,k) < cons_tice )
then 527 t(i,j,k) = t(i,j,k) + qsn_cu*(cons_alhs-cons_alhl)/cons_cp
535 tot_prec_upd = tot_prec_upd + ( ( qrn_cu_1d + qsn_cu ) * mass(i,j,k) )
536 area_upd_prc = area_upd_prc + ( cnv_updf(i,j,k)* ( qrn_cu_1d + qsn_cu )* mass(i,j,k) )
538 tot_prec_anv = tot_prec_anv + ( ( qrn_an + qsn_an ) * mass(i,j,k) )
539 area_anv_prc = area_anv_prc + ( cf_con(i,j,k)* ( qrn_an + qsn_an )* mass(i,j,k) )
541 tot_prec_ls = tot_prec_ls + ( ( qrn_ls + qsn_ls ) * mass(i,j,k) )
542 area_ls_prc = area_ls_prc + ( cf_ls(i,j,k)* ( qrn_ls + qsn_ls )* mass(i,j,k) )
544 if ( tot_prec_anv > 0.0 ) area_anv_prc1 =
max( area_anv_prc/tot_prec_anv, 1.e-6 )
545 if ( tot_prec_upd > 0.0 ) area_upd_prc1 =
max( area_upd_prc/tot_prec_upd, 1.e-6 )
546 if ( tot_prec_ls > 0.0 ) area_ls_prc1 =
max( area_ls_prc/tot_prec_ls, 1.e-6 )
548 area_ls_prc1 = ls_beta * area_ls_prc1
549 area_upd_prc1 = cnv_beta * area_upd_prc1
550 area_anv_prc1 = anv_beta * area_anv_prc1
553 if ( tot_prec_anv > 0.0 ) area_anv_prc =
max( area_anv_prc/tot_prec_anv, 1.e-6 )
554 if ( tot_prec_upd > 0.0 ) area_upd_prc =
max( area_upd_prc/tot_prec_upd, 1.e-6 )
555 if ( tot_prec_ls > 0.0 ) area_ls_prc =
max( area_ls_prc/tot_prec_ls, 1.e-6 )
557 area_ls_prc = ls_beta * area_ls_prc
558 area_upd_prc = cnv_beta * area_upd_prc
559 area_anv_prc = anv_beta * area_anv_prc
582 qlt_tmp = ql_ls(i,j,k) + ql_con(i,j,k)
583 qit_tmp = qi_ls(i,j,k) + qi_con(i,j,k)
585 prn_above_cu_old = prn_above_cu_new
586 psn_above_cu_old = psn_above_cu_new
587 evap_dd_cu_above_old = evap_dd_cu_above_new
588 subl_dd_cu_above_old = subl_dd_cu_above_new
615 evap_dd_cu_above_old , &
616 evap_dd_cu_above_new , &
617 subl_dd_cu_above_old , &
618 subl_dd_cu_above_new , &
635 prn_above_an_old = prn_above_an_new
636 psn_above_an_old = psn_above_an_new
637 evap_dd_an_above_old = evap_dd_an_above_new
638 subl_dd_an_above_old = subl_dd_an_above_new
666 evap_dd_an_above_old , &
667 evap_dd_an_above_new , &
668 subl_dd_an_above_old , &
669 subl_dd_an_above_new , &
686 prn_above_ls_old = prn_above_ls_new
687 psn_above_ls_old = psn_above_ls_new
688 evap_dd_ls_above_old = evap_dd_ls_above_new
689 subl_dd_ls_above_old = subl_dd_ls_above_new
717 evap_dd_ls_above_old , &
718 evap_dd_ls_above_new , &
719 subl_dd_ls_above_old , &
720 subl_dd_ls_above_new , &
738 if ( (ql_ls(i,j,k) + ql_con(i,j,k)) > 0.00 )
then 739 qt_tmpi_1 = 1./(ql_ls(i,j,k) + ql_con(i,j,k))
743 ql_ls(i,j,k) = ql_ls(i,j,k) * qlt_tmp * qt_tmpi_1
744 ql_con(i,j,k) = ql_con(i,j,k) * qlt_tmp * qt_tmpi_1
746 if ( (qi_ls(i,j,k) + qi_con(i,j,k)) > 0.00 )
then 747 qt_tmpi_2 = 1./(qi_ls(i,j,k) + qi_con(i,j,k))
751 qi_ls(i,j,k) = qi_ls(i,j,k) * qit_tmp * qt_tmpi_2
752 qi_con(i,j,k) = qi_con(i,j,k) * qit_tmp * qt_tmpi_2
808 call dqsat_bac(dqsdt,qs,t,ph,im,jm,lm,estblx,cons_h2omw,cons_airmw)
810 where ( q > rhexcess*qs )
811 dqs = (q - rhexcess*qs)/( 1.0 + rhexcess*dqsdt*cons_alhl/cons_cp )
817 t = t + (cons_alhl/cons_cp)*dqs
824 tpw = sum( q(i,j,:)*dm(i,j,:) )
828 if ( q(i,j,l) < 0.0 )
then 829 negtpw = negtpw + ( q(i,j,l)*dm( i,j,l ) )
835 if ( q(i,j,l) >= 0.0 )
then 836 q(i,j,l) = q(i,j,l)*( 1.0+negtpw/(tpw-negtpw) )
851 subroutine cloud_tidy( QV, TE, QLC, QIC, CF, QLA, QIA, AF, CONS_ALHL, CONS_ALHS, CONS_CP )
855 real(8),
intent(inout) :: te,qv,qlc,cf,qla,af,qic,qia
856 real(8),
intent(in) :: cons_alhl, cons_alhs, cons_cp
861 te = te - (cons_alhl/cons_cp)*qla - (cons_alhs/cons_cp)*qia
877 if ( qlc < 1.e-8 )
then 879 te = te - (cons_alhl/cons_cp)*qlc
883 if ( qic < 1.e-8 )
then 885 te = te - (cons_alhs/cons_cp)*qic
890 if ( qla < 1.e-8 )
then 892 te = te - (cons_alhl/cons_cp)*qla
896 if ( qia < 1.e-8 )
then 898 te = te - (cons_alhs/cons_cp)*qia
903 if ( ( qla + qia ) < 1.e-8 )
then 905 te = te - (cons_alhl/cons_cp)*qla - (cons_alhs/cons_cp)*qia
911 if ( ( qlc + qic ) < 1.e-8 )
then 913 te = te - (cons_alhl/cons_cp)*qlc - (cons_alhs/cons_cp)*qic
921 subroutine meltfreeze( DT, TE, QL, QI, T_ICE_ALL, T_ICE_MAX, ICEFRPWR, &
922 CONS_ALHL, CONS_ALHS, CONS_CP )
927 real(8),
intent(in) :: dt, t_ice_all, t_ice_max
928 integer,
intent(in) :: icefrpwr
929 real(8),
intent(in) :: cons_alhl, cons_alhs, cons_cp
932 real(8),
intent(inout) :: te,ql,qi
936 real(8),
parameter :: taufrz = 1000.
944 if ( te <= t_ice_max )
then 945 dqil = ql *(1.0 - exp( -dt * fqi / taufrz ) )
948 dqil =
max( 0., dqil )
951 te = te + (cons_alhs-cons_alhl)*dqil/cons_cp
955 if ( te > t_ice_max )
then 959 dqil =
min( 0., dqil )
962 te = te + (cons_alhs-cons_alhl)*dqil/cons_cp
967 subroutine convec_src( DT, MASS, iMASS, TE, QV, DCF, DMF, QLA, QIA, AF, QS, CONS_ALHS, &
968 CONS_ALHL, CONS_CP, T_ICE_ALL, T_ICE_MAX, ICEFRPWR )
973 real(8),
intent(IN) :: dt, t_ice_all, t_ice_max
974 integer,
intent(in) :: icefrpwr
975 real(8),
intent(in) :: mass, imass, qs
976 real(8),
intent(in) :: dmf, dcf
977 real(8),
intent(in) :: cons_alhs, cons_alhl, cons_cp
980 real(8),
intent(inout) :: te, qv
981 real(8),
intent(inout) :: qla, qia, af
984 real(8),
parameter :: minrhx = 0.001
985 real(8) :: tend, qvx, fqi
1008 qla = qla + (1.0-fqi)* tend*dt
1009 qia = qia + fqi * tend*dt
1012 te = te + (cons_alhs-cons_alhl) * fqi * tend*dt/cons_cp
1017 af =
min( af , 0.99 )
1022 if ( af < 1.0 )
then 1023 qvx = ( qv - qs * af )/(1.-af)
1029 if ( (( qvx - minrhx*qs ) < 0.0 ) .and. (af > 0.) )
then 1030 af = (qv - minrhx*qs )/( qs*(1.0-minrhx) )
1036 te = te - (cons_alhl*qla + cons_alhs*qia)/cons_cp
1045 subroutine pdf_width (PP,FRLAND,maxrhcrit,maxrhcritland,turnrhcrit,minrhcrit,pi_0,ALPHA )
1050 real(8),
intent(in) :: pp, frland
1052 real(8),
intent(in) :: maxrhcrit, maxrhcritland, turnrhcrit, minrhcrit, pi_0
1055 real(8),
intent(inout) :: alpha
1058 real(8) :: a1, tempmaxrh
1073 tempmaxrh = maxrhcrit
1074 if (frland > 0.05)
then 1075 tempmaxrh = maxrhcritland
1079 if (pp .le. turnrhcrit)
then 1085 a1 = minrhcrit + (tempmaxrh-minrhcrit)/(19.) * &
1086 ((atan( (2.*(pp- turnrhcrit)/(1020.-turnrhcrit)-1.) * &
1087 tan(20.*pi_0/21.-0.5*pi_0) ) + 0.5*pi_0) * 21./pi_0 - 1.)
1094 alpha =
min( alpha , 0.25 )
1104 subroutine ls_cloud( DT, ALPHA, PDFSHAPE, PL, TE, QV, QCl, QAl, QCi, QAi, CF, AF, &
1105 CONS_ALHL, CONS_ALHF, CONS_ALHS, CONS_CP, CONS_H2OMW, CONS_AIRMW, T_ICE_ALL, &
1106 T_ICE_MAX, ICEFRPWR, ESTBLX, cloud_pertmod, dmp )
1111 real(8),
intent(in) :: dt, alpha, pl, t_ice_all, t_ice_max
1112 integer,
intent(in) :: pdfshape, cloud_pertmod, dmp
1113 integer,
intent(in) :: icefrpwr
1114 real(8),
intent(in) :: cons_alhl, cons_alhf, cons_alhs, cons_cp, cons_h2omw, cons_airmw
1115 real(8),
intent(in) :: estblx(:)
1118 real(8),
intent(inout) :: te, qv, qcl, qci, qal, qai, cf, af
1123 real(8) :: qco, cfo, qao, qt, qmx, qmn, dq
1124 real(8) :: teo, qsx, dqsx, qs, dqs, tmparr
1125 real(8) :: qcx, qvx, cfx, qax, qc, qa, fqi, fqi_a, dqai, dqal, dqci, dqcl
1127 real(8) :: ten, qsp, cfp, qvp, qcp
1128 real(8) :: tep, qsn, cfn, qvn, qcn
1129 real(8) :: alhx, sigmaqt1, sigmaqt2
1131 real(8),
dimension(1) :: dqsx1,qsx1,teo1,pl1
1149 if ( qa > 0.0 )
then 1157 call dqsats_bac(dqsx, qsx,teo,pl,estblx,cons_h2omw, cons_airmw)
1159 if ( af < 1.0 )
then 1161 if ( (1.-af) .gt. 0.02)
then 1166 elseif (dmp == 2)
then 1175 qvx = ( qv - qsx*af )*tmparr
1177 if ( af >= 1.0 )
then 1215 sigmaqt1 = alpha*qsn
1216 sigmaqt2 = alpha*qsn
1218 if (pdfshape .eq. 2)
then 1221 sigmaqt1 = alpha*qsn
1222 sigmaqt2 = alpha*qsn
1226 if (cloud_pertmod == 0)
then 1227 call pdffrac(1,qt,sigmaqt1,sigmaqt2,qsn,cfn)
1228 elseif (cloud_pertmod == 1)
then 1229 call pdffrac(4,qt,sigmaqt1,sigmaqt2,qsn,cfn)
1243 alhx = (1.0-fqi)*cons_alhl + fqi*cons_alhs
1245 if (pdfshape .eq. 1)
then 1246 qcn = qcp + ( qcn - qcp ) / ( 1. - (cfn * (alpha-1.) - (qcn/qsn))*dqs*alhx/cons_cp)
1247 elseif (pdfshape .eq. 2)
then 1251 qcn = qcp + ( qcn - qcp ) *0.5
1255 qvn = qvp - (qcn - qcp)
1256 ten = tep + (1.0-fqi)*(cons_alhl/cons_cp)*( (qcn - qcp)*(1.-af) + (qao-qax)*af ) &
1257 + fqi* (cons_alhs/cons_cp)*( (qcn - qcp)*(1.-af) + (qao-qax)*af )
1267 if ( af < 1.0 )
then 1270 qco = qco * ( 1.-af)
1284 qao =
max( qt - qsx, 0. )
1292 dqcl = (1.0-fqi)*qcx
1296 if ((qcl+dqcl)<0.)
then 1297 dqci = dqci + (qcl+dqcl)
1300 if ((qci+dqci)<0.)
then 1301 dqcl = dqcl + (qci+dqci)
1310 if ((qal+dqal)<0.)
then 1311 dqai = dqai + (qal+dqal)
1314 if ((qai+dqai)<0.)
then 1315 dqal = dqal + (qai+dqai)
1320 if ( af < 1.e-5 )
then 1324 if ( cf < 1.e-5 )
then 1335 qv = qv - ( dqai+dqci+dqal+dqcl)
1338 te = te + (cons_alhl*( dqai+dqci+dqal+dqcl)+cons_alhf*(dqai+dqci))/ cons_cp
1342 if ( qao <= 0. )
then 1344 te = te - (cons_alhs/cons_cp)*qai - (cons_alhl/cons_cp)*qal
1352 subroutine pdffrac (flag,qtmean,sigmaqt1,sigmaqt2,qstar,clfrac)
1357 INTEGER,
INTENT(IN) :: flag
1358 real(8),
INTENT(IN) :: qtmean, sigmaqt1, sigmaqt2, qstar
1361 real(8),
INTENT(INOUT) :: clfrac
1364 REAL(8) :: qtmode, qtmin, qtmax
1365 REAL(8) :: rh, rhd, q1, q2
1370 if ((qtmean+sigmaqt1).lt.qstar)
then 1373 if (sigmaqt1.gt.0.)
then 1374 clfrac =
min((qtmean + sigmaqt1 - qstar),2.*sigmaqt1)/(2.*sigmaqt1)
1380 elseif(flag.eq.2)
then 1382 qtmode = qtmean + (sigmaqt1-sigmaqt2)/3.
1383 qtmin =
min(qtmode-sigmaqt1,0.)
1384 qtmax = qtmode + sigmaqt2
1386 if (qtmax.lt.qstar)
then 1388 elseif ( (qtmode.le.qstar).and.(qstar.lt.qtmax) )
then 1389 clfrac = (qtmax-qstar)*(qtmax-qstar) / ( (qtmax-qtmin)*(qtmax-qtmode) )
1390 elseif ( (qtmin.le.qstar).and.(qstar.lt.qtmode) )
then 1391 clfrac = 1. - ( (qstar-qtmin)*(qstar-qtmin) / ( (qtmax-qtmin)*(qtmode-qtmin) ) )
1392 elseif ( qstar.le.qtmin )
then 1396 elseif(flag.eq.3)
then 1399 if ((qtmean+sigmaqt1).lt.qstar)
then 1402 if (sigmaqt1.gt.0.)
then 1403 clfrac =
min((qtmean + sigmaqt1 - qstar),2.*sigmaqt1)/(2.*sigmaqt1)
1409 elseif(flag.eq.4)
then 1412 if ((qtmean+sigmaqt1).lt.qstar)
then 1415 if (sigmaqt1.gt.0.)
then 1416 clfrac =
min((qtmean + sigmaqt1 - qstar),2.*sigmaqt1)/(2.*sigmaqt1)
1427 subroutine pdfcondensate (flag,qtmean4,sigmaqt14,sigmaqt24,qstar4,condensate4)
1432 INTEGER,
INTENT(IN) :: flag
1433 real(8),
INTENT(IN) :: qtmean4, sigmaqt14, sigmaqt24, qstar4
1436 real(8),
INTENT(INOUT) :: condensate4
1439 real(8) :: qtmode, qtmin, qtmax, consta, constb, cloudf
1440 real(8) :: term1, term2, term3
1441 real(8) :: qtmean, sigmaqt1, sigmaqt2, qstar, condensate
1444 sigmaqt1 = sigmaqt14
1445 sigmaqt2 = sigmaqt24
1450 if (qtmean+sigmaqt1.lt.qstar)
then 1452 elseif (qstar.gt.qtmean-sigmaqt1)
then 1453 if (sigmaqt1.gt.0.d0)
then 1454 condensate = (
min(qtmean + sigmaqt1 - qstar,2.d0*sigmaqt1)**2)/ (4.d0*sigmaqt1)
1456 condensate = qtmean-qstar
1459 condensate = qtmean-qstar
1462 elseif (flag.eq.2)
then 1464 qtmode = qtmean + (sigmaqt1-sigmaqt2)/3.d0
1465 qtmin =
min(qtmode-sigmaqt1,0.d0)
1466 qtmax = qtmode + sigmaqt2
1468 if ( qtmax.lt.qstar )
then 1470 elseif ( (qtmode.le.qstar).and.(qstar.lt.qtmax) )
then 1471 constb = 2.d0 / ( (qtmax - qtmin)*(qtmax-qtmode) )
1472 cloudf = (qtmax-qstar)*(qtmax-qstar) / ( (qtmax-qtmin)*(qtmax-qtmode) )
1473 term1 = (qstar*qstar*qstar)/3.d0
1474 term2 = (qtmax*qstar*qstar)/2.d0
1475 term3 = (qtmax*qtmax*qtmax)/6.d0
1476 condensate = constb * (term1-term2+term3) - qstar*cloudf
1477 elseif ( (qtmin.le.qstar).and.(qstar.lt.qtmode) )
then 1478 consta = 2.d0 / ( (qtmax - qtmin)*(qtmode-qtmin) )
1479 cloudf = 1.d0 - ( (qstar-qtmin)*(qstar-qtmin) / ( (qtmax-qtmin)*(qtmode-qtmin) ) )
1480 term1 = (qstar*qstar*qstar)/3.d0
1481 term2 = (qtmin*qstar*qstar)/2.d0
1482 term3 = (qtmin*qtmin*qtmin)/6.d0
1483 condensate = qtmean - ( consta * (term1-term2+term3) ) - qstar*cloudf
1484 elseif ( qstar.le.qtmin )
then 1485 condensate = qtmean-qstar
1488 elseif (flag.eq.3)
then 1509 if (qtmean - qstar > -0.5e-3)
then 1510 condensate = qtmean - qstar
1517 condensate4 = condensate
1523 subroutine evap_cnv( DT, RHCR, PL, TE, QV, QL, QI, F, XF, QS, RHO_W, CLD_EVP_EFF, &
1524 CONS_H2OMW, CONS_AIRMW, CONS_ALHL, CONS_RVAP, CONS_RGAS, CONS_PI, CONS_CP)
1529 real(8),
intent(in) :: dt, rhcr, pl, xf, qs, rho_w, cld_evp_eff
1530 real(8),
intent(in) :: cons_h2omw, cons_airmw, cons_alhl, cons_rvap, cons_rgas, cons_pi, cons_cp
1533 real(8),
intent(inout) :: te, qv, ql, qi, f
1536 real(8) :: es, radius, k1, k2, teff, qcm, evap, rhx, qc, a_eff, epsilon
1538 real(8),
parameter :: k_cond = 2.4e-2
1539 real(8),
parameter :: diffu = 2.2e-5
1540 real(8),
parameter :: nn = 50.*1.0e6
1542 epsilon = cons_h2omw/cons_airmw
1546 es = 100.* pl * qs / ( (epsilon) + (1.0-(epsilon))*qs )
1548 rhx =
min( qv/qs , 1.00 )
1550 k1 = (cons_alhl**2) * rho_w / ( k_cond*cons_rvap*(te**2))
1551 k2 = cons_rvap * te * rho_w / ( diffu * (1000./pl) * es )
1554 if ( ( f > 0.) .and. ( ql > 0. ) )
then 1560 call ldradius(pl,te,qcm,nn,rho_w,radius,cons_rgas,cons_pi)
1562 if ( (rhx < rhcr ) .and.(radius > 0.0) )
then 1563 teff = (rhcr - rhx) / ((k1+k2)*radius**2)
1568 evap = a_eff*ql*dt*teff
1569 evap =
min( evap , ql )
1573 f = f * ( qc - evap ) / qc
1578 te = te - (cons_alhl/cons_cp)*evap
1582 subroutine subl_cnv( DT, RHCR, PL, TE, QV, QL, QI, F, XF, QS, RHO_W, CLD_EVP_EFF, &
1583 CONS_H2OMW, CONS_AIRMW, CONS_ALHL, CONS_RVAP, CONS_RGAS, CONS_PI, CONS_CP, CONS_ALHS)
1588 real(8),
intent(in) :: dt, rhcr, pl, xf, qs, rho_w, cld_evp_eff
1589 real(8),
intent(in) :: cons_h2omw, cons_airmw, cons_alhl, cons_rvap, cons_rgas, cons_pi, cons_cp, cons_alhs
1592 real(8),
intent(inout) :: te, qv, ql, qi, f
1595 real(8) :: es, radius, k1, k2, teff, qcm, subl, rhx, qc, a_eff, nn, epsilon
1597 real(8),
parameter :: k_cond = 2.4e-2
1598 real(8),
parameter :: diffu = 2.2e-5
1600 epsilon = cons_h2omw/cons_airmw
1606 es = 100.* pl * qs / ( (epsilon) + (1.0-(epsilon))*qs )
1608 rhx =
min( qv/qs , 1.00 )
1610 k1 = (cons_alhl**2) * rho_w / ( k_cond*cons_rvap*(te**2))
1611 k2 = cons_rvap * te * rho_w / ( diffu * (1000./pl) * es )
1614 if ( ( f > 0.) .and. ( qi > 0. ) )
then 1620 call ldradius(pl,te,qcm,nn,rho_w,radius,cons_rgas,cons_pi)
1622 if ( (rhx < rhcr ) .and.(radius > 0.0) )
then 1623 teff = ( rhcr - rhx) / ((k1+k2)*radius**2)
1628 subl = a_eff*qi*dt*teff
1629 subl =
min( subl , qi )
1633 f = f * ( qc - subl ) / qc
1638 te = te - (cons_alhs/cons_cp)*subl
1642 subroutine ldradius(PL,TE,QCL,NN,RHO_W,RADIUS,CONS_RGAS,CONS_PI)
1647 real(8),
intent(in) :: te,pl,nn,qcl,rho_w
1648 real(8),
intent(in) :: cons_rgas,cons_pi
1651 real(8),
intent(out) :: radius
1654 radius = ((qcl * (100.*pl / (cons_rgas*te )))/(nn*rho_w*(4./3.)*cons_pi))**(1./3.)
1658 subroutine autoconversion_ls( DT, QC, QP, TE, PL, F, SUNDQV2, SUNDQV3, SUNDQT1, &
1664 real(8),
intent(in) :: dt, te, pl, dzet, sundqv2, sundqv3, sundqt1, c_00, lwcrit
1667 real(8),
intent(inout) :: qc, qp, f
1670 real(8) :: acf0, acf, c00x, iqccrx, f2, f3, rate, dqp, qcm, dqfac
1684 CALL cons_sundq3(te, sundqv2, sundqv3, sundqt1, f2, f3 )
1686 c00x = c_00 * f2 * f3
1687 iqccrx = f2 * f3 / lwcrit
1689 if ( ( f > 0.) .and. ( qc > 0. ) )
then 1695 rate = c00x * ( 1.0 - exp( - ( qcm * iqccrx )**2 ) )
1704 if ( pl .GE. 775. .AND. te .LE. 275. )
then 1708 if ( pl .GE. 825. .AND. te .LE. 282. )
then 1712 if ( pl .GE. 775. .AND. pl .LT. 825. .AND. te .LE. 282. .AND. te .GT. 275.)
then 1716 if ( pl .GE. 825. .AND. te .LE. 275. )
then 1719 if ( pl .LE. 775. .OR. te .GT. 282. )
then 1724 if ( pl .GE. 950. .AND. te .GE. 285. )
then 1725 f3 =
min(0.2 * te - 56, 2.)
1727 if ( pl .GE. 925. .AND. te .GE. 290. )
then 1728 f3 =
min(0.04 * pl - 36., 2.)
1730 if ( pl .GE. 925. .AND. pl .LT. 950. .AND. te .GT. 285. .AND. te .LT. 290.)
then 1731 f3 =
max(
min(0.04*pl + 0.2 * te - 94., 2.),1.)
1733 if ( pl .GE. 950. .AND. te .GE. 290. )
then 1740 dqp = qc*( 1.0 - exp( -rate * dt ) )
1741 dqp =
max( dqp , 0.0 )
1746 if ( pl .GE. 975. .AND. te .GE. 280. )
then 1747 dqfac =
max(
min(0.2 * te - 56., 1.),0.)
1749 if ( pl .GE. 950. .AND. te .GE. 285. )
then 1750 dqfac =
max(
min(0.04 * pl - 38., 1.),0.)
1752 if ( pl .GE. 950. .AND. pl .LT. 975. .AND. te .GT. 280. .AND. te .LT. 285.)
then 1753 dqfac =
max(
min(0.04*pl + 0.2 * te - 95., 1.),0.)
1755 if ( ( pl >= 975. ) .AND. (te >= 285. ) )
then 1759 dqp =
max(dqp, dqfac*qc)
1765 if ( ((qc + dqp) > 0.) )
then 1766 f = qc * f / (qc + dqp )
1778 real(8),
intent(in) :: dt, te, pl, dzet, sundqv2, sundqv3, sundqt1, c_00, lwcrit
1781 real(8),
intent(inout) :: qc, qp, f
1784 real(8) :: acf0, acf, c00x, iqccrx, f2, f3, rate, dqp, qcm, dqfac
1798 CALL cons_sundq3(te, sundqv2, sundqv3, sundqt1, f2, f3 )
1800 c00x = c_00 * f2 * f3
1801 iqccrx = f2 * f3 / lwcrit
1803 if ( ( f > 0.) .and. ( qc > 0. ) )
then 1809 rate = c00x * ( 1.0 - exp( - ( qcm * iqccrx )**2 ) )
1818 if ( pl .GE. 775. .AND. te .LE. 275. )
then 1822 if ( pl .GE. 825. .AND. te .LE. 282. )
then 1826 if ( pl .GE. 775. .AND. pl .LT. 825. .AND. te .LE. 282. .AND. te .GT. 275.)
then 1830 if ( pl .GE. 825. .AND. te .LE. 275. )
then 1833 if ( pl .LE. 775. .OR. te .GT. 282. )
then 1838 if ( pl .GE. 950. .AND. te .GE. 285. )
then 1839 f3 =
min(0.2 * te - 56, 2.)
1841 if ( pl .GE. 925. .AND. te .GE. 290. )
then 1842 f3 =
min(0.04 * pl - 36., 2.)
1844 if ( pl .GE. 925. .AND. pl .LT. 950. .AND. te .GT. 285. .AND. te .LT. 290.)
then 1845 f3 =
max(
min(0.04*pl + 0.2 * te - 94., 2.),1.)
1847 if ( pl .GE. 950. .AND. te .GE. 290. )
then 1854 dqp = qc*( 1.0 - exp( -rate * dt ) )
1855 dqp =
max( dqp , 0.0 )
1860 if ( pl .GE. 975. .AND. te .GE. 280. )
then 1861 dqfac =
max(
min(0.2 * te - 56., 1.),0.)
1863 if ( pl .GE. 950. .AND. te .GE. 285. )
then 1864 dqfac =
max(
min(0.04 * pl - 38., 1.),0.)
1866 if ( pl .GE. 950. .AND. pl .LT. 975. .AND. te .GT. 280. .AND. te .LT. 285.)
then 1867 dqfac =
max(
min(0.04*pl + 0.2 * te - 95., 1.),0.)
1869 if ( ( pl >= 975. ) .AND. (te >= 285. ) )
then 1873 dqp =
max(dqp, dqfac*qc)
1885 real(8),
intent(in) :: temp, t_ice_all, t_ice_max
1886 integer,
intent(in) :: icefrpwr
1889 real(8),
intent(out) :: icefrct
1893 if ( temp <= t_ice_all )
then 1895 else if ( (temp > t_ice_all) .AND. (temp <= t_ice_max) )
then 1896 icefrct = 1.00 - ( temp - t_ice_all ) / ( t_ice_max - t_ice_all )
1899 icefrct =
min(icefrct,1.00)
1900 icefrct =
max(icefrct,0.00)
1902 icefrct = icefrct**icefrpwr
1908 SUBROUTINE cons_sundq3(TEMP,RATE2,RATE3,TE1, F2, F3)
1913 real(8),
intent(in) :: rate2, rate3, te1, temp
1916 real(8),
intent(out) :: f2, f3
1919 real(8),
parameter :: te0 = 273.
1920 real(8),
parameter :: te2 = 200.
1924 jump1= (rate2-1.0) / ( ( te0-te1 )**0.333 )
1927 IF ( temp .GE. te0 )
THEN 1931 IF ( ( temp .GE. te1 ) .AND. ( temp .LT. te0 ) )
THEN 1932 if (abs(te0 - temp) .gt. 0.0)
then 1933 f2 = 1.0 + jump1 * (( te0 - temp )**0.3333)
1939 IF ( temp .LT. te1 )
THEN 1940 f2 = rate2 + (rate3-rate2)*(te1-temp)/(te1-te2)
1950 subroutine cons_microphys(TEMP,PR,Q_SAT,AA,BB,CONS_H2OMW,CONS_AIRMW,CONS_RVAP,ALHX3)
1955 real(8),
intent(in) :: temp, q_sat, pr, alhx3
1956 real(8),
intent(in) :: cons_h2omw, cons_airmw, cons_rvap
1959 real(8),
intent(out) :: aa, bb
1962 real(8),
parameter :: k_cond = 2.4e-2
1963 real(8),
parameter :: diffu = 2.2e-5
1964 real(8) :: e_sat, epsi
1966 epsi = cons_h2omw/cons_airmw
1968 e_sat = 100.* pr * q_sat /( (epsi) + (1.0-(epsi))*q_sat )
1970 aa = ( alhx3**2 ) / ( k_cond*cons_rvap*(temp**2) )
1971 bb = cons_rvap*temp / ( diffu*(1000./pr)*e_sat )
1977 subroutine cons_alhx(T,ALHX3,T_ICE_MAX,T_ICE_ALL,CONS_ALHS,CONS_ALHL)
1982 real(8),
intent(in) :: t, t_ice_max, t_ice_all
1983 real(8),
intent(in) :: cons_alhs, cons_alhl
1986 real(8),
intent(out) :: alhx3
1988 if ( t < t_ice_all )
then 1992 if ( t > t_ice_max )
then 1996 if ( (t <= t_ice_max) .and. (t >= t_ice_all) )
then 1997 alhx3 = cons_alhs + (cons_alhl - cons_alhs)*( t - t_ice_all ) /( t_ice_max - t_ice_all )
2002 subroutine marshpalm(RAIN,PR,DIAM3,NTOTAL,W,VE)
2007 real(8),
intent(in ) :: rain, pr
2010 real(8),
intent(out) :: diam3, ntotal, w, ve
2014 real(8),
parameter :: n0 = 0.08
2015 real(8) :: rain_day,slopr,diam1
2017 real(8) :: rx(8) , d3x(8)
2044 rain_day = rain * 3600. *24.
2046 IF ( rain_day <= 0.00 )
THEN 2054 IF ( (rain_day <= rx(iqd+1)) .AND. (rain_day > rx(iqd) ) )
THEN 2055 slopr =( d3x(iqd+1)-d3x(iqd) ) / ( rx(iqd+1)-rx(iqd) )
2056 diam3 = d3x(iqd) + (rain_day-rx(iqd))*slopr
2060 IF ( rain_day >= rx(8) )
THEN 2064 ntotal = 0.019*diam3
2066 diam3 = 0.664 * diam3
2068 w = (2483.8 * diam3 + 80.)*sqrt(1000./pr)
2070 ve =
max( 0.99*w/100. , 1.000 )
2077 ntotal = ntotal*1.0e6
2081 subroutine ice_settlefall_cnv( WXR, QI, PL, TE, F, CONS_RGAS, KHu, KHl, k, DT, DZ, QP, ANV_ICEFALL_C )
2086 real(8),
intent(in) :: wxr, pl, te, dz, dt, anv_icefall_c
2087 real(8),
intent(in) :: cons_rgas
2088 integer,
intent(in) :: khu, khl, k
2090 real(8),
intent(inout) :: qi, f, qp
2093 real(8) :: rho, xim, lxim, qixp, vf
2096 rho = 1000.*100.*pl/(cons_rgas*te)
2098 if ( ( f > 0.) .and. ( qi > 0. ) )
then 2110 vf = 128.6 + 53.2*lxim + 5.5*lxim**2
2116 vf = vf * ( 100./
max(pl,10.) )**wxr
2121 if (khu .gt. 0 .and. khl .gt. 0)
then 2122 if ( (k-1 .ge. khu) .and. (k-1 .le. khl) )
then 2127 vf = anv_icefall_c * vf
2131 qixp = qi * ( vf * dt / dz )
2132 qixp =
min( qixp , qi )
2134 qixp =
max( qixp, 0.0 )
2144 subroutine ice_settlefall_ls( WXR, QI, PL, TE, F, CONS_RGAS, KHu, KHl, k, DT, DZ, QP, LS_ICEFALL_C )
2149 real(8),
intent(in) :: wxr, pl, te, dz, dt, ls_icefall_c
2150 real(8),
intent(in) :: cons_rgas
2151 integer,
intent(in) :: khu, khl, k
2153 real(8),
intent(inout) :: qi, f, qp
2156 real(8) :: rho, xim, lxim, qixp, vf
2158 rho = 1000.*100.*pl/(cons_rgas*te)
2160 if ( ( f > 0.) .and. ( qi > 0. ) )
then 2172 if (abs(xim) .gt. 0.0)
then 2173 vf = 109.0*(xim**0.16)
2182 vf = vf * ( 100./
max(pl,10.) )**wxr
2187 if (khu .gt. 0 .and. khl .gt. 0)
then 2188 if ( (k-1 .ge. khu) .and. (k-1 .le. khl) )
then 2193 vf = ls_icefall_c * vf
2197 qixp = qi * ( vf * dt / dz )
2198 qixp =
min( qixp , qi )
2200 qixp =
max( qixp, 0.0 )
2205 if ( ((qi + qixp) > 0.) )
then 2206 f = qi * f / (qi + qixp )
2213 subroutine precipandevap(K, KTOP, LM, DT, FRLAND, RHCR3, QPl, QPi, QCl, QCi, TE, QV, mass, imass, &
2214 PL, dZE, QDDF3, AA, BB, AREA, PFl_above_in, PFl_above_out, PFi_above_in, PFi_above_out, &
2215 EVAP_DD_above_in, EVAP_DD_above_out, SUBL_DD_above_in, SUBL_DD_above_out, &
2217 CONS_ALHF, CONS_ALHS, CONS_ALHL, CONS_CP, CONS_TICE,CONS_H2OMW,CONS_AIRMW, REVAP_OFF_P, &
2218 C_ACC, C_EV_R, C_EV_S, RHO_W, ESTBLX )
2223 integer,
intent(in) :: k, lm, ktop
2224 real(8),
intent(in) :: dt, mass, imass, pl, aa, bb, rhcr3, dze, qddf3, area, frland, envfc, ddrfc
2225 real(8),
intent(in) :: cons_alhf, cons_alhs, cons_alhl, cons_cp, cons_tice, cons_h2omw, cons_airmw
2226 real(8),
intent(in) :: revap_off_p
2227 real(8),
intent(in) :: c_acc, c_ev_r, c_ev_s, rho_w
2228 real(8),
intent(in) :: estblx(:)
2231 real(8),
intent(inout) :: qv, qpl, qpi, qcl, qci, te
2232 real(8),
intent(inout) :: pfl_above_in, pfl_above_out, pfi_above_in, pfi_above_out
2233 real(8),
intent(inout) :: evap_dd_above_in, evap_dd_above_out, subl_dd_above_in, subl_dd_above_out
2236 integer :: ns, nsmx, itr,l
2238 real(8) :: pfi, pfl, qs, dqs, envfrac, tko, qko, qstko, dqstko, rh_box, t_ed, qplko, qpiko
2239 real(8) :: ifactor, rainrat0, snowrat0, fallrn, fallsn, vesn, vern, nrain, nsnow, efactor
2240 real(8) :: tinlayerrn, diamrn, droprad, tinlayersn, diamsn, flakrad
2241 real(8) :: evap, subl, accr, mltfrz, evapx, sublx, evap_dd,subl_dd,ddfract, landseaf
2242 real(8) :: tau_frz, tau_mlt
2244 real(8),
parameter :: trmv_l = 1.0
2245 logical,
parameter :: taneff = .false.
2248 real(8),
parameter :: b_sub = 1.00
2252 IF ( area > 0. )
THEN 2253 ifactor = 1./ ( area )
2258 ifactor =
max( ifactor, 1.)
2268 call dqsats_bac(dqs,qs,te,pl,estblx,cons_h2omw,cons_airmw)
2282 qpl = qpl + pfl_above_in * imass
2285 qpi = qpi + pfi_above_in * imass
2288 accr = b_sub * c_acc * ( qpl*mass ) *qcl
2290 accr =
min( accr , qcl )
2296 accr = b_sub * c_acc * ( qpi*mass ) *qcl
2298 accr =
min( accr , qcl )
2304 te = te + cons_alhf*accr/cons_cp
2306 rainrat0 = ifactor*qpl*mass/dt
2307 snowrat0 = ifactor*qpi*mass/dt
2309 call marshpalm(rainrat0,pl,diamrn,nrain,fallrn,vern)
2310 call marshpalm(snowrat0,pl,diamsn,nsnow,fallsn,vesn)
2312 tinlayerrn = dze / ( fallrn+0.01 )
2313 tinlayersn = dze / ( fallsn+0.01 )
2319 IF ( (te > cons_tice ) .and.(te <= cons_tice+5. ) )
THEN 2320 mltfrz = tinlayersn * qpi *( te - cons_tice ) / tau_frz
2321 mltfrz =
min( qpi , mltfrz )
2322 te = te - cons_alhf*mltfrz/cons_cp
2328 IF ( te > cons_tice+5. )
THEN 2330 te = te - cons_alhf*mltfrz/cons_cp
2336 if ( k >= lm-1 )
THEN 2337 IF ( te > cons_tice+0. )
THEN 2339 te = te - cons_alhf*mltfrz/cons_cp
2347 IF ( te <= cons_tice )
THEN 2348 te = te + cons_alhf*qpl/cons_cp
2367 qstko = qs + dqstko * ( tko - te )
2368 qstko =
max( qstko , 1.0e-7 )
2375 IF ( rh_box < rhcr3 )
THEN 2376 efactor = rho_w * ( aa + bb ) / (rhcr3 - rh_box )
2381 if ( frland < 0.1 )
then 2390 if ( (rh_box < rhcr3) .AND. (diamrn > 0.00) .AND. (pl > 100.) .AND. (pl < revap_off_p) )
then 2392 t_ed = efactor * droprad**2
2393 t_ed = t_ed * ( 1.0 + dqstko*cons_alhl/cons_cp )
2394 evap = qpl*(1.0 - exp( -c_ev_r * vern * landseaf * envfrac * tinlayerrn / t_ed ) )
2400 if ( (rh_box < rhcr3) .AND. (diamsn > 0.00) .AND. (pl > 100.) .AND. (pl < revap_off_p) )
then 2402 t_ed = efactor * flakrad**2
2403 t_ed = t_ed * ( 1.0 + dqstko*cons_alhs/cons_cp )
2404 subl = qpi*(1.0 - exp( -c_ev_s * vesn * landseaf * envfrac * tinlayersn / t_ed ) )
2417 qko = qv + evap + subl
2418 tko = te - evap * cons_alhl / cons_cp - subl * cons_alhs / cons_cp
2426 evap_dd = evap_dd_above_in + ddfract*evap*mass
2427 evap = evap - ddfract*evap
2428 subl_dd = subl_dd_above_in + ddfract*subl*mass
2429 subl = subl - ddfract*subl
2431 qv = qv + evap + subl
2432 te = te - evap * cons_alhl / cons_cp - subl * cons_alhs / cons_cp
2439 evap = qddf3*evap_dd/mass
2440 subl = qddf3*subl_dd/mass
2441 qv = qv + evap + subl
2442 te = te - evap * cons_alhl / cons_cp - subl * cons_alhs / cons_cp
2450 evap_dd_above_out = evap_dd
2451 subl_dd_above_out = subl_dd
2456 subroutine dqsat_bac(DQSi,QSSi,TEMP,PLO,im,jm,lm,ESTBLX,CONS_H2OMW,CONS_AIRMW)
2465 real(8),
dimension(im,jm,lm) :: temp, plo
2466 real(8) :: estblx(:)
2467 real(8) :: cons_h2omw, cons_airmw
2470 real(8),
dimension(im,jm,lm) :: dqsi, qssi
2473 real(8),
parameter :: max_mixing_ratio = 1.0
2478 real(8) :: tl, tt, ti, dqsat, qsat, dqq, qq, pl, pp, dd
2481 integer,
parameter :: degsubs = 100
2482 real(8),
parameter :: tmintbl = 150.0, tmaxtbl = 333.0
2483 integer,
parameter :: tablesize = nint(tmaxtbl-tmintbl)*degsubs + 1
2485 esfac = cons_h2omw/cons_airmw
2496 if (tl<=tmintbl)
then 2498 elseif(tl>=tmaxtbl-.001)
then 2504 tt = (ti - tmintbl)*degsubs+1
2507 dqq = estblx(it+1) - estblx(it)
2508 qq = (tt-it)*dqq + estblx(it)
2511 qsat = max_mixing_ratio
2514 dd = 1.0/(pp - (1.0-esfac)*qq)
2516 dqsat = (esfac*degsubs)*dqq*pp*(dd*dd)
2528 subroutine dqsats_bac(DQSi,QSSi,TEMP,PLO,ESTBLX,CONS_H2OMW,CONS_AIRMW)
2536 real(8) :: temp, plo
2537 real(8) :: estblx(:)
2538 real(8) :: cons_h2omw,cons_airmw
2541 real(8) :: dqsi, qssi
2544 real(8),
parameter :: max_mixing_ratio = 1.0
2547 real(8) :: tl, tt, ti, dqsat, qsat, dqq, qq, pl, pp, dd
2550 integer,
parameter :: degsubs = 100
2551 real(8),
parameter :: tmintbl = 150.0, tmaxtbl = 333.0
2552 integer,
parameter :: tablesize = nint(tmaxtbl-tmintbl)*degsubs + 1
2554 esfac = cons_h2omw/cons_airmw
2561 if (tl<=tmintbl)
then 2563 elseif(tl>=tmaxtbl-.001)
then 2569 tt = (ti - tmintbl)*degsubs+1
2572 dqq = estblx(it+1) - estblx(it)
2573 qq = (tt-it)*dqq + estblx(it)
2576 qsat = max_mixing_ratio
2579 dd = 1.0/(pp - (1.0-esfac)*qq)
2581 dqsat = (esfac*degsubs)*dqq*pp*(dd*dd)
subroutine, public autoconversion_cnv(DT, QC, QP, TE, PL, F, SUNDQV2, SUNDQV3, SUNDQT1, C_00, LWCRIT, DZET)
subroutine, public ldradius(PL, TE, QCL, NN, RHO_W, RADIUS, CONS_RGAS, CONS_PI)
subroutine, public pdfcondensate(flag, qtmean4, sigmaqt14, sigmaqt24, qstar4, condensate4)
subroutine, public dqsat_bac(DQSi, QSSi, TEMP, PLO, im, jm, lm, ESTBLX, CONS_H2OMW, CONS_AIRMW)
subroutine, public precipandevap(K, KTOP, LM, DT, FRLAND, RHCR3, QPl, QPi, QCl, QCi, TE, QV, mass, imass, PL, dZE, QDDF3, AA, BB, AREA, PFl_above_in, PFl_above_out, PFi_above_in, PFi_above_out, EVAP_DD_above_in, EVAP_DD_above_out, SUBL_DD_above_in, SUBL_DD_above_out, ENVFC, DDRFC, CONS_ALHF, CONS_ALHS, CONS_ALHL, CONS_CP, CONS_TICE, CONS_H2OMW, CONS_AIRMW, REVAP_OFF_P, C_ACC, C_EV_R, C_EV_S, RHO_W, ESTBLX)
subroutine, public evap_cnv(DT, RHCR, PL, TE, QV, QL, QI, F, XF, QS, RHO_W, CLD_EVP_EFF, CONS_H2OMW, CONS_AIRMW, CONS_ALHL, CONS_RVAP, CONS_RGAS, CONS_PI, CONS_CP)
subroutine, public ice_settlefall_ls(WXR, QI, PL, TE, F, CONS_RGAS, KHu, KHl, k, DT, DZ, QP, LS_ICEFALL_C)
subroutine, public ice_settlefall_cnv(WXR, QI, PL, TE, F, CONS_RGAS, KHu, KHl, k, DT, DZ, QP, ANV_ICEFALL_C)
subroutine, public pdffrac(flag, qtmean, sigmaqt1, sigmaqt2, qstar, clfrac)
subroutine, public cons_alhx(T, ALHX3, T_ICE_MAX, T_ICE_ALL, CONS_ALHS, CONS_ALHL)
subroutine, public cloud_driver(DT, IM, JM, LM, th, q, ple, CNV_DQLDT, CNV_MFD, CNV_PRC3, CNV_UPDF, QI_ls, QL_ls, QI_con, QL_con, CF_LS, CF_con, FRLAND, PHYSPARAMS, ESTBLX, KHu, KHl, CONS_RUNIV, CONS_KAPPA, CONS_AIRMW, CONS_H2OMW, CONS_GRAV, CONS_ALHL, CONS_ALHF, CONS_PI, CONS_RGAS, CONS_CP, CONS_VIREPS, CONS_ALHS, CONS_TICE, CONS_RVAP, CONS_P00, do_moist_physics)
subroutine, public pdf_width(PP, FRLAND, maxrhcrit, maxrhcritland, turnrhcrit, minrhcrit, pi_0, ALPHA)
subroutine, public cons_microphys(TEMP, PR, Q_SAT, AA, BB, CONS_H2OMW, CONS_AIRMW, CONS_RVAP, ALHX3)
subroutine, public meltfreeze(DT, TE, QL, QI, T_ICE_ALL, T_ICE_MAX, ICEFRPWR, CONS_ALHL, CONS_ALHS, CONS_CP)
subroutine, public convec_src(DT, MASS, iMASS, TE, QV, DCF, DMF, QLA, QIA, AF, QS, CONS_ALHS, CONS_ALHL, CONS_CP, T_ICE_ALL, T_ICE_MAX, ICEFRPWR)
subroutine, public cloud_tidy(QV, TE, QLC, QIC, CF, QLA, QIA, AF, CONS_ALHL, CONS_ALHS, CONS_CP)
subroutine, public cons_sundq3(TEMP, RATE2, RATE3, TE1, F2, F3)
subroutine, public subl_cnv(DT, RHCR, PL, TE, QV, QL, QI, F, XF, QS, RHO_W, CLD_EVP_EFF, CONS_H2OMW, CONS_AIRMW, CONS_ALHL, CONS_RVAP, CONS_RGAS, CONS_PI, CONS_CP, CONS_ALHS)
subroutine, public dqsats_bac(DQSi, QSSi, TEMP, PLO, ESTBLX, CONS_H2OMW, CONS_AIRMW)
subroutine, public autoconversion_ls(DT, QC, QP, TE, PL, F, SUNDQV2, SUNDQV3, SUNDQT1, C_00, LWCRIT, DZET)
subroutine, public marshpalm(RAIN, PR, DIAM3, NTOTAL, W, VE)
subroutine, public get_ice_fraction(TEMP, T_ICE_ALL, T_ICE_MAX, ICEFRPWR, ICEFRCT)
subroutine, public ls_cloud(DT, ALPHA, PDFSHAPE, PL, TE, QV, QCl, QAl, QCi, QAi, CF, AF, CONS_ALHL, CONS_ALHF, CONS_ALHS, CONS_CP, CONS_H2OMW, CONS_AIRMW, T_ICE_ALL, T_ICE_MAX, ICEFRPWR, ESTBLX, cloud_pertmod, dmp)