19 parameter(rad2d=180./3.14159)
28 LOGICAL IFXPT(nxgrd,nygrd),DOTRPO,DIDFND
57 IF (ifxpt(ix,iy))
THEN
58 bottom=z0*((z10/z0)**0.9)
63 bottom=z0*((z10/z0)**0.5)
71 top=rhs(ix,iy,levbot(ix,iy))
72 u1=u(ix,iy,levbot(ix,iy))
73 v1=v(ix,iy,levbot(ix,iy))
74 w1=w(ix,iy,levbot(ix,iy))
79 CALL lgntrp(uuuf,bottom,top,zagl,u0,u1)
81 CALL lgntrp(vvvf,bottom,top,zagl,v0,v1)
83 CALL lgntrp(wwwf,bottom,top,zagl,w0,w1)
85 iugraf(ix,iy,1)=nint(100.0*u(ix,iy,1))
86 ivgraf(ix,iy,1)=nint(100.0*v(ix,iy,1))
87 iwgraf(ix,iy,1)=nint(100.0*w(ix,iy,1))
88 iptgrf(ix,iy,1)=nint(10.0*tmpkel(ix,iy,1))
90 patsfc=
cvt2p(setalt(ix,iy,1),sfcht(ix,iy)+z10)
91 iprgrf(ix,iy,1)=nint(10.0*patsfc)
105 zagl=zchooz(iz)-sfcht(ix,iy)
109 zmsl=zchooz(iz)+sfcht(ix,iy)
123 ELSE IF (zagl .GE. rhs(ix,iy,nlvl))
THEN
129 iugraf(ix,iy,iz)=nint(100.0*u(ix,iy,nlvl))
130 ivgraf(ix,iy,iz)=nint(100.0*v(ix,iy,nlvl))
131 iwgraf(ix,iy,iz)=nint(100.0*w(ix,iy,nlvl))
132 IF (dothet .OR. dopres .OR. dobri .OR. dobvpd)
THEN
133 ttt=tmpkel(ix,iy,nlvl)+dthdzl(ix,iy,nlvl)*
134 $ (zagl-rhs(ix,iy,nlvl))
135 iptgrf(ix,iy,iz)=nint(10.0*ttt)
136 atop=setalt(ix,iy,nlvl)
138 iprgrf(ix,iy,iz)=nint(10.0*
cvt2p(atop,zmsl))
141 ELSE IF (zagl.LE. z10)
THEN
153 IF (dothet .OR. dopres .OR. dobri .OR. dobvpd)
THEN
159 alt0=setalt(ix,iy,levbot(ix,iy))
161 iprgrf(ix,iy,iz)=nint(10.0*
cvt2p(alt0,zmsl))
172 ELSE IF (zagl .LT. rhs(ix,iy,levbot(ix,iy))
173 $ .AND. zagl.GT.z10)
THEN
187 IF (dothet .OR. dopres .OR. dobri .OR. dobvpd)
THEN
189 t1=tmpkel(ix,iy,levbot(ix,iy))
190 alt0=setalt(ix,iy,levbot(ix,iy))
192 iprgrf(ix,iy,iz)=nint(10.0*
cvt2p(alt0,zmsl))
197 top=rhs(ix,iy,levbot(ix,iy))
198 u1=u(ix,iy,levbot(ix,iy))
199 v1=v(ix,iy,levbot(ix,iy))
200 w1=w(ix,iy,levbot(ix,iy))
202 ELSE IF (zagl.GE. rhs(ix,iy,levbot(ix,iy))
203 $ .AND. zagl .LT. rhs(ix,iy,nlvl))
THEN
209 DO 130 ll=levbot(ix,iy),nlvl-1
211 IF (zagl.GE.rhs(ix,iy,ll) .AND.
212 $ zagl.LT.rhs(ix,iy,ll+1))
THEN
231 IF (zagl.EQ.rhs(ix,iy,ll))
THEN
232 alt0=setalt(ix,iy,ll)
233 ELSE IF (rhs(ix,iy,ll+1) .EQ. zagl)
THEN
234 alt0=setalt(ix,iy,ll+1)
236 wt1=1.0/abs(zagl-rhs(ix,iy,ll))
237 wt2=1.0/abs(zagl-rhs(ix,iy,ll+1))
238 alt0=(wt1*setalt(ix,iy,ll)+
239 $ wt2*setalt(ix,iy,ll+1))/(wt1+wt2)
242 iprgrf(ix,iy,iz)=nint(10.0*
cvt2p(alt0,zmsl))
243 IF (dothet .OR. dopres .OR. dobri
246 t1=tmpkel(ix,iy,ll+1)
253 IF (didfnd)
GO TO 135
266 CALL lgntrp(uuuf,bottom,top,zagl,u0,u1)
267 CALL lgntrp(vvvf,bottom,top,zagl,v0,v1)
268 CALL lgntrp(wwwf,bottom,top,zagl,w0,w1)
269 iugraf(ix,iy,iz)=nint(100.0*uuuf)
270 ivgraf(ix,iy,iz)=nint(100.0*vvvf)
271 iwgraf(ix,iy,iz)=nint(100.0*wwwf)
278 aaset=
xlintr(alt0,alt1,zagl,bottom,top)
279 IF (dothet .OR. dopres .OR. dobri.OR. dobvpd)
280 $ iptgrf(ix,iy,iz)=nint(10.0*
281 $
xlintr(t0,t1,zagl,bottom,top))
299 ug=0.01*float(iugraf(ix,iy,lev))
300 vg=0.01*float(ivgraf(ix,iy,lev))
302 IF (ug.EQ.zero.AND.vg.EQ.zero)
THEN
303 spdmet(ix,iy,lev)=zero
304 dirmet(ix,iy,lev)=zero
306 spdmet(ix,iy,lev)=
sp(ug,vg)
307 dirmet(ix,iy,lev)=
dd(ug,vg)
subroutine lgntrp(Y, X0, X1, X, Y0, Y1)
real function cvt2p(ALTIM, ELEV)
subroutine fixwnd(IFXPT, LVL)
real function xlintr(X0, X1, Z, ZZ0, Z1)