40 SUBROUTINE calpw(PW,IDECID)
43 use vrbls3d, only: q, qqw, qqi, qqr, qqs, cwm, qqg, t, rswtt, &
44 train, tcucn, mcvg, pmid, o3, ext, pint, rlwtt, &
49 use ctlblk_mod
, only: lm, jsta, jend, im, spval
57 real,
PARAMETER :: rhowat=1.e3
58 real,
parameter:: con_rd =2.8705e+2
59 real,
parameter:: con_rv =4.6150e+2
60 real,
parameter:: con_eps =con_rd/con_rv
61 real,
parameter:: con_epsm1 =con_rd/con_rv-1
65 integer,
intent(in) :: idecid
66 real,
dimension(IM,jsta:jend),
intent(inout) :: pw
68 REAL alpm,dz,pm,pwsum,rhoair,dp,es
69 REAL qdum(im,jsta:jend), pws(im,jsta:jend),qs(im,jsta:jend)
96 ELSE IF (idecid == 2)
THEN
100 qdum(i,j) = qqw(i,j,l)
103 ELSE IF (idecid == 3)
THEN
107 qdum(i,j) = qqi(i,j,l)
110 ELSE IF (idecid == 4)
THEN
114 qdum(i,j) = qqr(i,j,l)
117 ELSE IF (idecid == 5)
THEN
121 qdum(i,j) = qqs(i,j,l)
124 ELSE IF (idecid == 6)
THEN
128 qdum(i,j) = cwm(i,j,l)
132 ELSE IF (idecid == 16)
THEN
136 qdum(i,j) = qqg(i,j,l)
140 ELSE IF (idecid == 7)
THEN
145 IF (t(i,j,l) >= tfrz)
THEN
148 qdum(i,j) = qqw(i,j,l) + qqr(i,j,l)
152 ELSE IF (idecid == 8)
THEN
157 IF (t(i,j,l) <= tfrz)
THEN
160 qdum(i,j) = qqi(i,j,l) + qqs(i,j,l)
164 ELSE IF (idecid == 9)
THEN
169 qdum(i,j) = rswtt(i,j,l)
172 ELSE IF (idecid == 10)
THEN
177 qdum(i,j) = rlwtt(i,j,l)
180 ELSE IF (idecid == 11)
THEN
185 qdum(i,j) = train(i,j,l)
188 ELSE IF (idecid == 12)
THEN
193 qdum(i,j) = tcucn(i,j,l)
196 ELSE IF (idecid == 13)
THEN
201 qdum(i,j) = mcvg(i,j,l)
205 ELSE IF (idecid == 14)
THEN
210 es = min(
fpvsnew(t(i,j,l)),pmid(i,j,l))
211 qs(i,j) = con_eps*es/(pmid(i,j,l)+con_epsm1*es)
215 ELSE IF (idecid == 15)
THEN
219 qdum(i,j) = o3(i,j,l)
224 ELSE IF (idecid == 17)
THEN
228 qdum(i,j) = ext(i,j,l)
234 ELSE IF (idecid == 18)
THEN
238 qdum(i,j) = smoke(i,j,l,1)/1000000000.
244 ELSE IF (idecid == 19)
THEN
248 qdum(i,j) = taod5503d(i,j,l)
253 ELSE IF (idecid == 20)
THEN
257 qdum(i,j) = sca(i,j,l)
262 ELSE IF (idecid == 21)
THEN
266 qdum(i,j) = asy(i,j,l)
274 if(pint(i,j,l+1) <spval .and. qdum(i,j) < spval)
then
275 dp = pint(i,j,l+1) - pint(i,j,l)
276 IF (idecid == 19)
THEN
277 pw(i,j) = pw(i,j) + qdum(i,j)
279 pw(i,j) = pw(i,j) + qdum(i,j)*max(dp,0.)*gi*htm(i,j,l)
281 IF (idecid == 14) pws(i,j) = pws(i,j) + qs(i,j)*dp*gi*htm(i,j,l)
291 IF (idecid == 14)
THEN
295 if( pw(i,j)<spval)
then
296 pw(i,j) = max(0.,pw(i,j)/pws(i,j)*100.)
304 IF (idecid == 15)
then
308 if( pw(i,j)<spval)
then
309 pw(i,j) = pw(i,j) / 2.14e-5
elemental real function, public fpvsnew(t)
calcape() computes CAPE/CINS and other storm related variables.