33 parameter(npts=4225,ii=65,jj=65)
34 parameter(orient=80.0,ipole=33,jpole=33)
35 parameter(xmesh=381.0)
37 REAL R2(NPTS), WLON(NPTS)
38 REAL XLAT(NPTS), XI(II,JJ), XJ(II,JJ)
39 REAL XII(NPTS), XJJ(NPTS), ANGLE(NPTS)
40 REAL ALOLA(361,181), APOLA(NPTS), ERAS(NPTS,4)
41 REAL W1(NPTS), W2(NPTS)
42 REAL XDELI(NPTS), XDELJ(NPTS)
43 REAL XI2TM(NPTS), XJ2TM(NPTS)
45 INTEGER IV(NPTS), JV(NPTS), JY(NPTS,4)
46 INTEGER IM1(NPTS), IP1(NPTS), IP2(NPTS)
52 equivalence(xi(1,1),xii(1)),(xj(1,1),xjj(1))
54 DATA degprd/57.2957795/
60 IF (interp.EQ.1) lin = .true.
62 IF (iswt.EQ.1)
GO TO 900
65 gi2 = (1.86603 * earthr) / xmesh
78 r2(kk) = xjj(kk) * xjj(kk) + xii(kk) * xii(kk)
80 & asin((gi2 - r2(kk)) / (gi2 + r2(kk)))
85 angle(kk) = degprd * atan2(xjj(kk),xii(kk))
89 IF (angle(kk).LT.0.0) angle(kk) = angle(kk) + 360.0
93 wlon(kk) = 270.0 + orient - angle(kk)
97 IF (wlon(kk).LT.0.0) wlon(kk) = wlon(kk) + 360.0
101 IF (wlon(kk).GE.360.0) wlon(kk) = wlon(kk) - 360.0
108 w1(kk) = (360.0 - wlon(kk)) / deg + 1.0
109 w2(kk) = xlat(kk) / deg + 91.0
120 IF (interp.EQ.intrpo)
GO TO 2100
127 xdeli(k) = w1(k) - iv(k)
128 xdelj(k) = w2(k) - jv(k)
141 xi2tm(k) = xdeli(k) * (xdeli(k) - 1.0) * .25
142 xj2tm(k) = xdelj(k) * (xdelj(k) - 1.0) * .25
146 IF (iv(kk).EQ.1)
THEN
149 ELSE IF (iv(kk).EQ.360)
THEN
160 IF (jv(kk).GE.180) xj2tm(kk) = 0.0
164 IF (ip2(kk).LT.1) ip2(kk) = 1
165 IF (im1(kk).LT.1) im1(kk) = 1
166 IF (ip2(kk).GT.361) ip2(kk) = 361
167 IF (im1(kk).GT.361) im1(kk) = 361
172 IF (iv(kk).LT.1) iv(kk) = 1
173 IF (ip1(kk).LT.1) ip1(kk) = 1
174 IF (iv(kk).GT.361) iv(kk) = 361
175 IF (ip1(kk).GT.361) ip1(kk) = 361
181 IF (jy(kk,2).GT.181) jy(kk,2) = 181
182 IF (jy(kk,3).GT.181) jy(kk,3) = 181
187 IF (jy(kk,1).GT.181) jy(kk,1) = 181
188 IF (jy(kk,4).GT.181) jy(kk,4) = 181
198 eras(kk,2) = (alola(ip1(kk),jy(kk,2))-alola(iv(kk),jy(kk,2)))
199 & * xdeli(kk) + alola(iv(kk),jy(kk,2))
200 eras(kk,3) = (alola(ip1(kk),jy(kk,3))-alola(iv(kk),jy(kk,3)))
201 & * xdeli(kk) + alola(iv(kk),jy(kk,3))
205 apola(kk) = eras(kk,2) + (eras(kk,3) - eras(kk,2))
214 eras(kk,1)=(alola(ip1(kk),jy(kk,1))-alola(iv(kk),jy(kk,1)))
215 & * xdeli(kk) + alola(iv(kk),jy(kk,1)) +
216 & ( alola(im1(kk),jy(kk,1)) - alola(iv(kk),jy(kk,1))
217 & - alola(ip1(kk),jy(kk,1))+alola(ip2(kk),jy(kk,1)))
219 eras(kk,2)=(alola(ip1(kk),jy(kk,2))-alola(iv(kk),jy(kk,2)))
220 & * xdeli(kk) + alola(iv(kk),jy(kk,2)) +
221 & ( alola(im1(kk),jy(kk,2)) - alola(iv(kk),jy(kk,2))
222 & - alola(ip1(kk),jy(kk,2))+alola(ip2(kk),jy(kk,2)))
224 eras(kk,3)=(alola(ip1(kk),jy(kk,3))-alola(iv(kk),jy(kk,3)))
225 & * xdeli(kk) + alola(iv(kk),jy(kk,3)) +
226 & ( alola(im1(kk),jy(kk,3)) - alola(iv(kk),jy(kk,3))
227 & - alola(ip1(kk),jy(kk,3))+alola(ip2(kk),jy(kk,3)))
229 eras(kk,4)=(alola(ip1(kk),jy(kk,4))-alola(iv(kk),jy(kk,4)))
230 & * xdeli(kk) + alola(iv(kk),jy(kk,4)) +
231 & ( alola(im1(kk),jy(kk,4)) - alola(iv(kk),jy(kk,4))
232 & - alola(ip1(kk),jy(kk,4))+alola(ip2(kk),jy(kk,4)))
237 apola(kk) = eras(kk,2) + (eras(kk,3) - eras(kk,2))
238 & * xdelj(kk) + (eras(kk,1) - eras(kk,2)
239 & - eras(kk,3) + eras(kk,4)) * xj2tm(kk)
246 apola(2113) = alola(181,181)