32 parameter(npts=1755,ii=45,jj=39)
33 parameter(orient=60.0,ipole=27,jpole=57)
34 parameter(xmesh=190.5)
36 REAL R2(NPTS), WLON(NPTS)
37 REAL XLAT(NPTS), XI(II,JJ), XJ(II,JJ)
38 REAL XII(NPTS), XJJ(NPTS), ANGLE(NPTS)
39 REAL ALOLA(361,91), APOLA(NPTS), ERAS(NPTS,4)
40 REAL W1(NPTS), W2(NPTS)
41 REAL XDELI(NPTS), XDELJ(NPTS)
42 REAL XI2TM(NPTS), XJ2TM(NPTS)
44 INTEGER IV(NPTS), JV(NPTS), JY(NPTS,4)
45 INTEGER IM1(NPTS), IP1(NPTS), IP2(NPTS)
51 equivalence(xi(1,1),xii(1)),(xj(1,1),xjj(1))
53 DATA degprd/57.2957795/
59 IF (interp.EQ.1) lin = .true.
61 IF (iswt.EQ.1)
GO TO 900
64 gi2 = (1.86603 * earthr) / xmesh
77 r2(kk) = xjj(kk) * xjj(kk) + xii(kk) * xii(kk)
79 & asin((gi2 - r2(kk)) / (gi2 + r2(kk)))
84 angle(kk) = degprd * atan2(xjj(kk),xii(kk))
88 IF (angle(kk).LT.0.0) angle(kk) = angle(kk) + 360.0
92 wlon(kk) = 270.0 + orient - angle(kk)
96 IF (wlon(kk).LT.0.0) wlon(kk) = wlon(kk) + 360.0
100 IF (wlon(kk).GE.360.0) wlon(kk) = wlon(kk) - 360.0
104 w1(kk) = (360.0 - wlon(kk)) / deg + 1.0
105 w2(kk) = xlat(kk) / deg + 1.0
116 IF (interp.EQ.intrpo)
GO TO 2100
123 xdeli(k) = w1(k) - iv(k)
124 xdelj(k) = w2(k) - jv(k)
137 xi2tm(k) = xdeli(k) * (xdeli(k) - 1.0) * .25
138 xj2tm(k) = xdelj(k) * (xdelj(k) - 1.0) * .25
146 IF (jv(kk).LT.2.OR.jv(kk).GT.89) xj2tm(kk) = 0.0
153 IF (jy(kk,1).LT.1) jy(kk,1) = 1
163 eras(kk,2) = (alola(ip1(kk),jy(kk,2))-alola(iv(kk),jy(kk,2)))
164 & * xdeli(kk) + alola(iv(kk),jy(kk,2))
165 eras(kk,3) = (alola(ip1(kk),jy(kk,3))-alola(iv(kk),jy(kk,3)))
166 & * xdeli(kk) + alola(iv(kk),jy(kk,3))
170 apola(kk) = eras(kk,2) + (eras(kk,3) - eras(kk,2))
179 eras(kk,1)=(alola(ip1(kk),jy(kk,1))-alola(iv(kk),jy(kk,1)))
180 & * xdeli(kk) + alola(iv(kk),jy(kk,1)) +
181 & ( alola(im1(kk),jy(kk,1)) - alola(iv(kk),jy(kk,1))
182 & - alola(ip1(kk),jy(kk,1))+alola(ip2(kk),jy(kk,1)))
184 eras(kk,2)=(alola(ip1(kk),jy(kk,2))-alola(iv(kk),jy(kk,2)))
185 & * xdeli(kk) + alola(iv(kk),jy(kk,2)) +
186 & ( alola(im1(kk),jy(kk,2)) - alola(iv(kk),jy(kk,2))
187 & - alola(ip1(kk),jy(kk,2))+alola(ip2(kk),jy(kk,2)))
189 eras(kk,3)=(alola(ip1(kk),jy(kk,3))-alola(iv(kk),jy(kk,3)))
190 & * xdeli(kk) + alola(iv(kk),jy(kk,3)) +
191 & ( alola(im1(kk),jy(kk,3)) - alola(iv(kk),jy(kk,3))
192 & - alola(ip1(kk),jy(kk,3))+alola(ip2(kk),jy(kk,3)))
194 eras(kk,4)=(alola(ip1(kk),jy(kk,4))-alola(iv(kk),jy(kk,4)))
195 & * xdeli(kk) + alola(iv(kk),jy(kk,4)) +
196 & ( alola(im1(kk),jy(kk,4)) - alola(iv(kk),jy(kk,4))
197 & - alola(ip1(kk),jy(kk,4))+alola(ip2(kk),jy(kk,4)))
202 apola(kk) = eras(kk,2) + (eras(kk,3) - eras(kk,2))
203 & * xdelj(kk) + (eras(kk,1) - eras(kk,2)
204 & - eras(kk,3) + eras(kk,4)) * xj2tm(kk)