49 character(len=6),
private :: ATMOS_PHY_CP_KF_JMAPPLIB_type =
"KF1701"
50 real(RP),
allocatable,
private :: ishall_counter(:,:)
51 real(RP),
allocatable,
private :: ideep_counter (:,:)
67 use conv_grid,
only: &
69 use conv_kf_const,
only: &
71 use conv_kf_parm,
only: &
73 conv_kf_parm_get_stepcu
74 use conv_kf_parm1701,
only: &
75 conv_kf_parm_ini1701, &
76 conv_kf_parm_get_stepcu1701
77 use conv_kf_lut,
only: &
82 integer,
intent(in) :: ka, ks, ke
83 integer,
intent(in) :: ia, ja
85 real(rp),
intent(in) :: dx
86 real(
dp),
intent(in) :: dt
90 integer :: atmos_phy_cp_kf_jmapplib_radius_type = 3
94 real(rp) :: atmos_phy_cp_kf_jmapplib_dtlcl_fact = 0.5_rp
95 real(rp) :: atmos_phy_cp_kf_jmapplib_dpmin = 5000.0_rp
96 real(rp) :: atmos_phy_cp_kf_jmapplib_dlifetime = 600.0_rp
97 real(rp) :: atmos_phy_cp_kf_jmapplib_slifetime = 600.0_rp
98 real(rp) :: atmos_phy_cp_kf_jmapplib_detlq_qr_rate = 0.0_rp
99 real(rp) :: atmos_phy_cp_kf_jmapplib_detic_qs_rate = 1.0_rp
101 namelist / param_atmos_phy_cp_kf_jmapplib / &
102 atmos_phy_cp_kf_jmapplib_type, &
103 atmos_phy_cp_kf_jmapplib_radius_type, &
104 atmos_phy_cp_kf_jmapplib_dtlcl_fact, &
105 atmos_phy_cp_kf_jmapplib_dpmin, &
106 atmos_phy_cp_kf_jmapplib_dlifetime, &
107 atmos_phy_cp_kf_jmapplib_slifetime, &
108 atmos_phy_cp_kf_jmapplib_detlq_qr_rate, &
109 atmos_phy_cp_kf_jmapplib_detic_qs_rate
118 log_info(
"ATMOS_PHY_CP_KF_JMAPPLIB_setup",*)
'Setup'
119 log_info(
"ATMOS_PHY_CP_KF_JMAPPLIB_setup",*)
'KF scheme implemented in the JMA Physics Process Library'
123 read(
io_fid_conf,nml=param_atmos_phy_cp_kf_jmapplib,iostat=ierr)
125 log_error(
"ATMOS_PHY_CP_KF_JMAPPLIB_setup",*)
'Not appropriate names in namelist PARAM_ATMOS_PHY_CP_KF_JMAPPLIB. Check!'
128 log_nml(param_atmos_phy_cp_kf_jmapplib)
132 call conv_grid_ini( kmax )
133 call conv_kf_const_ini( dx, pre00, dt )
135 select case ( atmos_phy_cp_kf_jmapplib_type )
138 call conv_kf_parm_ini( &
140 kfrad_var_in = atmos_phy_cp_kf_jmapplib_radius_type, &
142 dtlcl_fct_in = atmos_phy_cp_kf_jmapplib_dtlcl_fact, &
143 dpmin_in = atmos_phy_cp_kf_jmapplib_dpmin, &
144 cu_lifetime_min_in = atmos_phy_cp_kf_jmapplib_dlifetime, &
145 shallow_lifetime_in = atmos_phy_cp_kf_jmapplib_slifetime, &
146 detlq_qr_r_in = atmos_phy_cp_kf_jmapplib_detlq_qr_rate, &
147 detic_qs_r_in = atmos_phy_cp_kf_jmapplib_detic_qs_rate )
153 call conv_kf_parm_ini1701( &
155 kfrad_var_in = atmos_phy_cp_kf_jmapplib_radius_type, &
156 kfrad_in = 1000.0_rp, &
158 dpmin_in = atmos_phy_cp_kf_jmapplib_dpmin, &
159 cu_lifetime_min_in = atmos_phy_cp_kf_jmapplib_dlifetime, &
160 shallow_lifetime_in = atmos_phy_cp_kf_jmapplib_slifetime, &
161 detlq_qr_r_in = atmos_phy_cp_kf_jmapplib_detlq_qr_rate, &
162 detic_qs_r_in = atmos_phy_cp_kf_jmapplib_detic_qs_rate, &
168 log_error(
"ATMOS_PHY_CP_KF_JMAPPLIB_setup",*)
'ATMOS_PHY_CP_KF_TYPE must be either "KF" or "KF1701"'
174 allocate( ishall_counter(ia,ja), ideep_counter(ia,ja) )
175 ishall_counter(:,:) = 0.0_rp
176 ideep_counter(:,:) = 0.0_rp
180 log_error(
"ATMOS_PHY_CP_KF_JMAPPLIB_setup",*)
'To use "KF-JMAPPLIB", compile SCALE with "SCALE_ENABLE_JMAPPLIB=T" option.'
195 deallocate( ishall_counter, ideep_counter )
206 KA, KS, KE, IA, IS, IE, JA, JS, JE, &
207 DENS, U, V, W, TEMP, POTT, &
210 us, PBLH, SFLX_BUOY, &
215 SFLX_rain, SFLX_snow, SFLX_prec, &
216 cloudtop, cloudbase )
225 use conv_kf_main,
only: &
227 use conv_kf_main1701,
only: &
229 use pbl_diag,
only: &
230 pbl_diag_buoyancy_excess
234 integer,
intent(in) :: ka, ks, ke
235 integer,
intent(in) :: ia, is, ie
236 integer,
intent(in) :: ja, js, je
238 real(rp),
intent(in) :: dens (ka,ia,ja)
239 real(rp),
intent(in) :: u (ka,ia,ja)
240 real(rp),
intent(in) :: v (ka,ia,ja)
241 real(rp),
intent(in) :: w (ka,ia,ja)
242 real(rp),
intent(in) :: temp (ka,ia,ja)
243 real(rp),
intent(in) :: pott (ka,ia,ja)
244 real(rp),
intent(in) :: pres (ka,ia,ja)
245 real(rp),
intent(in) :: exner(ka,ia,ja)
246 real(rp),
intent(in) :: qdry (ka,ia,ja)
247 real(rp),
intent(in) :: qv (ka,ia,ja)
248 real(rp),
intent(in) :: qc (ka,ia,ja)
249 real(rp),
intent(in) :: qi (ka,ia,ja)
250 real(rp),
intent(in) :: us (ia,ja)
251 real(rp),
intent(in) :: pblh (ia,ja)
252 real(rp),
intent(in) :: sflx_buoy(ia,ja)
253 real(rp),
intent(in) :: cz (ka,ia,ja)
254 real(rp),
intent(in) :: fz (0:ka,ia,ja)
256 real(rp),
intent(out) :: dens_t (ka,ia,ja)
257 real(rp),
intent(inout) :: rhot_t (ka,ia,ja)
258 real(rp),
intent(inout) :: rhoqv_t(ka,ia,ja)
259 real(rp),
intent(inout) :: rhoq_t (ka,ia,ja,
n_hyd)
260 real(rp),
intent(inout) :: w0avg (ka,ia,ja)
261 real(rp),
intent(inout) :: nca (ia,ja)
262 real(rp),
intent(inout) :: sflx_rain(ia,ja)
263 real(rp),
intent(inout) :: sflx_snow(ia,ja)
264 real(rp),
intent(inout) :: sflx_prec(ia,ja)
265 real(rp),
intent(inout) :: cloudtop (ia,ja)
266 real(rp),
intent(inout) :: cloudbase(ia,ja)
270 integer,
parameter :: iconv_run = 1
272 real(rp) :: tend_pt(ks:ke)
273 real(rp) :: tend_qv(ks:ke)
274 real(rp) :: tend_qc(ks:ke)
275 real(rp) :: tend_qr(ks:ke)
276 real(rp) :: tend_qi(ks:ke)
277 real(rp) :: tend_qs(ks:ke)
278 real(rp) :: tend_qg(ks:ke)
279 real(rp) :: dens_lc(ks:ke)
280 real(rp) :: qv_lc (ks:ke)
283 real(rp) :: z_f (ks:ke)
284 real(rp) :: dz_f (ks:ke)
286 real(rp) :: lcl_temp(ia,ja)
294 log_progress(*)
"atmosphere / physics / cumulus / KF-JMAPPLIB"
304 dens_lc(k) = dens(k,i,j) * qdry(k,i,j)
305 qv_lc(k) = qv(k,i,j) / qdry(k,i,j)
306 tend_pt(k) = rhot_t(k,i,j) / dens(k,i,j)
307 tend_qv(k) = rhoqv_t(k,i,j) / dens_lc(k)
308 tend_qc(k) = rhoq_t(k,i,j,
i_hc) / dens_lc(k)
309 tend_qr(k) = rhoq_t(k,i,j,
i_hr) / dens_lc(k)
310 tend_qi(k) = rhoq_t(k,i,j,
i_hi) / dens_lc(k)
311 tend_qs(k) = rhoq_t(k,i,j,
i_hs) / dens_lc(k)
312 tend_qg(k) = rhoq_t(k,i,j,
i_hg) / dens_lc(k)
314 z_f(k) = cz(k,i,j) - fz(ks-1,i,j)
315 dz_f(k) = fz(k,i,j) - fz(k-1,i,j)
318 select case ( atmos_phy_cp_kf_jmapplib_type )
323 u(ks:ke,i,j), v(ks:ke,i,j), w(ks:ke,i,j), temp(ks:ke,i,j), qv_lc(:), &
324 pres(ks:ke,i,j), exner(ks:ke,i,j), dens_lc(:), z_f(:), dz_f(:), &
326 sflx_prec(i,j), sflx_rain(i,j), sflx_snow(i,j), &
327 cloudtop(i,j), cloudbase(i,j), abe_out, &
328 ishall_counter(i,j), ideep_counter(i,j), &
331 tend_pt(:), tend_qv(:), tend_qc(:), &
332 tend_qi(:), tend_qr(:), tend_qs(:) )
334 tend_qg(ks:ke) = 0.0_rp
338 qc_lc = qc(ks,i,j) / qdry(ks,i,j)
339 qi_lc = qi(ks,i,j) / qdry(ks,i,j)
340 call pbl_diag_buoyancy_excess( &
341 pott(ks,i,j), qv_lc(ks),qc_lc, qi_lc, &
342 pblh(i,j), us(i,j), sflx_buoy(i,j), exner(ks,i,j), &
345 call conv_kf_run1701( &
347 u(ks:ke,i,j), v(ks:ke,i,j), w(ks:ke,i,j), temp(ks:ke,i,j), qv_lc(:), &
348 pres(ks:ke,i,j), exner(ks:ke,i,j), dens_lc(:), z_f(:), dz_f(:), &
351 sflx_prec(i,j), sflx_rain(i,j), sflx_snow(i,j), &
352 cloudtop(i,j), cloudbase(i,j), abe_out, &
353 ishall_counter(i,j), ideep_counter(i,j), &
356 tend_pt(:), tend_qv(:), tend_qc(:), &
357 tend_qi(:), tend_qr(:), &
358 tend_qs(:), tend_qg(:) )
362 if ( nca(i,j) < -1 ) nca(i,j) = -1
365 rhot_t(k,i,j) = tend_pt(k) * dens(k,i,j)
366 rhoqv_t(k,i,j) = tend_qv(k) * dens_lc(k)
367 rhoq_t(k,i,j,
i_hc) = tend_qc(k) * dens_lc(k)
368 rhoq_t(k,i,j,
i_hr) = tend_qr(k) * dens_lc(k)
369 rhoq_t(k,i,j,
i_hi) = tend_qi(k) * dens_lc(k)
370 rhoq_t(k,i,j,
i_hs) = tend_qs(k) * dens_lc(k)
371 rhoq_t(k,i,j,
i_hg) = tend_qg(k) * dens_lc(k)
372 dens_t(k,i,j) = rhoqv_t(k,i,j) &
373 + rhoq_t(k,i,j,
i_hc) + rhoq_t(k,i,j,
i_hr) &
374 + rhoq_t(k,i,j,
i_hi) + rhoq_t(k,i,j,
i_hs) + rhoq_t(k,i,j,
i_hg)