1 SUBROUTINE wetbulb(T,Q,PMID,HTM,KARR,TWET)
24 use lookup_mod,
only: thl, rdth, jtb, qs0, sqs, rdq, itb, ptbl, plq, ttbl,&
25 pl, rdp, the0, sthe, rdthe, ttblq, itbq, jtbq, rdpq, the0q, stheq,&
27 use ctlblk_mod,
only: jsta, jend, im, jsta_2l, jend_2u, lm, spval, &
28 ista, iend, ista_2l, iend_2u
29 use cuparm_mod,
only: h10e5, capa, epsq, d00, elocp
44 real,
dimension(ista_2l:iend_2u,jsta_2l:jend_2u,LM),
intent(in) :: T,Q, &
46 integer,
dimension(ista:iend,jsta:jend),
intent(in) :: KARR
47 real,
dimension(ista_2l:iend_2u,jsta_2l:jend_2u,LM),
intent(out) :: TWET
50 real,
dimension(ista:iend,jsta:jend) :: THESP, QQ, PP
51 integer,
dimension(ista:iend,jsta:jend) :: KLRES,KHRES,IPTB,ITHTB
53 integer I,J,L,ITTB1,ITTBK,IQTBK,IT,KNUML,KNUMH,IQ
54 real TBTK,QBTK,APEBTK,TTHBTK,TTHK,QQK,BQS00K,SQS00K,BQS10K, &
55 sqs10k,bqk,sqk,tqk,ppk,tpspk,apespk,prespk,p00k,p10k,p01k, &
68 IF (htm(i,j,l)<1.0)
THEN
72 IF(t(i,j,l)<spval)
THEN
76 apebtk=(h10e5/presk)**capa
77 IF(qbtk<epsq) qbtk=htm(i,j,l)*epsq
80 tthk =(tthbtk-thl)*rdth
100 bqk=(bqs10k-bqs00k)*qqk+bqs00k
101 sqk=(sqs10k-sqs00k)*qqk+sqs00k
102 tqk=(qbtk-bqk)/sqk*rdq
123 tpspk=p00k+(p10k-p00k)*ppk+(p01k-p00k)*qqk &
124 +(p00k-p10k-p01k+p11k)*ppk*qqk
125 apespk=(h10e5/tpspk)**capa
126 thesp(i,j)=tthbtk*exp(elocp*qbtk*apespk/tthbtk)
142 IF(pmid(i,j,l)==spval)cycle
158 CALL ttblex(twet(ista_2l,jsta_2l,l),ttbl,itb,jtb,klres &
159 ,pmid(ista_2l,jsta_2l,l),pl,qq,pp,rdp,the0,sthe &
160 ,rdthe,thesp,iptb,ithtb)
166 CALL ttblex(twet(ista_2l,jsta_2l,l),ttblq,itbq,jtbq,khres &
167 ,pmid(ista_2l,jsta_2l,l),plq,qq,pp,rdpq,the0q,stheq &
168 ,rdtheq,thesp,iptb,ithtb)