GDSWIZ

The GDSWIZ routine decodes the grib grid description section
           (passed in integer form as decoded by subprogram w3fi63)
           and returns one of the following:
             (IOPT= 0) grid and earth coordinates of all grid points
             (IOPT=+1) earth coordinates of selected grid coordinates
             (IOPT=-1) grid coordinates of selected earth coordinates

           The current code recognizes the following projections:
             (KGDS(1)=000) Equidistant cylindrical
             (KGDS(1)=001) Mercator cylindrical
             (KGDS(1)=003) Lambert conformal conical
             (KGDS(1)=004) Gaussian cylindrical
             (KGDS(1)=005) Polar stereographic azimuthaL
             (KGDS(1)=201) Staggered rotated equidistant cylindrical
             (KGDS(1)=202) Rotated equidistant cylindrical
             (KGDS(1)=203) Staggered rotated equidistant cylindrical 2-D

           If the selected coordinates are more than one gridpoint
           beyond the the edges of the grid domain, then the relevant
           output elements are set to fill values.  Also if iopt=0,
           if the number of grid points exceeds the number allotted,
           then all the output elements are set to fill values.
           The actual number of valid points computed is returned too.

USAGE:    CALL GDSWIZ(KGDS,IOPT,NPTS,FILL,XPTS,YPTS,RLON,RLAT,NRET,
                      LROT,CROT,SROT)

   Input argument list:
      KGDS     - INTEGER (200) GDS PARAMETERS AS DECODED BY W3FI63
      IOPT     - INTEGER OPTION FLAG
                 ( 0 TO COMPUTE EARTH COORDS OF ALL THE GRID POINTS)
                 (+1 TO COMPUTE EARTH COORDS OF SELECTED GRID COORDS)
                 (-1 TO COMPUTE GRID COORDS OF SELECTED EARTH COORDS)
      NPTS     - INTEGER MAXIMUM NUMBER OF COORDINATES
      FILL     - REAL FILL VALUE TO SET INVALID OUTPUT DATA
                 (MUST BE IMPOSSIBLE VALUE; SUGGESTED VALUE: -9999.)
      XPTS     - REAL (NPTS) GRID X POINT COORDINATES IF IOPT>0
      YPTS     - REAL (NPTS) GRID Y POINT COORDINATES IF IOPT>0
      RLON     - REAL (NPTS) EARTH LONGITUDES IN DEGREES E IF IOPT<0
                 (ACCEPTABLE RANGE: -360. TO 360.)
      RLAT     - REAL (NPTS) EARTH LATITUDES IN DEGREES N IF IOPT<0
                 (ACCEPTABLE RANGE: -90. TO 90.)
      LROT     - INTEGER FLAG TO RETURN VECTOR ROTATIONS IF 1
 
   Output argument list:
      XPTS     - REAL (NPTS) GRID X POINT COORDINATES IF IOPT<=0
      YPTS     - REAL (NPTS) GRID Y POINT COORDINATES IF IOPT<=0
      RLON     - REAL (NPTS) EARTH LONGITUDES IN DEGREES E IF IOPT>=0
      RLAT     - REAL (NPTS) EARTH LATITUDES IN DEGREES N IF IOPT>=0
      NRET     - INTEGER NUMBER OF VALID POINTS COMPUTED
                 (-1 IF PROJECTION UNRECOGNIZED)
      CROT     - REAL (NPTS) CLOCKWISE VECTOR ROTATION COSINES IF LROT=1
      SROT     - REAL (NPTS) CLOCKWISE VECTOR ROTATION SINES IF LROT=1
                 (UGRID=CROT*UEARTH-SROT*VEARTH;
                  VGRID=SROT*UEARTH+CROT*VEARTH)
 
 
iplib.tar Library contains subroutines to be used for interpolating almost any grids used at NCEP. (Fortran90)
Date posted: 2/22/2007