1 SUBROUTINE calwxt_post(T,Q,PMID,PINT,HTM,LMH,PREC,ZINT,IWX,ZWET)
24 use params_mod,
only: h1m12, d00, d608, h1, rog
25 use ctlblk_mod,
only: jsta, jend, spval, modelname,pthresh, im, &
26 jsta_2l, jend_2u, lm, lp1, &
27 ista, iend, ista_2l, iend_2u
34 real,
dimension(ista_2l:iend_2u,jsta_2l:jend_2u),
intent(in) :: LMH
35 real,
dimension(ista_2l:iend_2u,jsta_2l:jend_2u,LM),
intent(in) :: T,Q,PMID,HTM
36 real,
dimension(ista_2l:iend_2u,jsta_2l:jend_2u,LP1),
intent(in) :: ZINT,PINT
37 integer,
DIMENSION(ista:iend,jsta:jend),
intent(inout) :: IWX
38 real,
dimension(ista_2l:iend_2u,jsta_2l:jend_2u),
intent(inout) :: PREC
39 real,
DIMENSION(ista:iend,jsta:jend),
intent(inout) :: ZWET
53 REAL,
ALLOCATABLE :: TWET(:,:,:)
54 integer,
DIMENSION(ista:iend,jsta:jend) :: KARR,LICEE
55 real,
DIMENSION(ista:iend,jsta:jend) :: TCOLD,TWARM
57 logical :: jcontinue=.true.
70 integer I,J,L,LMHK,LICE,IFREL,IWRML,IFRZL
71 real PSFCK,TDCHK,A,TDKL,TDPRE,TLMHK,TWRMK,AREAS8,AREAP4, &
72 surfw,surfc,dzkl,area1,pintk1,pintk2,pm150,pkl,tkl,qkl
74 ALLOCATE ( twet(ista_2l:iend_2u,jsta_2l:jend_2u,lm) )
91 IF(modelname==
'RSM')
THEN
94 prec(i,j) = prec(i,j)*3*3600.0
108 IF (prec(i,j)<=pthresh) cycle
115 psfck=pint(i,j,lmhk+1)
122 760 tcold(i,j) = t(i,j,lmhk)
123 twarm(i,j) = t(i,j,lmhk)
135 IF (pkl<50000.0.OR.pkl>psfck-7000.0) cycle
137 a=alog(qkl*pkl/(610.78*(0.378*qkl+0.622)))
138 tdkl=(237.3*a)/(17.269-a)+273.15
140 IF (tdpre<tdchk.AND.tkl<tcold(i,j)) tcold(i,j)=tkl
141 IF (tdpre<tdchk.AND.tkl>twarm(i,j)) twarm(i,j)=tkl
142 IF (tdpre<tdchk.AND.l<licee(i,j)) licee(i,j)=l
149 IF (tcold(i,j)==t(i,j,lmhk).AND.tdchk<6.0)
THEN
162 IF (prec(i,j)<=pthresh) cycle
168 IF (tcold(i,j)>269.15)
THEN
169 IF (tlmhk<=273.15)
THEN
192 CALL wetbulb(t,q,pmid,htm,karr,twet)
211 psfck=pint(i,j,lmhk+1)
232 DO 1945 l=lmhk,lice,-1
233 dzkl=zint(i,j,l)-zint(i,j,l+1)
234 area1=(twet(i,j,l)-269.15)*dzkl
235 IF (twet(i,j,l)>=269.15) areap4=areap4+area1
238 IF (areap4<3000.0)
THEN
255 IF(pintk1<pm150)
THEN
258 dzkl=zint(i,j,l)-zint(i,j,l+1)
263 dzkl=t(i,j,l)*(q(i,j,l)*d608+h1)*rog*alog(pintk1/pm150)
264 area1=(twet(i,j,l)-273.15)*dzkl
279 IF (ifrzl==0.AND.t(i,j,l)<273.15) ifrzl=1
280 IF (iwrml==0.AND.t(i,j,l)>=twrmk) iwrml=1
282 IF (iwrml==0.OR.ifrzl==0)
THEN
283 dzkl=zint(i,j,l)-zint(i,j,l+1)
284 area1=(twet(i,j,l)-273.15)*dzkl
285 IF(ifrzl==0.AND.twet(i,j,l)>=273.15)surfw=surfw+area1
286 IF(iwrml==0.AND.twet(i,j,l)<=273.15)surfc=surfc+area1
289 IF(surfc<-3000.0.OR. &
290 (areas8<-3000.0.AND.surfw<50.0))
THEN
300 IF(tlmhk<273.15)
THEN
320 IF(modelname ==
'RSM')
THEN
324 prec(i,j) = prec(i,j)/(3*3600.0)
subroutine wetfrzlvl(twet, zwet)
This routine computes the lowest height with a wet bulb temperature of freezing for each mass point o...