78 subroutine precpd (im,ix,km,dt,del,prsl,q,cwm,t,rn,sr
79 &, rainp,u00k,psautco,prautco,evpco,wminco
125 use machine
, only : kind_phys
126 use funcphys
, only : fpvs
129 &, eps => con_eps, epsm1 => con_epsm1
133 real (kind=kind_phys) g, h1, h1000
138 parameter(g=grav, h1=1.e0, h1000=1000.0
140 &, elwv=hvap, eliv=hvap+hfus, row=1.e3
142 &, eliw=eliv-elwv, rcp=h1/cp, rrow=h1/row)
144 real(kind=kind_phys),
parameter :: cons_0=0.0, cons_p01=0.01
146 &, cons_m30=-30.0, cons_50=50.0
148 integer im, ix, km, jpr
149 real (kind=kind_phys) q(ix,km), t(ix,km), cwm(ix,km)
150 &, del(ix,km), prsl(ix,km)
153 &, rainp(im,km), rnp(im),
154 & psautco(im), prautco(im), evpco, wminco(2)
157 real (kind=kind_phys) err(im), ers(im), precrl(im)
158 &, precsl(im), precrl1(im), precsl1(im)
160 &, conde(im), rconde(im), tmt0(im)
161 &, wmin(im,km), wmink(im), pres(im)
162 &, wmini(im,km), ccr(im)
163 &, tt(im), qq(im), ww(im)
166 real (kind=kind_phys) cclim(km)
168 integer iw(im,km), ipr(im), iwl(im), iwl1(im)
173 real (kind=kind_phys) ke, rdt, us, climit, cws, csm1
174 &, crs1, crs2, cr, aa2, dtcp, c00, cmr
177 &, precrk, precsk, pres1, qk, qw, qi
178 &, qint, fiw, wws, cwmk, expf
179 &, psaut, psaci, amaxcm, tem1, tem2
180 &, tmt0k, psm1, psm2, ppr
181 &, rprs, erk, pps, sid, rid, amaxps
182 &, praut, fi, qc, amaxrq, rqkll
183 integer i, k, ihpr, n
207 csm1 = 5.0000e-8 * zaodt
208 crs1 = 5.00000e-6 * zaodt
209 crs2 = 6.66600e-10 * zaodt
211 aa2 = 1.25e-3 * zaodt
234 tem = (prsl(i,k)*0.00001)
241 wmin(i,k) = wminco(1) * tem
242 wmini(i,k) = wminco(2) * tem
278 tem = min(wmin(i,k), wmini(i,k))
279 if (cwm(i,k) > tem) comput(i) = .true.
295 precrl(n) = precrl1(n)
296 precsl(n) = precsl1(n)
308 precrk = max(cons_0, precrl1(n))
309 precsk = max(cons_0, precsl1(n))
310 wwn = max(ww(n), climit)
312 if (wwn > climit .or. (precrk+precsk) > d00)
then
323 conde(n) = (dt/g) * del(i,k)
324 condt(n) = conde(n) * rdt
325 rconde(n) = h1 / conde(n)
326 qk = max(epsq, qq(n))
327 tmt0(n) = tt(n) - 273.16
328 wwn = max(ww(n), climit)
338 qw = min(pres1, fpvs(tt(n)))
339 qw = eps * qw / (pres1 + epsm1 * qw)
359 if(tmt0(n) < -15.)
then
360 fi = qk - u00k(i,k)*qi
361 if(fi > d00 .or. wwn > climit)
then
367 elseif (tmt0(n) >= 0.)
then
373 if(iwl1(n) == 1 .and. wwn > climit) iwl(n) = 1
381 qc = (h1-fiw)*qint + fiw*qi
383 if(qc <= 1.0e-10)
then
390 if(rq(n) < u00k(i,k))
then
392 elseif(rq(n) >= us)
then
395 rqkll = min(us,rq(n))
396 ccr(n) = h1-sqrt((us-rqkll)/(us-u00k(i,k)))
446 if (comput(n) .and. ccr(n) > 0.0)
then
448 cwmk = max(cons_0, wws)
451 if (iwl(n) == 1)
then
452 amaxcm = max(cons_0, cwmk - wmini(i,k))
453 expf = dt * exp(0.025*tmt0(n))
454 psaut = min(cwmk, psautco(i)*expf*amaxcm)
455 ww(n) = ww(n) - psaut
456 cwmk = max(cons_0, ww(n))
458 psaci = min(cwmk, aa2*expf*precsl1(n)*cwmk)
460 ww(n) = ww(n) - psaci
461 precsl(n) = precsl(n) + (wws - ww(n)) * condt(n)
474 amaxcm = max(cons_0, cwmk - wmink(n))
476 tem1 = precsl1(n) + precrl1(n)
477 tem2 = min(max(cons_0, 268.0-tt(n)), cons_20)
478 tem = (1.0+c1*sqrt(tem1*rdt)) * (1+c2*sqrt(tem2))
480 tem2 = amaxcm * cmr * tem / max(ccr(n),cons_p01)
481 tem2 = min(cons_50, tem2*tem2)
483 praut = (prautco(i)*dt) * tem * amaxcm
485 praut = min(praut, cwmk)
486 ww(n) = ww(n) - praut
508 precrl(n) = precrl(n) + (wws - ww(n)) * condt(n)
512 rnp(n) = rnp(n) + (wws - ww(n))
545 qk = max(epsq, qq(n))
546 tmt0k = max(cons_m30, tmt0(n))
547 precrk = max(cons_0, precrl(n))
548 precsk = max(cons_0, precsl(n))
549 amaxrq = max(cons_0, u00k(i,k)-rq(n)) * conde(n)
553 ppr = ke * amaxrq * sqrt(precrk)
555 if (tmt0(n) .ge. 0.)
then
558 pps = (crs1+crs2*tmt0k) * amaxrq * precsk / u00k(i,k)
562 if(rq(n).ge.1.0e-10) erk = amaxrq * qk * rdt / rq(n)
563 if (ppr+pps .gt. abs(erk))
then
564 rprs = erk / (precrk+precsk)
568 ppr = min(ppr, precrk)
569 pps = min(pps, precsk)
570 err(n) = ppr * rconde(n)
571 ers(n) = pps * rconde(n)
572 precrl(n) = precrl(n) - ppr
576 rnp(n) = rnp(n) - err(n)
578 precsl(n) = precsl(n) - pps
615 if (tmt0(n) .gt. 0.)
then
616 amaxps = max(cons_0, precsl(n))
617 psm1 = csm1 * tmt0(n) * tmt0(n) * amaxps
618 psm2 = cws * cr * max(cons_0, ww(n)) * amaxps
619 ppr = (psm1 + psm2) * conde(n)
620 if (ppr .gt. amaxps)
then
622 psm1 = amaxps * rconde(n)
624 precrl(n) = precrl(n) + ppr
628 rnp(n) = rnp(n) + ppr * rconde(n)
630 precsl(n) = precsl(n) - ppr
644 tt(n) = tt(n) - dtcp * (elwv*err(n)+eliv*ers(n)+eliw*psm1)
645 qq(n) = qq(n) + dt * (err(n)+ers(n))
651 precrl1(n) = max(cons_0, precrl(n))
652 precsl1(n) = max(cons_0, precsl(n))
667 if (cwm(i,k) < 0.)
then
668 tem = q(i,k) + cwm(i,k)
671 t(i,k) = t(i,k) - elwv * rcp * cwm(i,k)
673 elseif (q(i,k) > 0.0)
then
675 t(i,k) = t(i,k) + elwv * rcp * q(i,k)
696 rn(i) = (precrl1(n) + precsl1(n)) * rrow
709 rid = precrl1(n) + precsl1(n)
710 if (rid < 1.e-13)
then
713 sr(i) = precsl1(n)/rid
real(kind=kind_phys), parameter con_g
gravity ( )
subroutine precpd(im, ix, km, dt, del, prsl, q, cwm, t, rn, sr , rainp, u00k, psautco, prautco, evpco, wminco , lprnt, jpr)
real(kind=kind_phys), parameter con_hfus
lat heat H2O fusion ( )
real(kind=kind_phys), parameter con_cp
spec heat air at p ( )
real(kind=kind_phys), parameter con_hvap
lat heat H2O cond ( )
real(kind=kind_phys), parameter con_ttp
temp at H2O 3pt (K)