30 parameter(npts=1755,ii=45,jj=39)
31 parameter(orient=150.0,ipole=27,jpole=37)
32 parameter(xmesh=190.5)
34 REAL R2(NPTS), WLON(NPTS)
35 REAL XLAT(NPTS), XI(II,JJ), XJ(II,JJ)
36 REAL XII(NPTS), XJJ(NPTS), ANGLE(NPTS)
37 REAL ALOLA(361,91), APOLA(NPTS), ERAS(NPTS,4)
38 REAL W1(NPTS), W2(NPTS)
39 REAL XDELI(NPTS), XDELJ(NPTS)
40 REAL XI2TM(NPTS), XJ2TM(NPTS)
42 INTEGER IV(NPTS), JV(NPTS), JY(NPTS,4)
43 INTEGER IM1(NPTS), IP1(NPTS), IP2(NPTS)
49 equivalence(xi(1,1),xii(1)),(xj(1,1),xjj(1))
51 DATA degprd/57.2957795/
57 IF (interp.EQ.1) lin = .true.
59 IF (iswt.EQ.1)
GO TO 900
62 gi2 = (1.86603 * earthr) / xmesh
75 r2(kk) = xjj(kk) * xjj(kk) + xii(kk) * xii(kk)
77 & asin((gi2 - r2(kk)) / (gi2 + r2(kk)))
82 angle(kk) = degprd * atan2(xjj(kk),xii(kk))
86 IF (angle(kk).LT.0.0) angle(kk) = angle(kk) + 360.0
90 wlon(kk) = 270.0 + orient - angle(kk)
94 IF (wlon(kk).LT.0.0) wlon(kk) = wlon(kk) + 360.0
98 IF (wlon(kk).GE.360.0) wlon(kk) = wlon(kk) - 360.0
105 w1(kk) = (360.0 - wlon(kk)) / deg + 1.0
106 w2(kk) = xlat(kk) / deg + 1.0
117 IF (interp.EQ.intrpo)
GO TO 2100
124 xdeli(k) = w1(k) - iv(k)
125 xdelj(k) = w2(k) - jv(k)
138 xi2tm(k) = xdeli(k) * (xdeli(k) - 1.0) * .25
139 xj2tm(k) = xdelj(k) * (xdelj(k) - 1.0) * .25
143 IF (iv(kk).EQ.1)
THEN
146 ELSE IF (iv(kk).EQ.360)
THEN
157 IF (jv(kk).LT.2.OR.jv(kk).GT.89) xj2tm(kk) = 0.0
161 IF (ip2(kk).LT.1) ip2(kk) = 1
162 IF (im1(kk).LT.1) im1(kk) = 1
163 IF (ip2(kk).GT.361) ip2(kk) = 361
164 IF (im1(kk).GT.361) im1(kk) = 361
169 IF (iv(kk).LT.1) iv(kk) = 1
170 IF (ip1(kk).LT.1) ip1(kk) = 1
171 IF (iv(kk).GT.361) iv(kk) = 361
172 IF (ip1(kk).GT.361) ip1(kk) = 361
178 IF (jy(kk,2).LT.1) jy(kk,2) = 1
179 IF (jy(kk,2).GT.91) jy(kk,2) = 91
180 IF (jy(kk,3).LT.1) jy(kk,3) = 1
181 IF (jy(kk,3).GT.91) jy(kk,3) = 91
186 IF (jy(kk,1).LT.1) jy(kk,1) = 1
187 IF (jy(kk,1).GT.91) jy(kk,1) = 91
188 IF (jy(kk,4).LT.1) jy(kk,4) = 1
189 IF (jy(kk,4).GT.91) jy(kk,4) = 91
199 eras(kk,2) = (alola(ip1(kk),jy(kk,2))-alola(iv(kk),jy(kk,2)))
200 & * xdeli(kk) + alola(iv(kk),jy(kk,2))
201 eras(kk,3) = (alola(ip1(kk),jy(kk,3))-alola(iv(kk),jy(kk,3)))
202 & * xdeli(kk) + alola(iv(kk),jy(kk,3))
206 apola(kk) = eras(kk,2) + (eras(kk,3) - eras(kk,2))
215 eras(kk,1)=(alola(ip1(kk),jy(kk,1))-alola(iv(kk),jy(kk,1)))
216 & * xdeli(kk) + alola(iv(kk),jy(kk,1)) +
217 & ( alola(im1(kk),jy(kk,1)) - alola(iv(kk),jy(kk,1))
218 & - alola(ip1(kk),jy(kk,1))+alola(ip2(kk),jy(kk,1)))
220 eras(kk,2)=(alola(ip1(kk),jy(kk,2))-alola(iv(kk),jy(kk,2)))
221 & * xdeli(kk) + alola(iv(kk),jy(kk,2)) +
222 & ( alola(im1(kk),jy(kk,2)) - alola(iv(kk),jy(kk,2))
223 & - alola(ip1(kk),jy(kk,2))+alola(ip2(kk),jy(kk,2)))
225 eras(kk,3)=(alola(ip1(kk),jy(kk,3))-alola(iv(kk),jy(kk,3)))
226 & * xdeli(kk) + alola(iv(kk),jy(kk,3)) +
227 & ( alola(im1(kk),jy(kk,3)) - alola(iv(kk),jy(kk,3))
228 & - alola(ip1(kk),jy(kk,3))+alola(ip2(kk),jy(kk,3)))
230 eras(kk,4)=(alola(ip1(kk),jy(kk,4))-alola(iv(kk),jy(kk,4)))
231 & * xdeli(kk) + alola(iv(kk),jy(kk,4)) +
232 & ( alola(im1(kk),jy(kk,4)) - alola(iv(kk),jy(kk,4))
233 & - alola(ip1(kk),jy(kk,4))+alola(ip2(kk),jy(kk,4)))
238 apola(kk) = eras(kk,2) + (eras(kk,3) - eras(kk,2))
239 & * xdelj(kk) + (eras(kk,1) - eras(kk,2)
240 & - eras(kk,3) + eras(kk,4)) * xj2tm(kk)
245 apola(1647) = alola(181,91)