41 integer,
private,
parameter :: qa_mp = 6
54 'Ratio of Water Vapor mass to total mass (Specific humidity)', &
55 'Ratio of Cloud Water mass to total mass ', &
56 'Ratio of Rain Water mass to total mass ', &
57 'Ratio of Cloud Ice mass ratio to total mass ', &
58 'Ratio of Snow miass ratio to total mass ', &
59 'Ratio of Graupel mass ratio to total mass '/)
72 private :: mp_tomita08
73 private :: mp_tomita08_bergeronparam
79 integer,
private,
parameter :: i_qv = 1
80 integer,
private,
parameter :: i_qc = 2
81 integer,
private,
parameter :: i_qr = 3
82 integer,
private,
parameter :: i_qi = 4
83 integer,
private,
parameter :: i_qs = 5
84 integer,
private,
parameter :: i_qg = 6
86 integer,
private,
parameter :: i_hyd_qc = 1
87 integer,
private,
parameter :: i_hyd_qr = 2
88 integer,
private,
parameter :: i_hyd_qi = 3
89 integer,
private,
parameter :: i_hyd_qs = 4
90 integer,
private,
parameter :: i_hyd_qg = 5
92 logical,
private :: do_couple_aerosol
93 logical,
private :: do_explicit_icegen
95 logical,
private :: fixed_re = .false.
96 logical,
private :: const_rec = .true.
97 logical,
private :: nofall_qr = .false.
98 logical,
private :: nofall_qi = .false.
99 logical,
private :: nofall_qs = .false.
100 logical,
private :: nofall_qg = .false.
102 real(RP),
private,
parameter :: dens00 = 1.28_rp
105 real(RP),
private :: n0r_def = 8.e+6_rp
106 real(RP),
private :: n0s_def = 3.e+6_rp
107 real(RP),
private :: n0g_def = 4.e+6_rp
109 real(RP),
private :: dens_s = 100.0_rp
110 real(RP),
private :: dens_g = 400.0_rp
113 real(RP),
private :: drag_g = 0.6_rp
114 real(RP),
private :: re_qc = 8.e-6_rp
115 real(RP),
private :: re_qi = 40.e-6_rp
116 real(RP),
private :: cr = 130.0_rp
117 real(RP),
private :: cs = 4.84_rp
120 real(RP),
private :: ar, as, ag
121 real(RP),
private :: br, bs, bg
122 real(RP),
private :: cg
123 real(RP),
private :: dr, ds, dg
126 real(RP),
private :: gam, gam_2, gam_3
128 real(RP),
private :: gam_1br, gam_2br, gam_3br
129 real(RP),
private :: gam_3dr
130 real(RP),
private :: gam_6dr
131 real(RP),
private :: gam_1brdr
132 real(RP),
private :: gam_5dr_h
134 real(RP),
private :: gam_1bs, gam_2bs, gam_3bs
135 real(RP),
private :: gam_3ds
136 real(RP),
private :: gam_1bsds
137 real(RP),
private :: gam_5ds_h
139 real(RP),
private :: gam_1bg, gam_3dg
140 real(RP),
private :: gam_1bgdg
141 real(RP),
private :: gam_5dg_h
144 logical,
private :: enable_kk2000 = .false.
148 logical,
private :: enable_rs2014 = .false.
149 real(RP),
private :: ln10
150 real(RP),
private,
parameter :: coef_a01 = 5.065339_rp
151 real(RP),
private,
parameter :: coef_a02 = -0.062659_rp
152 real(RP),
private,
parameter :: coef_a03 = -3.032362_rp
153 real(RP),
private,
parameter :: coef_a04 = 0.029469_rp
154 real(RP),
private,
parameter :: coef_a05 = -0.000285_rp
155 real(RP),
private,
parameter :: coef_a06 = 0.31255_rp
156 real(RP),
private,
parameter :: coef_a07 = 0.000204_rp
157 real(RP),
private,
parameter :: coef_a08 = 0.003199_rp
158 real(RP),
private,
parameter :: coef_a09 = 0.0_rp
159 real(RP),
private,
parameter :: coef_a10 = -0.015952_rp
161 real(RP),
private,
parameter :: coef_b01 = 0.476221_rp
162 real(RP),
private,
parameter :: coef_b02 = -0.015896_rp
163 real(RP),
private,
parameter :: coef_b03 = 0.165977_rp
164 real(RP),
private,
parameter :: coef_b04 = 0.007468_rp
165 real(RP),
private,
parameter :: coef_b05 = -0.000141_rp
166 real(RP),
private,
parameter :: coef_b06 = 0.060366_rp
167 real(RP),
private,
parameter :: coef_b07 = 0.000079_rp
168 real(RP),
private,
parameter :: coef_b08 = 0.000594_rp
169 real(RP),
private,
parameter :: coef_b09 = 0.0_rp
170 real(RP),
private,
parameter :: coef_b10 = -0.003577_rp
173 logical,
private :: enable_wdxz2014 = .false.
176 real(RP),
private :: eiw = 1.0_rp
177 real(RP),
private :: erw = 1.0_rp
178 real(RP),
private :: esw = 1.0_rp
179 real(RP),
private :: egw = 1.0_rp
180 real(RP),
private :: eri = 1.0_rp
181 real(RP),
private :: esi = 1.0_rp
182 real(RP),
private :: egi = 0.1_rp
183 real(RP),
private :: esr = 1.0_rp
184 real(RP),
private :: egr = 1.0_rp
185 real(RP),
private :: egs = 1.0_rp
186 real(RP),
private :: gamma_sacr = 25.e-3_rp
187 real(RP),
private :: gamma_gacs = 90.e-3_rp
188 real(RP),
private :: mi = 4.19e-13_rp
191 real(RP),
private,
parameter :: nc_lnd = 2000.0_rp
192 real(RP),
private,
parameter :: nc_ocn = 50.0_rp
193 real(RP),
private,
allocatable :: nc_def(:,:)
195 real(RP),
private :: beta_saut = 6.e-3_rp
196 real(RP),
private :: gamma_saut = 60.e-3_rp
197 real(RP),
private :: beta_gaut = 0.0_rp
198 real(RP),
private :: gamma_gaut = 90.e-3_rp
199 real(RP),
private :: qicrt_saut = 0.0_rp
200 real(RP),
private :: qscrt_gaut = 6.e-4_rp
203 real(RP),
private,
parameter :: da0 = 2.428e-2_rp
204 real(RP),
private,
parameter :: dda_dt = 7.47e-5_rp
205 real(RP),
private,
parameter :: dw0 = 2.222e-5_rp
206 real(RP),
private,
parameter :: ddw_dt = 1.37e-7_rp
207 real(RP),
private,
parameter :: mu0 = 1.718e-5_rp
208 real(RP),
private,
parameter :: dmu_dt = 5.28e-8_rp
210 real(RP),
private,
parameter :: f1r = 0.78_rp
211 real(RP),
private,
parameter :: f2r = 0.27_rp
212 real(RP),
private,
parameter :: f1s = 0.65_rp
213 real(RP),
private,
parameter :: f2s = 0.39_rp
214 real(RP),
private,
parameter :: f1g = 0.78_rp
215 real(RP),
private,
parameter :: f2g = 0.27_rp
218 real(RP),
private,
parameter :: a_frz = 0.66_rp
219 real(RP),
private,
parameter :: b_frz = 100.0_rp
222 real(RP),
private,
parameter :: mi40 = 2.46e-10_rp
223 real(RP),
private,
parameter :: mi50 = 4.80e-10_rp
224 real(RP),
private,
parameter :: vti50 = 1.0_rp
225 real(RP),
private,
parameter :: ri50 = 5.e-5_rp
228 logical,
private :: only_liquid = .false.
229 real(RP),
private :: sw_expice = 0.0_rp
230 real(RP),
private,
parameter :: nc_ihtr = 300.0_rp
231 real(RP),
private,
parameter :: di_max = 500.e-6_rp
232 real(RP),
private,
parameter :: di_a = 11.9_rp
234 integer,
private,
parameter :: w_nmax = 49
235 integer,
private,
parameter :: i_dqv_dt = 1
236 integer,
private,
parameter :: i_dqc_dt = 2
237 integer,
private,
parameter :: i_dqr_dt = 3
238 integer,
private,
parameter :: i_dqi_dt = 4
239 integer,
private,
parameter :: i_dqs_dt = 5
240 integer,
private,
parameter :: i_dqg_dt = 6
241 integer,
private,
parameter :: i_delta1 = 7
242 integer,
private,
parameter :: i_delta2 = 8
243 integer,
private,
parameter :: i_spsati = 9
244 integer,
private,
parameter :: i_iceflg = 10
245 integer,
private,
parameter :: i_rlmdr = 11
246 integer,
private,
parameter :: i_rlmds = 12
247 integer,
private,
parameter :: i_rlmdg = 13
248 integer,
private,
parameter :: i_piacr = 14
249 integer,
private,
parameter :: i_psacr = 15
250 integer,
private,
parameter :: i_praci = 16
251 integer,
private,
parameter :: i_pigen = 17
252 integer,
private,
parameter :: i_pidep = 18
253 integer,
private,
parameter :: i_psdep = 19
254 integer,
private,
parameter :: i_pgdep = 20
255 integer,
private,
parameter :: i_praut = 21
256 integer,
private,
parameter :: i_pracw = 22
257 integer,
private,
parameter :: i_pihom = 23
258 integer,
private,
parameter :: i_pihtr = 24
259 integer,
private,
parameter :: i_psacw = 25
260 integer,
private,
parameter :: i_psfw = 26
261 integer,
private,
parameter :: i_pgacw = 27
262 integer,
private,
parameter :: i_prevp = 28
263 integer,
private,
parameter :: i_piacr_s = 29
264 integer,
private,
parameter :: i_psacr_s = 30
265 integer,
private,
parameter :: i_piacr_g = 31
266 integer,
private,
parameter :: i_psacr_g = 32
267 integer,
private,
parameter :: i_pgacr = 33
268 integer,
private,
parameter :: i_pgfrz = 34
269 integer,
private,
parameter :: i_pisub = 35
270 integer,
private,
parameter :: i_pimlt = 36
271 integer,
private,
parameter :: i_psaut = 37
272 integer,
private,
parameter :: i_praci_s = 38
273 integer,
private,
parameter :: i_psaci = 39
274 integer,
private,
parameter :: i_psfi = 40
275 integer,
private,
parameter :: i_praci_g = 41
276 integer,
private,
parameter :: i_pgaci = 42
277 integer,
private,
parameter :: i_pssub = 43
278 integer,
private,
parameter :: i_psmlt = 44
279 integer,
private,
parameter :: i_pgaut = 45
280 integer,
private,
parameter :: i_pracs = 46
281 integer,
private,
parameter :: i_pgacs = 47
282 integer,
private,
parameter :: i_pgsub = 48
283 integer,
private,
parameter :: i_pgmlt = 49
285 character(len=H_SHORT),
private :: w_name(w_nmax)
287 data w_name /
'dqv_dt ', &
337 real(RP),
private,
allocatable :: w3d(:,:,:,:)
338 integer,
private :: hist_id(w_nmax)
347 KA, KS, KE, IA, IS, IE, JA, JS, JE )
361 integer,
intent(in) :: KA, KS, KE
362 integer,
intent(in) :: IA, IS, IE
363 integer,
intent(in) :: JA, JS, JE
365 real(RP) :: autoconv_nc = nc_ocn
367 namelist / param_atmos_phy_mp_tomita08 / &
369 do_explicit_icegen, &
410 real(RP),
parameter :: max_term_vel = 10.0_rp
418 log_info(
"ATMOS_PHY_MP_tomita08_setup",*)
'Setup' 419 log_info(
"ATMOS_PHY_MP_tomita08_setup",*)
'Tomita (2008) 1-moment bulk 6 category' 421 allocate( w3d(ka,ia,ja,w_nmax) )
422 w3d(:,:,:,:) = 0.0_rp
424 allocate( nc_def(ia,ja) )
429 read(
io_fid_conf,nml=param_atmos_phy_mp_tomita08,iostat=ierr)
431 log_info(
"ATMOS_PHY_MP_tomita08_setup",*)
'Not found namelist. Default used.' 432 elseif( ierr > 0 )
then 433 log_error(
"ATMOS_PHY_MP_tomita08_setup",*)
'Not appropriate names in namelist PARAM_ATMOS_PHY_MP_TOMITA08. Check!' 436 log_nml(param_atmos_phy_mp_tomita08)
439 log_info(
"ATMOS_PHY_MP_tomita08_setup",*)
'density of the snow [kg/m3] : ', dens_s
440 log_info(
"ATMOS_PHY_MP_tomita08_setup",*)
'density of the graupel [kg/m3] : ', dens_g
441 log_info(
"ATMOS_PHY_MP_tomita08_setup",*)
'Nc for auto-conversion [num/m3]: ', autoconv_nc
442 log_info(
"ATMOS_PHY_MP_tomita08_setup",*)
'Use k-k scheme? : ', enable_kk2000
443 log_info(
"ATMOS_PHY_MP_tomita08_setup",*)
'Use Roh scheme? : ', enable_rs2014
444 log_info(
"ATMOS_PHY_MP_tomita08_setup",*)
'Use WDXZ scheme? : ', enable_wdxz2014
446 log_info(
"ATMOS_PHY_MP_tomita08_setup",*)
'Use effective radius of ice for snow and graupel,' 447 log_info(
"ATMOS_PHY_MP_tomita08_setup",*)
' and set rain transparent? : ', fixed_re
448 log_info(
"ATMOS_PHY_MP_tomita08_setup",*)
'Density of the ice is used for the calculation of ' 449 log_info(
"ATMOS_PHY_MP_tomita08_setup",*)
' optically effective volume of snow and graupel.' 450 log_info(
"ATMOS_PHY_MP_tomita08_setup",*)
'Surpress sedimentation of rain? : ', nofall_qr
451 log_info(
"ATMOS_PHY_MP_tomita08_setup",*)
'Surpress sedimentation of ice? : ', nofall_qi
452 log_info(
"ATMOS_PHY_MP_tomita08_setup",*)
'Surpress sedimentation of snow? : ', nofall_qs
453 log_info(
"ATMOS_PHY_MP_tomita08_setup",*)
'Surpress sedimentation of graupel? : ', nofall_qg
454 log_info(
"ATMOS_PHY_MP_tomita08_setup",*)
'Enable explicit ice generation? : ', do_explicit_icegen
459 nc_def(i,j) = autoconv_nc
464 ar = pi * dens_w / 6.0_rp
465 as = pi * dens_s / 6.0_rp
466 ag = pi * dens_g / 6.0_rp
472 cg = sqrt( ( 4.0_rp * dens_g * grav ) / ( 3.0_rp * dens00 * drag_g ) )
478 if ( enable_rs2014 )
then 479 do_explicit_icegen = .true.
489 if ( do_explicit_icegen )
then 493 only_liquid = .false.
506 gam_1brdr =
sf_gamma( 1.0_rp + br + dr )
507 gam_5dr_h =
sf_gamma( 0.5_rp * (5.0_rp+dr) )
513 gam_1bsds =
sf_gamma( 1.0_rp + bs + ds )
514 gam_5ds_h =
sf_gamma( 0.5_rp * (5.0_rp+ds) )
518 gam_1bgdg =
sf_gamma( 1.0_rp + bg + dg)
519 gam_5dg_h =
sf_gamma( 0.5_rp * (5.0_rp+dg) )
525 call file_history_reg( w_name(ip),
'individual tendency term in tomita08',
'kg/kg/s', &
537 KA, KS, KE, IA, IS, IE, JA, JS, JE, &
541 TEMP, QTRC, CPtot, CVtot, &
549 mp_saturation_adjustment => atmos_phy_mp_saturation_adjustment
551 integer,
intent(in) :: KA, KS, KE
552 integer,
intent(in) :: IA, IS, IE
553 integer,
intent(in) :: JA, JS, JE
555 real(RP),
intent(in) :: DENS (ka,ia,ja)
556 real(RP),
intent(in) :: PRES (ka,ia,ja)
557 real(RP),
intent(in) :: CCN (ka,ia,ja)
558 real(DP),
intent(in) :: dt
560 real(RP),
intent(inout) :: TEMP(ka,ia,ja)
561 real(RP),
intent(inout) :: QTRC(ka,ia,ja,qa_mp)
562 real(RP),
intent(inout) :: CPtot(ka,ia,ja)
563 real(RP),
intent(inout) :: CVtot(ka,ia,ja)
565 real(RP),
intent(out) :: RHOE_t (ka,ia,ja)
566 real(RP),
intent(out) :: EVAPORATE(ka,ia,ja)
568 real(RP) :: RHOE_d_sat(ka,ia,ja)
570 real(RP) :: QC_t_sat(ka,ia,ja)
571 real(RP) :: QI_t_sat(ka,ia,ja)
576 log_progress(*)
'atmosphere / physics / microphysics / Tomita08' 580 ka, ks, ke, ia, is, ie, ja, js, je, &
581 dens(:,:,:), pres(:,:,:), ccn(:,:,:), &
583 temp(:,:,:), qtrc(:,:,:,:), &
584 cptot(:,:,:), cvtot(:,:,:), &
591 qc_t_sat(k,i,j) = qtrc(k,i,j,i_qc)
592 qi_t_sat(k,i,j) = qtrc(k,i,j,i_qi)
597 call mp_saturation_adjustment( &
598 ka, ks, ke, ia, is, ie, ja, js, je, &
603 qtrc(:,:,:,i_qc), qtrc(:,:,:,i_qi), &
604 cptot(:,:,:), cvtot(:,:,:), &
610 rhoe_t(k,i,j) = rhoe_t(k,i,j) + rhoe_d_sat(k,i,j) / dt
617 qc_t_sat(k,i,j) = ( qtrc(k,i,j,i_qc) - qc_t_sat(k,i,j) ) / dt
624 qi_t_sat(k,i,j) = ( qtrc(k,i,j,i_qi) - qi_t_sat(k,i,j) ) / dt
629 call file_history_in( qc_t_sat(:,:,:),
'Pcsat',
'QC production term by satadjust',
'kg/kg/s' )
630 call file_history_in( qi_t_sat(:,:,:),
'Pisat',
'QI production term by satadjust',
'kg/kg/s' )
635 evaporate(k,i,j) = max( -qc_t_sat(k,i,j), 0.0_rp ) &
636 * dens(k,i,j) / (4.0_rp/3.0_rp*pi*dwatr*re_qc**3)
648 subroutine mp_tomita08( &
649 KA, KS, KE, IA, IS, IE, JA, JS, JE, &
668 file_history_query, &
680 saturation_dens2qsat_liq => atmos_saturation_dens2qsat_liq, &
681 saturation_dens2qsat_ice => atmos_saturation_dens2qsat_ice
683 integer,
intent(in) :: KA, KS, KE
684 integer,
intent(in) :: IA, IS, IE
685 integer,
intent(in) :: JA, JS, JE
687 real(RP),
intent(in) :: DENS0(ka,ia,ja)
688 real(RP),
intent(in) :: PRES0(ka,ia,ja)
689 real(RP),
intent(in) :: CCN (ka,ia,ja)
690 real(DP),
intent(in) :: dt
692 real(RP),
intent(inout) :: TEMP0 (ka,ia,ja)
693 real(RP),
intent(inout) :: QTRC0 (ka,ia,ja,qa_mp)
694 real(RP),
intent(inout) :: CPtot0(ka,ia,ja)
695 real(RP),
intent(inout) :: CVtot0(ka,ia,ja)
697 real(RP),
intent(out) :: RHOE_t(ka,ia,ja)
701 real(RP) :: cptot, cvtot(ka)
702 real(RP) :: qv(ka), qc(ka), qr(ka), qi(ka), qs(ka), qg(ka)
703 real(RP) :: qv_t(ka), qc_t(ka), qr_t(ka), qi_t(ka), qs_t(ka), qg_t(ka)
704 real(RP) :: e_t, cp_t, cv_t
706 real(RP) :: QSATL(ka)
707 real(RP) :: QSATI(ka)
712 real(RP) :: Rdens(ka)
713 real(RP) :: rho_fact(ka)
716 real(RP) :: N0r(ka), N0s(ka), N0g(ka)
718 real(RP) :: RLMDr(ka), RLMDr_2(ka), RLMDr_3(ka)
719 real(RP) :: RLMDs, RLMDs_2, RLMDs_3
720 real(RP) :: RLMDg(ka), RLMDg_2(ka), RLMDg_3(ka)
721 real(RP) :: RLMDr_1br(ka), RLMDr_2br(ka), RLMDr_3br(ka)
722 real(RP) :: RLMDs_1bs, RLMDs_2bs, RLMDs_3bs
723 real(RP) :: RLMDr_dr(ka), RLMDr_3dr(ka), RLMDr_5dr(ka)
724 real(RP) :: RLMDs_ds, RLMDs_3ds, RLMDs_5ds
725 real(RP) :: RLMDg_dg(ka), RLMDg_3dg(ka), RLMDg_5dg(ka)
726 real(RP) :: RLMDr_7(ka)
727 real(RP) :: RLMDr_6dr(ka)
730 real(RP) :: tems, Xs2
731 real(RP) :: MOMs_0(ka), MOMs_1(ka), MOMs_2(ka)
732 real(RP) :: MOMs_0bs(ka), MOMs_1bs(ka), MOMs_2bs(ka)
733 real(RP) :: MOMs_2ds(ka), MOMs_5ds_h(ka), RMOMs_Vt(ka)
734 real(RP) :: coef_at(4), coef_bt(4)
735 real(RP) :: loga_, b_, nm
737 real(RP) :: Vti(ka), Vtr(ka), Vts(ka), Vtg(ka)
738 real(RP) :: Esi_mod, Egs_mod
741 real(RP) :: Pracw_orig, Pracw_kk
742 real(RP) :: Praut_berry, Praut_kk
744 real(RP) :: betai, betas
748 real(RP) :: Glv(ka), Giv(ka), Gil(ka)
749 real(RP) :: ventr, vents, ventg
750 real(RP) :: net, fac, fac_sw
751 real(RP) :: zerosw, tmp
754 real(RP) :: sw_bergeron(ka)
755 real(RP) :: a1(ka), a2(ka)
761 real(RP) :: sw, rhoqi, XNi, XMi, Di, Nig, Qig
763 logical :: HIST_sw(w_nmax), hist_flag
764 real(RP) :: w(ka,w_nmax)
766 integer :: k, i, j, ip
773 call file_history_query( hist_id(ip), hist_sw(ip) )
774 hist_flag = hist_flag .or. hist_sw(ip)
805 if ( do_couple_aerosol )
then 807 nc(k) = max( ccn(k,i,j)*1.e-6_rp, nc_def(i,j) )
817 dens(k) = dens0(k,i,j)
820 temp(k) = temp0(k,i,j)
823 call saturation_dens2qsat_liq( ka, ks, ke, &
827 call saturation_dens2qsat_ice( ka, ks, ke, &
833 qv(k) = qtrc0(k,i,j,i_qv)
836 qc(k) = qtrc0(k,i,j,i_qc)
839 qr(k) = qtrc0(k,i,j,i_qr)
842 qi(k) = qtrc0(k,i,j,i_qi)
845 qs(k) = qtrc0(k,i,j,i_qs)
848 qg(k) = qtrc0(k,i,j,i_qg)
854 sliq(k) = qv(k) / max( qsatl(k), eps )
855 sice(k) = qv(k) / max( qsati(k), eps )
857 rdens(k) = 1.0_rp / dens(k)
858 rho_fact(k) = sqrt( dens00 * rdens(k) )
859 temc(k) = temp(k) - tem00
863 w(k,i_delta1) = ( 0.5_rp + sign(0.5_rp, qr(k) - 1.e-4_rp ) )
865 w(k,i_delta2) = ( 0.5_rp + sign(0.5_rp, 1.e-4_rp - qr(k) ) ) &
866 * ( 0.5_rp + sign(0.5_rp, 1.e-4_rp - qs(k) ) )
868 w(k,i_spsati) = 0.5_rp + sign(0.5_rp, sice(k) - 1.0_rp )
870 w(k,i_iceflg) = 0.5_rp - sign( 0.5_rp, temc(k) )
874 w(k,i_dqv_dt) = qv(k) / dt
875 w(k,i_dqc_dt) = qc(k) / dt
876 w(k,i_dqr_dt) = qr(k) / dt
877 w(k,i_dqi_dt) = qi(k) / dt
878 w(k,i_dqs_dt) = qs(k) / dt
879 w(k,i_dqg_dt) = qg(k) / dt
883 sw_bergeron(k) = ( 0.5_rp + sign(0.5_rp, temc(k) + 30.0_rp ) ) &
884 * ( 0.5_rp + sign(0.5_rp, 0.0_rp - temc(k) ) ) &
885 * ( 1.0_rp - sw_expice )
889 if ( enable_wdxz2014 )
then 891 n0r(k) = 1.16e+5_rp * exp( log( max( dens(k)*qr(k)*1000.0_rp, 1.e-2_rp ) )*0.477_rp )
892 n0s(k) = 4.58e+9_rp * exp( log( max( dens(k)*qs(k)*1000.0_rp, 1.e-2_rp ) )*0.788_rp )
893 n0g(k) = 9.74e+8_rp * exp( log( max( dens(k)*qg(k)*1000.0_rp, 1.e-2_rp ) )*0.816_rp )
905 zerosw = 0.5_rp - sign(0.5_rp, qr(k) - 1.e-12_rp )
906 rlmdr(k) = sqrt(sqrt( dens(k) * qr(k) / ( ar * n0r(k) * gam_1br ) + zerosw )) * ( 1.0_rp-zerosw )
908 rlmdr_dr(k) = sqrt( rlmdr(k) )
909 rlmdr_2(k) = rlmdr(k)**2
910 rlmdr_3(k) = rlmdr(k)**3
911 rlmdr_7(k) = rlmdr(k)**7
912 rlmdr_1br(k) = rlmdr(k)**4
913 rlmdr_2br(k) = rlmdr(k)**5
914 rlmdr_3br(k) = rlmdr(k)**6
915 rlmdr_3dr(k) = rlmdr(k)**3 * rlmdr_dr(k)
916 rlmdr_5dr(k) = rlmdr(k)**5 * rlmdr_dr(k)
917 rlmdr_6dr(k) = rlmdr(k)**6 * rlmdr_dr(k)
919 w(k,i_rlmdr) = rlmdr(k)
923 if ( enable_rs2014 )
then 927 zerosw = 0.5_rp - sign(0.5_rp, dens(k) * qs(k) - 1.e-12_rp )
929 xs2 = dens(k) * qs(k) / as
930 tems = min( -0.1_rp, temc(k) )
931 coef_at(1) = coef_a01 + tems * ( coef_a02 + tems * ( coef_a05 + tems * coef_a09 ) )
932 coef_at(2) = coef_a03 + tems * ( coef_a04 + tems * coef_a07 )
933 coef_at(3) = coef_a06 + tems * coef_a08
934 coef_at(4) = coef_a10
935 coef_bt(1) = coef_b01 + tems * ( coef_b02 + tems * ( coef_b05 + tems * coef_b09 ) )
936 coef_bt(2) = coef_b03 + tems * ( coef_b04 + tems * coef_b07 )
937 coef_bt(3) = coef_b06 + tems * coef_b08
938 coef_bt(4) = coef_b10
942 moms_0(k) = exp(ln10*loga_) * exp(log(xs2+zerosw)*b_) * ( 1.0_rp-zerosw )
945 loga_ = coef_at(1) + nm * ( coef_at(2) + nm * ( coef_at(3) + nm * coef_at(4) ) )
946 b_ = coef_bt(1) + nm * ( coef_bt(2) + nm * ( coef_bt(3) + nm * coef_bt(4) ) )
947 moms_1(k) = exp(ln10*loga_) * exp(log(xs2+zerosw)*b_) * ( 1.0_rp-zerosw )
952 loga_ = coef_at(1) + nm * ( coef_at(2) + nm * ( coef_at(3) + nm * coef_at(4) ) )
953 b_ = coef_bt(1) + nm * ( coef_bt(2) + nm * ( coef_bt(3) + nm * coef_bt(4) ) )
954 moms_0bs(k) = exp(ln10*loga_) * exp(log(xs2+zerosw)*b_) * ( 1.0_rp-zerosw )
957 loga_ = coef_at(1) + nm * ( coef_at(2) + nm * ( coef_at(3) + nm * coef_at(4) ) )
958 b_ = coef_bt(1) + nm * ( coef_bt(2) + nm * ( coef_bt(3) + nm * coef_bt(4) ) )
959 moms_1bs(k) = exp(ln10*loga_) * exp(log(xs2+zerosw)*b_) * ( 1.0_rp-zerosw )
962 loga_ = coef_at(1) + nm * ( coef_at(2) + nm * ( coef_at(3) + nm * coef_at(4) ) )
963 b_ = coef_bt(1) + nm * ( coef_bt(2) + nm * ( coef_bt(3) + nm * coef_bt(4) ) )
964 moms_2bs(k) = exp(ln10*loga_) * exp(log(xs2+zerosw)*b_) * ( 1.0_rp-zerosw )
967 loga_ = coef_at(1) + nm * ( coef_at(2) + nm * ( coef_at(3) + nm * coef_at(4) ) )
968 b_ = coef_bt(1) + nm * ( coef_bt(2) + nm * ( coef_bt(3) + nm * coef_bt(4) ) )
969 moms_2ds(k) = exp(ln10*loga_) * exp(log(xs2+zerosw)*b_) * ( 1.0_rp-zerosw )
972 loga_ = coef_at(1) + nm * ( coef_at(2) + nm * ( coef_at(3) + nm * coef_at(4) ) )
973 b_ = coef_bt(1) + nm * ( coef_bt(2) + nm * ( coef_bt(3) + nm * coef_bt(4) ) )
974 moms_5ds_h(k) = exp(ln10*loga_) * exp(log(xs2+zerosw)*b_) * ( 1.0_rp-zerosw )
977 loga_ = coef_at(1) + nm * ( coef_at(2) + nm * ( coef_at(3) + nm * coef_at(4) ) )
978 b_ = coef_bt(1) + nm * ( coef_bt(2) + nm * ( coef_bt(3) + nm * coef_bt(4) ) )
979 rmoms_vt(k) = exp(ln10*loga_) * exp(log(xs2+zerosw)*b_) * ( 1.0_rp-zerosw ) / ( moms_0bs(k) + zerosw )
985 zerosw = 0.5_rp - sign(0.5_rp, dens(k) * qs(k) - 1.e-12_rp )
987 rlmds = sqrt(sqrt( dens(k) * qs(k) / ( as * n0s(k) * gam_1bs ) + zerosw )) * ( 1.0_rp-zerosw )
988 rlmds_ds = sqrt( sqrt(rlmds) )
990 rlmds_3 = rlmds_2 * rlmds
991 rlmds_1bs = rlmds_2 * rlmds_2
992 rlmds_2bs = rlmds_3 * rlmds_2
993 rlmds_3bs = rlmds_3 * rlmds_3
994 rlmds_3ds = rlmds_3 * rlmds_ds
995 rlmds_5ds = rlmds_2 * rlmds_3ds
997 moms_0(k) = n0s(k) * gam * rlmds
998 moms_1(k) = n0s(k) * gam_2 * rlmds_2
999 moms_2(k) = n0s(k) * gam_3 * rlmds_3
1000 moms_0bs(k) = n0s(k) * gam_1bs * rlmds_1bs
1001 moms_1bs(k) = n0s(k) * gam_2bs * rlmds_2bs
1002 moms_2bs(k) = n0s(k) * gam_3bs * rlmds_3bs
1003 moms_2ds(k) = n0s(k) * gam_3ds * rlmds_3ds
1004 moms_5ds_h(k) = n0s(k) * gam_5ds_h * sqrt(rlmds_5ds)
1005 rmoms_vt(k) = gam_1bsds / gam_1bs * rlmds_ds
1007 w(k,i_rlmds) = rlmds
1013 zerosw = 0.5_rp - sign(0.5_rp, qg(k) - 1.e-12_rp )
1014 rlmdg(k) = sqrt(sqrt( dens(k) * qg(k) / ( ag * n0g(k) * gam_1bg ) + zerosw )) * ( 1.0_rp-zerosw )
1016 rlmdg_dg(k) = sqrt( rlmdg(k) )
1017 rlmdg_2(k) = rlmdg(k)**2
1018 rlmdg_3(k) = rlmdg(k) * rlmdg_2(k)
1019 rlmdg_3dg(k) = rlmdg_3(k) * rlmdg_dg(k)
1020 rlmdg_5dg(k) = rlmdg_2(k) * rlmdg_3dg(k)
1022 w(k,i_rlmdg) = rlmdg(k)
1027 zerosw = 0.5_rp - sign(0.5_rp, qi(k) - 1.e-8_rp )
1028 vti(k) = -3.29_rp * exp( log( dens(k)*qi(k)+zerosw )*0.16_rp ) * ( 1.0_rp-zerosw )
1029 vtr(k) = -cr * rho_fact(k) * gam_1brdr / gam_1br * rlmdr_dr(k)
1030 vts(k) = -cs * rho_fact(k) * rmoms_vt(k)
1031 vtg(k) = -cg * rho_fact(k) * gam_1bgdg / gam_1bg * rlmdg_dg(k)
1037 nig = max( exp(-0.1_rp*temc(k)), 1.0_rp ) * 1000.0_rp
1038 qig = 4.92e-11_rp * exp(log(nig)*1.33_rp) * rdens(k)
1040 w(k,i_pigen) = max( min( qig-qi(k), qv(k)-qsati(k) ), 0.0_rp ) / dt
1046 if ( enable_kk2000 )
then 1048 zerosw = 0.5_rp - sign(0.5_rp, qc(k)*qr(k) - 1.e-12_rp )
1049 pracw_kk = 67.0_rp * exp( log( qc(k)*qr(k)+zerosw )*1.15_rp ) * ( 1.0_rp-zerosw )
1050 w(k,i_pracw) = pracw_kk
1054 pracw_orig = qc(k) * 0.25_rp * pi * erw * n0r(k) * cr * gam_3dr * rlmdr_3dr(k) * rho_fact(k)
1055 w(k,i_pracw) = pracw_orig
1062 w(k,i_psacw) = qc(k) * 0.25_rp * pi * esw * cs * moms_2ds(k) * rho_fact(k)
1064 w(k,i_pgacw) = qc(k) * 0.25_rp * pi * egw * n0g(k) * cg * gam_3dg * rlmdg_3dg(k) * rho_fact(k)
1068 esi_mod = min( esi, esi * exp( gamma_sacr * temc(k) ) )
1070 w(k,i_praci) = qi(k) * 0.25_rp * pi * eri * n0r(k) * cr * gam_3dr * rlmdr_3dr(k) * rho_fact(k)
1072 w(k,i_psaci) = qi(k) * 0.25_rp * pi * esi_mod * cs * moms_2ds(k) * rho_fact(k)
1074 w(k,i_pgaci) = qi(k) * 0.25_rp * pi * egi * n0g(k) * cg * gam_3dg * rlmdg_3dg(k) * rho_fact(k)
1076 w(k,i_piacr) = qi(k) * ar / mi * 0.25_rp * pi * eri * n0r(k) * cr * gam_6dr * rlmdr_6dr(k) * rho_fact(k)
1081 w(k,i_psacr) = ar * 0.25_rp * pi * rdens(k) * esr * n0r(k) * abs(vtr(k)-vts(k)) &
1082 * ( gam_1br * rlmdr_1br(k) * moms_2(k) &
1083 + 2.0_rp * gam_2br * rlmdr_2br(k) * moms_1(k) &
1084 + gam_3br * rlmdr_3br(k) * moms_0(k) )
1087 w(k,i_pgacr) = ar * 0.25_rp * pi * rdens(k) * egr * n0g(k) * n0r(k) * abs(vtg(k)-vtr(k)) &
1088 * ( gam_1br * rlmdr_1br(k) * gam_3 * rlmdg_3(k) &
1089 + 2.0_rp * gam_2br * rlmdr_2br(k) * gam_2 * rlmdg_2(k) &
1090 + gam_3br * rlmdr_3br(k) * gam * rlmdg(k) )
1093 w(k,i_pracs) = as * 0.25_rp * pi * rdens(k) * esr * n0r(k) * abs(vtr(k)-vts(k)) &
1094 * ( moms_0bs(k) * gam_3 * rlmdr_3(k) &
1095 + 2.0_rp * moms_1bs(k) * gam_2 * rlmdr_2(k) &
1096 + moms_2bs(k) * gam * rlmdr(k) )
1099 egs_mod = min( egs, egs * exp( gamma_gacs * temc(k) ) )
1100 w(k,i_pgacs) = as * 0.25_rp * pi * rdens(k) * egs_mod * n0g(k) * abs(vtg(k)-vts(k)) &
1101 * ( moms_0bs(k) * gam_3 * rlmdg_3(k) &
1102 + 2.0_rp * moms_1bs(k) * gam_2 * rlmdg_2(k) &
1103 + moms_2bs(k) * gam * rlmdg(k) )
1108 if ( enable_kk2000 )
then 1110 zerosw = 0.5_rp - sign(0.5_rp, qc(k) - 1.e-12_rp )
1111 praut_kk = 1350.0_rp &
1112 * exp( log( qc(k)+zerosw )*2.47_rp ) * ( 1.0_rp-zerosw ) &
1113 * exp( log( nc(k) )*(-1.79_rp) )
1114 w(k,i_praut) = praut_kk
1118 rhoqc = dens(k) * qc(k) * 1000.0_rp
1119 dc = 0.146_rp - 5.964e-2_rp * log( nc(k) / 2000.0_rp )
1120 praut_berry = rdens(k) * 1.67e-5_rp * rhoqc * rhoqc / ( 5.0_rp + 3.66e-2_rp * nc(k) / ( dc * rhoqc + eps ) )
1121 w(k,i_praut) = praut_berry
1127 betai = min( beta_saut, beta_saut * exp( gamma_saut * temc(k) ) )
1128 w(k,i_psaut) = max( betai*(qi(k)-qicrt_saut), 0.0_rp )
1130 betas = min( beta_gaut, beta_gaut * exp( gamma_gaut * temc(k) ) )
1131 w(k,i_pgaut) = max( betas*(qs(k)-qscrt_gaut), 0.0_rp )
1136 da = ( da0 + dda_dt * temc(k) )
1137 kd = ( dw0 + ddw_dt * temc(k) ) * pre00 / pres0(k,i,j)
1138 nu(k) = ( mu0 + dmu_dt * temc(k) ) * rdens(k)
1140 glv(k) = 1.0_rp / ( lhv0/(da*temp(k)) * ( lhv0/(rvap*temp(k)) - 1.0_rp ) + 1.0_rp/(kd*dens(k)*qsatl(k)) )
1141 giv(k) = 1.0_rp / ( lhs0/(da*temp(k)) * ( lhs0/(rvap*temp(k)) - 1.0_rp ) + 1.0_rp/(kd*dens(k)*qsati(k)) )
1142 gil(k) = ( da * temc(k) ) / lhf0
1147 ventr = f1r * gam_2 * rlmdr_2(k) + f2r * sqrt( cr * rho_fact(k) / nu(k) * rlmdr_5dr(k) ) * gam_5dr_h
1148 w(k,i_prevp) = 2.0_rp * pi * rdens(k) * n0r(k) * ( 1.0_rp-min(sliq(k),1.0_rp) ) * glv(k) * ventr
1153 rhoqi = max(dens(k)*qi(k), eps)
1154 xni = min( max( 5.38e+7_rp * exp( log(rhoqi)*0.75_rp ), 1.e+3_rp ), 1.e+6_rp )
1156 di = min( di_a * sqrt(xmi), di_max )
1157 tmp = 4.0_rp * di * xni * rdens(k) * ( sice(k)-1.0_rp ) * giv(k)
1158 w(k,i_pidep) = ( w(k,i_spsati) ) * ( tmp)
1159 w(k,i_pisub) = ( 1.0_rp-w(k,i_spsati) ) * (-tmp)
1164 sw = ( 0.5_rp - sign(0.5_rp, temc(k) + 40.0_rp ) )
1165 w(k,i_pihom) = sw * qc(k) / dt
1170 sw = ( 0.5_rp + sign(0.5_rp, temc(k) + 40.0_rp ) ) &
1171 * ( 0.5_rp - sign(0.5_rp, temc(k) ) )
1172 w(k,i_pihtr) = sw * ( dens(k) / dwatr * qc(k)**2 / ( nc_ihtr * 1.e+6_rp ) ) &
1173 * b_frz * ( exp(-a_frz*temc(k)) - 1.0_rp )
1178 sw = ( 0.5_rp + sign(0.5_rp, temc(k) ) )
1179 w(k,i_pimlt) = sw * qi(k) / dt
1184 vents = f1s * moms_1(k) + f2s * sqrt( cs * rho_fact(k) / nu(k) ) * moms_5ds_h(k)
1185 tmp = 2.0_rp * pi * rdens(k) * ( sice(k)-1.0_rp ) * giv(k) * vents
1186 w(k,i_psdep) = ( w(k,i_spsati) ) * ( tmp)
1187 w(k,i_pssub) = ( 1.0_rp-w(k,i_spsati) ) * (-tmp)
1189 w(k,i_psmlt) = 2.0_rp * pi * rdens(k) * gil(k) * vents &
1190 + cl * temc(k) / lhf0 * ( w(k,i_psacw) + w(k,i_psacr) )
1191 w(k,i_psmlt) = max( w(k,i_psmlt), 0.0_rp )
1196 ventg = f1g * gam_2 * rlmdg_2(k) + f2g * sqrt( cg * rho_fact(k) / nu(k) * rlmdg_5dg(k) ) * gam_5dg_h
1197 tmp = 2.0_rp * pi * rdens(k) * n0g(k) * ( sice(k)-1.0_rp ) * giv(k) * ventg
1198 w(k,i_pgdep) = ( w(k,i_spsati) ) * ( tmp)
1199 w(k,i_pgsub) = ( 1.0_rp-w(k,i_spsati) ) * (-tmp)
1201 w(k,i_pgmlt) = 2.0_rp * pi * rdens(k) * n0g(k) * gil(k) * ventg &
1202 + cl * temc(k) / lhf0 * ( w(k,i_pgacw) + w(k,i_pgacr) )
1203 w(k,i_pgmlt) = max( w(k,i_pgmlt), 0.0_rp )
1208 tmp = ( exp(-a_frz*temc(k)) - 1.0_rp ) * rlmdr_7(k)
1209 w(k,i_pgfrz) = 2.0_rp * pi * rdens(k) * n0r(k) * 60.0_rp * b_frz * ar * tmp
1213 call mp_tomita08_bergeronparam( ka, ks, ke, &
1215 a1(:), a2(:), ma2(:) )
1217 dt1 = ( exp( log(mi50)*ma2(k) ) &
1218 - exp( log(mi40)*ma2(k) ) ) / ( a1(k) * ma2(k) )
1219 ni50 = qi(k) * dt / ( mi50 * dt1 )
1220 w(k,i_psfw ) = ni50 * ( a1(k) * exp( log(mi50)*a2(k) ) &
1221 + pi * eiw * dens(k) * qc(k) * ri50*ri50 * vti50 )
1222 w(k,i_psfi ) = qi(k) / dt1
1227 w(k,i_pigen) = min( w(k,i_pigen), w(k,i_dqv_dt) ) * ( w(k,i_iceflg) ) * sw_expice
1228 w(k,i_pidep) = min( w(k,i_pidep), w(k,i_dqv_dt) ) * ( w(k,i_iceflg) ) * sw_expice
1229 w(k,i_psdep) = min( w(k,i_psdep), w(k,i_dqv_dt) ) * ( w(k,i_iceflg) )
1230 w(k,i_pgdep) = min( w(k,i_pgdep), w(k,i_dqv_dt) ) * ( w(k,i_iceflg) )
1234 w(k,i_pracw) = w(k,i_pracw) &
1235 + w(k,i_psacw) * ( 1.0_rp-w(k,i_iceflg) ) &
1236 + w(k,i_pgacw) * ( 1.0_rp-w(k,i_iceflg) )
1240 w(k,i_praut) = min( w(k,i_praut), w(k,i_dqc_dt) )
1241 w(k,i_pracw) = min( w(k,i_pracw), w(k,i_dqc_dt) )
1242 w(k,i_pihom) = min( w(k,i_pihom), w(k,i_dqc_dt) ) * ( w(k,i_iceflg) ) * sw_expice
1243 w(k,i_pihtr) = min( w(k,i_pihtr), w(k,i_dqc_dt) ) * ( w(k,i_iceflg) ) * sw_expice
1244 w(k,i_psacw) = min( w(k,i_psacw), w(k,i_dqc_dt) ) * ( w(k,i_iceflg) )
1245 w(k,i_psfw ) = min( w(k,i_psfw ), w(k,i_dqc_dt) ) * ( w(k,i_iceflg) ) * sw_bergeron(k)
1246 w(k,i_pgacw) = min( w(k,i_pgacw), w(k,i_dqc_dt) ) * ( w(k,i_iceflg) )
1250 w(k,i_prevp) = min( w(k,i_prevp), w(k,i_dqr_dt) )
1251 w(k,i_piacr) = min( w(k,i_piacr), w(k,i_dqr_dt) ) * ( w(k,i_iceflg) )
1252 w(k,i_psacr) = min( w(k,i_psacr), w(k,i_dqr_dt) ) * ( w(k,i_iceflg) )
1253 w(k,i_pgacr) = min( w(k,i_pgacr), w(k,i_dqr_dt) ) * ( w(k,i_iceflg) )
1254 w(k,i_pgfrz) = min( w(k,i_pgfrz), w(k,i_dqr_dt) ) * ( w(k,i_iceflg) )
1258 w(k,i_pisub) = min( w(k,i_pisub), w(k,i_dqi_dt) ) * ( w(k,i_iceflg) ) * sw_expice
1259 w(k,i_pimlt) = min( w(k,i_pimlt), w(k,i_dqi_dt) ) * ( 1.0_rp-w(k,i_iceflg) ) * sw_expice
1260 w(k,i_psaut) = min( w(k,i_psaut), w(k,i_dqi_dt) ) * ( w(k,i_iceflg) )
1261 w(k,i_praci) = min( w(k,i_praci), w(k,i_dqi_dt) ) * ( w(k,i_iceflg) )
1262 w(k,i_psaci) = min( w(k,i_psaci), w(k,i_dqi_dt) ) * ( w(k,i_iceflg) )
1263 w(k,i_psfi ) = min( w(k,i_psfi ), w(k,i_dqi_dt) ) * ( w(k,i_iceflg) ) * sw_bergeron(k)
1264 w(k,i_pgaci) = min( w(k,i_pgaci), w(k,i_dqi_dt) ) * ( w(k,i_iceflg) )
1268 w(k,i_pssub) = min( w(k,i_pssub), w(k,i_dqs_dt) ) * ( w(k,i_iceflg) )
1269 w(k,i_psmlt) = min( w(k,i_psmlt), w(k,i_dqs_dt) ) * ( 1.0_rp-w(k,i_iceflg) )
1270 w(k,i_pgaut) = min( w(k,i_pgaut), w(k,i_dqs_dt) ) * ( w(k,i_iceflg) )
1271 w(k,i_pracs) = min( w(k,i_pracs), w(k,i_dqs_dt) ) * ( w(k,i_iceflg) )
1272 w(k,i_pgacs) = min( w(k,i_pgacs), w(k,i_dqs_dt) )
1276 w(k,i_pgsub) = min( w(k,i_pgsub), w(k,i_dqg_dt) ) * ( w(k,i_iceflg) )
1277 w(k,i_pgmlt) = min( w(k,i_pgmlt), w(k,i_dqg_dt) ) * ( 1.0_rp-w(k,i_iceflg) )
1281 w(k,i_piacr_s) = ( 1.0_rp - w(k,i_delta1) ) * w(k,i_piacr)
1282 w(k,i_piacr_g) = ( w(k,i_delta1) ) * w(k,i_piacr)
1283 w(k,i_praci_s) = ( 1.0_rp - w(k,i_delta1) ) * w(k,i_praci)
1284 w(k,i_praci_g) = ( w(k,i_delta1) ) * w(k,i_praci)
1285 w(k,i_psacr_s) = ( w(k,i_delta2) ) * w(k,i_psacr)
1286 w(k,i_psacr_g) = ( 1.0_rp - w(k,i_delta2) ) * w(k,i_psacr)
1287 w(k,i_pracs ) = ( 1.0_rp - w(k,i_delta2) ) * w(k,i_pracs)
1302 fac_sw = 0.5_rp + sign( 0.5_rp, net+eps )
1304 + ( 1.0_rp - fac_sw ) * min( -w(k,i_dqc_dt)/(net-fac_sw), 1.0_rp )
1306 w(k,i_pimlt ) = w(k,i_pimlt ) * fac
1307 w(k,i_praut ) = w(k,i_praut ) * fac
1308 w(k,i_pracw ) = w(k,i_pracw ) * fac
1309 w(k,i_pihom ) = w(k,i_pihom ) * fac
1310 w(k,i_pihtr ) = w(k,i_pihtr ) * fac
1311 w(k,i_psacw ) = w(k,i_psacw ) * fac
1312 w(k,i_psfw ) = w(k,i_psfw ) * fac
1313 w(k,i_pgacw ) = w(k,i_pgacw ) * fac
1332 fac_sw = 0.5_rp + sign( 0.5_rp, net+eps )
1334 + ( 1.0_rp - fac_sw ) * min( -w(k,i_dqi_dt)/(net-fac_sw), 1.0_rp )
1336 w(k,i_pigen ) = w(k,i_pigen ) * fac
1337 w(k,i_pidep ) = w(k,i_pidep ) * fac
1338 w(k,i_pihom ) = w(k,i_pihom ) * fac
1339 w(k,i_pihtr ) = w(k,i_pihtr ) * fac
1340 w(k,i_pisub ) = w(k,i_pisub ) * fac
1341 w(k,i_pimlt ) = w(k,i_pimlt ) * fac
1342 w(k,i_psaut ) = w(k,i_psaut ) * fac
1343 w(k,i_praci_s) = w(k,i_praci_s) * fac
1344 w(k,i_psaci ) = w(k,i_psaci ) * fac
1345 w(k,i_psfi ) = w(k,i_psfi ) * fac
1346 w(k,i_praci_g) = w(k,i_praci_g) * fac
1347 w(k,i_pgaci ) = w(k,i_pgaci ) * fac
1365 fac_sw = 0.5_rp + sign( 0.5_rp, net+eps )
1367 + ( 1.0_rp - fac_sw ) * min( -w(k,i_dqr_dt)/(net-fac_sw), 1.0_rp )
1369 w(k,i_praut ) = w(k,i_praut ) * fac
1370 w(k,i_pracw ) = w(k,i_pracw ) * fac
1371 w(k,i_psmlt ) = w(k,i_psmlt ) * fac
1372 w(k,i_pgmlt ) = w(k,i_pgmlt ) * fac
1373 w(k,i_prevp ) = w(k,i_prevp ) * fac
1374 w(k,i_piacr_s) = w(k,i_piacr_s) * fac
1375 w(k,i_psacr_s) = w(k,i_psacr_s) * fac
1376 w(k,i_piacr_g) = w(k,i_piacr_g) * fac
1377 w(k,i_psacr_g) = w(k,i_psacr_g) * fac
1378 w(k,i_pgacr ) = w(k,i_pgacr ) * fac
1379 w(k,i_pgfrz ) = w(k,i_pgfrz ) * fac
1394 fac_sw = 0.5_rp + sign( 0.5_rp, net+eps )
1396 + ( 1.0_rp - fac_sw ) * min( -w(k,i_dqv_dt)/(net-fac_sw), 1.0_rp )
1398 w(k,i_prevp ) = w(k,i_prevp ) * fac
1399 w(k,i_pisub ) = w(k,i_pisub ) * fac
1400 w(k,i_pssub ) = w(k,i_pssub ) * fac
1401 w(k,i_pgsub ) = w(k,i_pgsub ) * fac
1402 w(k,i_pigen ) = w(k,i_pigen ) * fac
1403 w(k,i_pidep ) = w(k,i_pidep ) * fac
1404 w(k,i_psdep ) = w(k,i_psdep ) * fac
1405 w(k,i_pgdep ) = w(k,i_pgdep ) * fac
1426 fac_sw = 0.5_rp + sign( 0.5_rp, net+eps )
1428 + ( 1.0_rp - fac_sw ) * min( -w(k,i_dqs_dt)/(net-fac_sw), 1.0_rp )
1430 w(k,i_psdep ) = w(k,i_psdep ) * fac
1431 w(k,i_psacw ) = w(k,i_psacw ) * fac
1432 w(k,i_psfw ) = w(k,i_psfw ) * fac
1433 w(k,i_piacr_s) = w(k,i_piacr_s) * fac
1434 w(k,i_psacr_s) = w(k,i_psacr_s) * fac
1435 w(k,i_psaut ) = w(k,i_psaut ) * fac
1436 w(k,i_praci_s) = w(k,i_praci_s) * fac
1437 w(k,i_psaci ) = w(k,i_psaci ) * fac
1438 w(k,i_psfi ) = w(k,i_psfi ) * fac
1439 w(k,i_pssub ) = w(k,i_pssub ) * fac
1440 w(k,i_psmlt ) = w(k,i_psmlt ) * fac
1441 w(k,i_pgaut ) = w(k,i_pgaut ) * fac
1442 w(k,i_pracs ) = w(k,i_pracs ) * fac
1443 w(k,i_pgacs ) = w(k,i_pgacs ) * fac
1463 fac_sw = 0.5_rp + sign( 0.5_rp, net+eps )
1465 + ( 1.0_rp - fac_sw ) * min( -w(k,i_dqg_dt)/(net-fac_sw), 1.0_rp )
1467 w(k,i_pgdep ) = w(k,i_pgdep ) * fac
1468 w(k,i_pgacw ) = w(k,i_pgacw ) * fac
1469 w(k,i_piacr_g) = w(k,i_piacr_g) * fac
1470 w(k,i_psacr_g) = w(k,i_psacr_g) * fac
1471 w(k,i_pgacr ) = w(k,i_pgacr ) * fac
1472 w(k,i_pgfrz ) = w(k,i_pgfrz ) * fac
1473 w(k,i_praci_g) = w(k,i_praci_g) * fac
1474 w(k,i_pgaci ) = w(k,i_pgaci ) * fac
1475 w(k,i_pgaut ) = w(k,i_pgaut ) * fac
1476 w(k,i_pracs ) = w(k,i_pracs ) * fac
1477 w(k,i_pgacs ) = w(k,i_pgacs ) * fac
1478 w(k,i_pgsub ) = w(k,i_pgsub ) * fac
1479 w(k,i_pgmlt ) = w(k,i_pgmlt ) * fac
1484 qc_t(k) = + w(k,i_pimlt ) &
1492 qc_t(k) = max( qc_t(k), -w(k,i_dqc_dt) )
1496 qr_t(k) = + w(k,i_praut ) &
1508 qr_t(k) = max( qr_t(k), -w(k,i_dqr_dt) )
1512 qi_t(k) = + w(k,i_pigen ) &
1524 qi_t(k) = max( qi_t(k), -w(k,i_dqi_dt) )
1528 qs_t(k) = + w(k,i_psdep ) &
1542 qs_t(k) = max( qs_t(k), -w(k,i_dqs_dt) )
1546 qg_t(k) = + w(k,i_pgdep ) &
1559 qg_t(k) = max( qg_t(k), -w(k,i_dqg_dt) )
1563 qv_t(k) = - ( qc_t(k) + qr_t(k) + qi_t(k) + qs_t(k) + qg_t(k) )
1567 qtrc0(k,i,j,i_qv) = qtrc0(k,i,j,i_qv) + qv_t(k) * dt
1570 qtrc0(k,i,j,i_qc) = qtrc0(k,i,j,i_qc) + qc_t(k) * dt
1573 qtrc0(k,i,j,i_qr) = qtrc0(k,i,j,i_qr) + qr_t(k) * dt
1576 qtrc0(k,i,j,i_qi) = qtrc0(k,i,j,i_qi) + qi_t(k) * dt
1579 qtrc0(k,i,j,i_qs) = qtrc0(k,i,j,i_qs) + qs_t(k) * dt
1582 qtrc0(k,i,j,i_qg) = qtrc0(k,i,j,i_qg) + qg_t(k) * dt
1586 +
cv_water * ( qc_t(k) + qr_t(k) ) &
1587 +
cv_ice * ( qi_t(k) + qs_t(k) + qg_t(k) )
1588 cvtot(k) = cvtot0(k,i,j) + cv_t * dt
1592 e_t = -
lhv * qv_t(k) +
lhf * ( qi_t(k) + qs_t(k) + qg_t(k) )
1593 rhoe_t(k,i,j) = dens(k) * e_t
1594 temp0(k,i,j) = ( temp(k) * cvtot0(k,i,j) + e_t * dt ) / cvtot(k)
1598 cvtot0(k,i,j) = cvtot(k)
1603 +
cp_water * ( qc_t(k) + qr_t(k) ) &
1604 +
cp_ice * ( qi_t(k) + qs_t(k) + qg_t(k) )
1605 cptot = cptot0(k,i,j) + cp_t * dt
1606 cptot0(k,i,j) = cptot
1609 if ( hist_flag )
then 1611 if ( hist_sw(ip) )
then 1613 w3d(k,i,j,ip) = w(k,ip)
1623 if ( hist_sw(ip) )
call file_history_put( hist_id(ip), w3d(:,:,:,ip) )
1629 end subroutine mp_tomita08
1636 DENS0, TEMP0, RHOQ0, &
1641 integer,
intent(in) :: KA, KS, KE
1643 real(RP),
intent(in) :: DENS0(ka)
1644 real(RP),
intent(in) :: TEMP0(ka)
1645 real(RP),
intent(in) :: RHOQ0(ka,qa_mp-1)
1647 real(RP),
intent(out) :: vterm(ka,qa_mp-1)
1649 real(RP) :: dens(ka)
1650 real(RP) :: temc(ka)
1651 real(RP) :: qr(ka), qi(ka), qs(ka), qg(ka)
1653 real(RP) :: rho_fact(ka)
1655 real(RP) :: N0r(ka), N0s(ka), N0g(ka)
1656 real(RP) :: RLMDr, RLMDs, RLMDg
1657 real(RP) :: RLMDr_dr, RLMDs_ds, RLMDg_dg
1660 real(RP) :: tems, Xs2
1661 real(RP) :: MOMs_0bs, RMOMs_Vt(ka)
1662 real(RP) :: coef_at(4), coef_bt(4)
1663 real(RP) :: loga_, b_, nm
1672 temc(k) = temp0(k) - tem00
1673 qr(k) = rhoq0(k,i_hyd_qr) / dens(k)
1674 qi(k) = rhoq0(k,i_hyd_qi) / dens(k)
1675 qs(k) = rhoq0(k,i_hyd_qs) / dens(k)
1676 qg(k) = rhoq0(k,i_hyd_qg) / dens(k)
1678 rho_fact(k) = sqrt( dens00 / dens(k) )
1681 if ( enable_wdxz2014 )
then 1685 n0r(k) = 1.16e+5_rp * exp( log( max( dens(k)*qr(k)*1000.0_rp, 1.e-2_rp ) )*0.477_rp )
1686 n0s(k) = 4.58e+9_rp * exp( log( max( dens(k)*qs(k)*1000.0_rp, 1.e-2_rp ) )*0.788_rp )
1687 n0g(k) = 9.74e+8_rp * exp( log( max( dens(k)*qg(k)*1000.0_rp, 1.e-2_rp ) )*0.816_rp )
1701 zerosw = 0.5_rp - sign(0.5_rp, qi(k) - 1.e-8_rp )
1702 vterm(k,i_hyd_qi) = -3.29_rp * exp( log( dens(k)*qi(k)+zerosw )*0.16_rp ) * ( 1.0_rp-zerosw )
1708 zerosw = 0.5_rp - sign(0.5_rp, qr(k) - 1.e-12_rp )
1709 rlmdr = sqrt(sqrt( dens(k) * qr(k) / ( ar * n0r(k) * gam_1br ) + zerosw )) * ( 1.0_rp-zerosw )
1710 rlmdr_dr = sqrt( rlmdr )
1711 vterm(k,i_hyd_qr) = -cr * rho_fact(k) * gam_1brdr / gam_1br * rlmdr_dr
1715 if ( enable_rs2014 )
then 1719 zerosw = 0.5_rp - sign(0.5_rp, dens(k) * qs(k) - 1.e-12_rp )
1720 xs2 = dens(k) * qs(k) / as
1722 tems = min( -0.1_rp, temc(k) )
1723 coef_at(1) = coef_a01 + tems * ( coef_a02 + tems * ( coef_a05 + tems * coef_a09 ) )
1724 coef_at(2) = coef_a03 + tems * ( coef_a04 + tems * coef_a07 )
1725 coef_at(3) = coef_a06 + tems * coef_a08
1726 coef_at(4) = coef_a10
1727 coef_bt(1) = coef_b01 + tems * ( coef_b02 + tems * ( coef_b05 + tems * coef_b09 ) )
1728 coef_bt(2) = coef_b03 + tems * ( coef_b04 + tems * coef_b07 )
1729 coef_bt(3) = coef_b06 + tems * coef_b08
1730 coef_bt(4) = coef_b10
1733 loga_ = coef_at(1) + nm * ( coef_at(2) + nm * ( coef_at(3) + nm * coef_at(4) ) )
1734 b_ = coef_bt(1) + nm * ( coef_bt(2) + nm * ( coef_bt(3) + nm * coef_bt(4) ) )
1735 moms_0bs = exp(ln10*loga_) * exp(log(xs2+zerosw)*b_) * ( 1.0_rp-zerosw )
1738 loga_ = coef_at(1) + nm * ( coef_at(2) + nm * ( coef_at(3) + nm * coef_at(4) ) )
1739 b_ = coef_bt(1) + nm * ( coef_bt(2) + nm * ( coef_bt(3) + nm * coef_bt(4) ) )
1740 rmoms_vt(k) = exp(ln10*loga_) * exp(log(xs2+zerosw)*b_) * ( 1.0_rp-zerosw ) / ( moms_0bs + zerosw )
1745 zerosw = 0.5_rp - sign(0.5_rp, qs(k) - 1.e-12_rp )
1746 rlmds = sqrt(sqrt( dens(k) * qs(k) / ( as * n0s(k) * gam_1bs ) + zerosw )) * ( 1.0_rp-zerosw )
1747 rlmds_ds = sqrt( sqrt(rlmds) )
1748 rmoms_vt(k) = gam_1bsds / gam_1bs * rlmds_ds
1753 vterm(k,i_hyd_qs) = -cs * rho_fact(k) * rmoms_vt(k)
1759 zerosw = 0.5_rp - sign(0.5_rp, qg(k) - 1.e-12_rp )
1760 rlmdg = sqrt(sqrt( dens(k) * qg(k) / ( ag * n0g(k) * gam_1bg ) + zerosw )) * ( 1.0_rp-zerosw )
1761 rlmdg_dg = sqrt( rlmdg )
1762 vterm(k,i_hyd_qg) = -cg * rho_fact(k) * gam_1bgdg / gam_1bg * rlmdg_dg
1768 vterm(k,i_hyd_qc) = 0.0_rp
1771 if ( nofall_qr )
then 1774 vterm(k,i_hyd_qr) = 0.0_rp
1778 if ( nofall_qi )
then 1781 vterm(k,i_hyd_qi) = 0.0_rp
1785 if ( nofall_qs )
then 1788 vterm(k,i_hyd_qs) = 0.0_rp
1792 if ( nofall_qg )
then 1795 vterm(k,i_hyd_qg) = 0.0_rp
1799 vterm( 1:ks-1,:) = 0.0_rp
1800 vterm(ke+1:ka ,:) = 0.0_rp
1808 KA, KS, KE, IA, IS, IE, JA, JS, JE, &
1813 integer,
intent(in) :: KA, KS, KE
1814 integer,
intent(in) :: IA, IS, IE
1815 integer,
intent(in) :: JA, JS, JE
1817 real(RP),
intent(in) :: QTRC(ka,ia,ja,qa_mp-1)
1818 real(RP),
intent(in) :: mask_criterion
1820 real(RP),
intent(out) :: cldfrac(ka,ia,ja)
1831 qhydro = qtrc(k,i,j,i_hyd_qc) + qtrc(k,i,j,i_hyd_qr) &
1832 + qtrc(k,i,j,i_hyd_qi) + qtrc(k,i,j,i_hyd_qs) + qtrc(k,i,j,i_hyd_qg)
1833 cldfrac(k,i,j) = 0.5_rp + sign(0.5_rp,qhydro-mask_criterion)
1844 KA, KS, KE, IA, IS, IE, JA, JS, JE, &
1845 DENS0, TEMP0, QTRC0, &
1860 integer,
intent(in) :: KA, KS, KE
1861 integer,
intent(in) :: IA, IS, IE
1862 integer,
intent(in) :: JA, JS, JE
1864 real(RP),
intent(in) :: DENS0(ka,ia,ja)
1865 real(RP),
intent(in) :: TEMP0(ka,ia,ja)
1866 real(RP),
intent(in) :: QTRC0(ka,ia,ja,qa_mp-1)
1868 real(RP),
intent(out) :: Re (ka,ia,ja,
n_hyd)
1869 real(RP) :: dens(ka)
1870 real(RP) :: temc(ka)
1871 real(RP) :: qr(ka), qs(ka), qg(ka)
1873 real(RP) :: N0r(ka), N0s(ka), N0g(ka)
1874 real(RP) :: RLMDr, RLMDs, RLMDg
1876 real(RP),
parameter :: um2cm = 100.0_rp
1879 real(RP) :: tems, Xs2
1880 real(RP) :: coef_at(4), coef_bt(4)
1881 real(RP) :: loga_, b_, nm
1884 integer :: k, i, j, ih
1891 re(k,i,j,
i_hi) = re_qi * um2cm
1900 re(k,i,j,ih) = 0.0_rp
1906 if ( const_rec .or. fixed_re )
then 1912 re(k,i,j,
i_hc) = re_qc * um2cm
1923 if ( do_couple_aerosol )
then 1926 nc(k) = nc_def(i,j) * 1.e+6_rp
1930 nc(k) = nc_def(i,j) * 1.e+6_rp
1935 re(k,i,j,
i_hc) = 1.1_rp &
1936 * ( dens0(k,i,j) * qtrc0(k,i,j,i_hyd_qc) / nc(k) / ( 4.0_rp / 3.0_rp * pi * dens_w ) )**(1.0_rp/3.0_rp)
1937 re(k,i,j,
i_hc) = min( 1.e-3_rp, max( 1.e-6_rp, re(k,i,j,
i_hc) ) ) * um2cm
1944 if ( fixed_re )
then 1950 re(k,i,j,
i_hr) = 10000.e-6_rp * um2cm
1958 re(k,i,j,
i_hs) = re_qi * um2cm
1966 re(k,i,j,
i_hg) = re_qi * um2cm
1973 #ifndef __GFORTRAN__ 1991 dens(k) = dens0(k,i,j)
1992 temc(k) = temp0(k,i,j) - tem00
1993 qr(k) = qtrc0(k,i,j,i_hyd_qr)
1994 qs(k) = qtrc0(k,i,j,i_hyd_qs)
1995 qg(k) = qtrc0(k,i,j,i_hyd_qg)
1999 if ( enable_wdxz2014 )
then 2002 n0r(k) = 1.16e+5_rp * exp( log( max( dens(k)*qr(k)*1000.0_rp, 1.e-2_rp ) )*0.477_rp )
2003 n0s(k) = 4.58e+9_rp * exp( log( max( dens(k)*qs(k)*1000.0_rp, 1.e-2_rp ) )*0.788_rp )
2004 n0g(k) = 9.74e+8_rp * exp( log( max( dens(k)*qg(k)*1000.0_rp, 1.e-2_rp ) )*0.816_rp )
2016 zerosw = 0.5_rp - sign(0.5_rp, qr(k) - 1.e-12_rp )
2017 rlmdr = sqrt(sqrt( dens(k) * qr(k) / ( ar * n0r(k) * gam_1br ) + zerosw )) * ( 1.0_rp-zerosw )
2019 re(k,i,j,
i_hr) = 1.5_rp * rlmdr * um2cm
2022 if ( enable_rs2014 )
then 2024 zerosw = 0.5_rp - sign(0.5_rp, qs(k) - 1.e-12_rp )
2027 zerosw = 0.5_rp - sign(0.5_rp, dens(k) * qs(k) - 1.e-12_rp )
2028 xs2 = dens(k) * qs(k) / as
2030 tems = min( -0.1_rp, temc(k) )
2031 coef_at(1) = coef_a01 + tems * ( coef_a02 + tems * ( coef_a05 + tems * coef_a09 ) )
2032 coef_at(2) = coef_a03 + tems * ( coef_a04 + tems * coef_a07 )
2033 coef_at(3) = coef_a06 + tems * coef_a08
2034 coef_at(4) = coef_a10
2035 coef_bt(1) = coef_b01 + tems * ( coef_b02 + tems * ( coef_b05 + tems * coef_b09 ) )
2036 coef_bt(2) = coef_b03 + tems * ( coef_b04 + tems * coef_b07 )
2037 coef_bt(3) = coef_b06 + tems * coef_b08
2038 coef_bt(4) = coef_b10
2041 loga_ = coef_at(1) + nm * ( coef_at(2) + nm * ( coef_at(3) + nm * coef_at(4) ) )
2042 b_ = coef_bt(1) + nm * ( coef_bt(2) + nm * ( coef_bt(3) + nm * coef_bt(4) ) )
2044 re(k,i,j,
i_hs) = 0.5_rp * exp(ln10*loga_) * exp(log(xs2+zerosw)*b_) * ( 1.0_rp-zerosw ) / ( xs2+zerosw ) * um2cm
2048 zerosw = 0.5_rp - sign(0.5_rp, qs(k) - 1.e-12_rp )
2049 rlmds = sqrt(sqrt( dens(k) * qs(k) / ( as * n0s(k) * gam_1bs ) + zerosw )) * ( 1.0_rp-zerosw )
2050 re(k,i,j,
i_hs) = 1.5_rp * rlmds * um2cm
2056 zerosw = 0.5_rp - sign(0.5_rp, qg(k) - 1.e-12_rp )
2057 rlmdg = sqrt(sqrt( dens(k) * qg(k) / ( ag * n0g(k) * gam_1bg ) + zerosw )) * ( 1.0_rp-zerosw )
2058 re(k,i,j,
i_hg) = 1.5_rp * rlmdg * um2cm
2072 subroutine mp_tomita08_bergeronparam( &
2079 integer,
intent(in) :: KA, KS, KE
2081 real(RP),
intent(in) :: temp(ka)
2082 real(RP),
intent(out) :: a1(ka)
2083 real(RP),
intent(out) :: a2(ka)
2084 real(RP),
intent(out) :: ma2(ka)
2086 real(RP),
parameter :: a1_tab(32) = (/ &
2087 0.0001e-7_rp, 0.7939e-7_rp, 0.7841e-6_rp, 0.3369e-5_rp, 0.4336e-5_rp, &
2088 0.5285e-5_rp, 0.3728e-5_rp, 0.1852e-5_rp, 0.2991e-6_rp, 0.4248e-6_rp, &
2089 0.7434e-6_rp, 0.1812e-5_rp, 0.4394e-5_rp, 0.9145e-5_rp, 0.1725e-4_rp, &
2090 0.3348e-4_rp, 0.1725e-4_rp, 0.9175e-5_rp, 0.4412e-5_rp, 0.2252e-5_rp, &
2091 0.9115e-6_rp, 0.4876e-6_rp, 0.3473e-6_rp, 0.4758e-6_rp, 0.6306e-6_rp, &
2092 0.8573e-6_rp, 0.7868e-6_rp, 0.7192e-6_rp, 0.6513e-6_rp, 0.5956e-6_rp, &
2093 0.5333e-6_rp, 0.4834e-6_rp /)
2094 real(RP),
parameter :: a2_tab(32) = (/ &
2095 0.0100_rp, 0.4006_rp, 0.4831_rp, 0.5320_rp, 0.5307_rp, &
2096 0.5319_rp, 0.5249_rp, 0.4888_rp, 0.3849_rp, 0.4047_rp, &
2097 0.4318_rp, 0.4771_rp, 0.5183_rp, 0.5463_rp, 0.5651_rp, &
2098 0.5813_rp, 0.5655_rp, 0.5478_rp, 0.5203_rp, 0.4906_rp, &
2099 0.4447_rp, 0.4126_rp, 0.3960_rp, 0.4149_rp, 0.4320_rp, &
2100 0.4506_rp, 0.4483_rp, 0.4460_rp, 0.4433_rp, 0.4413_rp, &
2101 0.4382_rp, 0.4361_rp /)
2111 temc = min( max( temp(k)-tem00, -30.99_rp ), 0.0_rp )
2112 itemc = int( -temc ) + 1
2113 fact = - ( temc +
real(itemc-1,kind=8) )
2115 a1(k) = ( 1.0_rp-fact ) * a1_tab(itemc ) &
2116 + ( fact ) * a1_tab(itemc+1)
2118 a2(k) = ( 1.0_rp-fact ) * a2_tab(itemc ) &
2119 + ( fact ) * a2_tab(itemc+1)
2121 ma2(k) = 1.0_rp - a2(k)
2123 a1(k) = a1(k) * exp( log(1.e-3_rp)*ma2(k) )
2128 end subroutine mp_tomita08_bergeronparam
2133 KA, KS, KE, IA, IS, IE, JA, JS, JE, &
2144 integer,
intent(in) :: KA, KS, KE
2145 integer,
intent(in) :: IA, IS, IE
2146 integer,
intent(in) :: JA, JS, JE
2148 real(RP),
intent(in) :: QTRC(ka,ia,ja,qa_mp-1)
2150 real(RP),
intent(out) :: Qe(ka,ia,ja,
n_hyd)
2152 integer :: k, i, j, ih
2160 qe(k,i,j,
i_hc) = qtrc(k,i,j,i_hyd_qc)
2169 qe(k,i,j,
i_hr) = qtrc(k,i,j,i_hyd_qr)
2178 qe(k,i,j,
i_hi) = qtrc(k,i,j,i_hyd_qi)
2187 qe(k,i,j,
i_hs) = qtrc(k,i,j,i_hyd_qs)
2196 qe(k,i,j,
i_hg) = qtrc(k,i,j,i_hyd_qg)
2206 qe(k,i,j,ih) = 0.0_rp
2218 KA, KS, KE, IA, IS, IE, JA, JS, JE, &
2231 integer,
intent(in) :: KA, KS, KE
2232 integer,
intent(in) :: IA, IS, IE
2233 integer,
intent(in) :: JA, JS, JE
2234 real(RP),
intent(in) :: Qe (ka,ia,ja,
n_hyd)
2235 real(RP),
intent(out) :: QTRC(ka,ia,ja,qa_mp-1)
2245 qtrc(k,i,j,i_hyd_qc) = qe(k,i,j,
i_hc)
2254 qtrc(k,i,j,i_hyd_qr) = qe(k,i,j,
i_hr)
2263 qtrc(k,i,j,i_hyd_qi) = qe(k,i,j,
i_hi)
2272 qtrc(k,i,j,i_hyd_qs) = qe(k,i,j,
i_hs)
2281 qtrc(k,i,j,i_hyd_qg) = qe(k,i,j,
i_hg) + qe(k,i,j,
i_hh)
integer, parameter, public atmos_phy_mp_tomita08_nices
module atmosphere / saturation
integer, parameter, public atmos_phy_mp_tomita08_nwaters
real(rp), public cv_ice
CV for ice [J/kg/K].
real(rp), parameter, public const_dwatr
density of water [kg/m3]
character(len=h_mid), dimension(qa_mp), parameter, public atmos_phy_mp_tomita08_tracer_descriptions
real(rp), public cp_ice
CP for ice [J/kg/K].
integer, parameter, public i_hs
snow
real(rp) function, public sf_gamma(x)
Gamma function.
subroutine, public atmos_phy_mp_tomita08_terminal_velocity(KA, KS, KE, DENS0, TEMP0, RHOQ0, vterm)
Lin-type cold rain microphysics (terminal velocity)
real(rp), parameter, public const_cl
specific heat (liquid water) [J/kg/K]
integer, parameter, public i_hr
liquid water rain
integer, parameter, public i_hi
ice water cloud
subroutine, public atmos_phy_mp_tomita08_qhyd2qtrc(KA, KS, KE, IA, IS, IE, JA, JS, JE, Qe, QTRC)
get mass ratio of each category
real(rp), parameter, public const_tem00
temperature reference (0C) [K]
integer, public io_fid_conf
Config file ID.
subroutine, public file_history_reg(name, desc, unit, itemid, standard_name, ndims, dim_type, cell_measures, fill_halo)
Register/Append variable to history file.
integer, parameter, public i_hh
hail
real(rp), public const_lhf0
latent heat of fusion at 0C [J/kg]
real(rp), parameter, public const_dice
density of ice [kg/m3]
subroutine, public atmos_phy_mp_tomita08_effective_radius(KA, KS, KE, IA, IS, IE, JA, JS, JE, DENS0, TEMP0, QTRC0, Re)
Calculate Effective Radius.
character(len=h_short), dimension(qa_mp), parameter, public atmos_phy_mp_tomita08_tracer_units
real(rp), public const_undef
real(rp), parameter, public const_lhs0
latent heat of sublimation at 0C [J/kg]
module ATMOSPHERE / Physics Cloud Microphysics - Common
subroutine, public atmos_phy_mp_tomita08_qtrc2qhyd(KA, KS, KE, IA, IS, IE, JA, JS, JE, QTRC, Qe)
Calculate mass ratio of each category.
real(rp), public cv_vapor
CV for vapor [J/kg/K].
module atmosphere / hydrometeor
real(rp), parameter, public const_lhv0
latent heat of vaporizaion at 0C [J/kg]
real(rp), public const_pre00
pressure reference [Pa]
real(rp), public const_grav
standard acceleration of gravity [m/s2]
character(len=h_short), dimension(qa_mp), parameter, public atmos_phy_mp_tomita08_tracer_names
real(rp), public lhf
latent heat of fusion for use [J/kg]
real(rp), parameter, public const_rvap
specific gas constant (water vapor) [J/kg/K]
subroutine, public prc_abort
Abort Process.
real(rp), public lhv
latent heat of vaporization for use [J/kg]
integer, parameter, public i_hc
liquid water cloud
subroutine, public atmos_phy_mp_tomita08_setup(KA, KS, KE, IA, IS, IE, JA, JS, JE)
ATMOS_PHY_MP_tomita08_setup Setup.
subroutine, public prof_rapstart(rapname_base, level)
Start raptime.
real(rp), public const_eps
small number
real(rp), public const_pi
pi
subroutine, public atmos_phy_mp_tomita08_adjustment(KA, KS, KE, IA, IS, IE, JA, JS, JE, DENS, PRES, CCN, dt, TEMP, QTRC, CPtot, CVtot, RHOE_t, EVAPORATE)
ATMOS_PHY_MP_tomita08_adjustment calculate state after saturation process.
integer, parameter, public n_hyd
module atmosphere / physics / microphysics / Tomita08
subroutine, public prof_rapend(rapname_base, level)
Save raptime.
real(rp), public cp_vapor
CP for vapor [J/kg/K].
integer, parameter, public atmos_phy_mp_tomita08_ntracers
real(rp), public cp_water
CP for water [J/kg/K].
integer, parameter, public i_hg
graupel
subroutine, public atmos_phy_mp_tomita08_cloud_fraction(KA, KS, KE, IA, IS, IE, JA, JS, JE, QTRC, mask_criterion, cldfrac)
Calculate Cloud Fraction.
real(rp), public cv_water
CV for water [J/kg/K].