home *** CD-ROM | disk | FTP | other *** search
/ Photo CD Demo 1 / Demo.bin / formats / grib / format_g
Text File  |  1980-02-04  |  101KB  |  2,353 lines

  1.                                   ii
  2.                       U.S. DEPARTMENT OF COMMERCE
  3.             NATIONAL OCEANIC AND ATMOSPHERIC ADMINISTRATION
  4.                        NATIONAL WEATHER SERVICE
  5.                     NATIONAL METEOROLOGICAL CENTER
  6.                                    
  7.                                    
  8.                                    
  9.                                    
  10.                                    
  11.                               G  R  I  B
  12.                                    
  13.                                Edition 1
  14.                                    
  15.                       (WMO Code FM 92-VIII Ext.)
  16.                                    
  17.                                    
  18.                             THE WMO FORMAT
  19.                                    
  20.                                   FOR
  21.                                    
  22.               THE STORAGE OF WEATHER PRODUCT INFORMATION
  23.                                    
  24.                                   AND
  25.                                    
  26.                THE EXCHANGE OF WEATHER PRODUCT MESSAGES
  27.                                    
  28.                         IN GRIDDED BINARY FORM
  29.                                    
  30.                                    
  31.                                    
  32.                                    
  33.                            John D. Stackpole
  34.                           Automation Division
  35.                                    
  36.                                    
  37.                                    
  38.                                 Revised
  39.                             (see overleaf)
  40.                                    
  41.                                    
  42.                                    
  43.                                    
  44.                                    
  45.                             March 13, 1992
  46.                            REVISION HISTORY
  47.                                    
  48. March 15, 1991           Original Publication of GRIB Edition 1
  49.  
  50. June 3, 1991           p.6:  Correct originating center
  51.                              for Montreal to 53
  52.                        p.7:  Add generating process code numbers
  53.                              for SSI analysis
  54.                        p.9:  Add grid no. 103 to list
  55.                              of NMC storage grids (Table B)
  56.                        p.13: Move MARD grid 206 so that the
  57.                              lat/lon point (35N,95W) falls
  58.                              exactly on grid point (30,16)
  59.                        p.14: Move MARD grid 209 so that the
  60.                              lat/lon point (35N,95W) falls
  61.                              exactly on grid point (59,31)
  62.                        p.15: Replace regional West CONUS grid with
  63.                              regional full CONUS grid, as no. 211
  64.                        p.16: Replace regional East CONUS grid with
  65.                              regional full CONUS grid, double
  66.                              resolution, as no. 212
  67.                        p.21: additional locally defined parameters
  68.                        pp.A.1 & A.2:  Add optional characters to WMO
  69.                              header for multi-part messages.
  70.                        p.A.4: Northern Hemisphere P.S. grid added;
  71.                               Regional CONUS replaces east & west CONUS
  72.                        Appendix B: All new: Description of BLOK.
  73.  
  74. October 11, 1991       p.6: added OPC Fog forecasting model as no.73
  75.                        p.7&8: added ETA model
  76.                        p.9&10: added NMC "Super C" grids 104 & 105
  77.                        p.21: added parameter 136 vertical speed shear
  78.                        p.35: corrected bit 2 scanning direction
  79.  
  80. March 13, 1992         p.2:  corrected footnote
  81.                        p.5:  clarified "century"
  82.                        p.16  corrected pole and corner points
  83.                        p.21: added 137 visibility
  84.                              deleted 202 (use 57) evaporation
  85.                              supplied units for 207 & 213
  86.                        p.30  corrected content of octets 24-27
  87.  
  88.                        Then totally reprinted with new pagination.
  89.                             GRIB Edition 1
  90.                                    
  91.                                    
  92.  
  93. INTRODUCTION
  94.  
  95.      The World Meteorological Organization (WMO) Commission for Basic
  96. Systems (CBS) Extraordinary Meeting Number VIII (1985) approved a
  97. general purpose, bit-oriented data exchange format, designated FM 92-
  98. VIII Ext. GRIB (GRIdded Binary).  It is an efficient vehicle for
  99. transmitting large volumes of gridded data to automated centers over
  100. high speed telecommunication lines using modern protocols.  By packing
  101. information into the GRIB code, messages can be made more compact than
  102. character oriented bulletins, producing faster computer-to-computer
  103. transmissions.  GRIB can equally well serve as a data storage format,
  104. generating the same efficiencies relative to information storage and
  105. retrieval devices.
  106.  
  107.      Changes and extensions to GRIB were approved at the regular
  108. meeting of the WMO/CBS in February, 1988; additional changes were
  109. introduced at the CBS/WGDM/Sub-Group on Data Representation meetings in
  110. May 1989 and in October 1990.  The last set of changes were of such
  111. structural magnitude as to require a new Edition of GRIB, Edition 1,
  112. which this document describes.
  113.  
  114.      Note: the Edition number is in the same location, relative to the
  115. start of the GRIB message, for all Editions. Thus, decoding programs
  116. can detect which Edition layout to expect in the remaining portion of
  117. the message.  This is appropriate for archives of messages encoded in
  118. earlier Editions or during transition periods.
  119.  
  120.      Each GRIB record intended for either transmission or storage
  121. contains single value, or a matrix of values, at an array of grid
  122. points, or a set of spectral coefficients, for parameters at a single
  123. level (or layer) as a continuous bit stream.  Logical divisions of the
  124. record are designated as "sections", each of which provides control
  125. information and/or data.  A GRIB record consists of six sections, two
  126. of which are optional:
  127.  
  128.                (0) Indicator Section
  129.  
  130.                (1) Product Definition Section (PDS)
  131.  
  132.                (2) Grid Description Section (GDS)  -  optional
  133.  
  134.                (3) Bit Map Section (BMS)           -  optional
  135.  
  136.                (4) Binary Data Section (BDS)
  137.  
  138.                (5) '7777' (ASCII Characters)
  139.  
  140.      Most centers require bulletin headers to enable them to receive,
  141. identify, and switch messages; NMC is no exception.  The standard WMO
  142. abbreviated heading for GRIB is described in Appendix A.
  143.  
  144.      In this documentation, certain symbols are used to clarify the
  145. contents of octets (groups of eight consecutive binary bits, "bytes" in
  146. American usage).  If unadorned letters are used, they are symbolic and
  147. their meanings are described in the text; a decimal number is simply
  148. printed as is; a character or string of characters is represented
  149. inside single quote marks.  International Alphabet No. 5, which is
  150. identical in its essential elements to the U.S. National Standard 7-bit
  151. ASCII, is used for character representation in the GRIB code.
  152.  
  153.      Octets are numbered consecutively from the start of each section;
  154. bits within an octet are also numbered from left (the most significant
  155. bit) to right (the least significant bit).  Thus an octet with bit 8
  156. set to the value 1 would have the integer value 1; bit 7 set to one
  157. would have a value of 2, etc.
  158.  
  159.      The numbering of Tables in the following text corresponds to the
  160. description of GRIB in the WMO Manual on Codes<1>.  Some additional
  161. tables not found in the WMO Manual are indicated by letters.
  162.  
  163.      A final caveat: this document does not include all the features in
  164. GRIB as described in the Manual on Codes.  This document selects out
  165. those features which are of particular interest to the National Weather
  166. Service at the present time.  Some of the "advanced" features are
  167. alluded to in this document; please refer to the Manual for full
  168. details.
  169.  
  170.  
  171. DATA PACKING METHOD.
  172.  
  173.      The code form represents numeric data as a series of binary digits
  174. (bits).  Such data representation is independent of any particular
  175. machine representation; by convention data lengths are measured in
  176. octets.  Data are coded as binary integers using the minimum number of
  177. bits required for the desired precision.  Numeric values, with units as
  178. shown in Table 2, are first scaled by a power of ten to achieve an
  179. appropriate decimal precision, a reference value is subtracted from
  180. them to reduce redundancy and eliminate negative values, and they are
  181. then further scaled by a power of two to pack them into a pre-selected
  182. word length.
  183.  
  184.      The representation of a single value is such that:
  185.  
  186.                         Y * 10D = R + (X * 2E)
  187.                                    
  188.      where
  189.      
  190.      Y = original or unpacked value; units as in Table 2;
  191.      D = decimal scale factor, to achieve desired precision
  192.                (sign bit, followed by a 15-bit integer);
  193.      R = reference value (32 bits);
  194.      X = internal value (No. of bits varies for each record);
  195.      E = binary scale factor for word-length packing
  196.                (sign bit, followed by a 15-bit integer).
  197.      
  198.      The reference value (R) is the minimum value of the decimally
  199. scaled data that is being encoded.  R is placed in the Binary Data
  200. Section in four octets as a single precision floating-point number:
  201.  
  202.                   sAAAAAAA BBBBBBBB BBBBBBBB BBBBBBBB
  203.                                    
  204.           where s = sign bit, encoded as   0 => positive
  205.                                            1 => negative
  206.                 A = 7-bit binary integer, the characteristic
  207.                 B = 24-bit binary integer, the mantissa.
  208.           
  209.      The appropriate formula to recover the value of R is:
  210.  
  211.                    R = (-1)s * 2(-24) * B * 16(A-64)
  212.                                    
  213.      This formula is the standard IBM representation for a single
  214. precision (real) floating point number.  (Consideration is being given
  215. to using the IEEE floating point representation in the future, in a
  216. later Edition of GRIB.)
  217.  
  218.      Both the decimal scaling factor and/or the binary scaling factors
  219. may equal 0.  It is not necessary to use the binary scaling to "fit"
  220. the numbers into a prespecified word size; an alternative encoding
  221. practice is to change the word length (the same for all the points, of
  222. course) to accommodate the largest departure from the reference value.
  223. A properly written GRIB decoder should be able to decode either option
  224. with no change in the logic as long as the decoder makes no prior
  225. assumptions about word lengths.  All the necessary parameters are
  226. included in the GRIB message, of course.
  227.  
  228.  
  229. GRIB CODE FORM:
  230.  
  231.      With the exception of the Indicator Section and the End Section
  232. all octets contain binary values.  All sections contain an even number
  233. of octets; the variable length sections are padded with zero values as
  234. necessary.  These extra bits must be accounted for in finding one's way
  235. through the sections; their content should be ignored.
  236.  
  237.  
  238. SECTION 0: THE INDICATOR SECTION (IS)
  239.  
  240.      The indicator section serves to identify the start of the record
  241. in a human readable form; to indicate the total length of the message,
  242. and to indicate the Edition number of the message.  It is always eight
  243. octets long.
  244.  
  245.      Octet no.             IS Content
  246.  
  247.        1-4        'GRIB'  (Coded CCITT-ITA No. 5) (ASCII);
  248.  
  249.        5-7        Total length, in octets, of GRIB message
  250.                     (including Section 0);
  251.  
  252.        8          Edition number - currently  1
  253.  
  254.  
  255. SECTION 1: THE PRODUCT DEFINITION SECTION (PDS).
  256.  
  257.      The PDS contains indicators for the Parameter table Version, the
  258. originating center, the numerical model (or "generating process") that
  259. created the data, the geographical area covered by the data, the
  260. parameter itself, and the actual values for the appropriate vertical
  261. level or layer, the decimal scale factor, and date/time information.
  262. The PDS is at least 28 octets long but it may be longer if an
  263. originating center chooses to make it so.  Users of GRIB messages are
  264. strongly urged to use the length-of-section portion of the PDS to
  265. determine where the next section begins.  Do not assume a fixed octet
  266. length.
  267.  
  268.      Octet no.                PDS Content
  269.  
  270.       1 - 3     Length in octets of the Product Definition Section
  271.  
  272.       4         Parameter Table Version number.
  273.                 Currently Version 1 for international exchange
  274.                 Parameter table version numbers 128-254 are
  275.                 reserved for local use.
  276.  
  277.       5         Identification of center (See Table 0)
  278.  
  279.       6         Generating process ID number
  280.                 (allocated by the originating center; See Table A)
  281.  
  282.       7         Grid Identification (geographical location and
  283.                                         area; See Table B)
  284.  
  285.       8         Flag specifying the presence or absence of a GDS
  286.                     or a BMS       (See Table 1)
  287.  
  288.       9         Indicator of parameter and units (See Table 2)
  289.  
  290.       10        Indicator of type of level or layer
  291.                          (See Tables 3 & 3a)
  292.  
  293.       11-12     Height, pressure, etc. of the level or layer
  294.  
  295.                          (See Table 3)
  296.  
  297.       13        Year of century     \  Initial (or Reference)
  298.                                     |  time of forecast - UTC
  299.       14        Month of year       |
  300.                                     |          or
  301.       15        Day of month         >
  302.                                     |  Start of time period
  303.       16        Hour of day         |    for averaging or
  304.                                     |    accumulation of
  305.       17        Minute of hour      /    analyses
  306.      
  307.       18        Forecast time unit (see Table 4)
  308.  
  309.       19        P1 - Period of time (Number of time units)
  310.                     (0 for analysis or initialized analysis.)
  311.                     Units of time given by content of octet 18.
  312.  
  313.       20        P2 - Period of time (Number of time units)
  314.                          or
  315.                     Time interval between successive analyses,
  316.                     successive initialized analyses, or forecasts,
  317.                     undergoing averaging or accumulation.
  318.                     Units given by octet 18.
  319.  
  320.       21        Time range indicator (See Table 5)
  321.  
  322.       22-23     Number included in average, when octet 21
  323.                   (Table 5) indicates an average or
  324.                   accumulation; otherwise set to zero.
  325.  
  326.       24        Number Missing from averages or accumulations.
  327.  
  328.       25        Century of Initial (Reference) time
  329.                     (=20 until Jan. 1, 2001)
  330.  
  331.       26        Reserved - set to 0
  332.  
  333.       27-28     The decimal scale factor D.  A negative value
  334.                 is indicated by setting the high order bit
  335.                 (bit No. 1) in octet 27 to 1 (on).
  336.  
  337.       29-40     Reserved (need not be present)
  338.  
  339.       41-...    Reserved for originating center use.
  340.  
  341.      Note: Octet 8 may indicate the presence of the Grid Description
  342. Section (GDS) even though octet 7 specifies a predefined grid.  In this
  343. case the GDS must describe that grid - this device serves as a
  344. mechanism for transmitting new "predefined" grids to users prior to
  345. their formal publication in this or the official WMO documentation.
  346.  
  347.      
  348.      
  349.                            TABLES FOR THE PDS
  350.                                    
  351.                                    
  352.                      TABLE 0.  ORIGINATING CENTER
  353.                              (PDS Octet 5)
  354.                                    
  355.                                    
  356.                                    
  357.           VALUE               CENTER
  358.      
  359.             07      US Weather Service - National Met. Center
  360.             34      Japanese Meteorological Agency - Tokyo
  361.             53      Canadian Meteorological Service - Montreal
  362.             58      US Navy  - Fleet Numerical Oceanography Center
  363.             74      U.K. Met Office - Bracknell
  364.             98      European Center for Medium-Range Weather
  365.                     Forecasts - Reading
  366.      
  367.  
  368.  
  369.                 TABLE A.   Generating Process or Model
  370.                              (PDS Octet 6)
  371.                                    
  372.                                    
  373.          VALUE                MODEL
  374.      
  375.           10         Significant Wind-Wave Forecast Model
  376.           19         Limited-area Fine Mesh (LFM) analysis
  377.           25         Snow Cover Analysis
  378.           39         Nested Grid forecast Model (NGM)
  379.           42         Global Optimum Interpolation Analysis (GOI)
  380.                      from "Aviation" run
  381.           43         Global Optimum Interpolation Analysis (GOI)
  382.                      from "Final" run
  383.           44         Sea Surface Temperature Analysis
  384.           53         LFM-Fourth Order Forecast Model
  385.           64         Regional Optimum Interpolation Analysis (ROI)
  386.      .....68        80 wave triangular, 18-layer Spectral model
  387.                      from "Aviation" run
  388.           69         80 wave triangular, 18 layer Spectral model
  389.                      from "Medium Range Forecast" run
  390.           73         Fog Forecast model - Ocean Prod. Center
  391.           76         Bias corrected Medium Range Forecast
  392.           77         126 wave triangular, 18 layer Spectral model
  393.                      from "Aviation" run
  394.           78         126 wave triangular, 18 layer Spectral model
  395.                      from "Medium Range Forecast" run
  396.           79         Backup from the previous run
  397.           81         Spectral Statistical Interpolation (SSI)
  398.                      analysis from "Aviation" run.
  399.           82         Spectral Statistical Interpolation (SSI)
  400.                      analysis from "Final" run.
  401.           83         ETA mesoscale forecast model
  402.      
  403.      
  404.      
  405.      TABLE B.   GRID IDENTIFICATION
  406.      
  407.                              (PDS Octet 7)
  408.                                    
  409.                       INTERNATIONAL EXCHANGE GRIDS
  410.                                    
  411.       VALUE  RESOLUTION      AREA              GRID          GRID
  412.              (degrees)     COVERAGE            SHAPE        POINTS
  413.              lon x lat     (degrees)        cols  rows
  414.      
  415.       21    5.0 x 2.5   0-180E, 0-90N         37   36 + pole  1333
  416.       22    5.0 x 2.5   180W-0, 0-90N         37   36 + pole  1333
  417.       23    5.0 x 2.5   0-180E, 90S-0  pole + 37   36         1333
  418.       24    5.0 x 2.5   180W-0, 90S-0  pole + 37   36         1333
  419.       25    5.0 x 5.0   0-355E, 0-90N         72   18 + pole  1297
  420.       26    5.0 x 5.0   0-355E, 90S-0  pole + 72   18         1297
  421.       50    2.5 x 1.25             (see note iv)               964
  422.       61    2.0 x 2.0   0-180E, 0-90N         91   45 + pole  4096
  423.       62    2.0 x 2.0   180W-0, 0-90N         91   45 + pole  4096
  424.       63    2.0 x 2.0   0-180E, 90S-0  pole + 91   45         4096
  425.       64    2.0 x 2.0   180W-0, 90S-0  pole + 91   45         4096
  426.    
  427.      255         (non-standard grid - defined in the GDS)
  428.  
  429. NOTES ON INTERNATIONAL EXCHANGE GRIDS:
  430.  
  431.      (i)    The grid points are laid out in a linear array such that
  432. the longitude index (the columns) is the most rapidly varying.  For the
  433. northern hemisphere grids the first point in the record is at the
  434. intersection of the western-most meridian and southern-most circle of
  435. latitude; the last point is the single polar value (see note iii,
  436. below).  For the southern hemisphere grids the first point in the
  437. record is the single polar value (see note iii, below); the last point
  438. is at the intersection of the eastern-most meridian and northern-most
  439. circle of latitude.  For those familiar with FORTRAN subscripting
  440. conventions, longitude is the first subscript, latitude the second.
  441.  
  442.       (ii)   In grids 21 through 26, and 61 through 64, the values on
  443. the shared boundaries are included in each area.
  444.  
  445.       (iii)  The datum for the pole point is given only once in each
  446. grid.  The user must expand, if desired, the single pole point value to
  447. all the pole "points" at the pole row of a latitude-longitude grid.
  448. Scalar quantity values are the same for all pole points on a the grid.
  449. Wind components at the poles are given by the formulae:
  450.  
  451.             u = -speed * sin(dd)   &   v = -speed * cos(dd)
  452.  
  453. where dd is the direction of the wind as reported according to the
  454. specification of wind direction at the poles (refer to WMO Manual
  455. on Codes <1>, code table 878).
  456.  
  457.      The WMO convention can be given this operational definition:  At
  458. the North Pole, face into the wind and report the value of the west
  459. longitude meridian along which the wind is coming at you; at the South
  460. Pole do likewise but report the east longitude meridian value. This is
  461. equivalent to placing the origin of a right-handed Cartesian coordinate
  462. system on the North Pole with the y-axis pointing to the prime (0
  463. degree) meridian and the x-axis pointing to the 90 degrees west
  464. meridian, and then resolving any vector wind at the pole point into
  465. components along those axes.  At the South Pole the coordinate axes are
  466. oriented such that the y-axis points toward 180 degrees west.  Those
  467. components are the u- and v-values given as the single pair of pole
  468. point winds in the GRIB format.
  469.  
  470.      In terms of a longitude/latitude grid these are the wind
  471. components for the pole point at the 180 degree meridian.  For example,
  472. on a 2.5x2.5 degree northern hemisphere grid (145x37 points), with the
  473. abscissa along the equator and the ordinate along the prime meridian,
  474. the transmitted north pole wind components are those that belong at the
  475. gridpoint (73,37).  The wind components at the other grid points along
  476. the pole row may be obtained through suitable rotation of the
  477. coordinate system.  All the components at the pole row are, of course,
  478. simply representations of the same vector wind viewed from differing
  479. (rotated) coordinate systems.  In the southern hemisphere the analogous
  480. situation holds; the single set of transmitted pole point wind
  481. components belong at the gridpoint (73,1).
  482.  
  483.      (iv)   Grid 50 is a set of points over the contiguous United
  484. States and environs on a grid extending from 20N (row No. 1) to 60N
  485. (row  No. 33) in 1.25 degree intervals.  The grid increases in
  486. longitudinal extent from south to north in the following manner:
  487.  
  488.           ROWS   NO. POINTS   LONGITUDINAL EXTENT
  489.           
  490.            1-4      22          122.5W  - 70.0W
  491.            5-8      24          125.0W  - 67.5W
  492.            9-12     26          127.5W  - 65.0W
  493.           13-16     28          130.0W  - 62.5W
  494.           17-20     30          132.5W  - 60.0W
  495.           21-24     32          135.0W  - 57.5W
  496.           25-28     34          137.5W  - 55.0W
  497.           29-33     36          140.0W  - 52.5W
  498.           
  499.           
  500.                              TABLE B cont.
  501.                            NMC STORAGE GRIDS
  502.                                    
  503.                                    
  504.  VALUE                GRID                           GRID
  505.                                                       INCREMENT
  506. -----------------------------------------------------------------
  507.  
  508.    5         3021-point (53x57) N. Hemisphere polar   190.5 km
  509.              stereographic grid oriented 105W; Pole   at 60N
  510.              at (27,49).
  511.  
  512.    6         2385-point (53x45) N. Hemisphere polar   190.5 km
  513.              stereographic grid oriented 105W; Pole   at 60N
  514.              at (27,49).
  515.  
  516.   27         4225-point (65x65) N. Hemisphere polar   381 km
  517.              stereographic grid oriented 80W; Pole    at 60N
  518.              at (33,33).
  519.  
  520.   28         4225-point (65x65) S. Hemisphere polar   381 km
  521.              stereographic grid oriented 100E; Pole   at 60S
  522.              at (33,33).
  523.  
  524.   29         5365-point (145x37) N. Hemisphere lon-   2.5 degs
  525.              gitude/latitude grid for latitudes 0N
  526.              to 90N; (1,1) at (0E,0N).
  527.  
  528.   30         5365-point (145x37) S. Hemisphere lon-   2.5 degs
  529.              gitude/latitude grid for latitudes 90S
  530.              to 0S; (1,1) at (0E,90S).
  531.  
  532.   33         8326-point (181x46) N. Hemisphere lon-   2 degs
  533.              gitude/latitude grid for latitudes 0N
  534.              to 90N; (1,1) at (0E,0N).
  535.  
  536.   34         8326-point (181x46) S. Hemisphere lon-   2 degs
  537.              gitude/latitude grid for latitudes 90S
  538.              to 0S; (1,1) at (0E,90S).
  539.  
  540.  100         6889-point (83x83) N. Hemisphere polar   91.452 km
  541.              stereographic grid oriented 105W; Pole   at 60N
  542.              at (40.5,88.5). (NGM Original C-Grid)
  543.  
  544.  101         10283-point (113x91) N. Hemisphere       91.452 km
  545.              polar stereographic grid oriented 105W;  at 60N
  546.              Pole at (58.5,92.5). (NGM "Big C-Grid")
  547.  
  548.  103         3640-point (65x56) N. Hemisphere polar   91.452 km
  549.             stereographic grid oriented 105W; Pole    at 60N
  550.             at (25.5,84.5) (Used by ARL)
  551.  
  552.   68   104 A  16170-point (147x110) N. Hemisphere       90.75464 km
  553.              polar stereographic grid oriented 105W;   at 60N
  554.              pole at (75.5,109.5). (NGM Super C grid)
  555.  
  556.  69   105 A  6889-point (83x83) N. Hemisphere polar     90.75464 km
  557.              stereographic grid oriented 105W;         at 60N
  558.              pole at  (40.5,88.5).  (U.S. area
  559.              subset of NGM Super C grid, used
  560.              by ETA model)
  561.  
  562.  255         (non-standard grid - defined in the GDS)
  563.  
  564.  
  565. NOTE ON NMC STORAGE GRIDS:
  566.  
  567.      On the polar stereographic grids, the vector wind is resolved into
  568. u and v components with respect to the grid coordinates, i.e., u
  569. represents motion in the direction of increasing x (i) coordinate, v in
  570. the direction of increasing y (j).  On the latitude-longitude grids, u
  571. and v are true eastward and northward components, respectively.
  572. However, take note of Table 7, below, which allows for the
  573. specification of other possibilities.
  574.  
  575.                             TABLE B, cont.
  576.                          AWIPS-90 STORAGE AND
  577.                           TRANSMISSION GRIDS
  578.                                    
  579.      Note: The following grids are intended for use in the U.S. Weather
  580. Service's Advanced Weather Information Processing System for the 1990s
  581. (AWIPS-90).  Their definition is subject to change as the AWIPS-90
  582. requirements are further refined.
  583.  
  584. VALUE                  AWIPS GRID DESCRIPTIONS
  585.               (See Table C for definition of symbols)
  586.    -----------------------------------------------------------------
  587. 201                     Hemispheric
  588.                       (polar stereographic)
  589.  
  590.                       Nx =               65
  591.                       Ny =               65
  592.                       La1 =              -20.826N = 20.826S
  593.                       Lo1 =              210.000E = 150.000W
  594.                       Res.& Comp. flag = 0 0 0 0 1 0 0 0
  595.                       Lov =              255.000E = 105.000W
  596.                       Dx  = Dy =         381.000 km
  597.                       Projection Flag (Bit 1) = 0
  598.                       Scanning Mode (Bits 1 2 3) = 0 1 0
  599.  
  600. The pole point is at     (I,J) =  (33,33)
  601.  
  602. Map 201 is the same as NMC storage grid 27, except it is rotated to 105
  603. deg. orientation.
  604. 202                      National - CONUS
  605.                          (polar stereographic)
  606.  
  607.                          Nx =                65
  608.                          Ny =                43
  609.                          La1 =                 7.838N
  610.                          Lo1 =               218.972E = 141.028W
  611.                          Res.& Comp. flag =  0 0 0 0 1 0 0 0
  612.                          Lov =               255.000E = 105.000W
  613.                          Dx  = Dy =          190.500 km
  614.                          Projection Flag (Bit 1) = 0
  615.                          Scanning Mode (Bits 1 2 3) = 0 1 0
  616.  
  617. For reference here are the lat/lon values of the corners of the grid:
  618.                          (1,1)   =    7.838N, 141.028W
  619.                          (1,43)  =   35.616N, 168.577E
  620.                          (65,43) =   35.617N,  18.576W
  621.                          (65,1)  =    7.838N,  68.973W
  622.  
  623. The pole point is at     (I,J) =     (33,45)
  624.  
  625.  
  626. -----------------------------------------------------------------
  627. 203                      National - Alaska
  628.                          (polar stereographic)
  629.  
  630.                          Nx =                45
  631.                          Ny =                39
  632.                          La1 =                19.132N
  633.                          Lo1 =               174.163E = 185.837W
  634.                          Res.& Comp. flag =  0 0 0 0 1 0 0 0
  635.                          Lov =               210.000E = 150.000W
  636.                          Dx  = Dy =          190.500 km
  637.                          Projection Flag (Bit 1) = 0
  638.                          Scanning Mode (Bits 1 2 3) = 0 1 0
  639.  
  640. For reference here are the lat/lon values of the corners of the grid:
  641.                          (1,1)   =   19.132N, 174.163E
  642.                          (1,39)  =   44.646N, 115.601E
  643.                          (45,39) =   57.634N,  53.660W
  644.                          (45,1)  =   24.361N, 123.434W
  645.  
  646. The pole point is at     (I,J) =     (27,37)
  647.  
  648.  
  649. -----------------------------------------------------------------
  650. 204                      National - Hawaii
  651.                          (Mercator)
  652.  
  653.                          Ni =                79
  654.                          Nj =                71
  655.                          La1 =                29.263S
  656.                          Lo1 =               129.470E
  657.                          Res.& Comp. flag =  1 0 0 0 0 0 0 0
  658.                          La2 =                60.547N
  659.                          Lo2 =               111.096W
  660.                          Latin =              20.000
  661.                          Scanning Mode (Bits 1 2 3) = 0 1 0
  662.                          Di  = Dj =  160.000 km
  663.  
  664. For reference here are the lat/lon values of the corners of the grid:
  665.                          (1,1)   =   29.263S, 129.470E
  666.                          (1,71)  =   60.547N, 129.470E
  667.                          (79,71) =   60.547N, 111.096W
  668.                          (79,1)  =   29.263S, 111.096W
  669.  
  670. The longitudinal grid spacing is 1.706 degrees.
  671.  
  672. -----------------------------------------------------------------
  673. 205                      National - Puerto Rico
  674.                          (polar stereographic)
  675.  
  676.                          Nx =                 45
  677.                          Ny =                 39
  678.                          La1 =                 0.616N
  679.                          Lo1 =               275.096E = 84.904W
  680.                          Res.& Comp. flag =  0 0 0 0 1 0 0 0
  681.                          Lov =               300.000E = 60.000W
  682.                          Dx  = Dy =          190.500 km
  683.                          Projection Flag (Bit 1) = 0
  684.                          Scanning Mode (Bits 1 2 3) = 0 1 0
  685.  
  686. For reference here are the lat/lon values of the corners of the grid:
  687.                          (1,1)   =    0.616N,  84.904W
  688.                          (1,39)  =   36.257N, 115.304W
  689.                          (45,39) =   45.620N,  15.000W
  690.                          (45,1)  =    3.389N,  42.181W
  691.  
  692. The pole point is at     (I,J) =     (27,57)
  693.  
  694.  
  695. -----------------------------------------------------------------
  696. 206                      Regional - Central US MARD
  697.                          (Lambert Conformal)
  698.  
  699.                          Nx =                51
  700.                          Ny =                41
  701.                          La1 =                22.289N
  702.                          Lo1 =               242.009E = 117.991W
  703.                          Res.& Comp. flag =  0 0 0 0 1 0 0 0
  704.                          Lov =               265.000E = 95.000W
  705.                          Dx = Dy =            81.2705 km
  706.                          Projection Flag = 0  (not bipolar)
  707.                          Scanning Mode (Bits 1 2 3) = 0 1 0
  708.                          Latin 1 =    25.000N
  709.                          Latin 2 =    25.000N   (tangent cone)
  710.  
  711. For reference here are the lat/lon values of the corners of the grid:
  712.                          (1,1)   =   22.289N, 117.991W
  713.                          (1,41)  =   50.081N, 124.898W
  714.                          (51,41) =   50.072N,  73.182W
  715.                          (51,1)  =   23.142N,  78.275W
  716.  
  717. The Dx, Dy grid increment (at 25 deg north) was selected so that the
  718. grid spacing would be exactly 80.000 km at 35 deg north; the
  719. intersection of 35N & 95W falls on point (30,16).
  720.  
  721. -----------------------------------------------------------------
  722. 207                      Regional - Alaska
  723.                          (polar stereographic)
  724.  
  725.                          Nx =                 49
  726.                          Ny =                 35
  727.                          La1 =                42.085N
  728.                          Lo1 =               184.359E = 175.641W
  729.                          Res.& Comp. flag =  0 0 0 0 1 0 0 0
  730.                          Lov =               210.000E = 150.000W
  731.                          Dx  = Dy =           95.250 km
  732.                          Projection Flag (Bit 1) = 0
  733.                          Scanning Mode (Bits 1 2 3) = 0 1 0
  734.  
  735. For reference here are the lat/lon values of the corners of the grid:
  736.                          (1,1)   =   42.085N, 175.641W
  737.                          (1,35)  =   63.976N, 153.689E
  738.                          (49,35) =   63.976N,  93.689W
  739.                          (49,1)  =   42.085N, 124.359W
  740.  
  741. The pole point is at     (I,J) =     (25,51)
  742.  
  743.  
  744. 208                      Regional - Hawaii
  745.                          (Mercator)
  746.  
  747.                          Ni =                25
  748.                          Nj =                25
  749.                          La1 =                10.656N
  750.                          Lo1 =               193.781E = 166.219W
  751.                          Res.& Comp. flag =  1 0 0 0 0 0 0 0
  752.                          La2 =                27.917N
  753.                          Lo2 =               147.844W
  754.                          Latin =              20.000
  755.                          Scanning Mode (Bits 1 2 3) = 0 1 0
  756.                          Di  = Dj =           80.000 km
  757.  
  758. For reference here are the lat/lon values of the corners of the grid:
  759.                          (1,1)   =   10.656N, 166.219W
  760.                          (1,25)  =   27.917N, 166.219W
  761.                          (25,25) =   27.917N, 147.844W
  762.                          (25,1)  =   10.656N, 147.844W
  763.  
  764. The longitudinal grid spacing is 0.766 degrees
  765.  
  766. -----------------------------------------------------------------
  767. 209                      Regional - Central US MARD - Double Res.
  768.                          (Lambert Conformal)
  769.  
  770.                          Nx =                101
  771.                          Ny =                81
  772.                          La1 =                22.289N
  773.                          Lo1 =               242.00962E = 117.991W
  774.                          Res.& Comp. flag =  0 0 0 0 1 0 0 0
  775.                          Lov =               265.000E =  95.000W
  776.                          Dx = Dy =            40.63525 km
  777.                          Projection Flag =   0 (not bipolar)
  778.                          Scanning Mode (Bits 1 2 3) = 0 1 0
  779.                          Latin 1 =    25.000N
  780.                          Latin 2 =    25.000N   (tangent cone)
  781.  
  782. For reference here are the lat/lon values of the corners of the grid:
  783.                          (1,1)    =  22.289N, 117.991W
  784.                          (1,81)   =  50.081N, 124.898W
  785.                          (101,81) =  50.072N,  73.182W
  786.                          (101,1)  =  23.142N,  78.275W
  787.  
  788. The Dx, Dy grid increment (at 25 deg north) was selected so that the
  789. grid spacing would be exactly 40.000 km at 35 deg north; the
  790. intersection of 35N & 95W falls on point (59,31).
  791.  
  792. 210                      Regional - Puerto Rico
  793.                          (Mercator)
  794.  
  795.                          Ni =                25
  796.                          Nj =                25
  797.                          La1 =                 9.000N
  798.                          Lo1 =               283.000E = 77.000W
  799.                          Res.& Comp. flag =  1 0 0 0 0 0 0 0
  800.                          La2 =                26.422N
  801.                          Lo2 =                58.625W
  802.                          Latin =              20.000
  803.                          Di  = Dj =           80.000 km
  804.                          Scanning Mode (Bits 1 2 3) = 0 1 0
  805.  
  806. For reference here are the lat/lon values of the corners of the grid:
  807.                          (1,1)   =    9.000N, 77.000W
  808.                          (1,25)  =   26.422N, 77.000W
  809.                          (25,25) =   26.422N, 58.625W
  810.                          (25,1)  =    9.000N, 58.626W
  811.  
  812. The longitudinal grid spacing is 0.766 degrees
  813.  
  814. -----------------------------------------------------------------
  815. 211                      Regional - CONUS
  816.                          (Lambert Conformal)
  817.  
  818.                          Nx =                93
  819.                          Ny =                65
  820.                          La1 =                12.190N
  821.                          Lo1 =               226.541E = 133.459W
  822.                          Res.& Comp. flag =  0 0 0 0 1 0 0 0
  823.                          Lov =               265.000E = 95.000W
  824.                          Dx = Dy =            81.2705 km
  825.                          Projection Flag = 0  (not bipolar)
  826.                          Scanning Mode (Bits 1 2 3) = 0 1 0
  827.                          Latin 1 =    25.000N
  828.                          Latin 2 =    25.000N   (tangent cone)
  829.  
  830. For reference here are the lat/lon values of the corners of the grid:
  831.                          (1,1)    =  12.190N, 133.459W
  832.                          (1,65)   =  54.536N, 152.856W
  833.                          (93,65)  =  57.290N,  49.385W
  834.                          (93,1)   =  14.335N,  65.091W
  835.  
  836. The Dx, Dy grid increment (at 25 deg north) was selected so that the
  837. grid spacing would be exactly 80.000 km at 35 deg north; the
  838. intersection of 35N & 95W falls on point (53,25).
  839.  
  840. 212                    Regional  - CONUS - double resolution
  841.                           (Lambert Conformal)
  842.  
  843.                          Nx =                185
  844.                          Ny =                129
  845.                          La1 =                12.190N
  846.                          Lo1 =               226.514E = 133.459W
  847.                          Res.& Comp. flag =  0 0 0 0 1 0 0 0
  848.                          Lov =               265.000E =  95.000W
  849.                          Dx = Dy =            40.63525 km
  850.                          Projection Flag = 0  (not bipolar)
  851.                          Scanning Mode (Bits 1 2 3) = 0 1 0
  852.                          Latin 1 =    25.000N
  853.                          Latin 2 =    25.000N   (tangent cone)
  854.  
  855. For reference here are the lat/lon values of the corners of the grid:
  856.                          (1,1)     =    12.190N, 133.459W
  857.                          (1,129)   =    54.536N, 122.856W
  858.                          (185,129) =    57.290N,  49.385W
  859.                          (185,1)   =    14.335N,  65.091W
  860.  
  861. The Dx, Dy grid increment (at 25 deg north) was selected so that the
  862. grid spacing would be exactly 80.000 km at 35 deg north; the
  863. intersection of 35N & 95W falls on point (105,49).
  864.  
  865.  
  866. -----------------------------------------------------------------
  867. 213                      National - CONUS - Double Resolution
  868.                          (polar stereographic)
  869.  
  870.                          Nx =                129
  871.                          Ny =                85
  872.                          La1 =                 7.838N
  873.                          Lo1 =               218.972E = 141.028W
  874.                          Res.& Comp. flag =  0 0 0 0 1 0 0 0
  875.                          Lov =               255.000E = 105.000W
  876.                          Dx  = Dy =           95.250 km
  877.                          Projection Flag (Bit 1) = 0
  878.                          Scanning Mode (Bits 1 2 3) = 0 1 0
  879.  
  880. For reference here are the lat/lon values of the corners of the grid:
  881.                          (1,1)    =   7.838N, 141.028W
  882.                          (1,85)   =  35.617N, 168.577E
  883.                          (129,85) =  35.617N,  18.577W
  884.                          (129,1)  =   7.838N,  68.973W
  885.  
  886. The pole point is at     (I,J) =     (65,89)
  887.  
  888. -----------------------------------------------------------------
  889. 214                      Regional - Alaska - Double Resolution
  890.                          (polar stereographic)
  891.  
  892.                          Nx =                 97
  893.                          Ny =                 69
  894.                          La1 =                42.085N
  895.                          Lo1 =               184.359E = 175.641W
  896.                          Res.& Comp. flag =  0 0 0 0 1 0 0 0
  897.                          Lov =               210.000E = 150.000W
  898.                          Dx  = Dy =           47.625 km
  899.                          Projection Flag(Bit 1) = 0
  900.                          Scanning Mode (Bits 1 2 3) = 0 1 0
  901.  
  902. For reference here are the lat/lon values of the corners of the grid:
  903.                          (1,1) =     42.085N, 175.641W
  904.                          (1,69) =    63.975N, 153.690E
  905.                          (97,69) =   63.975N,  93.689W
  906.                          (97,1) =    42.085N, 124.358W
  907.  
  908. The pole point is at     (I,J) =     (49,101)
  909.  
  910. -----------------------------------------------------------------
  911.                                    
  912.                                    
  913.                                    
  914.                      TABLE 1.  FLAG FOR GDS OR BMS
  915.                              (PDS Octet 8)
  916.                                    
  917.      The bit flag indicates the omission or inclusion of the Grid
  918.                  Description and/or Bit Map Sections.
  919.                                    
  920.                                    
  921.                     BIT       VALUE     MEANING
  922.  
  923.                     1           0       GDS Omitted
  924.                                 1       GDS Included
  925.  
  926.                     2           0       BMS Omitted
  927.                                 1       BMS Included
  928.  
  929.                     3-8         0       reserved
  930.  
  931.                      TABLE 2.  PARAMETERS & UNITS
  932.                                Version 1
  933.                              (PDS Octet 9)
  934.                                    
  935.      VALUE               PARAMETER                 UNITS
  936.           
  937.           
  938.       000     Reserved
  939.  
  940.       001     Pressure                               Pa
  941.       002     Pressure reduced to MSL                Pa
  942.       003     Pressure tendency                      Pa/s
  943.       004
  944.       005
  945.       006     Geopotential                          m2/s2
  946.       007     Geopotential height                    gpm
  947.       008     Geometric height                       m
  948.       009
  949.       010
  950.  
  951.       011     Temperature                            deg. K
  952.       012     Virtual temperature                    deg. K
  953.       013     Potential temperature                  deg. K
  954.       014     Pseudo-adiabatic potential temperature deg. K
  955.       015     Maximum temperature                    deg. K
  956.       016     Minimum temperature                    deg. K
  957.       017     Dew point temperature                  deg. K
  958.       018     Dew point depression (or deficit)      deg. K
  959.       019     Lapse rate                           deg. K/m
  960.       020
  961.  
  962.       021     Radar Spectra (1)                        -
  963.       022     Radar Spectra (2)                        -
  964.       023     Radar Spectra (3)                        -
  965.       024
  966.       025     Temperature anomaly                    deg. K
  967.       026     Pressure anomaly                         Pa
  968.       027     Geopotential height anomaly              gpm
  969.       028     Wave Spectra (1)                          -
  970.       029     Wave Spectra (2)                          -
  971.       030     Wave Spectra (3)                          -
  972.  
  973.       031     Wind direction                     deg. true
  974.       032     Wind speed                             m/s
  975.       033     u-component of wind                    m/s
  976.       034     v-component of wind                    m/s
  977.       035     Stream function                        m2/s
  978.       036     Velocity potential                     m2/s
  979.       037
  980.       038     Sigma coord. vertical velocity          /s
  981.       039     Pressure Vertical velocity            Pa/s
  982.       040     Geometric Vertical velocity            m/s
  983.  
  984.       041     Absolute vorticity                     /s
  985.       042     Absolute divergence                    /s
  986.       043     Relative vorticity                     /s
  987.       044     Relative divergence                    /s
  988.       045     Vertical u-component shear             /s
  989.       046     Vertical v-component shear             /s
  990.       047     Direction of current                deg. true
  991.       048     Speed of current                       m/s
  992.       049     u-component of current                 m/s
  993.       050     v-component of current                 m/s
  994.  
  995.       051     Specific humidity                      kg/kg
  996.       052     Relative humidity                      %
  997.       053     Humidity mixing ratio                  kg/kg
  998.       054     Precipitable water                     kg/m2
  999.       055     Vapor pressure                         Pa
  1000.       056     Saturation deficit                     Pa
  1001.       057     Evaporation                            kg/m2
  1002.       058
  1003.       059     Precipitation rate                   kg/m2/s
  1004.       060     Thunderstorm probability               %
  1005.  
  1006.       061     Total precipitation                   kg/m2
  1007.       062     Large scale precipitation             kg/m2
  1008.       063     Convective precipitation              kg/m2
  1009.       064     Snowfall rate water equivalent        kg/m2s
  1010.       065     Water equiv. of accum. snow depth     kg/m2
  1011.       066     Snow depth                             m
  1012.       067     Mixed layer depth                      m
  1013.       068     Transient thermocline depth            m
  1014.       069     Main thermocline depth                 m
  1015.       070     Main thermocline anomaly               m
  1016.  
  1017.       071     Total cloud cover                      %
  1018.       072     Convective cloud cover                 %
  1019.       073     Low cloud cover                        %
  1020.       074     Medium cloud cover                     %
  1021.       075     High cloud cover                       %
  1022.       076     Cloud water                            kg/m2
  1023.       077
  1024.       078
  1025.       079
  1026.       080
  1027.  
  1028.       081     Land-sea mask (1=land; 0=sea)         1/0
  1029.       082     Deviation of sea level from mean       m
  1030.       083     Surface roughness                      m
  1031.       084     Albedo                                 %
  1032.       085     Soil temperature                      deg. K
  1033.       086     Soil moisture content                 kg/m2
  1034.       087     Vegetation                             %
  1035.       088     Salinity                              kg/kg
  1036.       089     Density                                kg/m3
  1037.       090
  1038.  
  1039.       091     Ice concentration (ice=1; no ice=0)    1/0
  1040.       092     Ice thickness                          m
  1041.       093     Direction of ice drift              deg. true
  1042.       094     Speed of ice drift                     m/s
  1043.       095     u-component of ice drift               m/s
  1044.       096     v-component of ice drift               m/s
  1045.       097     Ice growth                             m
  1046.       098     Ice divergence                         /s
  1047.       099
  1048.       100     Significant height of combined wind    m
  1049.               waves and swell
  1050.  
  1051.       101     Direction of wind waves             deg. true
  1052.       102     Significant height of wind waves       m
  1053.       103     Mean period of wind waves              s
  1054.       104     Direction of swell waves            deg. true
  1055.       105     Significant height of swell waves      m
  1056.       106     Mean period of swell waves             s
  1057.       107     Primary wave direction              deg. true
  1058.       108     Primary wave mean period               s
  1059.       109     Secondary wave direction            deg. true
  1060.       110     Secondary wave mean period             s
  1061.  
  1062.       111     Net shortwave radiation (surface)      W/m2
  1063.       112     Net longwave radiation (surface)       W/m2
  1064.       113     Net shortwave radiation (top of atmos.)W/m2
  1065.       114     Net longwave radiation (top of atmos.) W/m2
  1066.       115     Long wave radiation                    W/m2
  1067.       116     Short wave radiation                   W/m2
  1068.       117     Global radiation                       W/m2
  1069.       118
  1070.       119
  1071.       120
  1072.  
  1073.       121     Latent heat flux                       W/m2
  1074.       122     Sensible heat flux                     W/m2
  1075.       123     Boundary layer dissipation             W/m2
  1076.       124
  1077.       125
  1078.       126
  1079.       127     Image data
  1080.  
  1081.  
  1082.      (128 - 254  Reserved for use by originating center)
  1083.                     NWS usage as follows...
  1084.  
  1085.       131     Surface lifted index                   Deg. K
  1086.       132     Best (4 layer) lifted index            Deg. K
  1087.       133     K index                                Deg. K
  1088.       134     Sweat index                            Deg. K
  1089.       135     Horizontal moisture divergence         kg/kg/s
  1090.       136     Vertical speed shear                   /s
  1091.       137     Visibility                             m
  1092.  
  1093.       201     Ice-free water surface                 %
  1094.       207     Moisture availability                  %
  1095.       208     Exchange coefficient                   (kg/m3)(m/s)
  1096.       209     No. of mixed layers next to surface    integer
  1097.       213     Amount of non-convective cloud         %
  1098.       216     Temperature tendency by all radiation  Deg.K/s
  1099.       220     Natural log of surface pressure        ln(kPa)
  1100.       222     5-wave geopotential height             gpm
  1101.  
  1102.  
  1103.       255     Missing
  1104.  
  1105. Notes:
  1106.  
  1107.        1) By convention, downward fluxes of radiation or other
  1108.                quantities are assigned negative values; upward
  1109.                fluxes of radiation or other quantities are
  1110.                assigned positive values.
  1111.                
  1112.        2) The u and v components of vector quantities are defined
  1113.                with reference to GDS Octet 17 and Table 7.
  1114.                
  1115.        3) provision is made for three types of spectra:
  1116.                
  1117.                1)   Direction and Frequency
  1118.                2)   Direction and radial number
  1119.                3)   Radial number and radial number
  1120.                
  1121.                    TABLE 3.  TYPE AND VALUE OF LEVEL
  1122.                        (PDS Octets 10, 11, & 12)
  1123.                                    
  1124.                                    
  1125.        Octet Number 10            Number 11        Number 12
  1126.  
  1127.   VALUE      MEANING                      CONTENTS
  1128. |---------------------------+-----------------+----------------|
  1129. | 0 - 99  special codes,    |        0        |       0        |
  1130. |         see Table 3a      |                 |                |
  1131. |---------------------------+-----------------+----------------|
  1132. | 100     isobaric level    |  pressure in hectoPascals (hPa)  |
  1133. |                           |            (2 octets)            |
  1134. |---------------------------+-----------------+----------------|
  1135. | 101     layer between two |  pressure of    |  pressure of   |
  1136. |         isobaric levels   |  top (kPa)      |  bottom (kPa)  |
  1137. |---------------------------+-----------------+----------------|
  1138. | 102     mean sea level    |        0        |       0        |
  1139. |---------------------------+-----------------+----------------|
  1140. | 103     fixed height level|   height above mean sea level    |
  1141. |                           |        (MSL) in meters           |
  1142. |---------------------------+-----------------+----------------|
  1143. | 104     layer between two |  height of top  |  height of     |
  1144. |           height levels   |     (hm)        |  bottom (hm)   |
  1145. |            above msl      |                 |                |
  1146. |---------------------------+-----------------+----------------|
  1147. | 105     fixed height above|         height in meters         |
  1148. |           ground          |            (2 octets)            |
  1149. |---------------------------+-----------------+----------------|
  1150. | 106     layer between two |  height of top  |  height of     |
  1151. |           height levels   |      (hm)       |  bottom (hm)   |
  1152. |           above ground    |                 |                |
  1153. |---------------------------+-----------------+----------------|
  1154. | 107     sigma level       |     sigma value in 1/10000       |
  1155. |                           |            (2 octets)            |
  1156. |---------------------------+-----------------+----------------|
  1157. | 108     layer between two |  sigma value at |  sigma value   |
  1158. |           sigma levels    |       top       |  at bottom     |
  1159. |                           |     in 1/100    |   in 1/100     |
  1160. |---------------------------+-----------------+----------------|
  1161. | 111     depth below       |            centimeters           |
  1162. |         land surface      |             (2 octets)           |
  1163. |---------------------------+-----------------+----------------|
  1164. | 112     layer between two |  depth of upper | depth of lower |
  1165. |         depths below      |    surface (cm) |   surface (cm) |
  1166. |         land surface      |                 |                |
  1167. |---------------------------+-----------------+----------------|
  1168. | 121     layer between two |  1100 hPa minus | 1100 hPa minus |
  1169. |         isobaric surfaces |  pressure of    | pressure of    |
  1170. |         (high precision)  |  top, in hPa    | bottom, in hPa |
  1171. |---------------------------+-----------------+----------------|
  1172. |---------------------------+-----------------+----------------|
  1173. | 128     layer between two |  1.1 minus sigma| 1.1 minus sigma|
  1174. |         sigma levels      |  of top, in     | of top, in     |
  1175. |         (high precision)  |  1/1000 of sigma| 1/1000 of sigma|
  1176. |---------------------------+-----------------+----------------|
  1177. | 141     layer between two |  pressure of    | 1100hPa minus  |
  1178. |         isobaric surfaces |  top, in kPa    | pressure of    |
  1179. |         (mixed precision) |                 | bottom, in hPa |
  1180. |---------------------------+-----------------+----------------|
  1181. | 160     depth below       |               meters             |
  1182. |         sea level         |             (2 octets)           |
  1183. |---------------------------+-----------------+----------------|
  1184.  
  1185. Note: The numbering allows for additions within this framework:
  1186.      
  1187.           100-119   normal precision
  1188.           120-139   high precision
  1189.           140-159   mixed precision
  1190.                                    
  1191.                                    
  1192.                                    
  1193.                       TABLE 3a.   SPECIAL LEVELS
  1194.                             (PDS Octet 10)
  1195.                                    
  1196.                                    
  1197.                                    
  1198.           VALUE               LEVEL
  1199.           
  1200.           01                surface (of the Earth, which
  1201.                                    includes sea surface)
  1202.           02                cloud base level
  1203.           03                cloud top level
  1204.           04                0 deg isotherm level
  1205.           05                adiabatic condensation level
  1206.           06                maximum wind speed level
  1207.           07                tropopause level
  1208.           08-99             reserved
  1209.                      TABLE 4.  FORECAST TIME UNIT
  1210.                             (PDS Octet 18)
  1211.                                    
  1212.                                    
  1213.                     VALUE           TIME UNIT
  1214.                
  1215.                       0              minute
  1216.                       1               hour
  1217.                       2               day
  1218.                       3               month
  1219.                       4              year
  1220.                       5              decade
  1221.                       6              normal (30 years)
  1222.                       7              century
  1223.                       8-253          reserved
  1224.                       254            second
  1225.      
  1226.      
  1227.                                TABLE 5.
  1228.                          TIME RANGE INDICATOR
  1229.                             (PDS Octet 21)
  1230.                                    
  1231.                                    
  1232.               VALUE                MEANING
  1233.      
  1234.                 0           Forecast product valid
  1235.                             at reference time + P1 (P1>0),
  1236.                             or
  1237.                             Uninitialized analysis product
  1238.                             for reference time (P1=0).
  1239.                             or
  1240.                             Image product
  1241.                             for reference time (P1=0)
  1242.      
  1243.                 1           Initialized analysis product
  1244.                             for reference time (P1=0).
  1245.      
  1246.                 2           Product with a valid time ranging
  1247.      between reference time + P1 and
  1248.                             reference time + P2
  1249.      
  1250.                 3           Average
  1251.                             (reference time + P1 to
  1252.                             reference time + P2)
  1253.      
  1254.                 4           Accumulation
  1255.                             (reference time + P1 to
  1256.                             reference time + P2)
  1257.                             product considered valid at
  1258.                             reference time + P2
  1259.      
  1260.                 5           Difference
  1261.                             (reference time + P2 minus
  1262.                             reference time + P1)
  1263.                             product considered valid at
  1264.                             reference time + P2
  1265.      
  1266.                 6-9         reserved
  1267.      
  1268.                 10          P1 occupies octets 19 and 20;
  1269.                             product valid at reference time + P1
  1270.      
  1271.                 11-112      reserved
  1272.      
  1273.                 113         Average of N forecasts (or initialized
  1274.                             analyses); each product has forecast
  1275.                             period of P1 (P1=0 for initialized
  1276.                             analyses); products have reference
  1277.                             times at intervals of P2, beginning at
  1278.                             the given reference time.
  1279.      
  1280.                 114         Accumulation of N forecasts (or
  1281.                             initialized analyses); each product
  1282.                             has forecast period of P1 (P1=0 for
  1283.                             initialized analyses); products have
  1284.                             reference times at intervals of P2,
  1285.                             beginning at the given reference time.
  1286.      
  1287.                 115         Average of N forecasts, all with the
  1288.                             same reference time; the first has a
  1289.                             forecast period of P1, the remaining
  1290.                             forecasts follow at intervals of P2.
  1291.      
  1292.                 116         Accumulation of N forecasts, all with
  1293.                             the same reference time; the first has
  1294.                             a forecast period of P1, the remaining
  1295.                             follow at intervals of P2.
  1296.      
  1297.                 117         Average of N forecasts, the first has a
  1298.                             period of P1, the subsequent ones have
  1299.                             forecast periods reduced from the previous
  1300.                             one by an interval of P2; the reference
  1301.                             time for the first is given in octets 13-
  1302.                             17, the subsequent ones have reference
  1303.                             times increased from the previous one by an
  1304.                             interval of P2.  Thus all the forecasts
  1305.                             have the same valid time, given by the
  1306.                             initial reference time + P1.
  1307.                             
  1308.                 118 -122    reserved
  1309.      
  1310.                 123         Average of N uninitialized analyses,
  1311.                             starting at the reference time,
  1312.                             at intervals of P2.
  1313.      
  1314.                 124         Accumulation of N uninitialized
  1315.                             analyses, starting at the reference
  1316.                             time, at intervals of P2.
  1317.      
  1318.      
  1319.                 125-254     reserved
  1320.      
  1321.      
  1322. NOTES:
  1323.      
  1324. 1)   For analysis products, or the first of a series of analysis
  1325.      products, the reference time (octets 13 to 17) indicates the valid
  1326.      time.
  1327.      
  1328. 2)   For forecast products, or the first of a series of forecast
  1329.      products, the reference time indicates the valid time of the
  1330.      analysis upon which the (first) forecast is based.
  1331.      
  1332. 3)   Initialized analysis products are allocated numbers distinct from
  1333.      those allocated to uninitialized analysis products.
  1334.      
  1335. 4)   A value of 10 allows the period of a forecast to be extended over
  1336.      two octets; this is to assist with extended range forecasts.
  1337.      
  1338. 5)   Where products or a series of products are averaged or
  1339.      accumulated, the number involved is to be represented in octets 22-
  1340.      23 of Section 1, while any number missing is to be represented in
  1341.      octet 24.
  1342.      
  1343. 6)   Forecasts of the accumulation or difference of some quantity (e.g.
  1344.      quantitative precipitation forecasts), indicated by values of 4 or
  1345.      5 in octet 21, have a product valid time given by the reference
  1346.      time + P2; the period of accumulation, or difference, can be
  1347.      calculated as P2 - P1.
  1348.      
  1349.      A few examples may help to clarify the use of Table 5:
  1350.  
  1351.      For analysis products P1 is zero and the time range indicator is
  1352. also zero; for initialized products (sometimes called "zero hour
  1353. forecasts") P1 is zero, but octet 21 is set to 1.
  1354.  
  1355.      For forecasts, typically, P1 contains the number of hours of the
  1356. forecast (the unit indicator given in octet 18 would be 1) and octet 21
  1357. contains a zero.
  1358.  
  1359.      Value 115 would be used, typically, for multiple day mean
  1360. forecasts, all derived from the same initial conditions.
  1361.  
  1362.      Value 117 would be used, typically, for Monte Carlo type
  1363. calculations: many forecasts valid at the same time from different
  1364. initial (reference) times.
  1365.  
  1366.       Averages, accumulations, and differences get a somewhat
  1367. specialized treatment.  If octet 21 (Table 5) has a value between 2 and
  1368. 5 (inclusive) then the reference time + P1 is the initial date/time and
  1369. the reference time + P2 is the final date/time of the period over which
  1370. averaging or accumulation takes place.  If, however, octet 21 has a
  1371. value of 113, 114, 115, 116, 117, 123, or 124 then P2 specifies the
  1372. time interval between each of the fields (or the forecast initial
  1373. times) that have been averaged or accumulated.  These latter values of
  1374. octet 21 require the quantities averaged to be equally separated in
  1375. time; the former values, 3 and 4 in particular, allow for irregular or
  1376. unspecified intervals of time between the fields that are averaged or
  1377. accumulated.
  1378.  
  1379.  
  1380. SECTION 2: GRID DESCRIPTION SECTION (GDS)
  1381.  
  1382.      The purpose of the (optional) GDS is to provide a grid description
  1383. for grids not defined by number in Table 3.
  1384.  
  1385.      Octet no.                     GDS Content
  1386.  
  1387.       1 -         Length in octets of the Grid Description Section
  1388.  
  1389.       4           NV, the number of vertical coordinate parameters
  1390.  
  1391.       5           PV, the location (octet number) of the list of
  1392.                   vertical coordinate parameters, if present
  1393.                   or
  1394.                   PL, the location (octet number) of the list of
  1395.                   numbers of points in each row (when no vertical
  1396.                   parameters are present), if present
  1397.                   or
  1398.                   255 (all bits set to 1) if neither are present
  1399.  
  1400.       6           Data representation type (See Table 6)
  1401.  
  1402.       7 - 32       Grid description, according to data
  1403.                   representation type, except Lambert or Mercator.
  1404.  
  1405.       7 - 42      Grid description for Lambert or Mercator grid
  1406.  
  1407.      PV           List of vertical coordinate parameters
  1408.                   (length = NV x 4 octets);
  1409.                   if present, then PL = 4 x NV + PV
  1410.  
  1411.      PL           List of numbers of points in each row, used for
  1412.                   quasi-regular grids
  1413.                   (length = NROWS x 2 octets, where NROWS is the
  1414.                   total number of rows defined within the grid
  1415.                   description)
  1416.  
  1417.      Note:     NV, PV, and PL relate to "advanced" features of GRIB
  1418.                not, at present, in use in the National Weather Service.
  1419.                See the WMO Manual on Codes<1> for the descriptions of
  1420.                those features.
  1421.                
  1422.      
  1423.      
  1424.                            TABLES FOR THE GDS
  1425.                                    
  1426.                                    
  1427.                   TABLE 6.  DATA REPRESENTATION TYPE
  1428.                              (GDS Octet 6)
  1429.                                    
  1430.                                    
  1431.               VALUE             MEANING
  1432.  
  1433.                 0           Latitude/Longitude Grid
  1434.                             also called Equidistant Cylindrical
  1435.                             or Plate Carree projection grid
  1436.                 1           Mercator Projection Grid
  1437.                 2           Gnomonic Projection Grid
  1438.                 3           Lambert Conformal, secant or
  1439.                             tangent, conical or bipolar
  1440.                             (normal or oblique) Projection Grid
  1441.                 4           Gaussian Latitude/Longitude Grid
  1442.                 5           Polar Stereographic Projection Grid
  1443.  
  1444.                 6 - 12      (reserved - see Manual on Codes)
  1445.  
  1446.                 13          Oblique Lambert conformal, secant or
  1447.                             tangent, conical or bipolar,
  1448.                             projection
  1449.  
  1450.                 14 - 49     (reserved - see Manual on Codes)
  1451.  
  1452.                 50          Spherical Harmonic Coefficients
  1453.  
  1454.                 51 - 89     (reserved - see Manual on Codes)
  1455.  
  1456.                 90          Space view perspective or
  1457.                             orthographic grid
  1458.  
  1459.                 91 - 254    (reserved - see Manual on Codes)
  1460.  
  1461.  
  1462.  
  1463.                    TABLE C. Sundry Grid Descriptions
  1464.                                    
  1465.                                    
  1466.                                    
  1467.                        LATITUDE/LONGITUDE GRIDS
  1468.                           (GDS Octets 7 - 32)
  1469.                                    
  1470.                                    
  1471.            OCTET NO.      CONTENT & MEANING
  1472.  
  1473.            7 -  8   Ni - No. of points along a latitude circle
  1474.  
  1475.            9 - 10   Nj - No. of points along a longitude meridian
  1476.  
  1477.            11 - 13  La1 - latitude of first grid point
  1478.                     units: millidegrees (degrees x 1000)
  1479.                     values limited to range 0 - 90,000
  1480.                     bit 1 set to 1 for south latitude
  1481.  
  1482.            14 - 16  Lo1 - longitude of first grid point
  1483.                     units: millidegrees (degrees x 1000)
  1484.                     values limited to range 0 - 360,000
  1485.                     bit 1 (leftmost) set to 1 for west longitude
  1486.  
  1487.            17       Resolution and component flags (Table 7)
  1488.  
  1489.            18 - 20  La2 - Latitude of last grid point
  1490.                     (same units, value range, and bit 1 as La1)
  1491.  
  1492.            21 - 23  Lo2 - Longitude of last grid point
  1493.                     (same units, value range, and bit 1 as Lo1)
  1494.  
  1495.            24 - 25  Di - Longitudinal Direction Increment
  1496.                     (west to east)
  1497.                     (same units as Lo1)
  1498.                     (if not given, all bits set = 1)
  1499.  
  1500.            26 - 27  Regular Lat/Lon Grid:
  1501.                           Dj - Latitudinal Direction Increment
  1502.                           (south to north)
  1503.                           (same units as La1)
  1504.                           (if not given, all bits set = 1)
  1505.                     Gaussian Grid:
  1506.                           N - number of latitude circles between
  1507.                               a pole and the equator
  1508.                           Mandatory if Gaussian Grid specified
  1509.  
  1510.             28      Scanning mode flags  (See Table 8)
  1511.  
  1512.             29 - 32 Reserved (set to zero)
  1513.  
  1514. Note: The latitude and longitude of the first and last grid points
  1515. should always be given, for regular grids.
  1516. POLAR STEREOGRAPHIC GRIDS
  1517.  
  1518.                           (GDS Octets 7 - 32)
  1519.                                    
  1520.          OCTET NO.    CONTENT & MEANING
  1521.  
  1522.           7 -  8      Nx - Number of points along x-axis
  1523.           9 - 10      Ny - Number of points along y-axis
  1524.          11 - 13      La1 - Latitude of first grid point
  1525.          14 - 16      Lo1 - Longitude of first grid point
  1526.               17      Resolution and component flags (see Table 7)
  1527.          18 - 20      Lov - The orientation of the grid;
  1528.                       i.e., the east longitude value of the
  1529.                       meridian which is parallel to the
  1530.                       y-axis (or columns of the grid) along
  1531.                       which latitude increases as the
  1532.                       y-coordinate increases. (Note: The
  1533.                       orientation longitude may, or may not,
  1534.                       appear within a particular grid.)
  1535.          21 - 23      Dx - the X-direction grid length
  1536.                            (see Note 2)
  1537.          24 - 26      Dy - the Y-direction grid length
  1538.                            (see note 2)
  1539.               27      Projection center flag  (see note 5)
  1540.               28      Scanning mode           (see Table 8)
  1541.          29 - 32      Set to 0 (reserved)
  1542.  
  1543.      NOTES:
  1544.  
  1545. 1.   Latitude and longitude are in millidegrees (thousandths)
  1546.      
  1547. 2.   Grid lengths are in units of meters, at the 60 degree latitude
  1548.      circle nearest to the pole in the projection plane.
  1549.      
  1550. 3.   Latitude values are limited to the range 0 - 90,000.  Bit 1 is set
  1551.      to 1 to indicate south latitude.
  1552.      
  1553. 4.   Longitude values are limited to the range 0 - 360,000.  Bit one is
  1554.      set to 1 to indicate west longitude.
  1555.      
  1556. 5.   Octet 27:
  1557.      Bit 1 set to 0 if the North pole is on the projection plane.
  1558.      Bit 1 set to 1 if the South pole is on the projection plane.
  1559.      
  1560. 6.   The first and last grid points may not necessarily be the same as
  1561.      the first and last data points if the bit map section (BMS) is
  1562.      used.
  1563.      
  1564. 7.   The resolution flag (bit 1 of Table 7) is not applicable.
  1565.      
  1566.      
  1567.              LAMBERT CONFORMAL SECANT OR TANGENT CONE GRIDS
  1568.                           (GDS Octets 7 - 42)
  1569.                                    
  1570.                          OCTET NO.    CONTENT & MEANING
  1571.                                    
  1572.           7 -  8      Nx - Number of points along x-axis
  1573.           9 - 10      Ny - Number of points along y-axis
  1574.          11 - 13      La1 - Latitude of first grid point
  1575.          14 - 16      Lo1 - Longitude of first grid point
  1576.               17      Resolution and component flags (see Table 7)
  1577.          18 - 20      Lov - The orientation of the grid;
  1578.                       i.e., the east longitude value of the
  1579.                       meridian which is parallel to the
  1580.                       y-axis (or columns of the grid) along
  1581.                       which latitude increases as the
  1582.                       y-coordinate increases. (Note: The
  1583.                       orientation longitude may, or may not,
  1584.                       appear within a particular grid.)
  1585.          21 - 23      Dx - the X-direction grid length
  1586.                            (see note 2)
  1587.          24 - 26      Dy - the Y-direction grid length
  1588.                            (see Note 2)
  1589.               27      Projection center flag   (see note 5)
  1590.               28      Scanning mode            (see Table 8)
  1591.          29 - 31      Latin 1 - The first latitude from the pole
  1592.                       at which the secant cone cuts the spherical
  1593.                       earth.       (See Note 8)
  1594.          32 - 34      Latin 2 - The second latitude from the pole
  1595.                       at which the secant cone cuts the spherical
  1596.                       earth.       (See Note 8)
  1597.          35 - 37      Latitude of southern pole (millidegrees)
  1598.          38 - 40      Longitude of southern pole (millidegrees)
  1599.          41 - 42      Reserved (set to 0)
  1600.  
  1601.      NOTES:
  1602.  
  1603. 1.   Latitude and longitude are in millidegrees (thousandths)
  1604.      
  1605. 2.   Grid lengths are in units of meters, at the intersection latitude
  1606.      circle nearest to the pole in the projection plane.
  1607.      
  1608. 3.   Latitude values are limited to the range 0 - 90,000.  Bit 1 is set
  1609.      to 1 to indicate south latitude.
  1610.      
  1611. 4.   Longitude values are limited to the range 0 - 360,000.  Bit one is
  1612.      set to 1 to indicate west longitude.
  1613.      
  1614. 5.   Octet 27:
  1615.      Bit 1 set to 0 if the North pole is on the projection plane.
  1616.      Bit 1 set to 1 if the South pole is on the projection plane.
  1617.      Bit 2 set to 0 if only one projection center used
  1618.      Bit 2 set to 1 if projection is bipolar and symmetric
  1619.      
  1620. 6.   The first and last grid points may not necessarily be the same as
  1621.      the first and last data points if the bit map section (BMS) is
  1622.      used.
  1623.      
  1624. 7.   The resolution flag (bit 1 of Table 7) is not applicable.
  1625.      
  1626. 8.   If Latin 1 = Latin 2 then the projection is on a tangent cone.
  1627.      
  1628.  
  1629.  
  1630.                             MERCATOR GRIDS
  1631.                           (GDS Octets 7 - 42)
  1632.  
  1633.          OCTET NO.    CONTENT & MEANING
  1634.  
  1635.           7 -  8      Ni - Number of points along a
  1636.                            latitude circle
  1637.           9 - 10      Nj - Number of points along a
  1638.                            longitude meridian
  1639.          11 - 13      La1 - Latitude of first grid point
  1640.          14 - 16      Lo1 - Longitude of first grid point
  1641.               17      Resolution and component flags (see Table 7)
  1642.          18 - 20      La2 - latitude of last grid point
  1643.          21 - 23      Lo2 - longitude of last grid point
  1644.          24 - 26      Latin - The latitude(s) at which the
  1645.                               Mercator projection cylinder
  1646.                               intersects the earth.
  1647.               27      Reserved (set to 0)
  1648.               28      Scanning mode (see Table 8)
  1649.          29 - 31      Di - the longitudinal direction increment
  1650.                            (see Note 2)
  1651.          32 - 34      Dj - the latitudinal direction increment
  1652.                            (see note 2)
  1653.          35 - 42      Reserved (set to 0)
  1654.  
  1655.      NOTES:
  1656.  
  1657. 1.   Latitude and longitude are in millidegrees (thousandths)
  1658. 2.   Grid lengths are in units of meters, at the circle of latitude
  1659.      specified by Latin.
  1660. 3.   Latitude values are limited to the range 0 - 90,000.  Bit 1 is set
  1661.      to 1 to indicate south latitude.
  1662. 4.   Longitude values are limited to the range 0 - 360,000.  Bit one is
  1663.      set to 1 to indicate west longitude.
  1664. 5.   The latitude and longitude of the last grid point should always be
  1665.      given.
  1666. 6.   The first and last grid points may not necessarily be the same as
  1667.      the first and last data points if the bit map section (BMS) is
  1668.      used.
  1669.  
  1670.  
  1671.                     SPHERICAL HARMONIC COEFFICIENTS
  1672.                           (GDS Octets 7 - 32)
  1673.                                    
  1674.                                    
  1675.                         OCTET NO.      CONTENT & MEANING
  1676.                                    
  1677.                 7 -  8        J - Pentagonal Resolution Parameter
  1678.                                    
  1679.                 9 - 10        K - Pentagonal Resolution Parameter
  1680.                                    
  1681.                11 - 12        M - Pentagonal Resolution Parameter
  1682.  
  1683.           13             Representation Type (See Table 9)
  1684.  
  1685.           14             Coefficient Storage Mode (See Table 10)
  1686.  
  1687.           15 - 32        Set to zero (reserved)
  1688.  
  1689.  
  1690.                TABLE 7 - RESOLUTION AND COMPONENT FLAGS
  1691.                             (GDS Octet 17)
  1692.                                    
  1693.                                    
  1694.         Bit      Value        Meaning
  1695.  
  1696.          1         0     Direction increments not given
  1697.                    1     Direction increments given
  1698.  
  1699.          2         0     Earth assumed spherical with
  1700.                          radius=6367.47 km
  1701.                    1     Earth assumed oblate spheroid with size
  1702.                          as determined by IAU in 1965:
  1703.                          6378.160 km, 6356.775 km, f = 1/297.0
  1704.  
  1705.          3-4             reserved (set to 0)
  1706.  
  1707.          5         0     u- and v-components of vector quantities
  1708.                          resolved relative to easterly and
  1709.                          northerly directions
  1710.                    1     u and v components of vector quantities
  1711.                          resolved relative to the defined grid in
  1712.                          the direction of increasing x and y
  1713.                          (or i and j) coordinates respectively
  1714.  
  1715.          6-8             reserved (set to 0)
  1716.  
  1717.  
  1718.                      TABLE 8.  SCANNING MODE FLAG
  1719.                             (GDS Octet 28)
  1720.                                    
  1721.                                    
  1722.      BIT  VALUE               MEANING
  1723.  
  1724.      1    0    Points scan in +i direction
  1725.           1    Points scan in -i direction
  1726.  
  1727.      2    0    Points scan in -j direction
  1728.           1    Points scan in +j direction
  1729.  
  1730.      3    0    Adjacent points in i direction are consecutive
  1731.                  (FORTRAN: (I,J))
  1732.           1    Adjacent points in j direction are consecutive
  1733.                  (FORTRAN: (J,I))
  1734.                                    
  1735.                                    
  1736. Note:     i direction is defined as west to east along a parallel of
  1737.           latitude, or left to right along an x axis.
  1738.           
  1739.           j direction is defined as south to north along a meridian of
  1740.           longitude, or bottom to top along a y axis.
  1741.  
  1742.  
  1743.                  TABLE 9. SPECTRAL REPRESENTATION TYPE
  1744.                             (GDS Octet 13)
  1745.                                    
  1746.                                    
  1747.         VALUE                  MEANING
  1748.  
  1749.           1              Associated Legendre Polynomials
  1750.                          of the First Kind with normalization
  1751.                          such that the integral equals 1
  1752.  
  1753.  
  1754.  
  1755.                   TABLE 10. COEFFICIENT STORAGE MODE
  1756.                             (GDS Octet 14)
  1757.                                    
  1758.                                    
  1759.         VALUE                     MEANING
  1760.  
  1761.           1         The complex coefficients Xnm are stored for   m > 0
  1762.                     as pairs of real numbers Re(Xnm), Im(Xnm) ordered
  1763.                     with n increasing from m to N(m), first for m = 0
  1764.                     and then for m = 1, 2, 3,...M.  The real part of
  1765.                     the (0,0) coefficient is stored in octets 12-15 of
  1766.                     the BDS, as a floating point number in the same
  1767.                     manner as the packing reference value, with units
  1768.                     as in Table 2.  The remaining coefficients,
  1769.                     starting with the imaginary part of the (0,0)
  1770.                     coefficient, are packed according to the GRIB
  1771.                     packing algorithm, with units as given in Table 5,
  1772.                     in octets 16 and onward in the BDS.
  1773.  
  1774.  
  1775. NOTES ON SPECTRAL TRUNCATION:
  1776.  
  1777.      Using the associated Legendre Polynomials of the First Kind, Pnm,
  1778. as typical expansion functions, any variable X(  ,  ), which is a
  1779. function of longitude,  , and sin(latitude),  , can be represented by
  1780.  
  1781.      
  1782.      
  1783.      
  1784.      
  1785.      In the summations, M is the maximum zonal wave number that is to
  1786. be included, and K & J together define the maximum meridional total
  1787. wave number N(m), which, it should be noted, is a function of m.  A
  1788. sketch shows the relationships:
  1789.  
  1790.      
  1791.      
  1792.      
  1793.      
  1794.      
  1795.      
  1796.      
  1797.      
  1798.      
  1799.      
  1800.      
  1801.      
  1802.      
  1803.      
  1804.      
  1805.      
  1806.      
  1807.      
  1808.      In this figure, the ordinate is n the zonal wave number, the
  1809. abscissa is m the total meridional wave number, the vertical line at m
  1810. = M is the zonal truncation, and the diagonal passing through (0,0) is
  1811. the line n = m.  The Legendre Polynomials are defined only on or above
  1812. this line, that is for n > m.  On the n-axis, the horizontal line at n
  1813. = K indicates the upper limit to n values, and the diagonal that
  1814. intersects the n-axis at n = J indicates the upper limit of the area in
  1815. which the Polynomials are defined.  The shaded irregular pentagon
  1816. defined by the n-axis, the diagonal from n = J, the horizontal n = K,
  1817. the vertical m = M, and the other diagonal n = m surrounds the region
  1818. of the (n x m) plane containing the Legendre Polynomials used in the
  1819. expansion.
  1820.  
  1821.      This general pentagonal truncation reduces to some familiar common
  1822. truncations as special cases:
  1823.  
  1824.           Triangular:    K = J = M and N(m) = J
  1825.           Rhomboidal:    K = J + M and N(m) = J + m
  1826.           Trapezoidal:   K = J, K > M and N(m) = J
  1827.  
  1828.      In all of the above m can take on negative values to represent the
  1829. imaginary part of the spectral coefficients.
  1830.  
  1831.  
  1832. SECTION 3: BIT MAP SECTION (BMS).
  1833.  
  1834.      The purpose of the (optional) BMS is to provide either a bit map
  1835. or a reference to a bit map pre-defined by the center.  The bit map
  1836. consists of contiguous bits with a bit-to-data-point correspondence as
  1837. defined in the grid description.  A bit set equal to 1 implies the
  1838. presence of a datum for that grid point in the BDS; a value of zero
  1839. implies the absence of such.
  1840.  
  1841.      Octet no.
  1842.  
  1843.       1 - 3       Length in octets of Bit Map Section
  1844.  
  1845.       4           Number of unused bits at end of Section 3.
  1846.  
  1847.       5 - 6       Numeric:
  1848.  
  1849.                     Numeric = 0: a bit map follows;
  1850.                     otherwise  : the numeric refers to a
  1851.                                  predefined bit map provided
  1852.                                  by the center
  1853.  
  1854.       7 - nnn     Bit map, zero filled to an even number of octets
  1855.  
  1856.  
  1857. SECTION 4: BINARY DATA SECTION (BDS).
  1858.  
  1859.      The BDS contains the binary scaling information needed to
  1860. reconstruct the original data from the packed data.  The required
  1861. decimal scale factor is found in the PDS, above.  The data stream is
  1862. zero filled to an even number of octets.
  1863.  
  1864.      Octet no.
  1865.  
  1866.       1 - 3       Length in octets of binary data section
  1867.  
  1868.        4          Bits 1 through 4: Flag - See Table 11
  1869.                   Bits 5 through 8: Number of unused bits at end
  1870.                                     of Section 4.
  1871.  
  1872.       5 - 6       The binary scale factor (E).  A negative value
  1873.                   is indicated by setting the high order bit
  1874.                   (bit No. 1) in octet 5 to 1 (on).
  1875.  
  1876.       7 - 10      Reference value (minimum value); floating
  1877.                   point representation of the number.
  1878.  
  1879.       11          Number of bits into which a data point is packed
  1880.  
  1881.       12 -        Variable, depending on octet 4; zero
  1882.                   filled to an even number of octets.
  1883.  
  1884. NOTE:
  1885.  
  1886.      If all the data in a grid point field happen to have the same
  1887. value, then all of the deviations from the reference value are set to
  1888. zero.  Since a zero value requires no bits for packing, octet 11 is set
  1889. to zero, thus indicating a field of constant data, the value of which
  1890. is given by the reference value.  Under these circumstances, octet 12
  1891. is set to zero (the zero fill to an even number of octets) and bits 5-8
  1892. of octet 4 contain an 8.  The number of data points in the field is
  1893. implied by the grid identification given in the PDS and/or the GDS and
  1894. BMS.
  1895.  
  1896.      The same situation may occur if all of the spectral coefficients,
  1897. other than the (0,0) coefficient, have the same value.  In this case
  1898. octet 16 is set to zero to accomplish the zero fill to an even number
  1899. of octets.
  1900.  
  1901.      
  1902.      
  1903.                            TABLES FOR THE BDS
  1904.                                    
  1905.                                    
  1906.                             TABLE 11.  FLAG
  1907.                              (BDS Octet 4)
  1908.                                    
  1909.                                    
  1910.          Bit     Value      Meaning
  1911.  
  1912.  
  1913.  
  1914.           1       0      Grid point data
  1915.                   1      Spherical Harmonic Coefficients
  1916.  
  1917.           2       0      Simple packing
  1918.                   1      Second order Packing
  1919.  
  1920.           3       0      Original data were floating point values
  1921.                   1      Original data were integer values
  1922.  
  1923.           4       0      No additional flags at octet 14
  1924.                   1      Octet 14 contains flag bits 5 - 12
  1925.  
  1926.           5              Reserved (set to 0)
  1927.  
  1928.           6       0      Single datum at each grid point
  1929.                   1      Matrix of values at each grid point
  1930.  
  1931.           7       0      No secondary bit maps
  1932.                   1      Secondary bit maps present
  1933.  
  1934.           8       0      Second order values have constant width
  1935.                   1      Second order values have different widths
  1936.  
  1937.           9-12           Reserved (set to 0)
  1938.  
  1939. Notes:
  1940.         
  1941.      (1)  Bit 4 is set to 1 to indicate that bits 5 to 12 are contained
  1942.           in octet 14 of the data section.
  1943.           
  1944.      (2)  Bit 3 is set to 1 to indicate that the original data was
  1945.           integers; when this is the case any non-zero reference values
  1946.           should be rounded to an integer value.
  1947.           
  1948.      (3)  When secondary bit maps are present in the data (used in
  1949.           association with second order packing and, optionally, with a
  1950.           matrix of values at each point) this is indicated by setting
  1951.           bit 7 to 1.
  1952.           
  1953.      At present, the "extension" of Table 11 into octet 14 and the
  1954. associated "advanced" features of GRIB is not employed in the National
  1955. Weather Service.  Thus binary data always begins in octet 12.
  1956.  
  1957.  
  1958. SECTION 5: END SECTION
  1959.  
  1960.      The end section serves a human readable indication of the end of a
  1961. GRIB record.  It can also be used for computer verification that a
  1962. complete GRIB record is available for data extraction.  It should not
  1963. be used as a search target since a '7777' bit combination could exist
  1964. anywhere in the binary data stream.
  1965.  
  1966.      Octet no.
  1967.  
  1968.       1-4        '7777' (Coded CCITT-ITA No. 5)
  1969.  
  1970.                                    
  1971.                                    
  1972.                                    
  1973.                                    
  1974.                                    
  1975.                                    
  1976.                                    
  1977.                                    
  1978.                                    
  1979.                                    
  1980.                               APPENDIX A
  1981.                                    
  1982.                                    
  1983.                                    
  1984.                                    
  1985.                                    
  1986.                                    
  1987.                     OUTLINE OF WMO BULLETIN HEADERS
  1988.                                    
  1989.                                    
  1990.                                    
  1991.                                    
  1992.                                USED WITH
  1993.                                    
  1994.                                    
  1995.                                    
  1996.                               G  R  I  B
  1997.                           WMO BULLETIN HEADER
  1998.                                    
  1999.                                    
  2000.      The WMO abbreviated heading is used to identify the NMC GRIB
  2001. messages; however, it is not a complete description of their content.
  2002. The user is cautioned against using the header as the sole determiner
  2003. of the record content; she should, of course, rely on the Product
  2004. Definition Section for that purpose.
  2005.  
  2006.      Note: In the following, a hexadecimal number is enclosed in
  2007. parentheses followed by the designation "hex".
  2008.  
  2009.      The information needed to identify the NMC product is contained in
  2010. 21 octets.  The characters are encoded using the CCITT-ITA No. 5, also
  2011. known (in the US) as ASCII characters, and are defined as follows:
  2012.  
  2013.  Octet no.                    Header Content
  2014.    
  2015.     1     The character 'H' for GRIB bulletins sent to the NWS Family
  2016.           of Services and for International Exchange
  2017.           or
  2018.           The character 'Y' for GRIB bulletins intended for the NWS
  2019.           AWIPS program.
  2020.    
  2021.     2     A letter character specifying the type parameter as shown in
  2022.           Table A.1.
  2023.    
  2024.     3     A letter character specifying the grid area as defined in
  2025.           Table A.2.
  2026.    
  2027.     4     A letter or numeric character indicating the time difference
  2028.           between the reference time and valid time of the data as
  2029.           listed in Table A.3, i.e., the forecast length.
  2030.    
  2031.     5-6   Numeric characters as defined in Table A.4.  Usually the
  2032.           pressure level, sometimes just a sequence number.  Some
  2033.           values have special level or layer meanings.
  2034.    
  2035.     7     Blank (20)hex
  2036.    
  2037.     8-11  Four characters identifying the originating center.  These
  2038.           are always 'KWBC' for NMC-produced messages.
  2039.    
  2040.     12    Blank (20)hex
  2041.    
  2042.     13-14 Two numeric characters providing the reference day of the
  2043.           month (01-31) of the data.
  2044.    
  2045.     15-18 Four numeric characters providing the reference hour and
  2046.           minute of the data.
  2047.    
  2048.     19-22 Four OPTIONAL characters: one blank (20)hex, then 'Pxx',
  2049.           where xx=01-99.  Used to indicate sequential parts of very
  2050.           long messages that have been divided using the BLOK feature.
  2051.           See Appendix B.
  2052.    
  2053.     19-21 OR 23-25  Two ASCII carriage returns and a line feed,
  2054.           (0D0D0A)hex.
  2055.    
  2056.    
  2057.      The first six characters are commonly referred to as
  2058.  
  2059.                             T1 T2 A1 A2 ii
  2060.                                    
  2061.      In summary...
  2062.  
  2063.                Generic Meaning of   T1  T2  A1  A2  ii:
  2064.                                    
  2065.      
  2066.      T1:  Type of bulletin:   "H" for GRIB messages for
  2067.                               Family of Services and
  2068.                               International Exchange;
  2069.                               "Y" for AWIPS GRIB messages
  2070.      
  2071.      T2:  Type of data/parameter
  2072.      
  2073.      A1:  Grid
  2074.      
  2075.      A2:  Analysis or forecast hour
  2076.    
  2077.      ii:  Numeric.  Usually the pressure level, sometimes just a
  2078.           sequence number.  Some values have special level or layer
  2079.           meanings.
  2080.    
  2081.    
  2082.      In the following tables, the columns headed AWIPS are
  2083. augmentations to the common Family of Services (FOS) and International
  2084. Exchange variables.  FOS and international GRIB messages (with H as the
  2085. initial character) draw upon the left hand columns only.  AWIPS GRIB
  2086. messages (with Y as the initial character) use letters from both
  2087. columns.  If both columns contain entries for the same designator, the
  2088. T1 character (H or Y) indicates which entry to use.
  2089.  
  2090.                    TABLE A.1   TYPE PARAMETERS - T2
  2091.                            (Header Octet 2)
  2092.                                    
  2093.                                    
  2094.  DESIGNATOR                 PARAMETER
  2095.                               Usage
  2096.      
  2097.              FOS & International             AWIPS
  2098.      
  2099.      A
  2100.      B                                  Vertical Wind Shear
  2101.      C                                  Vorticity
  2102.      D                                  Thunderstorm probability
  2103.      E       Total Precipitation
  2104.      F                                  Precipitable Water
  2105.      G                                  Convective Precip.
  2106.      H       Height (geopotential)
  2107.      I
  2108.      J
  2109.      K       Primary Wave Period
  2110.      L       Primary Wave Direction
  2111.      M       Secondary Wave Period
  2112.      N       Secondary Wave Direction
  2113.      O       Vertical velocity
  2114.      P       Pressure
  2115.      Q                                  Stability Index
  2116.                                         (Best 4-layer index)
  2117.      R       Relative humidity
  2118.      S       Snow
  2119.      T       Temperature
  2120.      U       u wind component
  2121.      V       v wind component
  2122.      W
  2123.      X       Surface Lifted index
  2124.      Y
  2125.      Z
  2126.      
  2127.      
  2128.                    TABLE A.2   GRID DESIGNATOR - A1
  2129.                            (Header Octet 3)
  2130.                                    
  2131.                                    
  2132.                      DESIGNATOR              GRID Number
  2133.                                            (See Table B)
  2134.                                    
  2135.                           FOS & International          AWIPS
  2136.                                    
  2137.                A           21            201 - Northern Hemisphere
  2138.                                  B           22
  2139.                                  C           23
  2140.                                  D           24
  2141.                                  E           25
  2142.                                  F           26
  2143.                                  G           50
  2144.                H                         213 - National CONUS with
  2145.                                                 Double Resolution
  2146.                  I                         202 - National CONUS
  2147.                  J                         203 - National Alaska
  2148.                  K                         204 - National Hawaii
  2149.               L                         205 - National Puerto Rico
  2150.                   M                         206 - Regional MARD
  2151.                  N                         207 - Regional Alaska
  2152.                  O                         208 - Regional Hawaii
  2153.               P                         210 - Regional Puerto Rico
  2154.                  Q                         211 - Regional CONUS
  2155.                R                         212 - Regional CONUS with
  2156.                                                  Double Resolution
  2157.                S                         209 - Regional MARD with
  2158.                                                  Double Resolution
  2159.               T           61            214 - Regional Alaska with
  2160.                                                  Double Resolution
  2161.                                  U           62
  2162.                                  V           63
  2163.                                  W           64
  2164.           X        (Used for experimental transmissions)
  2165.           Y
  2166.           Z
  2167.                                    
  2168.                                    
  2169.                                    
  2170.                TABLE A.3   FORECAST HOUR DESIGNATOR - A2
  2171.                            (Header Octet 4)
  2172.                                    
  2173.                                    
  2174. DESIGNATOR                    HOUR
  2175.                               Usage
  2176.  
  2177.            FOS & International    AWIPS (additional)
  2178.  
  2179.     A       00 hour analysis
  2180.     B       06 hour fcst
  2181.     C       12     "
  2182.     D       18     "
  2183.     E       24     "
  2184.     F       30     "
  2185.     G       36     "
  2186.     H       42     "
  2187.     I       48     "
  2188.     J       60     "
  2189.     K       72     "
  2190.     L       84     "
  2191.     M       96     "
  2192.     N      108     "
  2193.     O      120     "
  2194.     P      132     "
  2195.     Q      144     "
  2196.     R      156     "
  2197.     S      168     "
  2198.     T      180     "
  2199.     U      192     "
  2200.     V      204     "
  2201.     W      216     "
  2202.     X      228     "
  2203.     Y      240     "
  2204.     Z                               0 hour (initialized)
  2205.     0 (zero)                        2 hour fcst
  2206.     1                               4     "
  2207.     2                               8     "
  2208.     3                               10    "
  2209.     4                               14    "
  2210.     5                               16    "
  2211.     6                               20    "
  2212.     7                               22    "
  2213.     8                               54    "
  2214.     9                               66    "
  2215.                      TABLE A.4   LEVEL DESIGNATORS - ii
  2216.                         (Header Octets 5 and 6)
  2217.                                    
  2218.                                    
  2219.            DESIGNATOR        LEVEL or LAYER
  2220.                     
  2221.                      99     1000 hPa
  2222.                00           Entire Atmosphere
  2223.                
  2224.                98           Air Properties at Surface of Earth
  2225.                97           Level of the tropopause
  2226.                96           Level of the maximum wind
  2227.                94           Level of 0 deg C isotherm
  2228.                93           Land/Water Properties at Surface of
  2229.                             Earth/Ocean
  2230.                92           Boundary Layer
  2231.                91           Reduced to Sea Level
  2232.                
  2233.                18           1828 m level (= 6000 ft)
  2234.                27           2743 m level (= 9000 ft)
  2235.                37           3658 m level (= 12000 ft)
  2236.                
  2237.           
  2238.      Otherwise, the designator given is the hundreds and tens digits of
  2239. the hPa level in the atmosphere, e.g. 70=700hPa; 03=30hPa, etc..
  2240.  
  2241.                                    
  2242.                                    
  2243.                                    
  2244.                                    
  2245.                                    
  2246.                                    
  2247.                                    
  2248.                                    
  2249.                                    
  2250.                                    
  2251.                               APPENDIX B
  2252.                                    
  2253.                                    
  2254.                                    
  2255.                                    
  2256.                                    
  2257.                                    
  2258.                            The BLOK feature
  2259.                                    
  2260.                  for subdividing large GRIB bulletins
  2261.                                   BLOK
  2262.                                    
  2263.                                    
  2264.      The BLOK feature is used to subdivide large GRIB bulletins to
  2265. allow them to fit into existing (limited) communications or data
  2266. storage facilities.  Once divided, the individual subdivisions (BLOKs)
  2267. can not stand alone - they must be reassembled back into the single
  2268. bulletin whence they came for any processing.  However, from a
  2269. communications or storage standpoint, each individual BLOK is
  2270. considered as a distinct bulletin or record and will be uniquely
  2271. identified.
  2272.  
  2273.      The application of the BLOK feature is quite straightforward: a
  2274. given GRIB record - all the bits from "GRIB" through "7777" - may be
  2275. partitioned at any point (without any regard for the contents) or any
  2276. number of points.  The only rule is that the separate parts must
  2277. contain an even number of octets.  The separate parts are then encased
  2278. in a BLOK envelope (details follow), and that's it.  It is, of course,
  2279. up to the receiver of a collection of BLOKs to strip off the BLOK
  2280. envelopes and put the GRIB message back together again.  Just get all
  2281. the king's horses and all the king's men to help do so.
  2282.  
  2283.      Here is the structure and content of the BLOK envelope.
  2284.  
  2285.      Section 0 - Indicator section
  2286.  
  2287.         Octet No.           Contents
  2288.  
  2289.           1-4       'BLOK' - 4 ASCII characters
  2290.           5-7       Total length of this BLOK, in octets
  2291.            8        BLOK Edition Number - currently 0
  2292.           9-11      Total length of original GRIB message,
  2293.                     in octets
  2294.           12        Flag - see Table B.1 - indicates presence
  2295.                     or absence of Section 1
  2296.           13        Total number of related BLOKs
  2297.           14        Sequence number of this BLOK
  2298.           15-16     reserved, set to 0
  2299.  
  2300.  
  2301.      Section 1 - Identification section - optional
  2302.  
  2303.      If present, this section contains the complete Product Definition
  2304.      Section (PDS) from the original GRIB message.  If this section is
  2305.      included in one BLOK, it must be included in all related BLOKs.
  2306.      
  2307.      
  2308.      Section 2 - Data section
  2309.  
  2310.      This section contains an arbitrary part of the original GRIB
  2311.      message - the only restriction is that this section contain an
  2312.      even number of octets.
  2313.      
  2314.      
  2315.      Section 3 - End section
  2316.  
  2317.         Octet No.           Contents
  2318.  
  2319.           1-4       '7777' - 4 ASCII characters
  2320.  
  2321.  
  2322.                                Table B.1
  2323.                                    
  2324.                         Section 1 present Flag
  2325.  
  2326.            Bit      Value       Meaning
  2327.  
  2328.             1        0        Optional Section 1 omitted
  2329.                      1        Optional Section 1 present
  2330.  
  2331.             2-8               Reserved (set to 0)
  2332.      
  2333.      
  2334.      Keep in mind that each subdivision of the original bulletin will
  2335. be completely surrounded by a BLOK envelope, from 'BLOK' through
  2336. '7777'.
  2337.  
  2338.      Note that the last BLOK of a set for a given bulletin will have
  2339. two '7777's in a row; the first is the one that marks the end of the
  2340. original bulletin, the second marks the end of the (last) BLOK.
  2341.  
  2342.      When BLOKs are sent out as individual messages with identifying
  2343. WMO headers, the 'Pxx' characters that are an optional part of the
  2344. header shall be included in the header.  See Appendix A.  In this way
  2345. the complete WMO header shall be unique for each message even though
  2346. the TTAAii portion of the headers will be the same, reflecting that
  2347. each BLOK, for a single GRIB message,  contains the same information.
  2348.  
  2349. _______________________________
  2350. <1>  World Meteorological Organization publication No. 306, Manual on
  2351.      Codes, Vol. 1, Part B, Secretariat of the WMO, Geneva,
  2352.      Switzerland, 1988, plus Supplements No. 1, 2, & 3
  2353.