49 use vrbls3d,
only: pint, pmid, t, zint, q
52 use params_mod,
only: pq0, a2, a3, a4, rgamog
53 use ctlblk_mod,
only: pt, jsta_2l, jend_2u, spval, lp1, lm, jsta, jend,&
54 grib, cfld, datapd, fld_info, im, jm, im_jm, &
55 ista, iend, ista_2l, iend_2u
56 use rqstfld_mod,
only: iget, lvls, id, iavblfld, lvlsxml
60 integer,
PARAMETER :: LSIG=5
66 REAL,
dimension(ista_2l:iend_2u,jsta_2l:jend_2u) :: TSL
67 REAL,
dimension(ista_2l:iend_2u,jsta_2l:jend_2u) :: grid1
68 REAL SIGO(LSIG+1),DSIGO(LSIG),ASIGO(LSIG)
71 INTEGER,
dimension(ista_2l:iend_2u,jsta_2l:jend_2u) :: NL1X
84 integer I,J,L,LL,LP,LLMH,NHOLD,II,JJ
85 real PTSIGO,PSIGO,APSIGO,FACT,AI,BI,TMT0,QSAT,TVRL, &
86 tvrblo,tblo,ql,rhl,zl,pl,tl
102 IF((iget(296)>0) )
THEN
116 sigo(l)=sigo(l-1)+dsigo(lsig-l+2)
120 asigo(l)=0.5*(sigo(l)+sigo(l+1))
149 llmh = nint(lmh(i,j))
150 psigo=ptsigo+asigo(lp)*(pint(i,j,llmh+1)-ptsigo)
151 IF(nl1x(i,j)==lp1.AND.pmid(i,j,l)>psigo)
THEN
161 IF(nl1x(i,j)==lp1.AND.pint(i,j,llmh+1)>=psigo)
THEN
188 llmh = nint(lmh(i,j))
189 psigo=ptsigo+asigo(lp)*(pint(i,j,llmh+1)-ptsigo)
191 IF(nl1x(i,j)<=llmh.and. &
192 (pmid(i,j,ll)-pmid(i,j,ll-1))/=0.)
THEN
202 fact=(apsigo-log(pmid(i,j,ll)))/ &
203 & (log(pmid(i,j,ll))-log(pmid(i,j,ll-1)))
204 tsl(i,j)=t(i,j,ll)+(t(i,j,ll)-t(i,j,ll-1))*fact
216 tl = 0.5*(t(i,j,lm-2)+t(i,j,lm-1))
217 ql = 0.5*(q(i,j,lm-2)+q(i,j,lm-1))
225 qsat = pq0/pl*exp(a2*(tl-a3)/(tl-a4))
240 tvrl = tl*(1.+0.608*ql)
241 tvrblo = tvrl*(psigo/pl)**rgamog
242 tblo = tvrblo/(1.+0.608*ql)
251 qsat = pq0/psigo*exp(a2*(tblo-a3)/(tblo-a4))
267 IF(lvls(lp,iget(296))>0)
THEN
273 if(grib==
'grib2')
then
275 fld_info(cfld)%ifld=iavblfld(iget(296))
276 fld_info(cfld)%lvl=lvlsxml(lp,iget(296))
277 datapd(1:iend-ista+1,1:jend-jsta+1,cfld)=grid1(ista:iend,jsta:jend)