OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
lonlat.f
Go to the documentation of this file.
1  subroutine lonlat(alon,alat,xlon,ylat)
2 c
3 c Interpolates lineraly across anchor points to fill up lons and
4 c lats.
5 c
6 c Modified to offset scan by a fixed number of pixels
7 c F.S. Patt, SAIC GSC, December 21, 2000.
8  parameter(npix=1968,nanc=77)
9  integer ianc(nanc)
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/
18  data poff/5.5/
19 c
20 c Interpolate across scan lines
21  do ia = 1,nanc-1
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))/
27 c $ (float(ianc(ia))-float(ianc(ia+1)))
28  $ (float(ianc(ia+1))-float(ianc(ia)))
29  else
30  rm = (alon(ia+1)-alon(ia))/(float(ianc(ia+1))-float(ianc(ia)))
31  end if
32 c
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
38  if (ia.eq.1) i1 = 1
39  if (ia.eq.(nanc-1)) i2 = npix
40  do i = i1,i2
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)
44  end if
45  ylat(i) = rm2*(float(i)-poff)+b2
46  enddo
47  enddo
48 c xlon(npix) = alon(nanc)
49 c ylat(npix) = alat(nanc)
50 c
51  return
52  end
README for MOD_PR03(V6.1.0) 2. POINTS OF CONTACT it can be either SDP Toolkit or MODIS Packet for Terra input files The orbit validation configuration parameter(LUN 600281) must be either "TRUE" or "FALSE". It needs to be "FALSE" when running in Near Real Time mode
subroutine lonlat(alon, alat, xlon, ylat)
Definition: lonlat.f:2