1 SUBROUTINE calwxt_post(T,Q,PMID,PINT,HTM,LMH,PREC,ZINT,IWX,ZWET)
23 use params_mod, only: h1m12, d00, d608, h1, rog
24 use ctlblk_mod
, only: jsta, jend, spval, modelname,pthresh, im, &
25 jsta_2l, jend_2u, lm, lp1
32 real,
dimension(IM,jsta_2l:jend_2u),
intent(in) :: lmh
33 real,
dimension(IM,jsta_2l:jend_2u,LM),
intent(in) :: t,q,pmid,htm
34 real,
dimension(IM,jsta_2l:jend_2u,LP1),
intent(in) :: zint,pint
35 integer,
DIMENSION(IM,jsta:jend),
intent(inout) :: iwx
36 real,
dimension(IM,jsta_2l:jend_2u),
intent(inout) :: prec
37 real,
DIMENSION(IM,jsta:jend),
intent(inout) :: zwet
51 REAL,
ALLOCATABLE :: twet(:,:,:)
52 integer,
DIMENSION(IM,jsta:jend) :: karr,licee
53 real,
DIMENSION(IM,jsta:jend) :: tcold,twarm
55 logical :: jcontinue=.true.
68 integer i,j,l,lmhk,lice,ifrel,iwrml,ifrzl
69 real psfck,tdchk,a,tdkl,tdpre,tlmhk,twrmk,areas8,areap4, &
70 surfw,surfc,dzkl,area1,pintk1,pintk2,pm150,pkl,tkl,qkl
72 ALLOCATE ( twet(im,jsta_2l:jend_2u,lm) )
89 IF(modelname==
'RSM')
THEN
92 prec(i,j) = prec(i,j)*3*3600.0
106 IF (prec(i,j)<=pthresh) cycle
113 psfck=pint(i,j,lmhk+1)
120 760 tcold(i,j) = t(i,j,lmhk)
121 twarm(i,j) = t(i,j,lmhk)
133 IF (pkl<50000.0.OR.pkl>psfck-7000.0) cycle
135 a=alog(qkl*pkl/(610.78*(0.378*qkl+0.622)))
136 tdkl=(237.3*a)/(17.269-a)+273.15
138 IF (tdpre<tdchk.AND.tkl<tcold(i,j)) tcold(i,j)=tkl
139 IF (tdpre<tdchk.AND.tkl>twarm(i,j)) twarm(i,j)=tkl
140 IF (tdpre<tdchk.AND.l<licee(i,j)) licee(i,j)=l
147 IF (tcold(i,j)==t(i,j,lmhk).AND.tdchk<6.0)
THEN
160 IF (prec(i,j)<=pthresh) cycle
166 IF (tcold(i,j)>269.15)
THEN
167 IF (tlmhk<=273.15)
THEN
190 CALL wetbulb(t,q,pmid,htm,karr,twet)
191 CALL wetfrzlvl(twet,zwet)
209 psfck=pint(i,j,lmhk+1)
230 DO 1945 l=lmhk,lice,-1
231 dzkl=zint(i,j,l)-zint(i,j,l+1)
232 area1=(twet(i,j,l)-269.15)*dzkl
233 IF (twet(i,j,l)>=269.15) areap4=areap4+area1
236 IF (areap4<3000.0)
THEN
253 IF(pintk1<pm150)
THEN
256 dzkl=zint(i,j,l)-zint(i,j,l+1)
261 dzkl=t(i,j,l)*(q(i,j,l)*d608+h1)*rog*alog(pintk1/pm150)
262 area1=(twet(i,j,l)-273.15)*dzkl
277 IF (ifrzl==0.AND.t(i,j,l)<273.15) ifrzl=1
278 IF (iwrml==0.AND.t(i,j,l)>=twrmk) iwrml=1
280 IF (iwrml==0.OR.ifrzl==0)
THEN
281 dzkl=zint(i,j,l)-zint(i,j,l+1)
282 area1=(twet(i,j,l)-273.15)*dzkl
283 IF(ifrzl==0.AND.twet(i,j,l)>=273.15)surfw=surfw+area1
284 IF(iwrml==0.AND.twet(i,j,l)<=273.15)surfc=surfc+area1
287 IF(surfc<-3000.0.OR. &
288 (areas8<-3000.0.AND.surfw<50.0))
THEN
298 IF(tlmhk<273.15)
THEN
318 IF(modelname ==
'RSM')
THEN
322 prec(i,j) = prec(i,j)/(3*3600.0)