37 real,
parameter::
esl = 0.621971831
38 real,
parameter::
tice = 273.16
41 real,
parameter::
c_liq = 4.1855e+3
50 real,
parameter::
hlv0 = 2.5e6
51 real,
parameter::
hlf0 = 3.3358e5
54 real,
parameter::
t_ice = 273.16
74 & , dt, tau, nwat, delp, delp_tl, pe, pe_tl, peln, peln_tl, pkz, &
75 & pkz_tl, ta, ta_tl, qa, qa_tl, ua, ua_tl, va, va_tl, hydrostatic, w, &
76 & w_tl, delz, delz_tl, u_dt, v_dt, t_dt, k_bot)
80 INTEGER,
INTENT(IN) :: is, ie, js, je, km, nq, nwat
81 INTEGER,
INTENT(IN) :: isd, ied, jsd, jed
83 INTEGER,
INTENT(IN) :: tau
85 REAL,
INTENT(IN) :: dt
86 REAL,
INTENT(IN) :: pe(is-1:ie+1, km+1, js-1:je+1)
87 REAL,
INTENT(IN) :: pe_tl(is-1:ie+1, km+1, js-1:je+1)
88 REAL,
INTENT(IN) :: peln(is:ie, km+1, js:je)
89 REAL,
INTENT(IN) :: peln_tl(is:ie, km+1, js:je)
91 REAL,
INTENT(IN) :: delp(isd:ied, jsd:jed, km)
92 REAL,
INTENT(IN) :: delp_tl(isd:ied, jsd:jed, km)
94 REAL,
INTENT(IN) :: delz(isd:, jsd:, :)
95 REAL,
INTENT(IN) :: delz_tl(isd:, jsd:, :)
96 REAL,
INTENT(IN) :: pkz(is:ie, js:je, km)
97 REAL,
INTENT(IN) :: pkz_tl(is:ie, js:je, km)
98 LOGICAL,
INTENT(IN) :: hydrostatic
99 INTEGER,
INTENT(IN),
OPTIONAL :: k_bot
101 REAL,
INTENT(INOUT) :: ua(isd:ied, jsd:jed, km)
102 REAL,
INTENT(INOUT) :: ua_tl(isd:ied, jsd:jed, km)
103 REAL,
INTENT(INOUT) :: va(isd:ied, jsd:jed, km)
104 REAL,
INTENT(INOUT) :: va_tl(isd:ied, jsd:jed, km)
105 REAL,
INTENT(INOUT) :: w(isd:, jsd:, :)
106 REAL,
INTENT(INOUT) :: w_tl(isd:, jsd:, :)
108 REAL,
INTENT(INOUT) :: ta(isd:ied, jsd:jed, km)
109 REAL,
INTENT(INOUT) :: ta_tl(isd:ied, jsd:jed, km)
111 REAL,
INTENT(INOUT) :: qa(isd:ied, jsd:jed, km, nq)
112 REAL,
INTENT(INOUT) :: qa_tl(isd:ied, jsd:jed, km, nq)
113 REAL,
INTENT(INOUT) :: u_dt(isd:ied, jsd:jed, km)
114 REAL,
INTENT(INOUT) :: v_dt(isd:ied, jsd:jed, km)
115 REAL,
INTENT(INOUT) :: t_dt(is:ie, js:je, km)
117 REAL,
DIMENSION(is:ie, km) :: u0, v0, w0, t0, hd, te, gz, tvm, pm, &
119 REAL,
DIMENSION(is:ie, km) :: u0_tl, v0_tl, w0_tl, t0_tl, hd_tl, &
120 & te_tl, gz_tl, tvm_tl, pm_tl
121 REAL :: q0(is:ie, km, nq), qcon(is:ie, km)
122 REAL :: q0_tl(is:ie, km, nq), qcon_tl(is:ie, km)
123 REAL,
DIMENSION(is:ie) :: gzh, lcp2, icp2, cvm, cpm, qs
124 REAL,
DIMENSION(is:ie) :: gzh_tl, cvm_tl, cpm_tl
125 REAL :: ri_ref, ri, pt1, pt2, ratio, tv, cv, tmp, q_liq, q_sol
126 REAL :: ri_ref_tl, ri_tl, pt1_tl, pt2_tl, tv_tl, tmp_tl, q_liq_tl, &
128 REAL :: tv1, tv2, g2, h0, mc, fra, rk, rz, rdt, tvd, tv_surf
129 REAL :: tv1_tl, tv2_tl, h0_tl, mc_tl
130 REAL :: dh, dq, qsw, dqsdt, tcp3, t_max, t_min
131 INTEGER :: i, j, k, kk, n, m, iq, km1, im, kbot
132 REAL,
PARAMETER :: ustar2=1.e-4
134 INTEGER :: sphum, liq_wat, rainwat, snowwat, graupel, ice_wat, &
154 IF (
PRESENT(k_bot))
THEN 155 IF (k_bot .LT. 3)
THEN 163 IF (pe(is, 1, js) .LT. 2.)
THEN 173 IF (k_bot .LT. min1)
THEN 182 IF (nwat .EQ. 0)
THEN 189 IF (nwat .EQ. 3)
THEN 225 q0_tl(i, k, iq) = qa_tl(i, j, k, iq)
226 q0(i, k, iq) = qa(i, j, k, iq)
232 t0_tl(i, k) = ta_tl(i, j, k)
233 t0(i, k) = ta(i, j, k)
234 tvm_tl(i, k) = t0_tl(i, k)*(1.+xvir*q0(i, k, sphum)) + t0(i, k&
235 & )*xvir*q0_tl(i, k, sphum)
236 tvm(i, k) = t0(i, k)*(1.+xvir*q0(i, k, sphum))
237 u0_tl(i, k) = ua_tl(i, j, k)
238 u0(i, k) = ua(i, j, k)
239 v0_tl(i, k) = va_tl(i, j, k)
240 v0(i, k) = va(i, j, k)
241 pm_tl(i, k) = (delp_tl(i, j, k)*(peln(i, k+1, j)-peln(i, k, j)&
242 & )-delp(i, j, k)*(peln_tl(i, k+1, j)-peln_tl(i, k, j)))/(peln&
243 & (i, k+1, j)-peln(i, k, j))**2
244 pm(i, k) = delp(i, j, k)/(peln(i, k+1, j)-peln(i, k, j))
251 IF (hydrostatic)
THEN 254 tv_tl =
rdgas*tvm_tl(i, k)
256 den(i, k) = pm(i, k)/tv
257 gz_tl(i, k) = gzh_tl(i) + tv_tl*(1.-pe(i, k, j)/pm(i, k)) - &
258 & tv*(pe_tl(i, k, j)*pm(i, k)-pe(i, k, j)*pm_tl(i, k))/pm(i&
260 gz(i, k) = gzh(i) + tv*(1.-pe(i, k, j)/pm(i, k))
261 hd_tl(i, k) =
cp_air*tvm_tl(i, k) + gz_tl(i, k) + 0.5*(2*u0(&
262 & i, k)*u0_tl(i, k)+2*v0(i, k)*v0_tl(i, k))
263 hd(i, k) =
cp_air*tvm(i, k) + gz(i, k) + 0.5*(u0(i, k)**2+v0&
265 gzh_tl(i) = gzh_tl(i) + tv_tl*(peln(i, k+1, j)-peln(i, k, j)&
266 & ) + tv*(peln_tl(i, k+1, j)-peln_tl(i, k, j))
267 gzh(i) = gzh(i) + tv*(peln(i, k+1, j)-peln(i, k, j))
272 IF (nwat .EQ. 0)
THEN 279 ELSE IF (nwat .EQ. 1)
THEN 283 cpm(i) = (1.-q0(i, k, sphum))*
cp_air + q0(i, k, sphum)*&
285 cvm_tl(i) =
cv_vap*q0_tl(i, k, sphum) - cv_air*q0_tl(i, k&
287 cvm(i) = (1.-q0(i, k, sphum))*cv_air + q0(i, k, sphum)*&
290 ELSE IF (nwat .EQ. 2)
THEN 295 cpm(i) = (1.-q0(i, k, sphum))*
cp_air + q0(i, k, sphum)*&
297 cvm_tl(i) =
cv_vap*q0_tl(i, k, sphum) - cv_air*q0_tl(i, k&
299 cvm(i) = (1.-q0(i, k, sphum))*cv_air + q0(i, k, sphum)*&
302 ELSE IF (nwat .EQ. 3)
THEN 304 q_liq_tl = q0_tl(i, k, liq_wat)
305 q_liq = q0(i, k, liq_wat)
306 q_sol_tl = q0_tl(i, k, ice_wat)
307 q_sol = q0(i, k, ice_wat)
308 cpm_tl(i) =
cp_air*(-q0_tl(i, k, sphum)-q_liq_tl-q_sol_tl)&
311 cpm(i) = (1.-(q0(i, k, sphum)+q_liq+q_sol))*
cp_air + q0(i&
313 cvm_tl(i) = cv_air*(-q0_tl(i, k, sphum)-q_liq_tl-q_sol_tl)&
316 cvm(i) = (1.-(q0(i, k, sphum)+q_liq+q_sol))*cv_air + q0(i&
319 ELSE IF (nwat .EQ. 4)
THEN 321 q_liq_tl = q0_tl(i, k, liq_wat) + q0_tl(i, k, rainwat)
322 q_liq = q0(i, k, liq_wat) + q0(i, k, rainwat)
323 cpm_tl(i) =
cp_air*(-q0_tl(i, k, sphum)-q_liq_tl) + &
325 cpm(i) = (1.-(q0(i, k, sphum)+q_liq))*
cp_air + q0(i, k, &
327 cvm_tl(i) = cv_air*(-q0_tl(i, k, sphum)-q_liq_tl) +
cv_vap&
328 & *q0_tl(i, k, sphum) +
c_liq*q_liq_tl
329 cvm(i) = (1.-(q0(i, k, sphum)+q_liq))*cv_air + q0(i, k, &
334 q_liq_tl = q0_tl(i, k, liq_wat) + q0_tl(i, k, rainwat)
335 q_liq = q0(i, k, liq_wat) + q0(i, k, rainwat)
336 q_sol_tl = q0_tl(i, k, ice_wat) + q0_tl(i, k, snowwat) + &
337 & q0_tl(i, k, graupel)
338 q_sol = q0(i, k, ice_wat) + q0(i, k, snowwat) + q0(i, k, &
340 cpm_tl(i) =
cp_air*(-q0_tl(i, k, sphum)-q_liq_tl-q_sol_tl)&
343 cpm(i) = (1.-(q0(i, k, sphum)+q_liq+q_sol))*
cp_air + q0(i&
345 cvm_tl(i) = cv_air*(-q0_tl(i, k, sphum)-q_liq_tl-q_sol_tl)&
348 cvm(i) = (1.-(q0(i, k, sphum)+q_liq+q_sol))*cv_air + q0(i&
353 den(i, k) = -(delp(i, j, k)/(
grav*delz(i, j, k)))
354 w0_tl(i, k) = w_tl(i, j, k)
355 w0(i, k) = w(i, j, k)
356 gz_tl(i, k) = gzh_tl(i) - g2*delz_tl(i, j, k)
357 gz(i, k) = gzh(i) - g2*delz(i, j, k)
358 tmp_tl = gz_tl(i, k) + 0.5*(2*u0(i, k)*u0_tl(i, k)+2*v0(i, k&
359 & )*v0_tl(i, k)+2*w0(i, k)*w0_tl(i, k))
360 tmp = gz(i, k) + 0.5*(u0(i, k)**2+v0(i, k)**2+w0(i, k)**2)
361 hd_tl(i, k) = cpm_tl(i)*t0(i, k) + cpm(i)*t0_tl(i, k) + &
363 hd(i, k) = cpm(i)*t0(i, k) + tmp
364 te_tl(i, k) = cvm_tl(i)*t0(i, k) + cvm(i)*t0_tl(i, k) + &
366 te(i, k) = cvm(i)*t0(i, k) + tmp
367 gzh_tl(i) = gzh_tl(i) -
grav*delz_tl(i, j, k)
368 gzh(i) = gzh(i) -
grav*delz(i, j, k)
374 IF (n .EQ. 1) ratio = 0.25
375 IF (n .EQ. 2) ratio = 0.5
376 IF (n .EQ. 3) ratio = 0.999
378 ratio =
REAL(n)/
REAL(m)
385 IF (nwat .LT. 2)
THEN 392 ELSE IF (nwat .EQ. 2)
THEN 396 qcon_tl(i, k) = q0_tl(i, k, liq_wat)
397 qcon(i, k) = q0(i, k, liq_wat)
400 ELSE IF (nwat .EQ. 3)
THEN 403 qcon_tl(i, k) = q0_tl(i, k, liq_wat) + q0_tl(i, k, ice_wat&
405 qcon(i, k) = q0(i, k, liq_wat) + q0(i, k, ice_wat)
408 ELSE IF (nwat .EQ. 4)
THEN 411 qcon_tl(i, k) = q0_tl(i, k, liq_wat) + q0_tl(i, k, rainwat&
413 qcon(i, k) = q0(i, k, liq_wat) + q0(i, k, rainwat)
419 qcon_tl(i, k) = q0_tl(i, k, liq_wat) + q0_tl(i, k, ice_wat&
420 & ) + q0_tl(i, k, snowwat) + q0_tl(i, k, rainwat) + q0_tl(&
422 qcon(i, k) = q0(i, k, liq_wat) + q0(i, k, ice_wat) + q0(i&
423 & , k, snowwat) + q0(i, k, rainwat) + q0(i, k, graupel)
432 tv1_tl = t0_tl(i, km1)*(1.+xvir*q0(i, km1, sphum)-qcon(i, &
433 & km1)) + t0(i, km1)*(xvir*q0_tl(i, km1, sphum)-qcon_tl(i, &
435 tv1 = t0(i, km1)*(1.+xvir*q0(i, km1, sphum)-qcon(i, km1))
436 tv2_tl = t0_tl(i, k)*(1.+xvir*q0(i, k, sphum)-qcon(i, k)) + &
437 & t0(i, k)*(xvir*q0_tl(i, k, sphum)-qcon_tl(i, k))
438 tv2 = t0(i, k)*(1.+xvir*q0(i, k, sphum)-qcon(i, k))
439 pt1_tl = (tv1_tl*pkz(i, j, km1)-tv1*pkz_tl(i, j, km1))/pkz(i&
441 pt1 = tv1/pkz(i, j, km1)
442 pt2_tl = (tv2_tl*pkz(i, j, k)-tv2*pkz_tl(i, j, k))/pkz(i, j&
444 pt2 = tv2/pkz(i, j, k)
446 ri_tl = (((gz_tl(i, km1)-gz_tl(i, k))*(pt1-pt2)+(gz(i, km1)-&
447 & gz(i, k))*(pt1_tl-pt2_tl))*0.5*(pt1+pt2)*((u0(i, km1)-u0(i&
448 & , k))**2+(v0(i, km1)-v0(i, k))**2+ustar2)-(gz(i, km1)-gz(i&
449 & , k))*(pt1-pt2)*0.5*((pt1_tl+pt2_tl)*((u0(i, km1)-u0(i, k)&
450 & )**2+(v0(i, km1)-v0(i, k))**2+ustar2)+(pt1+pt2)*(2*(u0(i, &
451 & km1)-u0(i, k))*(u0_tl(i, km1)-u0_tl(i, k))+2*(v0(i, km1)-&
452 & v0(i, k))*(v0_tl(i, km1)-v0_tl(i, k)))))/(0.5*(pt1+pt2)*((&
453 & u0(i, km1)-u0(i, k))**2+(v0(i, km1)-v0(i, k))**2+ustar2))&
455 ri = (gz(i, km1)-gz(i, k))*(pt1-pt2)/(0.5*(pt1+pt2)*((u0(i, &
456 & km1)-u0(i, k))**2+(v0(i, km1)-v0(i, k))**2+ustar2))
457 IF (tv1 .GT. t_max .AND. tv1 .GT. tv2)
THEN 461 ELSE IF (tv2 .LT. t_min)
THEN 462 IF (ri .GT. 0.2)
THEN 469 IF (400.e2 - pm(i, k) .LT. 0.)
THEN 473 max2_tl = -pm_tl(i, k)
474 max2 = 400.e2 - pm(i, k)
487 ri_ref_tl = 4.*ri_ref_tl
489 ELSE IF (k .EQ. 3)
THEN 490 ri_ref_tl = 2.*ri_ref_tl
492 ELSE IF (k .EQ. 4)
THEN 493 ri_ref_tl = 1.5*ri_ref_tl
496 IF (ri .LT. ri_ref)
THEN 497 IF (0.0 .LT. ri/ri_ref)
THEN 498 max1_tl = (ri_tl*ri_ref-ri*ri_ref_tl)/ri_ref**2
504 mc_tl = (ratio*(delp_tl(i, j, km1)*delp(i, j, k)+delp(i, j&
505 & , km1)*delp_tl(i, j, k))*(delp(i, j, km1)+delp(i, j, k))&
506 & -ratio*delp(i, j, km1)*delp(i, j, k)*(delp_tl(i, j, km1)&
507 & +delp_tl(i, j, k)))*(1.-max1)**2/(delp(i, j, km1)+delp(i&
508 & , j, k))**2 - ratio*delp(i, j, km1)*delp(i, j, k)*2*(1.-&
509 & max1)*max1_tl/(delp(i, j, km1)+delp(i, j, k))
510 mc = ratio*delp(i, j, km1)*delp(i, j, k)/(delp(i, j, km1)+&
511 & delp(i, j, k))*(1.-max1)**2
513 h0_tl = mc_tl*(q0(i, k, iq)-q0(i, km1, iq)) + mc*(q0_tl(&
514 & i, k, iq)-q0_tl(i, km1, iq))
515 h0 = mc*(q0(i, k, iq)-q0(i, km1, iq))
516 q0_tl(i, km1, iq) = q0_tl(i, km1, iq) + (h0_tl*delp(i, j&
517 & , km1)-h0*delp_tl(i, j, km1))/delp(i, j, km1)**2
518 q0(i, km1, iq) = q0(i, km1, iq) + h0/delp(i, j, km1)
519 q0_tl(i, k, iq) = q0_tl(i, k, iq) - (h0_tl*delp(i, j, k)&
520 & -h0*delp_tl(i, j, k))/delp(i, j, k)**2
521 q0(i, k, iq) = q0(i, k, iq) - h0/delp(i, j, k)
524 IF (nwat .LT. 2)
THEN 525 qcon_tl(i, km1) = 0.0
527 ELSE IF (nwat .EQ. 2)
THEN 529 qcon_tl(i, km1) = q0_tl(i, km1, liq_wat)
530 qcon(i, km1) = q0(i, km1, liq_wat)
531 ELSE IF (nwat .EQ. 3)
THEN 533 qcon_tl(i, km1) = q0_tl(i, km1, liq_wat) + q0_tl(i, km1&
535 qcon(i, km1) = q0(i, km1, liq_wat) + q0(i, km1, ice_wat)
536 ELSE IF (nwat .EQ. 4)
THEN 538 qcon_tl(i, km1) = q0_tl(i, km1, liq_wat) + q0_tl(i, km1&
540 qcon(i, km1) = q0(i, km1, liq_wat) + q0(i, km1, rainwat)
542 qcon_tl(i, km1) = q0_tl(i, km1, liq_wat) + q0_tl(i, km1&
543 & , ice_wat) + q0_tl(i, km1, snowwat) + q0_tl(i, km1, &
544 & rainwat) + q0_tl(i, km1, graupel)
545 qcon(i, km1) = q0(i, km1, liq_wat) + q0(i, km1, ice_wat)&
546 & + q0(i, km1, snowwat) + q0(i, km1, rainwat) + q0(i, &
550 h0_tl = mc_tl*(u0(i, k)-u0(i, k-1)) + mc*(u0_tl(i, k)-&
552 h0 = mc*(u0(i, k)-u0(i, k-1))
553 u0_tl(i, k-1) = u0_tl(i, k-1) + (h0_tl*delp(i, j, k-1)-h0*&
554 & delp_tl(i, j, k-1))/delp(i, j, k-1)**2
555 u0(i, k-1) = u0(i, k-1) + h0/delp(i, j, k-1)
556 u0_tl(i, k) = u0_tl(i, k) - (h0_tl*delp(i, j, k)-h0*&
557 & delp_tl(i, j, k))/delp(i, j, k)**2
558 u0(i, k) = u0(i, k) - h0/delp(i, j, k)
560 h0_tl = mc_tl*(v0(i, k)-v0(i, k-1)) + mc*(v0_tl(i, k)-&
562 h0 = mc*(v0(i, k)-v0(i, k-1))
563 v0_tl(i, k-1) = v0_tl(i, k-1) + (h0_tl*delp(i, j, k-1)-h0*&
564 & delp_tl(i, j, k-1))/delp(i, j, k-1)**2
565 v0(i, k-1) = v0(i, k-1) + h0/delp(i, j, k-1)
566 v0_tl(i, k) = v0_tl(i, k) - (h0_tl*delp(i, j, k)-h0*&
567 & delp_tl(i, j, k))/delp(i, j, k)**2
568 v0(i, k) = v0(i, k) - h0/delp(i, j, k)
569 IF (hydrostatic)
THEN 571 h0_tl = mc_tl*(hd(i, k)-hd(i, k-1)) + mc*(hd_tl(i, k)-&
573 h0 = mc*(hd(i, k)-hd(i, k-1))
574 hd_tl(i, k-1) = hd_tl(i, k-1) + (h0_tl*delp(i, j, k-1)-&
575 & h0*delp_tl(i, j, k-1))/delp(i, j, k-1)**2
576 hd(i, k-1) = hd(i, k-1) + h0/delp(i, j, k-1)
577 hd_tl(i, k) = hd_tl(i, k) - (h0_tl*delp(i, j, k)-h0*&
578 & delp_tl(i, j, k))/delp(i, j, k)**2
579 hd(i, k) = hd(i, k) - h0/delp(i, j, k)
582 h0_tl = mc_tl*(hd(i, k)-hd(i, k-1)) + mc*(hd_tl(i, k)-&
584 h0 = mc*(hd(i, k)-hd(i, k-1))
585 te_tl(i, k-1) = te_tl(i, k-1) + (h0_tl*delp(i, j, k-1)-&
586 & h0*delp_tl(i, j, k-1))/delp(i, j, k-1)**2
587 te(i, k-1) = te(i, k-1) + h0/delp(i, j, k-1)
588 te_tl(i, k) = te_tl(i, k) - (h0_tl*delp(i, j, k)-h0*&
589 & delp_tl(i, j, k))/delp(i, j, k)**2
590 te(i, k) = te(i, k) - h0/delp(i, j, k)
592 h0_tl = mc_tl*(w0(i, k)-w0(i, k-1)) + mc*(w0_tl(i, k)-&
594 h0 = mc*(w0(i, k)-w0(i, k-1))
595 w0_tl(i, k-1) = w0_tl(i, k-1) + (h0_tl*delp(i, j, k-1)-&
596 & h0*delp_tl(i, j, k-1))/delp(i, j, k-1)**2
597 w0(i, k-1) = w0(i, k-1) + h0/delp(i, j, k-1)
598 w0_tl(i, k) = w0_tl(i, k) - (h0_tl*delp(i, j, k)-h0*&
599 & delp_tl(i, j, k))/delp(i, j, k)**2
600 w0(i, k) = w0(i, k) - h0/delp(i, j, k)
607 IF (hydrostatic)
THEN 610 t0_tl(i, kk) = ((hd_tl(i, kk)-gzh_tl(i)-0.5*(2*u0(i, kk)*&
611 & u0_tl(i, kk)+2*v0(i, kk)*v0_tl(i, kk)))*(rk-pe(i, kk, j)&
612 & /pm(i, kk))+(hd(i, kk)-gzh(i)-0.5*(u0(i, kk)**2+v0(i, kk&
613 & )**2))*(pe_tl(i, kk, j)*pm(i, kk)-pe(i, kk, j)*pm_tl(i, &
614 & kk))/pm(i, kk)**2)/(rk-pe(i, kk, j)/pm(i, kk))**2
615 t0(i, kk) = (hd(i, kk)-gzh(i)-0.5*(u0(i, kk)**2+v0(i, kk)&
616 & **2))/(rk-pe(i, kk, j)/pm(i, kk))
617 gzh_tl(i) = gzh_tl(i) + t0_tl(i, kk)*(peln(i, kk+1, j)-&
618 & peln(i, kk, j)) + t0(i, kk)*(peln_tl(i, kk+1, j)-peln_tl&
620 gzh(i) = gzh(i) + t0(i, kk)*(peln(i, kk+1, j)-peln(i, kk, &
622 t0_tl(i, kk) = (t0_tl(i, kk)*(
rdgas+rz*q0(i, kk, sphum))-&
623 & t0(i, kk)*rz*q0_tl(i, kk, sphum))/(
rdgas+rz*q0(i, kk, &
625 t0(i, kk) = t0(i, kk)/(
rdgas+rz*q0(i, kk, sphum))
629 t0_tl(i, kk) = ((hd_tl(i, kk)-gzh_tl(i)-0.5*(2*u0(i, kk)*&
630 & u0_tl(i, kk)+2*v0(i, kk)*v0_tl(i, kk)))*(rk-pe(i, kk, j)&
631 & /pm(i, kk))*(
rdgas+rz*q0(i, kk, sphum))-(hd(i, kk)-gzh(i&
632 & )-0.5*(u0(i, kk)**2+v0(i, kk)**2))*((rk-pe(i, kk, j)/pm(&
633 & i, kk))*rz*q0_tl(i, kk, sphum)-(pe_tl(i, kk, j)*pm(i, kk&
634 & )-pe(i, kk, j)*pm_tl(i, kk))*(
rdgas+rz*q0(i, kk, sphum))&
635 & /pm(i, kk)**2))/((rk-pe(i, kk, j)/pm(i, kk))*(
rdgas+rz*&
636 & q0(i, kk, sphum)))**2
637 t0(i, kk) = (hd(i, kk)-gzh(i)-0.5*(u0(i, kk)**2+v0(i, kk)&
638 & **2))/((rk-pe(i, kk, j)/pm(i, kk))*(
rdgas+rz*q0(i, kk, &
644 IF (nwat .EQ. 0)
THEN 651 ELSE IF (nwat .EQ. 1)
THEN 654 & q0_tl(i, kk, sphum)
655 cpm(i) = (1.-q0(i, kk, sphum))*
cp_air + q0(i, kk, &
657 cvm_tl(i) =
cv_vap*q0_tl(i, kk, sphum) - cv_air*q0_tl(&
659 cvm(i) = (1.-q0(i, kk, sphum))*cv_air + q0(i, kk, &
662 ELSE IF (nwat .EQ. 2)
THEN 665 & q0_tl(i, kk, sphum)
666 cpm(i) = (1.-q0(i, kk, sphum))*
cp_air + q0(i, kk, &
668 cvm_tl(i) =
cv_vap*q0_tl(i, kk, sphum) - cv_air*q0_tl(&
670 cvm(i) = (1.-q0(i, kk, sphum))*cv_air + q0(i, kk, &
673 ELSE IF (nwat .EQ. 3)
THEN 675 q_liq_tl = q0_tl(i, kk, liq_wat)
676 q_liq = q0(i, kk, liq_wat)
677 q_sol_tl = q0_tl(i, kk, ice_wat)
678 q_sol = q0(i, kk, ice_wat)
679 cpm_tl(i) =
cp_air*(-q0_tl(i, kk, sphum)-q_liq_tl-&
681 & q_liq_tl +
c_ice*q_sol_tl
682 cpm(i) = (1.-(q0(i, kk, sphum)+q_liq+q_sol))*
cp_air + &
685 cvm_tl(i) = cv_air*(-q0_tl(i, kk, sphum)-q_liq_tl-&
687 & q_liq_tl +
c_ice*q_sol_tl
688 cvm(i) = (1.-(q0(i, kk, sphum)+q_liq+q_sol))*cv_air + &
691 ELSE IF (nwat .EQ. 4)
THEN 693 q_liq_tl = q0_tl(i, kk, liq_wat) + q0_tl(i, kk, &
695 q_liq = q0(i, kk, liq_wat) + q0(i, kk, rainwat)
696 cpm_tl(i) =
cp_air*(-q0_tl(i, kk, sphum)-q_liq_tl) + &
698 cpm(i) = (1.-(q0(i, kk, sphum)+q_liq))*
cp_air + q0(i, &
700 cvm_tl(i) = cv_air*(-q0_tl(i, kk, sphum)-q_liq_tl) + &
702 cvm(i) = (1.-(q0(i, kk, sphum)+q_liq))*cv_air + q0(i, &
707 q_liq_tl = q0_tl(i, kk, liq_wat) + q0_tl(i, kk, &
709 q_liq = q0(i, kk, liq_wat) + q0(i, kk, rainwat)
710 q_sol_tl = q0_tl(i, kk, ice_wat) + q0_tl(i, kk, &
711 & snowwat) + q0_tl(i, kk, graupel)
712 q_sol = q0(i, kk, ice_wat) + q0(i, kk, snowwat) + q0(i&
714 cpm_tl(i) =
cp_air*(-q0_tl(i, kk, sphum)-q_liq_tl-&
716 & q_liq_tl +
c_ice*q_sol_tl
717 cpm(i) = (1.-(q0(i, kk, sphum)+q_liq+q_sol))*
cp_air + &
720 cvm_tl(i) = cv_air*(-q0_tl(i, kk, sphum)-q_liq_tl-&
722 & q_liq_tl +
c_ice*q_sol_tl
723 cvm(i) = (1.-(q0(i, kk, sphum)+q_liq+q_sol))*cv_air + &
728 tv_tl = gz_tl(i, kk) + 0.5*(2*u0(i, kk)*u0_tl(i, kk)+2*&
729 & v0(i, kk)*v0_tl(i, kk)+2*w0(i, kk)*w0_tl(i, kk))
730 tv = gz(i, kk) + 0.5*(u0(i, kk)**2+v0(i, kk)**2+w0(i, kk&
732 t0_tl(i, kk) = ((te_tl(i, kk)-tv_tl)*cvm(i)-(te(i, kk)-&
733 & tv)*cvm_tl(i))/cvm(i)**2
734 t0(i, kk) = (te(i, kk)-tv)/cvm(i)
735 hd_tl(i, kk) = cpm_tl(i)*t0(i, kk) + cpm(i)*t0_tl(i, kk)&
737 hd(i, kk) = cpm(i)*t0(i, kk) + tv
746 IF (fra .LT. 1.)
THEN 749 t0_tl(i, k) = ta_tl(i, j, k) + fra*(t0_tl(i, k)-ta_tl(i, j, &
751 t0(i, k) = ta(i, j, k) + (t0(i, k)-ta(i, j, k))*fra
752 u0_tl(i, k) = ua_tl(i, j, k) + fra*(u0_tl(i, k)-ua_tl(i, j, &
754 u0(i, k) = ua(i, j, k) + (u0(i, k)-ua(i, j, k))*fra
755 v0_tl(i, k) = va_tl(i, j, k) + fra*(v0_tl(i, k)-va_tl(i, j, &
757 v0(i, k) = va(i, j, k) + (v0(i, k)-va(i, j, k))*fra
760 IF (.NOT.hydrostatic)
THEN 763 w0_tl(i, k) = w_tl(i, j, k) + fra*(w0_tl(i, k)-w_tl(i, j, &
765 w0(i, k) = w(i, j, k) + (w0(i, k)-w(i, j, k))*fra
772 q0_tl(i, k, iq) = qa_tl(i, j, k, iq) + fra*(q0_tl(i, k, iq&
773 & )-qa_tl(i, j, k, iq))
774 q0(i, k, iq) = qa(i, j, k, iq) + (q0(i, k, iq)-qa(i, j, k&
782 u_dt(i, j, k) = rdt*(u0(i, k)-ua(i, j, k))
783 v_dt(i, j, k) = rdt*(v0(i, k)-va(i, j, k))
785 ta_tl(i, j, k) = t0_tl(i, k)
786 ta(i, j, k) = t0(i, k)
787 ua_tl(i, j, k) = u0_tl(i, k)
788 ua(i, j, k) = u0(i, k)
789 va_tl(i, j, k) = v0_tl(i, k)
790 va(i, j, k) = v0(i, k)
794 qa_tl(i, j, k, iq) = q0_tl(i, k, iq)
795 qa(i, j, k, iq) = q0(i, k, iq)
799 IF (.NOT.hydrostatic)
THEN 803 w_tl(i, j, k) = w0_tl(i, k)
804 w(i, j, k) = w0(i, k)
810 SUBROUTINE fv_subgrid_z(isd, ied, jsd, jed, is, ie, js, je, km, nq, dt&
811 & , tau, nwat, delp, pe, peln, pkz, ta, qa, ua, va, hydrostatic, w, &
812 & delz, u_dt, v_dt, t_dt, k_bot)
816 INTEGER,
INTENT(IN) :: is, ie, js, je, km, nq, nwat
817 INTEGER,
INTENT(IN) :: isd, ied, jsd, jed
819 INTEGER,
INTENT(IN) :: tau
821 REAL,
INTENT(IN) :: dt
822 REAL,
INTENT(IN) :: pe(is-1:ie+1, km+1, js-1:je+1)
823 REAL,
INTENT(IN) :: peln(is:ie, km+1, js:je)
825 REAL,
INTENT(IN) :: delp(isd:ied, jsd:jed, km)
827 REAL,
INTENT(IN) :: delz(isd:, jsd:, :)
828 REAL,
INTENT(IN) :: pkz(is:ie, js:je, km)
829 LOGICAL,
INTENT(IN) :: hydrostatic
830 INTEGER,
INTENT(IN),
OPTIONAL :: k_bot
832 REAL,
INTENT(INOUT) :: ua(isd:ied, jsd:jed, km)
833 REAL,
INTENT(INOUT) :: va(isd:ied, jsd:jed, km)
834 REAL,
INTENT(INOUT) :: w(isd:, jsd:, :)
836 REAL,
INTENT(INOUT) :: ta(isd:ied, jsd:jed, km)
838 REAL,
INTENT(INOUT) :: qa(isd:ied, jsd:jed, km, nq)
839 REAL,
INTENT(INOUT) :: u_dt(isd:ied, jsd:jed, km)
840 REAL,
INTENT(INOUT) :: v_dt(isd:ied, jsd:jed, km)
841 REAL,
INTENT(INOUT) :: t_dt(is:ie, js:je, km)
843 REAL,
DIMENSION(is:ie, km) :: u0, v0, w0, t0, hd, te, gz, tvm, pm, &
845 REAL :: q0(is:ie, km, nq), qcon(is:ie, km)
846 REAL,
DIMENSION(is:ie) :: gzh, lcp2, icp2, cvm, cpm, qs
847 REAL :: ri_ref, ri, pt1, pt2, ratio, tv, cv, tmp, q_liq, q_sol
848 REAL :: tv1, tv2, g2, h0, mc, fra, rk, rz, rdt, tvd, tv_surf
849 REAL :: dh, dq, qsw, dqsdt, tcp3, t_max, t_min
850 INTEGER :: i, j, k, kk, n, m, iq, km1, im, kbot
851 REAL,
PARAMETER :: ustar2=1.e-4
853 INTEGER :: sphum, liq_wat, rainwat, snowwat, graupel, ice_wat, &
870 IF (
PRESENT(k_bot))
THEN 871 IF (k_bot .LT. 3)
THEN 879 IF (pe(is, 1, js) .LT. 2.)
THEN 889 IF (k_bot .LT. min1)
THEN 898 IF (nwat .EQ. 0)
THEN 905 IF (nwat .EQ. 3)
THEN 927 q0(i, k, iq) = qa(i, j, k, iq)
933 t0(i, k) = ta(i, j, k)
934 tvm(i, k) = t0(i, k)*(1.+xvir*q0(i, k, sphum))
935 u0(i, k) = ua(i, j, k)
936 v0(i, k) = va(i, j, k)
937 pm(i, k) = delp(i, j, k)/(peln(i, k+1, j)-peln(i, k, j))
943 IF (hydrostatic)
THEN 947 den(i, k) = pm(i, k)/tv
948 gz(i, k) = gzh(i) + tv*(1.-pe(i, k, j)/pm(i, k))
949 hd(i, k) =
cp_air*tvm(i, k) + gz(i, k) + 0.5*(u0(i, k)**2+v0&
951 gzh(i) = gzh(i) + tv*(peln(i, k+1, j)-peln(i, k, j))
956 IF (nwat .EQ. 0)
THEN 961 ELSE IF (nwat .EQ. 1)
THEN 963 cpm(i) = (1.-q0(i, k, sphum))*
cp_air + q0(i, k, sphum)*&
965 cvm(i) = (1.-q0(i, k, sphum))*cv_air + q0(i, k, sphum)*&
968 ELSE IF (nwat .EQ. 2)
THEN 971 cpm(i) = (1.-q0(i, k, sphum))*
cp_air + q0(i, k, sphum)*&
973 cvm(i) = (1.-q0(i, k, sphum))*cv_air + q0(i, k, sphum)*&
976 ELSE IF (nwat .EQ. 3)
THEN 978 q_liq = q0(i, k, liq_wat)
979 q_sol = q0(i, k, ice_wat)
980 cpm(i) = (1.-(q0(i, k, sphum)+q_liq+q_sol))*
cp_air + q0(i&
982 cvm(i) = (1.-(q0(i, k, sphum)+q_liq+q_sol))*cv_air + q0(i&
985 ELSE IF (nwat .EQ. 4)
THEN 987 q_liq = q0(i, k, liq_wat) + q0(i, k, rainwat)
988 cpm(i) = (1.-(q0(i, k, sphum)+q_liq))*
cp_air + q0(i, k, &
990 cvm(i) = (1.-(q0(i, k, sphum)+q_liq))*cv_air + q0(i, k, &
995 q_liq = q0(i, k, liq_wat) + q0(i, k, rainwat)
996 q_sol = q0(i, k, ice_wat) + q0(i, k, snowwat) + q0(i, k, &
998 cpm(i) = (1.-(q0(i, k, sphum)+q_liq+q_sol))*
cp_air + q0(i&
1000 cvm(i) = (1.-(q0(i, k, sphum)+q_liq+q_sol))*cv_air + q0(i&
1005 den(i, k) = -(delp(i, j, k)/(
grav*delz(i, j, k)))
1006 w0(i, k) = w(i, j, k)
1007 gz(i, k) = gzh(i) - g2*delz(i, j, k)
1008 tmp = gz(i, k) + 0.5*(u0(i, k)**2+v0(i, k)**2+w0(i, k)**2)
1009 hd(i, k) = cpm(i)*t0(i, k) + tmp
1010 te(i, k) = cvm(i)*t0(i, k) + tmp
1011 gzh(i) = gzh(i) -
grav*delz(i, j, k)
1017 IF (n .EQ. 1) ratio = 0.25
1018 IF (n .EQ. 2) ratio = 0.5
1019 IF (n .EQ. 3) ratio = 0.999
1021 ratio =
REAL(n)/
REAL(m)
1027 IF (nwat .LT. 2)
THEN 1033 ELSE IF (nwat .EQ. 2)
THEN 1037 qcon(i, k) = q0(i, k, liq_wat)
1040 ELSE IF (nwat .EQ. 3)
THEN 1043 qcon(i, k) = q0(i, k, liq_wat) + q0(i, k, ice_wat)
1046 ELSE IF (nwat .EQ. 4)
THEN 1049 qcon(i, k) = q0(i, k, liq_wat) + q0(i, k, rainwat)
1055 qcon(i, k) = q0(i, k, liq_wat) + q0(i, k, ice_wat) + q0(i&
1056 & , k, snowwat) + q0(i, k, rainwat) + q0(i, k, graupel)
1065 tv1 = t0(i, km1)*(1.+xvir*q0(i, km1, sphum)-qcon(i, km1))
1066 tv2 = t0(i, k)*(1.+xvir*q0(i, k, sphum)-qcon(i, k))
1067 pt1 = tv1/pkz(i, j, km1)
1068 pt2 = tv2/pkz(i, j, k)
1070 ri = (gz(i, km1)-gz(i, k))*(pt1-pt2)/(0.5*(pt1+pt2)*((u0(i, &
1071 & km1)-u0(i, k))**2+(v0(i, km1)-v0(i, k))**2+ustar2))
1072 IF (tv1 .GT. t_max .AND. tv1 .GT. tv2)
THEN 1075 ELSE IF (tv2 .LT. t_min)
THEN 1076 IF (ri .GT. 0.2)
THEN 1082 IF (400.e2 - pm(i, k) .LT. 0.)
THEN 1085 max2 = 400.e2 - pm(i, k)
1096 ELSE IF (k .EQ. 3)
THEN 1098 ELSE IF (k .EQ. 4)
THEN 1101 IF (ri .LT. ri_ref)
THEN 1102 IF (0.0 .LT. ri/ri_ref)
THEN 1107 mc = ratio*delp(i, j, km1)*delp(i, j, k)/(delp(i, j, km1)+&
1108 & delp(i, j, k))*(1.-max1)**2
1110 h0 = mc*(q0(i, k, iq)-q0(i, km1, iq))
1111 q0(i, km1, iq) = q0(i, km1, iq) + h0/delp(i, j, km1)
1112 q0(i, k, iq) = q0(i, k, iq) - h0/delp(i, j, k)
1115 IF (nwat .LT. 2)
THEN 1117 ELSE IF (nwat .EQ. 2)
THEN 1119 qcon(i, km1) = q0(i, km1, liq_wat)
1120 ELSE IF (nwat .EQ. 3)
THEN 1122 qcon(i, km1) = q0(i, km1, liq_wat) + q0(i, km1, ice_wat)
1123 ELSE IF (nwat .EQ. 4)
THEN 1125 qcon(i, km1) = q0(i, km1, liq_wat) + q0(i, km1, rainwat)
1127 qcon(i, km1) = q0(i, km1, liq_wat) + q0(i, km1, ice_wat)&
1128 & + q0(i, km1, snowwat) + q0(i, km1, rainwat) + q0(i, &
1132 h0 = mc*(u0(i, k)-u0(i, k-1))
1133 u0(i, k-1) = u0(i, k-1) + h0/delp(i, j, k-1)
1134 u0(i, k) = u0(i, k) - h0/delp(i, j, k)
1136 h0 = mc*(v0(i, k)-v0(i, k-1))
1137 v0(i, k-1) = v0(i, k-1) + h0/delp(i, j, k-1)
1138 v0(i, k) = v0(i, k) - h0/delp(i, j, k)
1139 IF (hydrostatic)
THEN 1141 h0 = mc*(hd(i, k)-hd(i, k-1))
1142 hd(i, k-1) = hd(i, k-1) + h0/delp(i, j, k-1)
1143 hd(i, k) = hd(i, k) - h0/delp(i, j, k)
1146 h0 = mc*(hd(i, k)-hd(i, k-1))
1147 te(i, k-1) = te(i, k-1) + h0/delp(i, j, k-1)
1148 te(i, k) = te(i, k) - h0/delp(i, j, k)
1150 h0 = mc*(w0(i, k)-w0(i, k-1))
1151 w0(i, k-1) = w0(i, k-1) + h0/delp(i, j, k-1)
1152 w0(i, k) = w0(i, k) - h0/delp(i, j, k)
1159 IF (hydrostatic)
THEN 1162 t0(i, kk) = (hd(i, kk)-gzh(i)-0.5*(u0(i, kk)**2+v0(i, kk)&
1163 & **2))/(rk-pe(i, kk, j)/pm(i, kk))
1164 gzh(i) = gzh(i) + t0(i, kk)*(peln(i, kk+1, j)-peln(i, kk, &
1166 t0(i, kk) = t0(i, kk)/(
rdgas+rz*q0(i, kk, sphum))
1170 t0(i, kk) = (hd(i, kk)-gzh(i)-0.5*(u0(i, kk)**2+v0(i, kk)&
1171 & **2))/((rk-pe(i, kk, j)/pm(i, kk))*(
rdgas+rz*q0(i, kk, &
1177 IF (nwat .EQ. 0)
THEN 1182 ELSE IF (nwat .EQ. 1)
THEN 1184 cpm(i) = (1.-q0(i, kk, sphum))*
cp_air + q0(i, kk, &
1186 cvm(i) = (1.-q0(i, kk, sphum))*cv_air + q0(i, kk, &
1189 ELSE IF (nwat .EQ. 2)
THEN 1191 cpm(i) = (1.-q0(i, kk, sphum))*
cp_air + q0(i, kk, &
1193 cvm(i) = (1.-q0(i, kk, sphum))*cv_air + q0(i, kk, &
1196 ELSE IF (nwat .EQ. 3)
THEN 1198 q_liq = q0(i, kk, liq_wat)
1199 q_sol = q0(i, kk, ice_wat)
1200 cpm(i) = (1.-(q0(i, kk, sphum)+q_liq+q_sol))*
cp_air + &
1203 cvm(i) = (1.-(q0(i, kk, sphum)+q_liq+q_sol))*cv_air + &
1206 ELSE IF (nwat .EQ. 4)
THEN 1208 q_liq = q0(i, kk, liq_wat) + q0(i, kk, rainwat)
1209 cpm(i) = (1.-(q0(i, kk, sphum)+q_liq))*
cp_air + q0(i, &
1211 cvm(i) = (1.-(q0(i, kk, sphum)+q_liq))*cv_air + q0(i, &
1216 q_liq = q0(i, kk, liq_wat) + q0(i, kk, rainwat)
1217 q_sol = q0(i, kk, ice_wat) + q0(i, kk, snowwat) + q0(i&
1219 cpm(i) = (1.-(q0(i, kk, sphum)+q_liq+q_sol))*
cp_air + &
1222 cvm(i) = (1.-(q0(i, kk, sphum)+q_liq+q_sol))*cv_air + &
1227 tv = gz(i, kk) + 0.5*(u0(i, kk)**2+v0(i, kk)**2+w0(i, kk&
1229 t0(i, kk) = (te(i, kk)-tv)/cvm(i)
1230 hd(i, kk) = cpm(i)*t0(i, kk) + tv
1239 IF (fra .LT. 1.)
THEN 1242 t0(i, k) = ta(i, j, k) + (t0(i, k)-ta(i, j, k))*fra
1243 u0(i, k) = ua(i, j, k) + (u0(i, k)-ua(i, j, k))*fra
1244 v0(i, k) = va(i, j, k) + (v0(i, k)-va(i, j, k))*fra
1247 IF (.NOT.hydrostatic)
THEN 1250 w0(i, k) = w(i, j, k) + (w0(i, k)-w(i, j, k))*fra
1257 q0(i, k, iq) = qa(i, j, k, iq) + (q0(i, k, iq)-qa(i, j, k&
1265 u_dt(i, j, k) = rdt*(u0(i, k)-ua(i, j, k))
1266 v_dt(i, j, k) = rdt*(v0(i, k)-va(i, j, k))
1268 ta(i, j, k) = t0(i, k)
1269 ua(i, j, k) = u0(i, k)
1270 va(i, j, k) = v0(i, k)
1274 qa(i, j, k, iq) = q0(i, k, iq)
1278 IF (.NOT.hydrostatic)
THEN 1282 w(i, j, k) = w0(i, k)
1288 SUBROUTINE neg_adj3(is, ie, js, je, ng, kbot, hydrostatic, peln, delz&
1289 & , pt, dp, qv, ql, qr, qi, qs, qg, qa, check_negative)
1293 INTEGER,
INTENT(IN) :: is, ie, js, je, ng, kbot
1294 LOGICAL,
INTENT(IN) :: hydrostatic
1296 REAL,
INTENT(IN) :: dp(is-ng:ie+ng, js-ng:je+ng, kbot)
1297 REAL,
INTENT(IN) :: delz(is-ng:, js-ng:, :)
1299 REAL,
INTENT(IN) :: peln(is:ie, kbot+1, js:je)
1300 LOGICAL,
INTENT(IN),
OPTIONAL :: check_negative
1301 REAL,
DIMENSION(is-ng:ie+ng, js-ng:je+ng, kbot),
INTENT(INOUT) :: pt&
1302 & , qv, ql, qr, qi, qs, qg
1303 REAL,
DIMENSION(is-ng:ie+ng, js-ng:je+ng, kbot),
INTENT(INOUT), &
real function, public wqs2(ta, den, dqdt)
integer, parameter, public model_atmos
subroutine, public neg_adj3(is, ie, js, je, ng, kbot, hydrostatic, peln, delz, pt, dp, qv, ql, qr, qi, qs, qg, qa, check_negative)
real, parameter, public hlv
Latent heat of evaporation [J/kg].
subroutine, public fv_subgrid_z_tlm(isd, ied, jsd, jed, is, ie, js, je, km, nq, dt, tau, nwat, delp, delp_tl, pe, pe_tl, peln, peln_tl, pkz, pkz_tl, ta, ta_tl, qa, qa_tl, ua, ua_tl, va, va_tl, hydrostatic, w, w_tl, delz, delz_tl, u_dt, v_dt, t_dt, k_bot)
real, parameter, public rdgas
Gas constant for dry air [J/kg/deg].
real, parameter, public cp_vapor
Specific heat capacity of water vapor at constant pressure [J/kg/deg].
real, dimension(:), allocatable table
real, dimension(:), allocatable des
real, parameter, public rvgas
Gas constant for water vapor [J/kg/deg].
real, parameter, public cp_air
Specific heat capacity of dry air at constant pressure [J/kg/deg].
subroutine, public fv_subgrid_z(isd, ied, jsd, jed, is, ie, js, je, km, nq, dt, tau, nwat, delp, pe, peln, pkz, ta, qa, ua, va, hydrostatic, w, delz, u_dt, v_dt, t_dt, k_bot)
real, parameter, public hlf
Latent heat of fusion [J/kg].
real, parameter, public grav
Acceleration due to gravity [m/s^2].
real function, public wqsat2_moist(ta, qv, pa, dqdt)
real, parameter, public kappa
RDGAS / CP_AIR [dimensionless].