Close

Service Interruption

The NSIDC Web site and data services are currently having intermittent problems and may be unavailable. We are working to restore these services as soon as possible and apologize for any inconvenience this may cause. Please contact NSIDC User Services for assistance.

Coordinates Conversion Program II

The following program converts from latitude and longitude coordinates to polar stereographic SSM/I grid coordinates to pixel sample lines and indexes. Program I converts from pixel sample and line indexes to polar stereographic SSM/I grid coordinates to latitude and longitude coordinates.

c      Convert_11_xy
c
c      This program converts from latitude and longitude
c      to polar stereographic SSM/I grid coordinates (in km)
c      and to Leads ARI grid sample,line indexes.  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

       dimension t (2)
       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 latitude, longitude (9999,9999 to stop)'
       accept*,alat,along
       if (alat.eq.9999.) goto 999
       if(alat.lt.89.995)goto 250
       x=0.
       y=0.
       goto  300
250    rlat=alat
       do 600 II=1,2
        if(II.eq.2)rlat=slat
600    t(II)=TAN((pi/4.)-(rlat/(2.*cdr)))/((1.-e*SIND(rlat))/
     & (1.+e*SIND(rlat)))**(e/2.)

       cm=COSD(slat)/SQRT(1.-e2*(SIND(slat)**2))
       rho-re*cm*t(1)/t(2)
       x=rho*SIND(along-xlam)
       y=rho*COSD(along-xlam)
c      Transform sample, line coordinates to SSMI grid coordinates
300    if(grid.eq.'P'.or.grid.eq.'p')then
        rline=1975-y
        sample=x+2250
       else
        rline=1300-y
        sample=x
       end if
       print*,'    Sample    Line       SSMI x      SSMI y    Lat
     &       Long'
       write (6,310)sample,rline,x,y,alat,along
       print*
       goto  100
310    format(4f1O.2,2f1O.4)
999    continue
       end

The program is taken 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.