      program lats
c --- prints latitudes and longitudes for various cases of grid resolution
c --- idm,jdm are number of lat,long points
c --- 'rlong' is W longitude limit of output grid
c --- 'grid' is basic grid size in degrees
c --- 'xpiv' is I location of equator


c --- next 3 lines are for 0.08 deg case
       parameter (idm=1437,jdm=1437)
c      parameter (idm=1437,jdm=1678)
       data rad/57.29578/,pi/3.14159265/,grid/.08/,xpiv/1071./
       data rlong/-98.0/

c --- next 3 lines are for 0.5 in 0.08 deg domain (!!!!!!)
c      parameter (idm=210,jdm=270)
c     parameter (idm=232,jdm=270)
c     parameter (idm=250,jdm=270)
c     data rad/57.29578/,pi/3.14159265/,grid/.5/,xpiv/173./
c     data rlong/-98.0/

c --- next 3 lines are for 2. deg. case, 9N to 47N
c      parameter (idm=30,jdm=50)
c      data rad/57.29578/,pi/3.14159265/,grid/2./,xpiv/30./
c      data rlong/-97.5/

c --- next 3 lines are for .5 deg. case, 9N to 47N
cc      parameter (idm=116,jdm=197)                             !! 0.5 deg
c      parameter (idm=116,jdm=198)                             !! 0.5 deg
c      data rad/57.29578/,pi/3.14159265/,grid/.5/,xpiv/117./  !! 0.5 deg
c      data rlong/-98.0/                                     !! 0.5 deg

c --- next 3 lines are for jose map
c      parameter (idm=250,jdm=231)                              !! jose
c      data rad/57.29578/,pi/3.14159265/,grid/.1/,xpiv/238./   !! jose
c      data rlong/-83.0/                                      !! jose
      
ccc --- next 3 lines are for .9 deg. case, 28 S to 65 N
cc      parameter (idm=129,jdm=129)
cc      DATA RAD/57.29578/,PI/3.14159265/,GRID/.9/,XPIV/96./
cc      data rlong/-97.5/

ccc --- next 3 lines are for .45 deg. case, 10N to 60N
cc      parameter (idm=169,jdm=217)
cc      data rad/57.29578/,pi/3.14159265/,grid/.45/,xpiv/169./
cc      data rlong/-98./

ccc --- next lines are for Rainer's .45 and .225 depth arrays
cc      parameter (idm=256)
cc      DATA RAD/57.29578/,PI/3.14159265/,GRID/.45/,XPIV/191./
cc      parameter (idm=512)
cc      DATA RAD/57.29578/,PI/3.14159265/,GRID/.225/,XPIV/381./
c
      ALAT(DIST,GRIDD)=2.*ATAN(EXP(DIST*GRIDD/RAD))-PI/2.      
C
c --- print latitudes
      DO 4 I=1,IDM
      xlat=alat(xpiv-i,grid)*rad

c *****************************************************************
c      amun = 1./(30.*86400) + (xlat-47.)/(18.*86400)
c      amus = 1./( 5.*86400) - (xlat- 6.)/(18.*86400)
c      print 8887, i,xlat,amun,amus
c 8887 format(' i=',i3,' lat=',f8.2,' amun=',f20.15,'amus=',f20.15)

      print 8887, i,xlat
c 8887 format(' i=',i4,' lat=',f8.2)
 8887 format(' i=',i4,' lat=',f8.4)
c *****************************************************************

 4    CONTINUE
c --- check that latitude is zero for i=xpiv
      xlat=alat(0.,grid)*rad
      print 8888, xpiv,xlat
8888  format(' for i=xpiv=',f5.0,',   lat=',f8.2)
c --- print longitudes
      DO 5 j=1,jdm
      xlong=rlong+(j-1)*grid

      print 8886, j,xlong
 8886 format(' j=',i4,' long=',f8.2)

5     CONTINUE
      END

