|
||||||
|
|
||||||
The following program converts from pixel sample and line indexes to polar stereographic SSM/I grid coordinates to latitude and longitude coordinates. Program II converts from latitude and longitude coordinates to polar stereographic SSM/I grid coordinates to pixel sample lines and indexes.
c Convert xy 11
c
c This program converts from Leads ARI grid sample,line
c indexes to polar stereographic SSM/I grid coordinates
c (in km) and to latitude and longitude. This program is a
c version of the program written by C.S. Morris, Jet Propulsion
c Laboratory, which appears in the NSIDC SSM/I User's
c Guide, Section F, "SSMII Polar Grids".
c
c Program adapted for Leads ARI grids by F.Fetterer,
c NOARL Remote Sensing,Stennis Space Center, March 1991
real*4 x,y,alat,along
real*8 e,e2,cdr,pi
character*1 grid
c Conversion constant, degrees to radians:
cdr=57.29577951
c Radius and eccentricity of earth (Hughes ellipsiod, km):
re=6378.273
e2=0.006693883
e=SQRT(e2)
pi=3.141592654
c Standard parallel - latitude of no distortion
slat=70.0
c Puts 135 deg long. at the top of the grid:
xlam=-45.
print*, 'Type ''P'' for Pacific grid, ''E'' for European'
accept*,grid
100 print*,'Type sample, line (9999,9999 to stop)'
accept*,sample,rline
if (sample.eq.9999.) goto 999
c Transform sample, line coordinates to SSMI grid coordinates
if(grid.eq.'P'.or.grid.eq.'p')then
y=1975-rline
x=-(2250-sample)
else
y=1300-rline
x=sample
end if
c Comput latitude and longitude:
200 rho=SQRT(x**2+y**2)
if(rho.gt.0.1)goto 250
alat=90.
along=0.
goto 300
250 cm=COSD(slat)/SQRT(1.-e2*(SIND(slat)**2))
t-TAN((pi/4.)-(slat/(2.*cdr)))/((1.-e*SIND(slat))/
& (1.+e*SIND(slat)))**(e/2.)
t=rho*t/(re*cm)
chi=(pi/2.)-2.*ATAN(T)
alat=chi+((e2/2.)+(5.*e2**2./24.)+
& (e2**3./12.))*SIN(2*chi)+((7.*e2**2./
& 48.)+(29.*e2**3/240.))*SIN(4.*chi)+
& (7.*e2**3./120.)*sin(6.*chi)
alat=alat*cdr
along=xlam+ATAN2D(x,-y)
if(along.1t.0.) along = along+360.
if(along.gt.360.)along = along-360.
300 print*,' Sample Line SSMI x SSMI y lat
& Long'
write (6,310)sample,rline,x,y,alat,along
print*
goto 100
310 format 4f10.2 2f10.4
999 continue
end
The program is reproduced from Fetterer and Hawkins. 1991. An AVHRR data set for the Arctic leads ARI. Naval Oceanographic and Atmospheric Research Laboratory, Technical Note 118. 61 p.