|
subroutine | fi631 (msga, kptr, kpds, kret) |
| Find 'grib' chars & reset pointers.
|
|
subroutine | fi632 (msga, kptr, kpds, kret) |
| Gather info from product definition sec.
|
|
subroutine | fi633 (msga, kptr, kgds, kret) |
| Extract info from grib-gds.
|
|
subroutine | fi634 (msga, kptr, kpds, kgds, kbms, kret) |
| Extract or generate bit map for output.
|
|
subroutine | fi634x (npts, nskp, msga, kbms) |
| Extract bit map.
|
|
subroutine | fi635 (msga, kptr, kpds, kgds, kbms, data, kret) |
| Extract grib data elements from bds.
|
|
subroutine | fi636 (data, msga, kbms, refnce, kptr, kpds, kgds) |
| Process second order packing.
|
|
subroutine | fi637 (j, kpds, kgds, kret) |
| Grib grid/size test.
|
|
subroutine | w3fi63 (msga, kpds, kgds, kbms, data, kptr, kret) |
| Unpack a GRIB (edition 1) field to the exact grid specified in the GRIB message, isolate the bit map, and make the values of the product descripton section (PDS) and the grid description section (GDS) available in return arrays.
|
|
Unpack GRIB field to a GRIB grid.
- Author
- Bill Cavanaugh
- Date
- 1991-09-13
Definition in file w3fi63.f.
subroutine w3fi63 |
( |
character*1, dimension(*) |
msga, |
|
|
integer, dimension(*) |
kpds, |
|
|
integer, dimension(*) |
kgds, |
|
|
logical*1, dimension(*) |
kbms, |
|
|
real, dimension(*) |
data, |
|
|
integer, dimension(*) |
kptr, |
|
|
|
kret |
|
) |
| |
Unpack a GRIB (edition 1) field to the exact grid specified in the GRIB message, isolate the bit map, and make the values of the product descripton section (PDS) and the grid description section (GDS) available in return arrays.
When decoding is completed, data at each grid point has been returned in the units specified in the GRIB manual.
See "GRIB - THE WMO FORMAT FOR THE STORAGE OF WEATHER PRODUCT
INFORMATION AND THE EXCHANGE OF WEATHER PRODUCT MESSAGES IN
GRIDDED BINARY FORM" dated July 1, 1988 by John D. Stackpolem DOC, NOAA, NWS, National Meteorological Center.
List of text messages from code:
- W3FI63/FI632
- 'HAVE ENCOUNTERED A NEW GRID FOR NMC, PLEASE NOTIFY AUTOMATION DIVISION, PRODUCTION MANAGEMENT BRANCH (W/NMC42)'
- 'HAVE ENCOUNTERED A NEW GRID FOR ECMWF, PLEASE NOTIFY AUTOMATION DIVISION, PRODUCTION MANAGEMENT BRANCH (W/NMC42)'
- 'HAVE ENCOUNTERED A NEW GRID FOR U.K. METEOROLOGICAL OFFICE, BRACKNELL. PLEASE NOTIFY AUTOMATION DIVISION, PRODUCTION MANAGEMENT BRANCH (W/NMC42)'
- 'HAVE ENCOUNTERED A NEW GRID FOR FNOC, PLEASE NOTIFY AUTOMATION DIVISION, PRODUCTION MANAGEMENT BRANCH (W/NMC42)'
- W3FI63/FI633
- 'POLAR STEREO PROCESSING NOT AVAILABLE'
- W3FI63/FI634
- 'WARNING - BIT MAP MAY NOT BE ASSOCIATED WITH SPHERICAL COEFFICIENTS'
- W3FI63/FI637
- 'NO CURRENT LISTING OF FNOC GRIDS'
- Parameters
-
[in] | MSGA | Grib field - "grib" thru "7777" char*1 (message can be preceded by junk chars). Contains the grib message to be unpacked. characters "GRIB" may begin anywhere within first 100 bytes. |
[out] | KPDS | Array of size 100 containing PDS elements, GRIB (edition 1):
- 1 Id of center
- 2 Generating process id number
- 3 Grid definition
- 4 Gds/bms flag (right adj copy of octet 8)
- 5 Indicator of parameter
- 6 Type of level
- 7 Height/pressure , etc of level
- 8 Year including (century-1)
- 9 Month of year
- 10 Day of month
- 11 Hour of day
- 12 Minute of hour
- 13 Indicator of forecast time unit
- 14 Time range 1
- 15 Time range 2
- 16 Time range flag
- 17 Number included in average
- 18 Version nr of grib specification
- 19 Version nr of parameter table
- 20 Nr missing from average/accumulation
- 21 Century of reference time of data
- 22 Units decimal scale factor
- 23 Subcenter number
- 24 Pds byte 29, for nmc ensemble products
- 128 If forecast field error
- 64 If bias corrected fcst field
- 32 If smoothed field
- Warning: can be combination of more than 1
- 25 Pds byte 30, not used
- 26-35 Reserved
- 36-N Consecutive bytes extracted from program Definition section (pds) of grib message
|
[out] | KGDS | ARRAY CONTAINING GDS ELEMENTS.
- 1) Data representation type
- 19 Number of vertical coordinate parameters
- 20 Octet number of the list of vertical coordinate Parameters Or Octet number of the list of numbers of points In each row Or 255 if neither are present
- 21 For grids with pl, number of points in grid
- 22 Number of words in each row
|
- LATITUDE/LONGITUDE GRIDS
- 2 N(i) nr points on latitude circle
- 3 N(j) nr points on longitude meridian
- 4 La(1) latitude of origin
- 5 Lo(1) longitude of origin
- 6 Resolution flag (right adj copy of octet 17)
- 7 La(2) latitude of extreme point
- 8 Lo(2) longitude of extreme point
- 9 Di longitudinal direction of increment
- 10 Dj latitudinal direction increment
- 11 Scanning mode flag (right adj copy of octet 28)
- GAUSSIAN GRIDS
- 2 N(i) nr points on latitude circle
- 3 N(j) nr points on longitude meridian
- 4 La(1) latitude of origin
- 5 Lo(1) longitude of origin
- 6 Resolution flag (right adj copy of octet 17)
- 7 La(2) latitude of extreme point
- 8 Lo(2) longitude of extreme point
- 9 Di longitudinal direction of increment
- 10 N - nr of circles pole to equator
- 11 Scanning mode flag (right adj copy of octet 28)
- 12 Nv - nr of vert coord parameters
- 13 Pv - octet nr of list of vert coord parameters or Pl - location of the list of numbers of points in each row (if no vert coord parameters are present or 255 if neither are present
- POLAR STEREOGRAPHIC GRIDS
- 2 N(i) nr points along lat circle
- 3 N(j) nr points along lon circle
- 4 La(1) latitude of origin
- 5 Lo(1) longitude of origin
- 6 Resolution flag (right adj copy of octet 17)
- 7 Lov grid orientation
- 8 Dx - x direction increment
- 9 Dy - y direction increment
- 10 Projection center flag
- 11 Scanning mode (right adj copy of octet 28)
- SPHERICAL HARMONIC COEFFICIENTS
- 2) J pentagonal resolution parameter
- 3) K pentagonal resolution parameter
- 4) M pentagonal resolution parameter
- 5) Representation type
- 6) Coefficient storage mode
- MERCATOR GRIDS
- 2 N(i) nr points on latitude circle
- 3 N(j) nr points on longitude meridian
- 4 La(1) latitude of origin
- 5 Lo(1) longitude of origin
- 6 Resolution flag (right adj copy of octet 17)
- 7 La(2) latitude of last grid point
- 8 Lo(2) longitude of last grid point
- 9 Latit - latitude of projection intersection
- 10 Reserved
- 11 Scanning mode flag (right adj copy of octet 28)
- 12 Longitudinal dir grid length
- 13 Latitudinal dir grid length
- LAMBERT CONFORMAL GRIDS
- 2 Nx nr points along x-axis
- 3 Ny nr points along y-axis
- 4 La1 lat of origin (lower left)
- 5 Lo1 lon of origin (lower left)
- 6 Resolution (right adj copy of octet 17)
- 7 Lov - orientation of grid
- 8 Dx - x-dir increment
- 9 Dy - y-dir increment
- 10 Projection center flag
- 11 Scanning mode flag (right adj copy of octet 28)
- 12 Latin 1 - first lat from pole of secant cone inter
- 13 Latin 2 - second lat from pole of secant cone inter
- E-STAGGERED ARAKAWA ROTATED LAT/LON GRIDS (TYPE 203)
- 2 N(i) nr points on latitude circle
- 3 N(j) nr points on longitude meridian
- 4 La(1) latitude of origin
- 5 Lo(1) longitude of origin
- 6 Resolution flag (right adj copy of octet 17)
- 7 La(2) latitude of center
- 8 Lo(2) longitude of center
- 9 Di longitudinal direction of increment
- 10 Dj latitudinal direction increment
- 11 Scanning mode flag (right adj copy of octet 28)
- CURVILINEAR ORTHIGINAL GRID (TYPE 204)
- 2 N(i) nr points on latitude circle
- 3 N(j) nr points on longitude meridian
- 4 Reserved set to 0
- 5 Reserved set to 0
- 6 Resolution flag (right adj copy of octet 17)
- 7 Reserved set to 0
- 8 Reserved set to 0
- 9 Reserved set to 0
- 10 Reserved set to 0
- 11 Scanning mode flag (right adj copy of octet 28)
- ROTATED LAT/LON A,B,C,D-STAGGERED (TYPE 205)
- 2 N(i) nr points on latitude circle
- 3 N(j) nr points on longitude meridian
- 4 La(1) latitude of first point
- 5 Lo(1) longitude of first point
- 6 Resolution flag (right adj copy of octet 17)
- 7 La(2) latitude of center
- 8 Lo(2) longitude of center
- 9 Di longitudinal direction of increment
- 10 Dj latitudinal direction increment
- 11 Scanning mode flag (right adj copy of octet 28)
- 12 Latitude of last point
- 13 Longitude of last point
- Parameters
-
[out] | KBMS | Bitmap describing location of output elements. (always constructed) |
[out] | DATA | Array containing the unpacked data elements. Note: 65160 is maximun field size allowable. |
[out] | KPTR | Array containing storage for following parameters |
- 1 Total length of grib message
- 2 Length of indicator (section 0)
- 3 Length of pds (section 1)
- 4 Length of gds (section 2)
- 5 Length of bms (section 3)
- 6 Length of bds (section 4)
- 7 Value of current byte
- 8 Bit pointer
- 9 Grib start bit nr
- 10 Grib/grid element count
- 11 Nr unused bits at end of section 3
- 12 Bit map flag (copy of bms octets 5,6)
- 13 Nr unused bits at end of section 2
- 14 Bds flags (right adj copy of octet 4)
- 15 Nr unused bits at end of section 4
- 16 Reserved
- 17 Reserved
- 18 Reserved
- 19 Binary scale factor
- 20 Num bits used to pack each datum
- Parameters
-
[out] | KRET | Flag indicating quality of completion. |
- Note
- When decoding is completed, data at each grid point has been returned in the units specified in the grib manual.
- Values for return flag (kret)
- 0 - Normal return, no errors
- 1 - 'grib' not found in first 100 chars
- 2 - '7777' not in correct location
- 3 - Unpacked field is larger than 260000
- 4 - Gds/ grid not one of currently accepted values
- 5 - Grid not currently avail for center indicated
- 8 - Temp gds indicated, but gds flag is off
- 9 - Gds indicates size mismatch with std grid
- 10 - Incorrect center indicator
- 11 - Binary data section (bds) not completely processed. program is not set to process flag combinations shown in octets 4 and 14.
- 12 - Binary data section (bds) not completely processed. program is not set to process flag combinations
- Author
- Bill Cavanaugh
- Date
- 1991-09-13
Definition at line 242 of file w3fi63.f.