GDSWZDC9
The GDSWZDC9 routine decodes the grib grid description section
(passed in integer form as decoded by subprogram w3fi63)
and returns one of the following:
(IOPT=+1) earth coordinates of selected grid coordinates
(IOPT=-1) grid coordinates of selected earth coordinates
For Staggered Rotated Equidistant cylindrical projections.
(See under the description of kgds to determine whether
to compute a Staggered wind grid or a Staggered mass grid.)
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.
The actual number of valid points computed is returned too.
Optionally, the vector rotations and the map Jacobians
for this grid may be returned as well.
USAGE: CALL GDSWZDC9(KGDS,IOPT,NPTS,FILL,XPTS,YPTS,RLON,RLAT,NRET,
LROT,CROT,SROT,LMAP,XLON,XLAT,YLON,YLAT,AREA)
Input argument list:
KGDS - INTEGER (200) GDS PARAMETERS AS DECODED BY W3FI63
IMPORTANT NOTE: IF THE 9TH BIT (FROM RIGHT) OF KGDS(11)
(SCANNING MODE FLAG) IS 1, THEN THIS
THE GRID IS COMPUTED FOR A WIND FIELD;
OTHERWISE IT IS FOR A MASS FIELD. THUS
MOD(KGDS(11)/256,2)=0 FOR MASS GRID.
IOPT - INTEGER OPTION FLAG
(+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
LMAP - INTEGER FLAG TO RETURN MAP JACOBIANS 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
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)
XLON - REAL (NPTS) DX/DLON IN 1/DEGREES IF LMAP=1
XLAT - REAL (NPTS) DX/DLAT IN 1/DEGREES IF LMAP=1
YLON - REAL (NPTS) DY/DLON IN 1/DEGREES IF LMAP=1
YLAT - REAL (NPTS) DY/DLAT IN 1/DEGREES IF LMAP=1
AREA - REAL (NPTS) AREA WEIGHTS IN M**2 IF LMAP=1
iplib.tar |
Library contains subroutines to be used for
interpolating almost any grids used at NCEP. (Fortran90)
Date posted: 2/22/2007 |