1 subroutine lonlat(alon,alat,xlon,ylat)
10 real alon(nanc),alat(nanc)
11 real xlon(npix),ylat(npix)
12 data ianc /1,16,31,46,61,76,91,106,121,136,151,166,181,196,216,
13 +236,256,276,296,316,341,366,391,416,441,466,496,526,556,591,626,
14 +666,706,751,796,841,886,931,984,1037,1082,1127,1172,1217,1262,
15 +1302,1342,1377,1412,1442,1472,1502,1527,1552,1577,1602,1627,1652,
16 +1672,1692,1712,1732,1752,1772,1787,1802,1817,1832,1847,1862,1877,
17 +1892,1907,1922,1937,1952,1968/
22 if (alon(ia) .ge. 90.0 .and. alon(ia+1) .le. -90.0)
then
23 rm = ((alon(ia+1)-alon(ia)+360.0))/
24 $ (float(ianc(ia+1))-float(ianc(ia)))
25 else if( alon(ia) .lt. -90.0 .and. alon(ia+1) .gt. 90.0)
then
26 rm = ((alon(ia+1)-alon(ia)-360.0))/
28 $ (float(ianc(ia+1))-float(ianc(ia)))
30 rm = (alon(ia+1)-alon(ia))/(float(ianc(ia+1))-float(ianc(ia)))
33 b = alon(ia) - rm*float(ianc(ia))
34 rm2 = (alat(ia+1)-alat(ia))/(float(ianc(ia+1))-float(ianc(ia)))
35 b2 = alat(ia) - rm2*float(ianc(ia))
36 i1 = ianc(ia) + poff + 1
37 i2 = ianc(ia+1) + poff
39 if (ia.eq.(nanc-1)) i2 = npix
41 xlon(i) = rm*(float(i)-poff)+b
42 if (xlon(i) .gt. 180.0)
then
43 xlon(i)=((xlon(i) - 180.0) - 180.0)
45 ylat(i) = rm2*(float(i)-poff)+b2