48 use vrbls3d, only: pint, pmid, t, zint, q
52 use ctlblk_mod
, only: pt, jsta_2l, jend_2u, spval, lp1, lm, jsta, jend,&
53 grib, cfld, datapd, fld_info, im, jm, im_jm
54 use rqstfld_mod
, only: iget, lvls, id, iavblfld, lvlsxml
58 integer,
PARAMETER :: lsig=5
64 REAL,
dimension(im,jsta_2l:jend_2u) :: tsl
65 REAL,
dimension(im,jsta_2l:jend_2u) :: grid1
66 REAL sigo(lsig+1),dsigo(lsig),asigo(lsig)
69 INTEGER,
dimension(im,jsta_2l:jend_2u) :: nl1x
82 integer i,j,l,ll,lp,llmh,nhold,ii,jj
83 real ptsigo,psigo,apsigo,fact,ai,bi,tmt0,qsat,tvrl, &
84 tvrblo,tblo,ql,rhl,zl,pl,tl
100 IF((iget(296)>0) )
THEN
114 sigo(l)=sigo(l-1)+dsigo(lsig-l+2)
118 asigo(l)=0.5*(sigo(l)+sigo(l+1))
147 llmh = nint(lmh(i,j))
148 psigo=ptsigo+asigo(lp)*(pint(i,j,llmh+1)-ptsigo)
149 IF(nl1x(i,j)==lp1.AND.pmid(i,j,l)>psigo)
THEN
159 IF(nl1x(i,j)==lp1.AND.pint(i,j,llmh+1)>=psigo)
THEN
186 llmh = nint(lmh(i,j))
187 psigo=ptsigo+asigo(lp)*(pint(i,j,llmh+1)-ptsigo)
189 IF(nl1x(i,j)<=llmh.and. &
190 (pmid(i,j,ll)-pmid(i,j,ll-1))/=0.)
THEN
200 fact=(apsigo-log(pmid(i,j,ll)))/ &
201 & (log(pmid(i,j,ll))-log(pmid(i,j,ll-1)))
202 tsl(i,j)=t(i,j,ll)+(t(i,j,ll)-t(i,j,ll-1))*fact
214 tl = 0.5*(t(i,j,lm-2)+t(i,j,lm-1))
215 ql = 0.5*(q(i,j,lm-2)+q(i,j,lm-1))
223 qsat = pq0/pl*exp(a2*(tl-a3)/(tl-a4))
238 tvrl = tl*(1.+0.608*ql)
239 tvrblo = tvrl*(psigo/pl)**rgamog
240 tblo = tvrblo/(1.+0.608*ql)
249 qsat = pq0/psigo*exp(a2*(tblo-a3)/(tblo-a4))
265 IF(lvls(lp,iget(296))>0)
THEN
271 if(grib==
'grib2')
then
273 fld_info(cfld)%ifld=iavblfld(iget(296))
274 fld_info(cfld)%lvl=lvlsxml(lp,iget(296))
275 datapd(1:im,1:jend-jsta+1,cfld)=grid1(1:im,jsta:jend)