home *** CD-ROM | disk | FTP | other *** search
/ Encyclopedia of Graphics File Formats Companion / GFF_CD.ISO / formats / grib / spec / grib.txt < prev    next >
Text File  |  1994-06-01  |  92KB  |  2,896 lines

  1. U.S. DEPARTMENT OF COMMERCE
  2. NATIONAL OCEANIC AND ATMOSPHERIC ADMINISTRATION
  3. NATIONAL WEATHER SERVICE
  4. NATIONAL METEOROLOGICAL CENTER
  5.  
  6.  
  7. Office Note 388
  8.  
  9.  
  10. G  R  I  B
  11.  
  12. (Edition 1)
  13.  
  14.  
  15.  
  16.  
  17. THE WMO FORMAT
  18.  
  19. FOR
  20.  
  21. THE STORAGE OF WEATHER PRODUCT INFORMATION 
  22.  
  23. AND
  24.  
  25. THE EXCHANGE OF WEATHER PRODUCT MESSAGES
  26.  
  27. IN GRIDDED BINARY FORM
  28.  
  29.  
  30.  
  31.  
  32. John D. Stackpole
  33. Automation Division
  34.  
  35.  
  36.  
  37. Revised
  38. (see overleaf)
  39.  
  40.  
  41.  
  42.  
  43.  
  44. August 31, 1993
  45.  
  46. This is an unreviewed manuscript,
  47. primarily intended for informal exchange of information
  48. among NMC staff members
  49.  
  50.  
  51. REVISION HISTORY
  52.  
  53. since the last full revision/reprinting
  54.  
  55. dated March 3, 1993
  56.  
  57.  
  58. August 31, 1993    p.6:    Added orig center for NWS/NMC/Reanal
  59.     and corrected DeBilt number.
  60. p.7:    Added gen code 70 for QLM hurricane
  61. p.9:    Added grids 75,76,77 for QLM
  62. p.13,14: Reoriented Grids 37-44 (WAFC/ICAO)
  63.     such that left hand column is at
  64.     330E (30W)
  65. p.13,13.1:  Added table of number of points in
  66.     lat circles of grids 37-44
  67. p.15:    Added description of Grid 1 
  68. p.18:    Corrected long grid spacing in degrees
  69.     and corrected location of Map 204
  70. p.20    Adjusted location of map 208 to
  71.     conform to change in map 204
  72. p.28:    Added MSL variants 128 & 129; Added
  73.     lat. lon. as parameters 176 & 177; 
  74.     added parameters 204, 205, 211, 212,
  75.     218.
  76. p.29:    Added Note 4
  77. p.48:    Clarification of table 11.
  78.  
  79. Appendix A.  Revised to include "Z" as first 
  80. character in WMO header.  Used for "off-hour" 
  81. forecast hours.
  82.  
  83.  
  84. GRIB Edition 1
  85.  
  86. INTRODUCTION
  87.  
  88. The World Meteorological Organization (WMO) Commission for 
  89. Basic Systems (CBS) Extraordinary Meeting Number VIII (1985) 
  90. approved a general purpose, bit-oriented data exchange format, 
  91. designated FM 92-VIII Ext. GRIB (GRIdded Binary).  It is an 
  92. efficient vehicle for transmitting large volumes of gridded data 
  93. to automated centers over high speed telecommunication lines using 
  94. modern protocols.  By packing information into the GRIB code, 
  95. messages can be made more compact than character oriented 
  96. bulletins, producing faster computer-to-computer transmissions.  
  97. GRIB can equally well serve as a data storage format, generating 
  98. the same efficiencies relative to information storage and 
  99. retrieval devices.  
  100.  
  101. Changes and extensions to GRIB were approved at the regular 
  102. meeting of the WMO/CBS in February, 1988; additional changes were 
  103. introduced at the CBS/WGDM/Sub-Group on Data Representation 
  104. meetings in May 1989 and in October 1990.  The last set of changes 
  105. were of such structural magnitude as to require a new Edition of 
  106. GRIB, Edition 1, which this document describes.  
  107.  
  108. Note: the Edition number is in the same location, relative to 
  109. the start of the GRIB message, for all Editions. Thus, decoding 
  110. programs can detect which Edition layout to expect in the 
  111. remaining portion of the message.  This is appropriate for 
  112. archives of messages encoded in earlier Editions or during 
  113. transition periods.
  114.  
  115. Each GRIB record intended for either transmission or storage 
  116. contains single value, or a matrix of values, at an array of grid 
  117. points, or a set of spectral coefficients, for parameters at a 
  118. single level (or layer) as a continuous bit stream.  Logical 
  119. divisions of the record are designated as "sections", each of 
  120. which provides control information and/or data.  A GRIB record 
  121. consists of six sections, two of which are optional:
  122.  
  123.         (0) Indicator Section
  124.         (1) Product Definition Section (PDS)
  125.         (2) Grid Description Section (GDS)  -  optional
  126.         (3) Bit Map Section (BMS)  -  optional
  127.         (4) Binary Data Section (BDS)
  128.         (5) '7777' (ASCII Characters)
  129.  
  130. Most centers require bulletin headers to enable them to 
  131. receive, identify, and switch messages; NMC is no exception.  The 
  132. standard WMO abbreviated heading for GRIB is described in Appendix 
  133. A.
  134.  
  135. In this documentation, certain symbols are used to clarify 
  136. the contents of octets (groups of eight consecutive binary bits, 
  137. "bytes" in American usage).  If unadorned letters are used, they 
  138. are symbolic and their meanings are described in the text; a 
  139. decimal number is simply printed as is; a character or string of 
  140. characters is represented inside single quote marks.  
  141. International Alphabet No. 5, which is identical in its essential 
  142. elements to the U.S. National Standard 7-bit ASCII, is used for 
  143. character representation in the GRIB code.  
  144.  
  145. Octets are numbered consecutively from the start of each 
  146. section; bits within an octet are also numbered from left (the 
  147. most significant bit) to right (the least significant bit).  Thus 
  148. an octet with bit 8 set to the value 1 would have the integer 
  149. value 1; bit 7 set to one would have a value of 2, etc.
  150. The numbering of Tables in the following text corresponds to 
  151. the description of GRIB in the WMO Manual on Codes< >.  Some 
  152. additional tables not found in the WMO Manual are indicated by 
  153. letters.  These, generally, contain information unique to the NWS 
  154. or NOAA.
  155.  
  156. A final caveat: this document does not include all the 
  157. features in GRIB as described in the Manual on Codes.  This 
  158. document selects out those features which are of particular 
  159. interest to the National Weather Service at the present time.  
  160. Some of the "advanced" features are alluded to in this document; 
  161. please refer to the Manual for full details.
  162.  
  163. DATA PACKING METHOD.
  164.  
  165. The code form represents numeric data as a series of binary 
  166. digits (bits).  Such data representation is independent of any 
  167. particular machine representation; by convention data lengths are 
  168. measured in octets.  Data are coded as binary integers using the 
  169. minimum number of bits required for the desired precision.  
  170. Numeric values, with units as shown in Table 2, are first scaled 
  171. by a power of ten to achieve an appropriate decimal precision, a 
  172. reference value is subtracted from them to reduce redundancy and 
  173. eliminate negative values, and they are then further scaled by a 
  174. power of two to pack them into a pre-selected word length.
  175. The representation of a single value is such that:
  176.  
  177. Y * 10D = R + (X * 2E)
  178.  
  179. where
  180.  
  181. Y = original or unpacked value; units as in Table 2;
  182. D = decimal scale factor, to achieve desired precision
  183.         (sign bit, followed by a 15-bit integer);
  184. R = reference value (32 bits);
  185. X = internal value (No. of bits varies for each record);
  186. E = binary scale factor for word-length packing
  187.         (sign bit, followed by a 15-bit integer). 
  188.  
  189. The reference value (R) is the minimum value of the decimally 
  190. scaled data that is being encoded.  R is placed in the Binary Data 
  191. Section in four octets as a single precision floating-point 
  192. number:
  193.  
  194. sAAAAAAA BBBBBBBB BBBBBBBB BBBBBBBB
  195.  
  196. where s = sign bit, encoded as   0 => positive
  197.                                  1 => negative
  198.       A = 7-bit binary integer, the characteristic
  199.       B = 24-bit binary integer, the mantissa.
  200.  
  201. The appropriate formula to recover the value of R is:
  202. R = (-1)s * 2(-24) * B * 16(A-64)
  203. This formula is the standard IBM representation for a single 
  204. precision (real) floating point number.  (Consideration is being 
  205. given to using the IEEE floating point representation in the 
  206. future, in a later Edition of GRIB.)
  207. Both the decimal scaling factor and/or the binary scaling 
  208. factors may equal 0.  It is not necessary to use the binary 
  209. scaling to "fit" the numbers into a prespecified word size; an 
  210. alternative encoding practice is to change the word length (the 
  211. same for all the points, of course) to accommodate the largest 
  212. departure from the reference value.  A properly written GRIB 
  213. decoder should be able to decode either option with no change in 
  214. the logic as long as the decoder makes no prior assumptions about 
  215. word lengths.  All the necessary parameters are included in the 
  216. GRIB message, of course.  
  217.  
  218. GRIB CODE FORM:
  219.  
  220. With the exception of the Indicator Section and the End 
  221. Section all octets contain binary values.  All sections contain an 
  222. even number of octets; the variable length sections are padded 
  223. with zero values as necessary.  These extra bits must be accounted 
  224. for in finding one's way through the sections; their content 
  225. should be ignored.
  226.  
  227. SECTION 0: THE INDICATOR SECTION (IS)
  228.  
  229. The indicator section serves to identify the start of the 
  230. record in a human readable form; to indicate the total length of 
  231. the message, and to indicate the Edition number of the message.  
  232. It is always eight octets long. 
  233.  
  234. Octet no.             IS Content
  235.  
  236.     1-4    'GRIB'  (Coded CCITT-ITA No. 5) (ASCII);
  237.  
  238.     5-7    Total length, in octets, of GRIB message
  239.             (including Sections 0 & 5);
  240.  
  241.     8    Edition number - currently  1
  242.  
  243. SECTION 1: THE PRODUCT DEFINITION SECTION (PDS).
  244.  
  245. The PDS contains indicators for the Parameter table Version, 
  246. the originating center, the numerical model (or "generating 
  247. process") that created the data, the geographical area covered by 
  248. the data, the parameter itself, and the actual values for the 
  249. appropriate vertical level or layer, the decimal scale factor, and 
  250. date/time information.  The PDS is at least 28 octets long but it 
  251. may be longer if an originating center chooses to make it so.  
  252. Users of GRIB messages are strongly urged to use the length-of-
  253. section portion of the PDS to determine where the next section 
  254. begins.  Do not assume a fixed octet length.
  255.  
  256.  
  257.  
  258. Octet no.                PDS Content
  259.  
  260. 1 - 3      Length in octets of the Product Definition Section
  261.  4         Parameter Table Version number.
  262.            Currently Version 1 for international exchange
  263.        Parameter table version numbers 128-254 are
  264.        reserved for local use.
  265.  5         Identification of center (See Table 0)
  266.  6         Generating process ID number 
  267.        (allocated by the originating center; See Table A)
  268.  7         Grid Identification (geographical location and
  269.  
  270.             area; See Table B)
  271.  8         Flag specifying the presence or absence of a GDS
  272.                   or a BMS (See Table 1)
  273.  9         Indicator of parameter and units (See Table 2)
  274.  10        Indicator of type of level or layer 
  275.                     (See Tables 3 & 3a)
  276.  11-12     Height, pressure, etc. of the level or layer
  277.                     (See Table 3)
  278.  13        Year of century     \  Initial (or Reference)
  279.                                |  time of forecast - UTC
  280.  14        Month of year       |    
  281.                                |          or
  282.  15        Day of month         >
  283.                                |  Start of time period
  284.  16        Hour of day         |    for averaging or 
  285.                                |    accumulation of 
  286.  17        Minute of hour      /    analyses
  287.  
  288.  18        Forecast time unit (see Table 4)
  289.  19        P1 - Period of time (Number of time units)
  290.                 (0 for analysis or initialized analysis.)
  291.                 Units of time given by content of octet 18.
  292.  20        P2 - Period of time (Number of time units)
  293.                     or
  294.                 Time interval between successive analyses,
  295.                 successive initialized analyses, or forecasts,
  296.                 undergoing averaging or accumulation.
  297.                 Units given by octet 18.
  298.  21        Time range indicator (See Table 5)
  299.  22-23     Number included in average, when octet 21
  300.                 (Table 5) indicates an average or
  301.                accumulation; otherwise set to zero.
  302.  24       Number Missing from averages or accumulations.
  303.  25       Century of Initial (Reference) time
  304.                  (=20 until Jan. 1, 2001)
  305.  26       Reserved - set to 0
  306.  27-28    The decimal scale factor D.  A negative value
  307.     is indicated by setting the high order bit
  308.     (bit No. 1) in octet 27 to 1 (on).
  309.  29-40    Reserved (need not be present)
  310.  41-...    Reserved for originating center use.
  311.  
  312.  
  313. Note: Octet 8 may indicate the presence of the Grid 
  314. Description Section (GDS) even though octet 7 specifies a 
  315. predefined grid.  In this case the GDS must describe that grid - 
  316. this device serves as a mechanism for transmitting new 
  317. "predefined" grids to users prior to their formal publication in 
  318. this or the official WMO documentation.
  319.  
  320. TABLE 0.  TABLES FOR THE PDS ORIGINATING CENTER
  321. (PDS Octet 5)
  322.  
  323. VALUE            CENTER
  324.  
  325.     07    US Weather Service - National Met. Center
  326.     08    US NWS - NMC - Reanalysis project.
  327.     34    Japanese Meteorological Agency - Tokyo
  328.     54    Canadian Meteorological Service - Montreal
  329.     58    US Navy  - Fleet Numerical Oceanography Center
  330.     59    NOAA Forecast Systems Lab, Boulder CO
  331.     74    U.K. Met Office - Bracknell
  332.     97    European Space Agency (ESA)
  333.     98    European Center for Medium-Range Weather
  334.         Forecasts - Reading
  335.     99    DeBilt
  336.  
  337.     150    ABRFC - Arkansas-Red River RFC, Tulsa OK
  338.     151    Alaska RFC, Anchorage, AK
  339.     152    CBRFC - Colorado Basin RFC, Salt Lake City, UT
  340.     153    CNRFC - California-Nevada RFC, Sacramento, CA
  341.     154    LMRFC - Lower Mississippi RFC, Slidel, LA
  342.     155    MARFC - Middle Atlantic RFC, State College, PA
  343.     156    MBRFC - Missouri Basin RFC, Kansas City, MO
  344.     157    NCRFC - North Central RFC, Minneapolis, MN
  345.     158    NERFC - Northeast RFC, Hartford, CT
  346.     159    NWRFC - Northwest RFC, Portland, OR
  347.     160    OHRFC - Ohio Basin RFC, Cincinnati, OH
  348.     161    SERFC - Southeast RFC, Atlanta, GA
  349.     162    WGRFC - West Gulf RFC, Fort Worth, TX
  350.  
  351.     170    OUN   - Norman OK WFO
  352.  
  353.  
  354. TABLE A.        Generating Process or Model
  355. (PDS Octet 6)
  356.  
  357.     VALUE        MODEL
  358.  
  359.     10    Global Wind-Wave Forecast Model
  360.     19    Limited-area Fine Mesh (LFM) analysis
  361.     25    Snow Cover Analysis
  362.     39    Nested Grid forecast Model (NGM)
  363.     42    Global Optimum Interpolation Analysis (GOI)
  364.         from "Aviation" run
  365.     43    Global Optimum Interpolation Analysis (GOI)
  366.         from "Final" run
  367.     44    Sea Surface Temperature Analysis
  368.     53    LFM-Fourth Order Forecast Model
  369.     64    Regional Optimum Interpolation Analysis (ROI)
  370.     68    80 wave triangular, 18-layer Spectral model
  371.         from "Aviation" run
  372.     69    80 wave triangular, 18 layer Spectral model
  373.         from "Medium Range Forecast" run
  374.     70    Quasi-Lagrangian Hurricane Model (QLM)
  375.     73    Fog Forecast model - Ocean Prod. Center
  376.     74    Gulf of Mexico Wind/Wave
  377.     75    Gulf of Alaska Wind/Wave
  378.     76    Bias corrected Medium Range Forecast    
  379.     77    126 wave triangular, 18 layer Spectral model
  380.         from "Aviation" run
  381.     78    126 wave triangular, 18 layer Spectral model
  382.         from "Medium Range Forecast" run
  383.     79    Backup from the previous run
  384.     80    62 wave triangular, 18 layer Spectral model
  385.         from "Medium Range Forecast" run
  386.     81    Spectral Statistical Interpolation (SSI)
  387.         analysis from "Aviation" run.
  388.     82    Spectral Statistical Interpolation (SSI)
  389.         analysis from "Final" run.
  390.     83    ETA Model - 80 km version
  391.     84    ETA Model - 40 km version
  392.     85    ETA Model - 30 km version
  393.     86    MAPS Model, from Forecast Systems Lab
  394.             (Isentropic; scale: 60km at 40N)
  395.     150    NWS River Forecast System (NWSRFS)
  396.     151    NWS Flash Flood Guidance System (NWSFFGS)
  397.     152    WSR-88D Stage II Precipitation Analysis
  398.     153    WSR-88D Stage III Precipitation Analysis
  399.  
  400.  
  401. TABLE B.   GRID IDENTIFICATION
  402. (PDS Octet 7)
  403.  MASTER LIST OF NMC STORAGE GRIDS
  404.  VALUE                GRID                          
  405.                                                       INCREMENT
  406.  
  407.     1    1679-point (73x23) Mercator grid with    5 degs of
  408.         (1,1) at (0W,48.09S), (73,23) at (0W,    longitude
  409.         48.09N); I increasing eastward, 
  410.         Equator at J=12.
  411.  
  412.     2    10512-point (144x73) global longitude-    2.5 deg
  413.         latitude grid.  (1,1) at 0E, 90N, 
  414.         matrix layout.  N.B.: prime meridian 
  415.         not duplicated.
  416.  
  417.     3    65160-point (360x181) global longitude-    1.0 deg
  418.         latitude grid.  (1,1) at 0E, 90N, 
  419.         matrix layout.  N.B.: prime meridian 
  420.         not duplicated.
  421.         
  422.     5    3021-point (53x57) N. Hemisphere polar    190.5 km
  423.         stereographic grid oriented 105W; Pole    at 60N
  424.         at (27,49). (LFM analysis)
  425.  
  426.     6    2385-point (53x45) N. Hemisphere polar    190.5 km
  427.         stereographic grid oriented 105W; Pole    at 60N
  428.         at (27,49). (LFM Forecast)
  429.  
  430.     21-26    International Exchange and 
  431.         Family of Services (FOS) grids - see below
  432.  
  433.   27         4225-point (65x65) N. Hemisphere polar   381 km
  434.              stereographic grid oriented 80W; Pole    at 60N
  435.              at (33,33).
  436.  
  437.   28         4225-point (65x65) S. Hemisphere polar   381 km
  438.              stereographic grid oriented 100E; Pole   at 60S
  439.              at (33,33).
  440.  
  441.   29         5365-point (145x37) N. Hemisphere lon-   2.5 degs
  442.              gitude/latitude grid for latitudes 0N
  443.              to 90N; (1,1) at (0E,0N).
  444.  
  445.   30         5365-point (145x37) S. Hemisphere lon-   2.5 degs
  446.              gitude/latitude grid for latitudes 90S
  447.              to 0S; (1,1) at (0E,90S).
  448.  
  449.  
  450.  
  451.   33         8326-point (181x46) N. Hemisphere lon-   2 degs
  452.              gitude/latitude grid for latitudes 0N
  453.              to 90N; (1,1) at (0E,0N).
  454.  
  455.     34    8326-point (181x46) S. Hemisphere lon-    2 degs
  456.         gitude/latitude grid for latitudes 90S
  457.         to 0S; (1,1) at (0E,90S).
  458.  
  459.     37 - 44    Eight lat-long 1.25x1.25 "thinned" grids,
  460.         covering the globe by octants of 3447 points.
  461.         Full GRIB specifications below.
  462.         For WAFC, ICAO, Family of Services (FOS),
  463.         and International exchange.
  464.  
  465.     50    Family of Services "regional grid" - see below.
  466.  
  467.     55    6177-point (87x71) N. Hemisphere polar    254 km
  468.         stereographic grid oriented 105W; Pole    at 60N
  469.         at (44,38). (2/3 bedient NH sfc anl)
  470.  
  471.     56    6177-point (87x71) N. Hemisphere polar    127 km
  472.         stereographic grid oriented 105W; Pole    at 60N
  473.         at (40,73). (1/3 bedient NA sfc anl)
  474.  
  475.     61-64    International Exchange & FOS grids - see below.
  476.  
  477.     75    12321-point (111x111) N. Hemisphere    40 km at
  478.         Lambert Conformal grid.  No fixed    30&60 deg N
  479.         location; used by QLM Hurricane model.
  480.  
  481.     76    12321-point (111x111) S. Hemisphere    40 km at
  482.         Lambert Conformal grid.  No fixed    30&60 deg S
  483.         location; used by QLM Hurricane model.
  484.  
  485.     77    12321-point (111x111) N. Hemisphere    40 km at
  486.         Mercator grid.  No fixed location;    22.5 deg N&S
  487.         used by QLM Hurricane model.
  488.  
  489.     85    32400-point (360x90) N. Hemisphere    1 deg
  490.         longitude/latitude grid;
  491.         longitudes: 0.5E to 359.5E (0.5W); 
  492.         latitudes: 0.5N to 89.5N; 
  493.         origin (1,1) at (0.5E,0.5N)
  494.  
  495.     86    32400-point (360x90) S. Hemisphere    1 deg
  496.         longitude/latitude grid;
  497.         longitudes: 0.5E to 359.5E (0.5W); 
  498.         latitudes: 89.5S to 0.5S; 
  499.         origin (1,1) at (0.5E,89.5S)
  500.  
  501.     87    5022 point (81x62) N. Hemisphere  polar    68.153 km
  502.         stereographic grid oriented at 105W.    at 60N
  503.         Pole at (31.91, 112.53) Used for RUC.
  504.         (60 km at 40N).  See below for GRIB
  505.         specification.
  506.  
  507.     90    12902 point (92x141 semi-staggered)    lat.14/26 deg
  508.         lat. long., rotated such that center   lon.15/26 deg
  509.         located at 52.0N, 111.0W; LL at 37.5W, 35S
  510.         Unfilled E grid for 80 km ETA model
  511.  
  512.     91    25803 point (183x141)                  lat.14/26 deg
  513.         lat. long., rotated such that center   lon.15/26 deg
  514.         located at 52.0N, 111.0W; LL at 37.5W,35S
  515.         Filled E grid for 80 km ETA model
  516.  
  517.     92    2 4162 point (127x191 semi-staggered)  lat. 5/57 deg
  518.         lat. long., rotated such that center   lon. 5/18 deg
  519.         located at 41.0N, 97.0W; LL at 35W,25S
  520.         Unfilled E grid for 40 km ETA model
  521.  
  522.     93    48323 point (253x191)lat. long.,       lat.15/57 deg
  523.         rotated such that center located       lon.5/18 deg
  524.         at 41.0N, 97.0W; LL at 35W ,25S
  525.         Filled E grid for 40 km ETA model
  526.  
  527.     98    Global Gaussian T62 grid.  See GRIB 
  528.         specifications below
  529.  
  530.     100    6889-point (83x83) N. Hemisphere polar   91.452 km
  531.                stereographic grid oriented 105W; Pole   at 60N
  532.                at (40.5,88.5). (NGM Original C-Grid)
  533.  
  534.     101    10283-point (113x91) N. Hemisphere    91.452 km
  535.         polar stereographic grid oriented 105W;    at 60N
  536.         Pole at (58.5,92.5). (NGM "Big C-Grid")
  537.  
  538.     103    3640-point (65x56) N. Hemisphere polar    91.452 km
  539.         stereographic grid oriented 105W; Pole    at 60N
  540.         at (25.5,84.5) (used by ARL)
  541.  
  542.     104    16170-point (147x110) N. Hemisphere    90.75464 km
  543.         polar stereographic grid oriented 105W;    at 60N
  544.         pole at (75.5,109.5). (NGM Super C grid)
  545.  
  546.     105    6889-point (83x83) N. Hemisphere polar    90.75464 km
  547.         stereographic grid oriented 105W;    at 60N
  548.         pole at  (40.5,88.5).  (U.S. area
  549.         subset of NGM Super C grid, used 
  550.         by ETA model)
  551.  
  552.     106    19305 point (165x117) N. Hemisphere    45.37732 km
  553.         stereographic grid oriented 105W;    at 60N
  554.         pole at (80,176)
  555.         Hi res. ETA (2 x resolution of Super C)
  556.  
  557.     107    11040 point (120x92) N. Hemisphere    45.37732 km
  558.         stereographic grid oriented 105W;    at 60N
  559.         pole at (46,167)
  560.         subset of Hi res. ETA; for ETA & MAPS/RUC
  561.  
  562.     126    Global Gaussian T126 grid.  See GRIB 
  563.         specifications below
  564.  
  565.     201-nnn    AWIPS grids. See specifications below.
  566.  
  567.     255    (non-standard grid - defined in the GDS)
  568.  
  569. NOTE ON NMC STORAGE GRIDS:
  570.  
  571. On the polar stereographic grids, the vector wind is resolved 
  572. into u and v components with respect to the grid coordinates, 
  573. i.e., u represents motion in the direction of increasing x (i) 
  574. coordinate, v in the direction of increasing y (j).  On the 
  575. latitude-longitude grids, u and v are true eastward and northward 
  576. components, respectively.  However, take note of Table 7, below, 
  577. which allows for the specification of other possibilities.
  578.  
  579. INTERNATIONAL EXCHANGE AND FAMILY OF SERVICES (FOS) GRIDS
  580.  VALUE  RESOLUTION      AREA              GRID          GRID
  581.         (degrees)     COVERAGE            SHAPE        POINTS
  582.         lon x lat     (degrees)        cols  rows
  583.  
  584.  21    5.0 x 2.5   0-180E, 0-90N         37   36 + pole  1333
  585.  22    5.0 x 2.5   180W-0, 0-90N         37   36 + pole  1333
  586.  23    5.0 x 2.5   0-180E, 90S-0  pole + 37   36         1333
  587.  24    5.0 x 2.5   180W-0, 90S-0  pole + 37   36         1333
  588.  25    5.0 x 5.0   0-355E, 0-90N         72   18 + pole  1297
  589.  26    5.0 x 5.0   0-355E, 90S-0  pole + 72   18         1297
  590.  50    2.5 x 1.25             (see note iv)               964
  591.  61    2.0 x 2.0   0-180E, 0-90N         91   45 + pole  4096
  592.  62    2.0 x 2.0   180W-0, 0-90N         91   45 + pole  4096
  593.  63    2.0 x 2.0   0-180E, 90S-0  pole + 91   45         4096
  594.  64    2.0 x 2.0   180W-0, 90S-0  pole + 91   45         4096
  595.  
  596. 255         (non-standard grid - defined in the GDS) 
  597.  
  598. NOTES ON INTERNATIONAL EXCHANGE/FOS GRIDS:
  599.  
  600. (i)    The grid points are laid out in a linear array such 
  601. that the longitude index (the columns) is the most rapidly 
  602. varying.  For the northern hemisphere grids the first point in the 
  603. record is at the intersection of the western-most meridian and 
  604. southern-most circle of latitude; the last point is the single 
  605. polar value (see note iii, below).  For the southern hemisphere 
  606. grids the first point in the record is the single polar value (see 
  607. note iii, below); the last point is at the intersection of the 
  608. eastern-most meridian and northern-most circle of latitude.  For 
  609. those familiar with FORTRAN subscripting conventions, longitude is 
  610. the first subscript, latitude the second.
  611.  (ii)   In grids 21 through 26, and 61 through 64, the values 
  612. on the shared boundaries are included in each area.
  613.  (iii)  The datum for the pole point is given only once in 
  614. each grid.  The user must expand, if desired, the single pole 
  615. point value to all the pole "points" at the pole row of a 
  616. latitude-longitude grid.  Scalar quantity values are the same for 
  617. all pole points on a the grid.  Wind components at the poles are 
  618. given by the formulae:
  619.  
  620. u = -speed * sin(dd)   &   v = -speed * cos(dd)
  621.  
  622. where dd is the direction of the wind as reported according to the
  623. specification of wind direction at the poles (refer to WMO Manual
  624. on Codes <1>, code table 878).
  625.  
  626. The WMO convention can be given this operational definition:  
  627. At the North Pole, face into the wind and report the value of the 
  628. west longitude meridian along which the wind is coming at you; at 
  629. the South Pole do likewise but report the east longitude meridian 
  630. value. This is equivalent to placing the origin of a right-handed 
  631. Cartesian coordinate system on the North Pole with the y-axis 
  632. pointing to the prime (0 degree) meridian and the x-axis pointing 
  633. to the 90 degrees west meridian, and then resolving any vector 
  634. wind at the pole point into components along those axes.  At the 
  635. South Pole the coordinate axes are oriented such that the y-axis 
  636. points toward 180 degrees west.  Those components are the u- and 
  637. v-values given as the single pair of pole point winds in the GRIB 
  638. format.
  639.  
  640. In terms of a longitude/latitude grid these are the wind 
  641. components for the pole point at the 180 degree meridian.  For 
  642. example, on a 2.5x2.5 degree northern hemisphere grid (145x37 
  643. points), with the abscissa along the equator and the ordinate 
  644. along the prime meridian, the transmitted north pole wind 
  645. components are those that belong at the gridpoint (73,37).  The 
  646. wind components at the other grid points along the pole row may be 
  647. obtained through suitable rotation of the coordinate system.  All 
  648. the components at the pole row are, of course, simply 
  649. representations of the same vector wind viewed from differing 
  650. (rotated) coordinate systems.  In the southern hemisphere the 
  651. analogous situation holds; the single set of transmitted pole 
  652. point wind components belong at the gridpoint (73,1).  
  653. (iv)   Grid 50 is a set of points over the contiguous United 
  654. States and environs on a grid extending from 20N (row No. 1) to 
  655. 60N (row  No. 33) in 1.25 degree intervals.  The grid increases in 
  656. longitudinal extent from south to north in the following manner:  
  657.  
  658. ROWS   NO. POINTS   LONGITUDINAL EXTENT
  659.  
  660.  1-4      22          122.5W  - 70.0W
  661.  5-8      24          125.0W  - 67.5W
  662.  9-12     26          127.5W  - 65.0W
  663. 13-16     28          130.0W  - 62.5W
  664. 17-20     30          132.5W  - 60.0W
  665. 21-24     32          135.0W  - 57.5W
  666. 25-28     34          137.5W  - 55.0W
  667. 29-33     36          140.0W  - 52.5W  
  668.  
  669.  
  670. WAFC/ICAO/INTERNATIONAL EXCHANGE/FOS GRIDS
  671.  
  672. (Grids 37 - 44)
  673.  
  674. Global Coverage of Grids
  675.  
  676. Octants of the Globe
  677.  
  678. In the figure the boxes indicate the location of the octants 
  679. of the globe, the numbers are the corresponding grid 
  680. identification numbers (PDS Octet 7), and the letters are the grid 
  681. identification used in the WMO heading (see Appendix A).  
  682. The left and right meridional columns of each octant/grid are 
  683. shared with the neighbors.
  684.  
  685. The basic grid point separation is 1.25x1.25 deg. on a 
  686. latitude / longitude array, but the grid is "thinned" by reducing 
  687. the number of points in each row as one goes northward (or 
  688. southward) away from the equator.  The latitudinal increment is 
  689. always 1.25 deg.; this results in 73 rows where the pole is 
  690. included as a "row", not a single gridpoint.  
  691. The longitudinal spacing at the equator is also 1.25 deg.; 
  692. there will be 73 gridpoints there in each octant.
  693. The number of points on each latitudinal row, other than the 
  694. equator, is given by this formula (using FORTRAN notation):
  695.  
  696. NPOINTS = IFIX(2.0 + (90.0/1.25) * COS(LATITUDE))
  697.  
  698. Thus at the pole there will be two gridpoints, one each at the 
  699. meridians that delineate the edges of the octant.  The formula was 
  700. worked out so that there will be (approximately) equal geographic 
  701. separation between the grid points uniformly across the globe.
  702.  
  703. Because of variations in precision and roundoff error in 
  704. different computers, the value of NPOINTS may vary by 1 at 
  705. "critical" latitudes when calculated on various hardware 
  706. platforms.  Here is a table of the exact values of NPOINTS as a 
  707. function of latitude as used in the internationally exchanged 
  708. grids.  These numbers will, of course, be found in the Grid 
  709. Description Section of each GRIB bulletin.
  710.  
  711.  
  712. Latitude Range    NPOINTS
  713. inclusive
  714. (north or south)
  715.     
  716.      0.00 -  8.75    73
  717.     10.00 - 12.50    72
  718.     13.75 - 16.25    71
  719.     17.50 - 18.75    70
  720.     20.00 - 21.25    69
  721.     22.50    68
  722.     23.75 - 25.00    65
  723.     30.00    64
  724.     31.25    63
  725.     32.50    62
  726.     33.75    61
  727.     35.00 - 36.25    60
  728.     37.50    59
  729.     38.75    58
  730.     40.00    57
  731.     41.25    56
  732.     42.50    55
  733.     43.75    54
  734.     45.00    52
  735.     46.25    51
  736.     47.50    50
  737.     48.75    49
  738.     50.00    48
  739.     51.25    47
  740.     52.50    45
  741.     53.75    44
  742.     
  743.  
  744.  
  745. Latitude Range    NPOINTS
  746. inclusive
  747. (north or south)
  748.  
  749.     55.00    43
  750.     56.25    42
  751.     57.50    40
  752.     58.75    39
  753.     60.00    38
  754.     61.25    36
  755.     62.50    35
  756.     63.75    33
  757.     65.00    32
  758.     66.25    30
  759.     67.50    29
  760.     68.75    28
  761.     70.00    26
  762.     71.25    25
  763.     72.50    23
  764.     73.75    22
  765.     75.00    20
  766.     76.25    19
  767.     77.50    17
  768.     78.75    16
  769.     80.00    14
  770.     81.25    12
  771.     82.50    11
  772.     83.75     9
  773.     85.00     8
  774.     86.25     6
  775.     87.50     5
  776.     88.75     3
  777.     90.00     2
  778.  
  779.  
  780.  
  781.  
  782. When all this is put together the result is that there are 
  783. 3447 points of data actually transmitted in any individual GRIB 
  784. bulletin containing one octant of the globe.
  785.  
  786. In the GRIB bulletins all of this information will be 
  787. included in the Grid Description Section (GDS); the GDS must be 
  788. included in order to describe the thinned or "quasi-regular" grid 
  789. structure. See Section 2 and Table C for the general description 
  790. of the GDS; what follows are the specific values of the variables 
  791. in the GDS that describe these eight grids.
  792.  
  793. GDS Contents
  794.  
  795.     Octets    Value or variable
  796.  
  797.     1-3    178 (length of GDS)
  798.     4    0 (or 255, either indicating no PV)
  799.     5    33 (pointer to start of PL list)
  800.     6    0
  801.     7-32    Grid description - see below
  802.     33-178    number of points in each of 73 rows
  803.         (2 octets per point)
  804.  
  805. Details of Octets 7-32 - Grid Description
  806.     Octets    Variable & Value
  807.  
  808.     7-8    Ni = 73
  809.     9-10    Nj = 73
  810.  
  811.  
  812.  
  813. GRID:
  814. 37
  815. 38
  816. 39
  817. 40
  818. 41
  819. 42
  820. 43
  821. 44
  822.  
  823. 11-13
  824. La1 =
  825. 0
  826. 0
  827. 0
  828. 0
  829. 90S
  830. 90S
  831. 90S
  832. 90S
  833.  
  834. 14-16
  835. Lo1 =
  836. 330
  837. 60
  838. 150
  839. 240
  840. 330
  841. 60
  842. 150
  843. 240
  844.  
  845.  
  846.     17    Resolution & Component Flag = [10000000] (binary)
  847.  
  848.  
  849. GRID:
  850. 37
  851. 38
  852. 39
  853. 40
  854. 41
  855. 42
  856. 43
  857. 44
  858.  
  859. 18-20
  860. La2 =
  861. 90N
  862. 90N
  863. 90N
  864. 90N
  865. 0
  866. 0
  867. 0
  868. 0
  869.  
  870. 21-23
  871. Lo2 =
  872. 60
  873. 150
  874. 240
  875. 330
  876. 60
  877. 150
  878. 240
  879. 330
  880.  
  881.  
  882.     24-25    Di = 1.25 deg
  883.     26-27    Dj = 1.25 deg
  884.     28    Scan Mode = [01000000] (binary)
  885.     29-32    Set to 0 (unused)
  886.  
  887. Note that the scanning direction is from the bottom (south 
  888. edge) to the top of the octant grids, regardless of the 
  889. hemisphere.  Thus in the northern hemisphere the first 73 data 
  890. points (in the BDS) will be the equatorial values and the last two 
  891. will be the polar values.  The PL counts in the GDS octets 33-178 
  892. will, of course, indicate contain these numbers.  
  893. In the southern hemisphere, the first two data points will be 
  894. the south pole values, and the last 73 points will be the 
  895. equatorial values.  Octets 33-34 in the GDS will contain "2", 
  896. octets 35-36 will contain a "3", and so on to octet 177-178 which 
  897. will contain "73".
  898.  
  899.  
  900. SELECTED NMC GRIDS DEFINED USING GRIB SPECIFICATIONS
  901. (See Table C for definition of symbols)
  902.  
  903. VALUE           GRID DESCRIPTIONS
  904.  
  905. 1    Tropical Strip
  906.     (Mercator)
  907.  
  908.     Ni =    73
  909.     Nj =    23
  910.     La1 =     48.09S
  911.     Lo1 =      0.0E
  912.     Res. & Comp. flag =    1 0 0 0 0 0 0 0
  913.     La2 =     48.09N
  914.     Lo2 =      0.0W
  915.     Latin =      22.5
  916.     Scanning Mode (Bits 1 2 3) = 0 1 0
  917.     Di  = Dj =    513.669 km
  918.  
  919. For reference here are the lat/lon values of the corners of the 
  920. grid:
  921.     (1,1)   =     48.09S, 0.00E
  922.     (1,23)  =    48.09N, 0.00E
  923.     (73,23) =     48.09N, 0.00W
  924.     (73,1)  =    48.09S, 0.00W
  925.  
  926. The longitudinal grid spacing is 5.00 degrees.
  927.  
  928.  
  929. 87     U.S. Area; used in MAPS/RUC 
  930.     (60km at 40N)
  931.      (N. Hem. polar stereographic)
  932.  
  933.     Nx =    81
  934.     Ny =    62
  935.     La1 =    22.8756N
  936.     Lo1 =    239.5089E = 120.4911W
  937.     Res. & Comp. flag = 0 0 0 0 1 0 0 0
  938.     Lov =     255.000E = 105.000W
  939.     Dx  = Dy =    68.153 km
  940.     Projection Flag (Bit 1) = 0
  941.     Scanning Mode (Bits 1 2 3) = 0 1 0
  942.     
  943.  
  944. For reference here are the lat/lon values of the corners of the 
  945. grid:
  946.     (1,1)   =     22.8756N, 120.4911W
  947.     (1,62)  =    52,4887N, 136.5458W
  948.     (81,62) =     46.0172N,  60.8284W
  949.     (81,1)  =    20.1284N,  81.2432W
  950.  
  951. The pole point is at     (I,J) =     (31.91,112.53)
  952.  
  953.  
  954.  98           Global Gaussian Latitude/Longitude T62 Resolution
  955.  
  956.     Ni =    192
  957.     Nj =    94
  958.     La1 =     88.542N
  959.     Lo1 =      0.0E
  960.     Res. & Comp. flag =    1 0 0 0 0 0 0 0
  961.     La2 =     88.542S
  962.     Lo2 =    358.125E = 1.875W
  963.     Di =     1.875 degrees
  964.     N  =    47 (number of lat. circles, pole
  965.             to equator)
  966.     Scanning Mode = 00000000(NB:matrix style) 
  967.  
  968. For reference here are the lat/lon values of the corners of the 
  969. grid:
  970.     (1,1)   =     88.542N, 0.0E  (upper left)
  971.     (1,190)  =    88.542S, 0.0E
  972.     (384,190) =     88.542S, 359.0625E
  973.     (384,1)  =    88.542N, 359.0625E
  974.  
  975. -----------------------------------------------------------------
  976.  
  977.  126           Global Gaussian Latitude/Longitude T126 Resolution
  978.  
  979.     Ni =    384
  980.     Nj =    190
  981.     La1 =     89.277N
  982.     Lo1 =      0.0E
  983.     Res. & Comp. flag =    1 0 0 0 0 0 0 0
  984.     La2 =     89.277S
  985.     Lo2 =    359.0625E = 0.9375W
  986.     Di =     0.9375 degrees
  987.     N  =    95 (# of lat circles pole
  988.             to equator)
  989.     Scanning Mode = 00000000(NB:matrix style)
  990.  
  991. For reference here are the lat/lon values of the corners of the 
  992. grid:
  993.     (1,1)   =     89.277N, 0.0E  (upper left)
  994.     (1,190)  =    89.277S, 0.0E
  995.     (384,190) =     89.277S, 359.0625E
  996.     (384,1)  =    89.277N, 359.0625E
  997.  
  998.  
  999. AWIPS-90 STORAGE AND TRANSMISSION GRIDS
  1000.  
  1001. Note: The following grids are intended for use in the U.S. 
  1002. Weather Service's Advanced Weather Information Processing System 
  1003. for the 1990s (AWIPS-90).  Their definition is subject to change 
  1004. as the AWIPS-90 requirements are further refined.
  1005.  
  1006. VALUE                   AWIPS GRID DESCRIPTIONS
  1007.             (See Table C for definition of symbols)
  1008.  
  1009. 201       Hemispheric 
  1010.      (polar stereographic)
  1011.  
  1012.     Nx =    65
  1013.     Ny =    65
  1014.     La1 =    -20.826N = 20.826S
  1015.     Lo1 =    210.000E = 150.000W
  1016.     Res. & Comp. flag =    0 0 0 0 1 0 0 0
  1017.     Lov =     255.000E = 105.000W
  1018.     Dx  = Dy =    381.000 km
  1019.     Projection Flag (Bit 1) = 0
  1020.     Scanning Mode (Bits 1 2 3) = 0 1 0
  1021.     
  1022. The pole point is at     (I,J) =     (33,33)
  1023.  
  1024. Map 201 is the same as NMC storage grid 27, except it is rotated 
  1025. to 105 deg. orientation.
  1026.  
  1027. -----------------------------------------------------------------
  1028.  
  1029. 202    National - CONUS
  1030.     (polar stereographic)
  1031.  
  1032.     Nx =    65
  1033.     Ny =    43
  1034.     La1 =      7.838N
  1035.     Lo1 =    218.972E = 141.028W
  1036.     Res. & Comp. flag =    0 0 0 0 1 0 0 0
  1037.     Lov =     255.000E = 105.000W
  1038.     Dx  = Dy =    190.500 km
  1039.     Projection Flag (Bit 1) = 0
  1040.     Scanning Mode (Bits 1 2 3) = 0 1 0
  1041.  
  1042. For reference here are the lat/lon values of the corners of the 
  1043. grid:
  1044.     (1,1)   =      7.838N, 141.028W
  1045.     (1,43)  =    35.616N, 168.577E
  1046.     (65,43) =     35.617N,  18.576W
  1047.     (65,1)  =     7.838N,  68.973W
  1048.  
  1049. The pole point is at     (I,J) =     (33,45)
  1050.  
  1051.  
  1052. 203    National - Alaska
  1053.     (polar stereographic)
  1054.  
  1055.     Nx =    45
  1056.     Ny =    39
  1057.     La1 =     19.132N
  1058.     Lo1 =    174.163E = 185.837W
  1059.     Res. & Comp. flag =    0 0 0 0 1 0 0 0
  1060.     Lov =     210.000E = 150.000W
  1061.     Dx  = Dy =    190.500 km
  1062.     Projection Flag (Bit 1) = 0
  1063.     Scanning Mode (Bits 1 2 3) = 0 1 0
  1064.  
  1065. For reference here are the lat/lon values of the corners of the 
  1066. grid:
  1067.     (1,1)   =     19.132N, 174.163E
  1068.     (1,39)  =    44.646N, 115.601E
  1069.     (45,39) =     57.634N,  53.660W
  1070.     (45,1)  =    24.361N, 123.434W
  1071.  
  1072. The pole point is at     (I,J) =     (27,37)
  1073.  
  1074. -----------------------------------------------------------------
  1075.  
  1076. 204    National - Hawaii
  1077.     (Mercator)
  1078.  
  1079.     Ni =    93
  1080.     Nj =    68
  1081.     La1 =     25.000S
  1082.     Lo1 =    110.000E
  1083.     Res. & Comp. flag =    1 0 0 0 0 0 0 0
  1084.     La2 =     60.644N
  1085.     Lo2 =    109.129W
  1086.     Latin =      20.000
  1087.     Scanning Mode (Bits 1 2 3) = 0 1 0
  1088.     Di  = Dj =    160.000 km
  1089.  
  1090. For reference here are the lat/lon values of the corners of the 
  1091. grid:
  1092.     (1,1)   =     25.000S, 110.000E
  1093.     (1,68)  =    60.644N, 110.000E
  1094.     (93,68) =     60.644N, 109.129W
  1095.     (93,1)  =    25.000S, 109.129W
  1096.  
  1097. The longitudinal grid spacing is 1.531 degrees.
  1098.  
  1099.  
  1100. 205    National - Puerto Rico
  1101.     (polar stereographic)
  1102.  
  1103.     Nx =     45
  1104.     Ny =     39
  1105.     La1 =      0.616N
  1106.     Lo1 =    275.096E = 84.904W
  1107.     Res. & Comp. flag =    0 0 0 0 1 0 0 0
  1108.     Lov =     300.000E = 60.000W
  1109.     Dx  = Dy =    190.500 km
  1110.     Projection Flag (Bit 1) = 0
  1111.     Scanning Mode (Bits 1 2 3) = 0 1 0
  1112.  
  1113. For reference here are the lat/lon values of the corners of the 
  1114. grid:
  1115.  
  1116.     (1,1)   =      0.616N,  84.904W
  1117.     (1,39)  =    36.257N, 115.304W
  1118.     (45,39) =     45.620N,  15.000W
  1119.     (45,1)  =     3.389N,  42.181W
  1120.  
  1121. The pole point is at     (I,J) =     (27,57)
  1122.  
  1123. -----------------------------------------------------------------
  1124.  
  1125. 206    Regional - Central US MARD 
  1126.     (Lambert Conformal)
  1127.  
  1128.     Nx =    51
  1129.     Ny =    41
  1130.     La1 =     22.289N
  1131.     Lo1 =    242.009E = 117.991W
  1132.     Res. & Comp. flag =    0 0 0 0 1 0 0 0
  1133.     Lov =     265.000E = 95.000W
  1134.     Dx = Dy =     81.2705 km
  1135.     Projection Flag = 0  (not bipolar)
  1136.     Scanning Mode (Bits 1 2 3) = 0 1 0
  1137.     Latin 1 =      25.000N
  1138.     Latin 2 =    25.000N   (tangent cone)
  1139.  
  1140. For reference here are the lat/lon values of the corners of the 
  1141. grid:
  1142.     (1,1)   =     22.289N, 117.991W
  1143.     (1,41)  =    50.081N, 124.898W
  1144.     (51,41) =     50.072N,  73.182W
  1145.     (51,1)  =    23.142N,  78.275W
  1146.  
  1147. The Dx, Dy grid increment (at 25 deg north) was selected so that 
  1148. the grid spacing would be exactly 80.000 km at 35 deg north; the 
  1149. intersection of 35N & 95W falls on point (30,16).
  1150.  
  1151.  
  1152. 207    Regional - Alaska
  1153.     (polar stereographic)
  1154.  
  1155.     Nx =     49
  1156.     Ny =     35
  1157.     La1 =     42.085N
  1158.     Lo1 =    184.359E = 175.641W
  1159.     Res. & Comp. flag =    0 0 0 0 1 0 0 0
  1160.     Lov =     210.000E = 150.000W
  1161.     Dx  = Dy =     95.250 km
  1162.     Projection Flag (Bit 1) = 0
  1163.     Scanning Mode (Bits 1 2 3) = 0 1 0
  1164.  
  1165. For reference here are the lat/lon values of the corners of the 
  1166. grid:
  1167.     (1,1)   =     42.085N, 175.641W
  1168.     (1,35)  =    63.976N, 153.689E
  1169.     (49,35) =     63.976N,  93.689W
  1170.     (49,1)  =    42.085N, 124.359W
  1171.  
  1172. The pole point is at     (I,J) =     (25,51)
  1173.  
  1174. -----------------------------------------------------------------
  1175.  
  1176. 208    Regional - Hawaii
  1177.     (Mercator)
  1178.  
  1179.     Ni =    29
  1180.     Nj =    27
  1181.     La1 =      9.343N
  1182.     Lo1 =    192.685E = 167.315W
  1183.     Res. & Comp. flag =    1 0 0 0 0 0 0 0
  1184.     La2 =     28.092N
  1185.     Lo2 =    145.878W
  1186.     Latin =      20.000
  1187.     Scanning Mode (Bits 1 2 3) = 0 1 0
  1188.     Di  = Dj =     80.000 km
  1189.  
  1190. For reference here are the lat/lon values of the corners of the 
  1191. grid:
  1192.     (1,1)   =      9.343N, 167.315W
  1193.     (1,27)  =    28.092N, 167.315W
  1194.     (29,27) =     28.092N, 145.878W
  1195.     (29,1)  =     9.343N, 145.878W
  1196.  
  1197. The longitudinal grid spacing is 0.766 degrees.  The grid is 
  1198. positioned such that the odd-numbered rows and columns coincide 
  1199. with the National grid, No. 204;  the lower left corner of the 
  1200. regional grid is located at National (204) grid-point (55,24) and 
  1201. the upper right corner is located at (69,37).
  1202.  
  1203.  
  1204. 209    Regional - Central US MARD - Double Res.
  1205.     (Lambert Conformal)
  1206.  
  1207.     Nx =    101
  1208.     Ny =    81
  1209.     La1 =     22.289N
  1210.     Lo1 =    242.00962E = 117.991W
  1211.     Res. & Comp. flag =    0 0 0 0 1 0 0 0
  1212.     Lov =     265.000E =  95.000W
  1213.     Dx = Dy =     40.63525 km
  1214.     Projection Flag =     0 (not bipolar)
  1215.     Scanning Mode (Bits 1 2 3) = 0 1 0
  1216.     Latin 1 =      25.000N
  1217.     Latin 2 =    25.000N   (tangent cone)
  1218.  
  1219. For reference here are the lat/lon values of the corners of the 
  1220. grid:
  1221.     (1,1)    =     22.289N, 117.991W
  1222.     (1,81)   =    50.081N, 124.898W
  1223.     (101,81) =     50.072N,  73.182W
  1224.     (101,1)  =    23.142N,  78.275W
  1225.  
  1226. The Dx, Dy grid increment (at 25 deg north) was selected so that 
  1227. the grid spacing would be exactly 40.000 km at 35 deg north; the 
  1228. intersection of 35N & 95W falls on point (59,31).
  1229.  
  1230. -----------------------------------------------------------------
  1231.  
  1232. 210    Regional - Puerto Rico
  1233.     (Mercator)
  1234.  
  1235.     Ni =    25
  1236.     Nj =    25
  1237.     La1 =      9.000N
  1238.     Lo1 =    283.000E = 77.000W
  1239.     Res. & Comp. flag =    1 0 0 0 0 0 0 0
  1240.     La2 =     26.422N
  1241.     Lo2 =     58.625W
  1242.     Latin =      20.000
  1243.     Di  = Dj =     80.000 km
  1244.     Scanning Mode (Bits 1 2 3) = 0 1 0
  1245.  
  1246. For reference here are the lat/lon values of the corners of the 
  1247. grid:
  1248.     (1,1)   =      9.000N, 77.000W
  1249.     (1,25)  =    26.422N, 77.000W
  1250.     (25,25) =     26.422N, 58.625W
  1251.     (25,1)  =     9.000N, 58.626W
  1252.  
  1253. The longitudinal grid spacing is 0.766 degrees
  1254.  
  1255.  
  1256. 211    Regional - CONUS
  1257.     (Lambert Conformal)
  1258.  
  1259.     Nx =    93
  1260.     Ny =    65
  1261.     La1 =     12.190N
  1262.     Lo1 =    226.541E = 133.459W
  1263.     Res. & Comp. flag =    0 0 0 0 1 0 0 0
  1264.     Lov =     265.000E = 95.000W
  1265.     Dx = Dy =     81.2705 km
  1266.     Projection Flag = 0  (not bipolar)
  1267.     Scanning Mode (Bits 1 2 3) = 0 1 0
  1268.     Latin 1 =      25.000N
  1269.     Latin 2 =    25.000N   (tangent cone)
  1270.  
  1271. For reference here are the lat/lon values of the corners of the 
  1272. grid:
  1273.     (1,1)    =     12.190N, 133.459W
  1274.     (1,65)   =    54.536N, 152.856W
  1275.     (93,65)  =     57.290N,  49.385W
  1276.     (93,1)   =    14.335N,  65.091W
  1277.  
  1278. The Dx, Dy grid increment (at 25 deg north) was selected so that 
  1279. the grid spacing would be exactly 80.000 km at 35 deg north; the 
  1280. intersection of 35N & 95W falls on point (53,25).
  1281.  
  1282. -----------------------------------------------------------------
  1283.  
  1284. 212                   Regional  - CONUS - double resolution
  1285. (Lambert Conformal)
  1286.  
  1287.     Nx =    185
  1288.     Ny =    129
  1289.     La1 =     12.190N
  1290.     Lo1 =    226.514E = 133.459W
  1291.     Res. & Comp. flag =    0 0 0 0 1 0 0 0
  1292.     Lov =     265.000E =  95.000W
  1293.     Dx = Dy =     40.63525 km
  1294.     Projection Flag = 0  (not bipolar)
  1295.     Scanning Mode (Bits 1 2 3) = 0 1 0
  1296.     Latin 1 =      25.000N
  1297.     Latin 2 =    25.000N   (tangent cone)
  1298.  
  1299. For reference here are the lat/lon values of the corners of the 
  1300. grid:
  1301.     (1,1)     =     12.190N, 133.459W
  1302.     (1,129)   =       54.536N, 122.856W
  1303.     (185,129) =     57.290N,  49.385W
  1304.     (185,1)   =        14.335N,  65.091W
  1305.  
  1306. The Dx, Dy grid increment (at 25 deg north) was selected so that 
  1307. the grid spacing would be exactly 40.000 km at 35 deg north; the 
  1308. intersection of 35N & 95W falls on point (105,49).
  1309.  
  1310.  
  1311. 213    National - CONUS - Double Resolution
  1312.     (polar stereographic)
  1313.  
  1314.     Nx =    129
  1315.     Ny =    85
  1316.     La1 =      7.838N
  1317.     Lo1 =    218.972E = 141.028W
  1318.     Res. & Comp. flag =    0 0 0 0 1 0 0 0
  1319.     Lov =     255.000E = 105.000W
  1320.     Dx  = Dy =     95.250 km
  1321.     Projection Flag (Bit 1) = 0
  1322.     Scanning Mode (Bits 1 2 3) = 0 1 0
  1323.  
  1324. For reference here are the lat/lon values of the corners of the 
  1325. grid:
  1326.     (1,1)    =     7.838N, 141.028W
  1327.     (1,85)   =    35.617N, 168.577E
  1328.     (129,85) =    35.617N,  18.577W
  1329.     (129,1)  =     7.838N,  68.973W
  1330.  
  1331. The pole point is at     (I,J) =     (65,89)
  1332.  
  1333. -----------------------------------------------------------------
  1334.  
  1335. 214    Regional - Alaska - Double Resolution
  1336.     (polar stereographic)
  1337.  
  1338.     Nx =     97
  1339.     Ny =     69
  1340.     La1 =     42.085N
  1341.     Lo1 =    184.359E = 175.641W
  1342.     Res. & Comp. flag =    0 0 0 0 1 0 0 0
  1343.     Lov =     210.000E = 150.000W
  1344.     Dx  = Dy =     47.625 km
  1345.     Projection Flag(Bit 1) = 0
  1346.     Scanning Mode (Bits 1 2 3) = 0 1 0
  1347.  
  1348. For reference here are the lat/lon values of the corners of the 
  1349. grid:
  1350.     (1,1) =     42.085N, 175.641W
  1351.  
  1352.  
  1353.     (1,69) =    63.975N, 153.690E
  1354.     (97,69) =     63.975N,  93.689W
  1355.     (97,1) =    42.085N, 124.358W
  1356.  
  1357. The pole point is at     (I,J) =     (49,101)
  1358.  
  1359.  
  1360. TABLE 1.  FLAG FOR GDS OR BMS
  1361.  
  1362. (PDS Octet 8)
  1363.  
  1364. The bit flag indicates the omission or inclusion of the Grid 
  1365. Description and/or Bit Map Sections.
  1366.     BIT    VALUE    MEANING
  1367.     1      0    GDS Omitted
  1368.           1    GDS Included
  1369.  
  1370.     2      0    BMS Omitted
  1371.           1    BMS Included
  1372.  
  1373.     3-8      0    reserved
  1374.  
  1375.  
  1376. TABLE 2.  PARAMETERS & UNITS
  1377. Version 1
  1378. (PDS Octet 9)
  1379.  
  1380. VALUE               PARAMETER                 UNITS
  1381.                
  1382.  
  1383.       000     Reserved
  1384.  
  1385.       001     Pressure                               Pa
  1386.       002     Pressure reduced to MSL                Pa
  1387.       003     Pressure tendency                      Pa/s
  1388.       004
  1389.       005
  1390.       006     Geopotential                          m2/s2
  1391.       007     Geopotential height                    gpm
  1392.       008     Geometric height                       m
  1393.       009
  1394.       010
  1395.  
  1396.       011     Temperature                            deg. K
  1397.       012     Virtual temperature                    deg. K
  1398.       013     Potential temperature                  deg. K
  1399.       014     Pseudo-adiabatic potential temperature deg. K
  1400.       015     Maximum temperature                    deg. K
  1401.       016     Minimum temperature                    deg. K
  1402.       017     Dew point temperature                  deg. K
  1403.       018     Dew point depression (or deficit)      deg. K
  1404.       019     Lapse rate                           deg. K/m
  1405.       020                                                  
  1406.  
  1407.       021     Radar Spectra (1)                    -
  1408.       022     Radar Spectra (2)                    -
  1409.       023     Radar Spectra (3)                    -
  1410.       024 
  1411.       025     Temperature anomaly                    deg. K
  1412.       026        Pressure anomaly                     Pa
  1413.       027        Geopotential height anomaly             gpm
  1414.       028     Wave Spectra (1)                      -
  1415.       029     Wave Spectra (2)                      -
  1416.       030     Wave Spectra (3)                      -
  1417.  
  1418.       031     Wind direction                     deg. true
  1419.       032     Wind speed                             m/s
  1420.       033     u-component of wind                    m/s
  1421.       034     v-component of wind                    m/s
  1422.       035     Stream function                        m2/s
  1423.       036     Velocity potential                     m2/s
  1424.       037     Montgomery stream function             m2/s2
  1425.       038     Sigma coord. vertical velocity          /s
  1426.       039     Pressure Vertical velocity            Pa/s
  1427.       040     Geometric Vertical velocity            m/s
  1428.  
  1429.       041     Absolute vorticity                     /s
  1430.       042     Absolute divergence                    /s
  1431.       043     Relative vorticity                     /s
  1432.       044     Relative divergence                    /s
  1433.       045     Vertical u-component shear             /s
  1434.       046     Vertical v-component shear             /s
  1435.       047     Direction of current                deg. true
  1436.       048     Speed of current                       m/s
  1437.       049     u-component of current                 m/s
  1438.       050     v-component of current                 m/s
  1439.  
  1440.       051     Specific humidity                      kg/kg
  1441.       052     Relative humidity                      %
  1442.       053     Humidity mixing ratio                  kg/kg
  1443.       054     Precipitable water                     kg/m2
  1444.       055     Vapor pressure                         Pa
  1445.       056     Saturation deficit                     Pa
  1446.       057     Evaporation                            kg/m2
  1447.       058
  1448.       059        Precipitation rate                   kg/m2/s
  1449.       060     Thunderstorm probability               %
  1450.  
  1451.       061     Total precipitation                   kg/m2
  1452.       062     Large scale precipitation             kg/m2
  1453.       063     Convective precipitation              kg/m2
  1454.       064     Snowfall rate water equivalent        kg/m2s
  1455.       065     Water equiv. of accum. snow depth     kg/m2
  1456.       066     Snow depth                             m
  1457.       067     Mixed layer depth                      m
  1458.       068     Transient thermocline depth            m
  1459.       069     Main thermocline depth                 m
  1460.       070     Main thermocline anomaly               m
  1461.  
  1462.       071     Total cloud cover                      %
  1463.       072     Convective cloud cover                 %
  1464.       073     Low cloud cover                        %
  1465.       074     Medium cloud cover                     %
  1466.       075     High cloud cover                       %
  1467.       076     Cloud water                            kg/m2
  1468.       077     Condensation pressure of parcel        Pa
  1469.             lifted from indicated surface
  1470.       078
  1471.       079
  1472.       080     Water Temperature                  deg K
  1473.       081     Land-sea mask (1=land; 0=sea)         1/0
  1474.       082     Deviation of sea level from mean       m
  1475.       083     Surface roughness                      m
  1476.       084     Albedo                                 %
  1477.       085     Soil temperature                      deg. K
  1478.       086     Soil moisture content                 kg/m2 
  1479.       087     Vegetation                             %
  1480.       088     Salinity                              kg/kg
  1481.       089     Density                               kg/m3
  1482.       090
  1483.  
  1484.       091     Ice concentration (ice=1; no ice=0)    1/0
  1485.       092     Ice thickness                          m
  1486.       093     Direction of ice drift              deg. true
  1487.       094     Speed of ice drift                     m/s
  1488.       095     u-component of ice drift               m/s
  1489.       096     v-component of ice drift               m/s
  1490.       097     Ice growth rate                        m/s
  1491.       098     Ice divergence                         /s
  1492.       099
  1493.       100     Significant height of combined wind    m
  1494.               waves and swell
  1495.  
  1496.       101     Direction of wind waves             deg. true
  1497.       102     Significant height of wind waves       m
  1498.       103     Mean period of wind waves              s 
  1499.       104     Direction of swell waves            deg. true
  1500.       105     Significant height of swell waves      m
  1501.       106     Mean period of swell waves             s 
  1502.       107     Primary wave direction              deg. true
  1503.       108     Primary wave mean period               s 
  1504.       109     Secondary wave direction            deg. true
  1505.       110     Secondary wave mean period             s 
  1506.  
  1507.       111     Net short-wave radiation (surface)      W/m2
  1508.       112     Net long wave radiation (surface)       W/m2
  1509.       113     Net short-wave radiation (top of atmos.)W/m2
  1510.       114     Net long wave radiation (top of atmos.) W/m2
  1511.       115     Long wave radiation                    W/m2
  1512.       116     Short wave radiation                   W/m2
  1513.       117     Global radiation                       W/m2
  1514.       118      
  1515.       119      
  1516.       120      
  1517.  
  1518.       121     Latent heat flux                       W/m2
  1519.       122     Sensible heat flux                     W/m2
  1520.       123     Boundary layer dissipation             W/m2
  1521.       124
  1522.       125
  1523.       126
  1524.       127        Image data
  1525.  
  1526.      
  1527.  
  1528.  
  1529.     (128 - 254  Reserved for use by originating center) 
  1530.  
  1531.                 NWS/NMC usage as follows...
  1532.  
  1533.     128    Mean Sea Level Pressure (MSLSA)    Pa
  1534.         (Standard Atmosphere Reduction)
  1535.     129    Mean Sea Level Pressure (MSLMA)    Pa
  1536.         (MAPS System Reduction)
  1537.     130    Mean Sea Level Pressure  (MSLET)    Pa
  1538.         (ETA Model Reduction)
  1539.     131    Surface lifted index    Deg. K
  1540.     132    Best (4 layer) lifted index    Deg. K
  1541.     133    K index    Deg. K
  1542.     134    Sweat index    Deg. K
  1543.     135    Horizontal moisture divergence    kg/kg/s
  1544.     136    Vertical speed shear    /s
  1545.     137    Visibility    m
  1546.  
  1547.     150    Covariance between meridional    m2/s2
  1548.         and zonal components of the wind.
  1549.         Defined as [uv]-[u][v], where
  1550.         "[]" indicates the mean over the
  1551.         indicated time span.
  1552.  
  1553.     151    Covariance between temperature    K*m/s
  1554.         and zonal component of the wind.
  1555.         Defined as [uT]-[u][T], where
  1556.         "[]" indicates the mean over the
  1557.         indicated time span.
  1558.  
  1559.     152    Covariance between temperature    K*m/s
  1560.         and meridional component of the
  1561.         wind.  Defined as [vT]-[v][T], 
  1562.         where "[]" indicates the mean 
  1563.         over the indicated time span.
  1564.  
  1565.     157    Convective Available Potential Energy    J/kg
  1566.     158    Turbulent Kinetic Energy    J/kg
  1567.     
  1568.     176    latitude (-90 to +90) (NLAT)    deg
  1569.     177    east longitude (0-360)(ELON)    deg
  1570.  
  1571.     201    Ice-free water surface    %
  1572.     204    downward short wave rad. flux (DSWRF)    W/m**2
  1573.     205    downward long wave rad. flux (DLWRF)    W/m**2
  1574.     207    Moisture availability    %
  1575.     208    Exchange coefficient                (kg/m3)(m/s)
  1576.     209    No. of mixed layers next to surface    integer
  1577.     211    upward short wave rad. flux (USWRF)    W/m**2
  1578.     212    upward long wave rad. flux (ULWRF)    W/m**2
  1579.     213    Amount of non-convective cloud    %
  1580.     216    Temperature tendency by all radiation    Deg.K/s
  1581.     218    precip.index(0.0-1.00)(see note)(PREIX) fraction
  1582.     220    Natural log of surface pressure    ln(kPa)
  1583.     222    5-wave geopotential height    gpm
  1584.  
  1585.     255    Missing
  1586.  
  1587.  
  1588. Notes:
  1589.  
  1590. 1)    By convention, downward fluxes of radiation or 
  1591. other quantities are assigned negative values; 
  1592. upward fluxes of radiation or other quantities 
  1593. are assigned positive values.
  1594. 2)    The u and v components of vector quantities are 
  1595. defined with reference to GDS Octet 17 and 
  1596. Table 7.
  1597. 3)    provision is made for three types of spectra:
  1598.  
  1599. 1)    Direction and Frequency
  1600. 2)    Direction and radial number
  1601. 3)    Radial number and radial number
  1602. 4) Precipitation index (#218) defined as the fraction 
  1603. of satellite observed pixels with temperatures 
  1604. <235K over 1.0x1.0 box, centered at the 
  1605. gridpoint.
  1606.  
  1607.  
  1608.  
  1609.  
  1610. TABLE 3.  TYPE AND VALUE OF LEVEL
  1611. (PDS Octets 10, 11, & 12)
  1612.  
  1613.        Octet Number 10            Number 11        Number 12
  1614.  
  1615.   VALUE       MEANING                      CONTENTS
  1616.  
  1617.  
  1618. |---------------------------+-----------------+----------------|
  1619. | 0 - 99  special codes,    |        0        |       0        |
  1620. |         see Table 3a      |                 |                |
  1621. |---------------------------+-----------------+----------------|
  1622. | 100     isobaric level    |  pressure in hectoPascals (hPa)  |
  1623. |                           |            (2 octets)            |
  1624. |---------------------------+-----------------+----------------|
  1625. | 101     layer between two |  pressure of    |  pressure of   |
  1626. |         isobaric levels   |  top (kPa)      |  bottom (kPa)  |
  1627. |---------------------------+-----------------+----------------|
  1628. | 102     mean sea level    |        0        |       0        |
  1629. |---------------------------+-----------------+----------------|
  1630. | 103     fixed height level|   height above mean sea level    |
  1631. |                           |        (MSL) in meters           |
  1632. |---------------------------+-----------------+----------------|
  1633. | 104     layer between two |  height of top  |  height of     |
  1634. |           height levels   |     (hm)        |  bottom (hm)   |
  1635. |            above msl      |                 |                |
  1636. |---------------------------+-----------------+----------------|
  1637. | 105     fixed height above|         height in meters         |
  1638. |           ground          |            (2 octets)            |
  1639. |---------------------------+-----------------+----------------|
  1640. | 106     layer between two |  height of top  |  height of     |
  1641. |           height levels   |      (hm)       |  bottom (hm)   |
  1642. |           above ground    |                 |                |
  1643. |---------------------------+-----------------+----------------|
  1644. | 107     sigma level       |     sigma value in 1/10000       |
  1645. |                           |            (2 octets)            |
  1646. |---------------------------+-----------------+----------------|
  1647. | 108     layer between two |  sigma value at |  sigma value   |
  1648. |           sigma levels    |       top       |  at bottom     |
  1649. |                           |     in 1/100    |   in 1/100     |
  1650. |---------------------------+-----------------+----------------|
  1651. | 109     Hybrid level      |           level number           |
  1652. |                           |            (2 octets)            |
  1653. |---------------------------+-----------------+----------------|
  1654. | 110     layer between two | level number of | level number   |
  1655. |           hybrid levels   |       top       |  of bottom     |
  1656. |---------------------------+-----------------+----------------|
  1657. | 111     depth below       |            centimeters           |
  1658. |         land surface      |             (2 octets)           |
  1659. |---------------------------+-----------------+----------------|
  1660. | 112     layer between two |  depth of upper | depth of lower |
  1661. |         depths below      |    surface (cm) |   surface (cm) |
  1662. |         land surface      |                 |                |
  1663. |---------------------------+-----------------+----------------|
  1664.  
  1665.  
  1666. |---------------------------+-----------------+----------------|
  1667. | 113     isentropic        |     Potential Temp. degrees K    |
  1668. |         (theta) level     |             (2 octets)           |
  1669. |---------------------------+-----------------+----------------|
  1670. | 114     layer between two |    475K minus   |  475K minus    |
  1671. |         isentropic        |   theta of top  |theta of bottom |
  1672. |         levels            |    in Deg. K    |   in deg. K    |
  1673. |---------------------------+-----------------+----------------|
  1674. | 121     layer between two |  1100 hPa minus | 1100 hPa minus |
  1675. |         isobaric surfaces |  pressure of    | pressure of    |
  1676. |         (high precision)  |  top, in hPa    | bottom, in hPa |
  1677. |---------------------------+-----------------+----------------|
  1678. | 128     layer between two |  1.1 minus sigma| 1.1 minus sigma|
  1679. |         sigma levels      |  of top, in     | of bottom, in  |
  1680. |         (high precision)  |  1/1000 of sigma| 1/1000 of sigma|
  1681. |---------------------------+-----------------+----------------|
  1682. | 141     layer between two |  pressure of    | 1100hPa minus  |
  1683. |         isobaric surfaces |  top, in kPa    | pressure of    |
  1684. |         (mixed precision) |                 | bottom, in hPa |
  1685. |---------------------------+-----------------+----------------|
  1686. | 160     depth below       |               meters             |
  1687. |         sea level         |             (2 octets)           |
  1688. |---------------------------+-----------------+----------------|
  1689.  
  1690. Note: The numbering allows for additions within this framework:
  1691.  
  1692. 100-119    normal precision
  1693. 120-139    high precision
  1694. 140-159    mixed precision
  1695.  
  1696.  
  1697.  
  1698. TABLE 3a.   SPECIAL LEVELS
  1699. (PDS Octet 10)
  1700.  
  1701. VALUE               LEVEL
  1702.  
  1703. 01                surface (of the Earth, which
  1704.             includes sea surface)
  1705. 02                cloud base level
  1706. 03                cloud top level
  1707. 04                0 deg (C) isotherm level
  1708. 05                adiabatic condensation level
  1709.               (lifted from boundary layer)
  1710. 06                maximum wind speed level
  1711. 07                tropopause level
  1712. 08-99             reserved
  1713.  
  1714.  
  1715. TABLE 4.  FORECAST TIME UNIT
  1716. (PDS Octet 18)
  1717.  
  1718.  
  1719.     VALUE            TIME UNIT
  1720.  
  1721.     0            minute
  1722.     1            hour
  1723.     2            day
  1724.     3            month
  1725.     4            year
  1726.     5            decade
  1727.     6            normal (30 years)
  1728.     7            century
  1729.     8-253            reserved
  1730.     254            second
  1731.  
  1732. TABLE 5. 
  1733. TIME RANGE INDICATOR
  1734. (PDS Octet 21)
  1735.  
  1736.          VALUE            MEANING
  1737.  
  1738.  
  1739.  
  1740.     0    Forecast product valid 
  1741.         at reference time + P1 (P1>0), 
  1742.         or
  1743.         Uninitialized analysis product 
  1744.         for reference time (P1=0).
  1745.         or
  1746.         Image product 
  1747.         for reference time (P1=0)
  1748.  
  1749.     1    Initialized analysis product
  1750.         for reference time (P1=0).
  1751.  
  1752.     2    Product with a valid time ranging      
  1753.             between reference time + P1 and
  1754.         reference time + P2
  1755.  
  1756.     3    Average
  1757.         (reference time + P1 to
  1758.         reference time + P2)
  1759.  
  1760.     4    Accumulation 
  1761.         (reference time + P1 to
  1762.         reference time + P2)
  1763.         product considered valid at 
  1764.         reference time + P2
  1765.  
  1766.     5    Difference
  1767.         (reference time + P2 minus
  1768.         reference time + P1)
  1769.         product considered valid at 
  1770.         reference time + P2
  1771.  
  1772.     6-9    reserved
  1773.  
  1774.     10    P1 occupies octets 19 and 20;
  1775.         product valid at reference time + P1
  1776.  
  1777.     11-112    reserved
  1778.  
  1779.     113    Average of N forecasts (or initialized
  1780.         analyses); each product has forecast
  1781.         period of P1 (P1=0 for initialized
  1782.         analyses); products have reference
  1783.         times at intervals of P2, beginning at
  1784.         the given reference time.
  1785.  
  1786.     114    Accumulation of N forecasts (or
  1787.         initialized analyses); each product
  1788.         has forecast period of P1 (P1=0 for
  1789.         initialized    analyses); products have
  1790.         reference times at intervals of P2,
  1791.         beginning at the given reference time.
  1792.  
  1793.     115    Average of N forecasts, all with the
  1794.         same reference time; the first has a
  1795.         forecast period of P1, the remaining
  1796.         forecasts follow at intervals of P2.
  1797.  
  1798.     116    Accumulation of N forecasts, all with
  1799.         the same reference time; the first has
  1800.         a    forecast period of P1, the remaining
  1801.         follow at intervals of P2.
  1802.  
  1803.     117    Average of N forecasts, the first has 
  1804.         a period of P1, the subsequent ones 
  1805.         have forecast periods reduced from the 
  1806.         previous one by an interval of P2; the 
  1807.         reference time for the first is given 
  1808.         in octets 13-17, the subsequent ones 
  1809.         have reference times increased from 
  1810.         the previous one by an interval of P2.  
  1811.         Thus all the forecasts have the same 
  1812.         valid time, given by the initial 
  1813.         reference time + P1.
  1814.  
  1815.     118    Temporal variance, or covariance, of N 
  1816.         initialized analyses; each product has 
  1817.         forecast period P1=0; products have 
  1818.         reference times at intervals of P2, 
  1819.         beginning at the given reference time.
  1820.  
  1821.     119 -122    reserved
  1822.  
  1823.     123    Average of N uninitialized    analyses,
  1824.         starting at the reference time,
  1825.         at intervals of P2.
  1826.  
  1827.     124    Accumulation of N uninitialized
  1828.         analyses, starting at the reference
  1829.         time, at intervals of P2.
  1830.  
  1831.  
  1832.     125-254    reserved
  1833.  
  1834.  
  1835. NOTES:
  1836.  
  1837. 1)    For analysis products, or the first of a series of analysis 
  1838. products, the reference time (octets 13 to 17) indicates the 
  1839. valid time.
  1840. 2)    For forecast products, or the first of a series of forecast 
  1841. products, the reference time indicates the valid time of the 
  1842. analysis upon which the (first) forecast is based.
  1843. 3)    Initialized analysis products are allocated numbers distinct 
  1844. from those allocated to uninitialized analysis products.
  1845. 4)    A value of 10 allows the period of a forecast to be extended 
  1846. over two octets; this is to assist with extended range 
  1847. forecasts.
  1848. 5)    Where products or a series of products are averaged or 
  1849. accumulated, the number involved is to be represented in 
  1850. octets 22-23 of Section 1, while any number missing is to be 
  1851. represented in octet 24.
  1852. 6)    Forecasts of the accumulation or difference of some quantity 
  1853. (e.g. quantitative precipitation forecasts), indicated by 
  1854. values of 4 or 5 in octet 21, have a product valid time given 
  1855. by the reference time + P2; the period of accumulation, or 
  1856. difference, can be calculated as P2 - P1.
  1857.  
  1858.  
  1859. A few examples may help to clarify the use of Table 5:  
  1860. For analysis products P1 is zero and the time range indicator 
  1861. is also zero; for initialized products (sometimes called "zero hour 
  1862. forecasts") P1 is zero, but octet 21 is set to 1. 
  1863. For forecasts, typically, P1 contains the number of hours of 
  1864. the forecast (the unit indicator given in octet 18 would be 1) and 
  1865. octet 21 contains a zero. 
  1866. Value 115 would be used, typically, for multiple day mean 
  1867. forecasts, all derived from the same initial conditions.
  1868. Value 117 would be used, typically, for Monte Carlo type 
  1869. calculations: many forecasts valid at the same time from different 
  1870. initial (reference) times.
  1871.  
  1872. Averages, accumulations, and differences get a somewhat 
  1873. specialized treatment.  If octet 21 (Table 5) has a value between 2 
  1874. and 5 (inclusive) then the reference time + P1 is the initial 
  1875. date/time and the reference time + P2 is the final date/time of the 
  1876. period over which averaging or accumulation takes place.  If, 
  1877. however, octet 21 has a value of 113, 114, 115, 116, 117, 118, 123, 
  1878. or 124 then P2 specifies the time interval between each of the 
  1879. fields (or the forecast initial times) that have been averaged or 
  1880. accumulated.  These latter values of octet 21 require the 
  1881. quantities averaged to be equally separated in time; the former 
  1882. values, 3 and 4 in particular, allow for irregular or unspecified 
  1883. intervals of time between the fields that are averaged or 
  1884. accumulated.
  1885.  
  1886.  
  1887. SECTION 2: GRID DESCRIPTION SECTION (GDS)
  1888.  
  1889. The purpose of the (optional) GDS is to provide a grid 
  1890. description for grids not defined by number in Table 3.
  1891.  
  1892. Octet no.                    GDS Content
  1893.  
  1894.  1 - 3  Length in octets of the Grid Description Section
  1895.  4    NV, the number of vertical coordinate parameters
  1896.  5    PV, the location (octet number) of the list of
  1897.     vertical coordinate parameters, if present
  1898.     or
  1899.     PL, the location (octet number) of the list of
  1900.     numbers of points in each row (when no vertical
  1901.     parameters are present), if present
  1902.     or
  1903.     255 (all bits set to 1) if neither are present
  1904.  6    Data representation type (See Table 6)
  1905.  7 - 32 Grid description, according to data
  1906.     representation type, except Lambert or Mercator.
  1907. or
  1908.  7 - 42    Grid description for Lambert or Mercator grid
  1909. PV    List of vertical coordinate parameters
  1910.     (length = NV x 4 octets);
  1911.     if present, then PL = 4 x NV + PV
  1912. PL    List of numbers of points in each row, used for
  1913.     quasi-regular grids
  1914.     (length = NROWS x 2 octets, where NROWS is the
  1915.     total number of rows defined within the grid
  1916.     description)
  1917.  
  1918. Note:     NV and PV relate to "advanced" features of GRIB not, 
  1919. at present, in use in the National Weather Service.  
  1920. See the WMO Manual on Codes<1> for the descriptions 
  1921. of those features.
  1922.  
  1923. PL is used for "quasi-regular" or "thinned" grids; 
  1924. e.g., a lat/lon grid where the number of points in 
  1925. each row is reduced as one moves poleward from the 
  1926. equator.  The reduction usually follows some 
  1927. mathematical formula involving the cosine of the 
  1928. latitude, to generate an (approximately) equally 
  1929. spaced grid array.  The association of the numbers 
  1930. in octet PL (and following) with the particular row 
  1931. follows the scanning mode specification in Table 8.
  1932.  
  1933.  
  1934. TABLE 6.  TABLES FOR THE GDS DATA REPRESENTATION TYPE
  1935. (GDS Octet 6)
  1936.  
  1937.      VALUE    MEANING
  1938.     
  1939.     0    Latitude/Longitude Grid
  1940.         also called Equidistant Cylindrical
  1941.         or Plate Carree projection grid
  1942.     1    Mercator Projection Grid
  1943.     2    Gnomonic Projection Grid
  1944.     3    Lambert Conformal, secant or
  1945.         tangent, conical or bipolar 
  1946.         (normal or oblique) Projection Grid
  1947.     4    Gaussian Latitude/Longitude Grid
  1948.     5    Polar Stereographic Projection Grid
  1949.  
  1950.     6 - 12    (reserved - see Manual on Codes)
  1951.  
  1952.     13    Oblique Lambert conformal, secant or
  1953.         tangent, conical or bipolar,
  1954.         projection
  1955.  
  1956.     14 - 49    (reserved - see Manual on Codes)
  1957.  
  1958.     50    Spherical Harmonic Coefficients
  1959.  
  1960.     51 - 89    (reserved - see Manual on Codes)
  1961.  
  1962.     90    Space view perspective or
  1963.         orthographic grid
  1964.  
  1965.     91 - 254    (reserved - see Manual on Codes)
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971. TABLE C. Sundry Grid Definitions
  1972.  
  1973.  
  1974.  
  1975.  
  1976. LATITUDE/LONGITUDE GRIDS
  1977. INCLUDING GAUSSIAN
  1978. (GDS Octets 7 - 32)
  1979.  
  1980.     OCTET NO.    CONTENT & MEANING
  1981.  
  1982.  7 -  8    Ni - No. of points along a latitude circle
  1983.  
  1984.     9 - 10    Nj - No. of points along a longitude meridian
  1985.  
  1986.     11 - 13    La1 - latitude of first grid point
  1987.         units: millidegrees (degrees x 1000)
  1988.         values limited to range 0 - 90,000 
  1989.         bit 1 (leftmost) set to 1 for south latitude
  1990.  
  1991.     14 - 16    Lo1 - longitude of first grid point
  1992.         units: millidegrees (degrees x 1000)
  1993.         values limited to range 0 - 360,000 
  1994.         bit 1 (leftmost) set to 1 for west longitude
  1995.  
  1996.     17    Resolution and component flags (Table 7)
  1997.         
  1998.     18 - 20    La2 - Latitude of last grid point
  1999.         (same units, value range, and bit 1 as La1)
  2000.  
  2001.     21 - 23    Lo2 - Longitude of last grid point
  2002.         (same units, value range, and bit 1 as Lo1)
  2003.  
  2004.     24 - 25    Di - Longitudinal Direction Increment 
  2005.         (same units as Lo1)
  2006.         (if not given, all bits set = 1)
  2007.  
  2008.      26 - 27    Regular Lat/Lon Grid:
  2009.             Dj - Latitudinal Direction Increment
  2010.             (same units as La1)
  2011.             (if not given, all bits set = 1)
  2012.             or
  2013.             Gaussian Grid:
  2014.             N - number of latitude circles between
  2015.                 a pole and the equator
  2016.             Mandatory if Gaussian Grid specified 
  2017.  
  2018.      28    Scanning mode flags  (See Table 8)
  2019.  
  2020.      29 - 32    Reserved (set to zero)
  2021.  
  2022. Note: The latitude and longitude of the first and last grid points 
  2023. should always be given, for regular grids.
  2024.  
  2025.  
  2026.  
  2027. POLAR STEREOGRAPHIC GRIDS
  2028. (GDS Octets 7 - 32)
  2029.  
  2030.     OCTET NO.    CONTENT & MEANING
  2031.  
  2032.      7 -  8    Nx - Number of points along x-axis
  2033.      9 - 10    Ny - Number of points along y-axis
  2034.     11 - 13    La1 - Latitude of first grid point
  2035.     14 - 16    Lo1 - Longitude of first grid point
  2036.          17    Resolution and component flags (see Table 7)
  2037.     18 - 20    Lov - The orientation of the grid; 
  2038.         i.e., the east longitude value of the
  2039.         meridian which is parallel to the 
  2040.         y-axis (or columns of the grid) along
  2041.         which latitude increases as the 
  2042.         y-coordinate increases. (Note: The
  2043.         orientation longitude may, or may not,
  2044.         appear within a particular grid.)
  2045.     21 - 23    Dx - the X-direction grid length 
  2046.               (see Note 2)
  2047.     24 - 26    Dy - the Y-direction grid length 
  2048.               (see note 2)
  2049.          27    Projection center flag  (see note 5)
  2050.          28    Scanning mode           (see Table 8)
  2051.     29 - 32    Set to 0 (reserved)
  2052.  
  2053. NOTES:
  2054. 1.    Latitude and longitude are in millidegrees (thousandths)
  2055. 2.    Grid lengths are in units of meters, at the 60 degree 
  2056. latitude circle nearest to the pole in the projection plane.
  2057. 3.    Latitude values are limited to the range 0 - 90,000.  Bit 1 
  2058. is set to 1 to indicate south latitude.
  2059. 4.    Longitude values are limited to the range 0 - 360,000.  Bit 
  2060. one is set to 1 to indicate west longitude.
  2061. 5.    Octet 27:
  2062. Bit 1 set to 0 if the North pole is on the projection plane.
  2063. Bit 1 set to 1 if the South pole is on the projection plane.
  2064. 6.    The first and last grid points may not necessarily be the 
  2065. same as the first and last data points if the bit map section 
  2066. (BMS) is used.
  2067. 7.    The resolution flag (bit 1 of Table 7) is not applicable.
  2068.  
  2069.  
  2070.  
  2071.  LAMBERT CONFORMAL SECANT OR TANGENT CONE GRIDS
  2072. (GDS Octets 7 - 42)
  2073.  
  2074.     OCTET NO.    CONTENT & MEANING
  2075.  
  2076.      7 -  8    Nx - Number of points along x-axis
  2077.      9 - 10    Ny - Number of points along y-axis
  2078.     11 - 13    La1 - Latitude of first grid point
  2079.     14 - 16    Lo1 - Longitude of first grid point
  2080.          17    Resolution and component flags (see Table 7)
  2081.     18 - 20    Lov - The orientation of the grid; 
  2082.         i.e., the east longitude value of the
  2083.         meridian which is parallel to the 
  2084.         y-axis (or columns of the grid) along
  2085.         which latitude increases as the 
  2086.         y-coordinate increases. (Note: The
  2087.         orientation longitude may, or may not,
  2088.         appear within a particular grid.)
  2089.     21 - 23    Dx - the X-direction grid length 
  2090.               (see note 2)
  2091.     24 - 26    Dy - the Y-direction grid length 
  2092.               (see Note 2)
  2093.          27    Projection center flag   (see note 5)
  2094.          28    Scanning mode            (see Table 8)
  2095.     29 - 31    Latin 1 - The first latitude from the pole
  2096.         at which the secant cone cuts the spherical
  2097.         earth.       (See Note 8)
  2098.     32 - 34    Latin 2 - The second latitude from the pole
  2099.         at which the secant cone cuts the spherical
  2100.         earth.       (See Note 8)
  2101.     35 - 37    Latitude of southern pole (millidegrees)
  2102.     38 - 40    Longitude of southern pole (millidegrees)
  2103.     41 - 42    Reserved (set to 0)
  2104.  
  2105. NOTES:
  2106. 1.    Latitude and longitude are in millidegrees (thousandths)
  2107. 2.    Grid lengths are in units of meters, at the intersection 
  2108. latitude circle nearest to the pole in the projection plane.
  2109. 3.    Latitude values are limited to the range 0 - 90,000.  Bit 1 
  2110. is set to 1 to indicate south latitude.
  2111. 4.    Longitude values are limited to the range 0 - 360,000.  Bit 
  2112. one is set to 1 to indicate west longitude.
  2113. 5.    Octet 27:
  2114. Bit 1 set to 0 if the North pole is on the projection plane.
  2115. Bit 1 set to 1 if the South pole is on the projection plane.
  2116. Bit 2 set to 0 if only one projection center used
  2117. Bit 2 set to 1 if projection is bipolar and symmetric
  2118. 6.    The first and last grid points may not necessarily be the 
  2119. same as the first and last data points if the bit map section 
  2120. (BMS) is used.
  2121. 7.    The resolution flag (bit 1 of Table 7) is not applicable.
  2122. 8.    If Latin 1 = Latin 2 then the projection is on a tangent 
  2123. cone.
  2124.  
  2125. MERCATOR GRIDS
  2126. (GDS Octets 7 - 42)
  2127.  
  2128.     OCTET NO.    CONTENT & MEANING
  2129.  
  2130.      7 -  8    Ni - Number of points along a
  2131.               latitude circle
  2132.      9 - 10    Nj - Number of points along a
  2133.               longitude meridian
  2134.     11 - 13    La1 - Latitude of first grid point
  2135.     14 - 16    Lo1 - Longitude of first grid point
  2136.          17    Resolution and component flags (see Table 7)
  2137.     18 - 20    La2 - latitude of last grid point
  2138.     21 - 23    Lo2 - longitude of last grid point
  2139.     24 - 26    Latin - The latitude(s) at which the 
  2140.                 Mercator projection cylinder
  2141.                 intersects the earth.  
  2142.          27    Reserved (set to 0)
  2143.          28    Scanning mode (see Table 8)
  2144.     29 - 31    Di - the longitudinal direction increment 
  2145.               (see Note 2)
  2146.     32 - 34    Dj - the latitudinal direction increment 
  2147.               (see note 2)
  2148.     35 - 42    Reserved (set to 0)
  2149.  
  2150. NOTES:
  2151. 1.    Latitude and longitude are in millidegrees (thousandths)
  2152. 2.    Grid lengths are in units of meters, at the circle of 
  2153. latitude specified by Latin. 
  2154. 3.    Latitude values are limited to the range 0 - 90,000.  Bit 1 
  2155. is set to 1 to indicate south latitude.
  2156. 4.    Longitude values are limited to the range 0 - 360,000.  Bit 
  2157. one is set to 1 to indicate west longitude.
  2158. 5.    The latitude and longitude of the last grid point should 
  2159. always be given.
  2160. 6.    The first and last grid points may not necessarily be the 
  2161. same as the first and last data points if the bit map section 
  2162. (BMS) is used.
  2163.  
  2164.  
  2165.  
  2166. SPHERICAL HARMONIC COEFFICIENTS
  2167. (GDS Octets 7 - 32)
  2168.  
  2169.     OCTET NO.    CONTENT & MEANING
  2170.  
  2171.      7 -  8    J - Pentagonal Resolution Parameter
  2172.  
  2173.      9 - 10    K - Pentagonal Resolution Parameter
  2174.  
  2175.     11 - 12    M - Pentagonal Resolution Parameter
  2176.  
  2177.     13    Representation Type (See Table 9)
  2178.  
  2179.     14    Coefficient Storage Mode (See Table 10)
  2180.  
  2181.     15 - 32    Set to zero (reserved)
  2182.  
  2183.  
  2184.  
  2185.  
  2186. TABLE 7 - RESOLUTION AND COMPONENT FLAGS
  2187. (GDS Octet 17)
  2188.  
  2189.     Bit    Value    Meaning
  2190.  
  2191.     1    0    Direction increments not given
  2192.         1    Direction increments given
  2193.  
  2194.     2    0    Earth assumed spherical with
  2195.             radius = 6367.47 km
  2196.         1    Earth assumed oblate spheroid with size
  2197.             as determined by IAU in 1965: 
  2198.             6378.160 km, 6356.775 km, f = 1/297.0
  2199.  
  2200.     3-4        reserved (set to 0)
  2201.  
  2202.     5    0    u- and v-components of vector quantities
  2203.             resolved relative to easterly and
  2204.             northerly directions
  2205.         1    u and v components of vector quantities
  2206.             resolved relative to the defined grid in
  2207.             the direction of increasing x and y 
  2208.             (or i and j) coordinates    respectively
  2209.  
  2210.     6-8        reserved (set to 0)
  2211.  
  2212.  
  2213.  
  2214.  
  2215. TABLE 8.  SCANNING MODE FLAG
  2216. (GDS Octet 28)
  2217.  
  2218.     BIT    VALUE            MEANING
  2219.  
  2220.     1    0    Points scan in +i direction
  2221.         1    Points scan in -i direction
  2222.  
  2223.     2    0    Points scan in -j direction
  2224.         1    Points scan in +j direction
  2225.  
  2226.     3    0    Adjacent points in i direction are consecutive
  2227.               (FORTRAN: (I,J))
  2228.         1       Adjacent points in j direction are consecutive
  2229.               (FORTRAN: (J,I))
  2230.  
  2231. Note:     i direction is defined as west to east along a parallel 
  2232. of latitude, or left to right along an x axis.
  2233.  
  2234. j direction is defined as south to north along a 
  2235. meridian of longitude, or bottom to top along a y axis.
  2236.  
  2237.  
  2238. TABLE 9. SPECTRAL REPRESENTATION TYPE
  2239. (GDS Octet 13)
  2240.  
  2241.         VALUE           MEANING
  2242.  
  2243.     1    Associated Legendre Polynomials
  2244.         of the First Kind with normalization 
  2245.         such that the integral equals 1
  2246.  
  2247.  
  2248.  
  2249. TABLE 10. COEFFICIENT STORAGE MODE
  2250. (GDS Octet 14)
  2251.  
  2252.         VALUE             MEANING
  2253.  
  2254.           1     The complex coefficients Xnm are stored for   
  2255.         m > 0 as pairs of real numbers Re(Xnm), 
  2256.         Im(Xnm) ordered with n increasing from m to 
  2257.         N(m), first for m = 0 and then for m = 1, 2, 
  2258.         3,...M.  The real part of the (0,0) 
  2259.         coefficient is stored in octets 12-15 of the 
  2260.         BDS, as a floating point number in the same 
  2261.         manner as the packing reference value, with 
  2262.         units as in Table 2.  The remaining 
  2263.         coefficients, starting with the imaginary part 
  2264.         of the (0,0) coefficient, are packed according 
  2265.         to the GRIB packing algorithm, with units as 
  2266.         given in Table 5, in octets 16 and onward in 
  2267.         the BDS.
  2268.  
  2269.  
  2270. NOTES ON SPECTRAL TRUNCATION:
  2271.  
  2272. Using the associated Legendre Polynomials of the First Kind, 
  2273. Pnm, as typical expansion functions, any variable x(*,*), which is 
  2274. a function of longitude, * , and sin(latitude), * , can be 
  2275. represented by
  2276.  
  2277. In the summations, M is the maximum zonal wave number that is 
  2278. to be included, and K & J together define the maximum meridional 
  2279. total wave number N(m), which, it should be noted, is a function 
  2280. of m.  A sketch shows the relationships:
  2281.              
  2282.  
  2283. In this figure, the ordinate is n the zonal wave number, the 
  2284. abscissa, m, is the total meridional wave number, the vertical 
  2285. line at m = M is the zonal truncation, and the diagonal passing 
  2286. through (0,0) is the line n = m.  The Legendre Polynomials are 
  2287. defined only on or above this line, that is for n > m.  On the n-
  2288. axis, the horizontal line at n = K indicates the upper limit to n 
  2289. values, and the diagonal that intersects the n-axis at n = J 
  2290. indicates the upper limit of the area in which the Polynomials are 
  2291. defined.  The shaded irregular pentagon defined by the n-axis, the 
  2292. diagonal from n = J, the horizontal n = K, the vertical m = M, and 
  2293. the other diagonal n = m surrounds the region of the (n x m) plane 
  2294. containing the Legendre Polynomials used in the expansion.
  2295.  
  2296.  
  2297. This general pentagonal truncation reduces to some familiar 
  2298. common truncations as special cases:
  2299.  
  2300. Triangular:     K = J = M and N(m) = J
  2301. Rhomboidal:     K = J + M and N(m) = J + m
  2302. Trapezoidal:    K = J, K > M and N(m) = J
  2303.  
  2304. In all of the above m can take on negative values to 
  2305. represent the imaginary part of the spectral coefficients.
  2306.  
  2307. SECTION 3: BIT MAP SECTION (BMS).
  2308.  
  2309. The purpose of the (optional) BMS is to provide either a bit 
  2310. map or a reference to a bit map pre-defined by the center.  The 
  2311. bit map consists of contiguous bits with a bit-to-data-point 
  2312. correspondence as defined in the grid description.  A bit set 
  2313. equal to 1 implies the presence of a datum for that grid point in 
  2314. the BDS; a value of zero implies the absence of such.
  2315.  
  2316. Octet no.
  2317.  
  2318.  1 - 3       Length in octets of Bit Map Section
  2319.  4           Number of unused bits at end of Section 3.
  2320.  5 - 6       Numeric:
  2321.              Numeric = 0: a bit map follows;
  2322.              otherwise  : the numeric refers to a
  2323.              predefined bit map provided 
  2324.          by the center
  2325.  7 - nnn     Bit map, zero filled to an even number of octets
  2326.  
  2327.  
  2328. SECTION 4: BINARY DATA SECTION (BDS).
  2329.  
  2330. The BDS contains the packed data and the binary scaling 
  2331. information needed to reconstruct the original data from the 
  2332. packed data.  The required decimal scale factor is found in the 
  2333. PDS, above.  The data stream is zero filled to an even number of 
  2334. octets. 
  2335.  
  2336. Octet no.
  2337.  
  2338.  1 - 3    Length in octets of binary data section
  2339.  4    Bits 1 through 4: Flag - See Table 11
  2340.     Bits 5 through 8: Number of unused bits at end
  2341.     of Section 4.
  2342.  
  2343.  5 - 6  The binary scale factor (E).  A negative value
  2344.     is indicated by setting the high order bit
  2345.     (bit No. 1) in octet 5 to 1 (on).
  2346.  7 - 10 Reference value (minimum value); floating
  2347.     point representation of the number.
  2348.  11    Number of bits into which a datum point is
  2349.     packed
  2350.  12 -nnn     Variable, depending on octet 4;
  2351.     zero filled to an even number of octets.
  2352.  14    Optionally, may contain an extension of the 
  2353.     flags in octet 4.  See Table 11.
  2354.  
  2355. Here are some of the various forms the binary data can take; 
  2356. the flag table in BDS octet 4, possibly extended into octet 14, 
  2357. identifies which variant is in use. 
  2358.  
  2359. Grid-point data - Simple packing
  2360.  
  2361. Here the data simply begin in octet 12 and continue, packed 
  2362. according to the algorithm described above, without any particular 
  2363. regard for computer "word" boundaries, until there is no more 
  2364. data.  There may be some "zero-fill" bits at the end.
  2365.  
  2366. If all the data in a grid point field happen to have the same 
  2367. value, then all of the deviations from the reference value are set 
  2368. to zero.  Since a zero value requires no bits for packing, octet 
  2369. 11 is set to zero, thus indicating a field of constant data, the 
  2370. value of which is given by the reference value.  Under these 
  2371. circumstances, octet 12 is set to zero (the required "zero fill to 
  2372. an even number of octets") and bits 5-8 of octet 4 contain an 8.  
  2373. The number of data points in the field is implied by the grid 
  2374. identification given in the PDS and/or the GDS and BMS.
  2375.  
  2376. Spherical Harmonic Coefficients - Simple packing
  2377.  
  2378. Octets 12-15 contain the real part of the (0.0) coefficient 
  2379. in the same floating point format as the reference value in octets 
  2380. 7-10.  The imaginary part of the (0.0) coefficient, 
  2381. mathematically, is always equal zero.  Octets 16 to the end 
  2382. contain the remaining coefficients packed up as binary data with 
  2383. the same sort of scaling, reference value, and the like, as with 
  2384. grid-point numbers.  Excluding the (0,0) coefficient, which is 
  2385. usually much larger than the others, from the packing operation 
  2386. means that the remaining coefficients can be packed to a given 
  2387. precision more efficiently (fewer bits per word) than would be the 
  2388. case otherwise.
  2389.  
  2390. Grid-Point Data - Complex Packing
  2391.  
  2392. [This section to be completed at a later date.]
  2393.  
  2394.  
  2395.  TABLE 11. TABLES FOR THE BDS FLAG
  2396. (BDS Octet 4 and, optionally, 14)
  2397.  
  2398.     Bit     Value       Meaning
  2399.  
  2400.         
  2401.         1    0    Grid point data    
  2402.         1    Spherical Harmonic Coefficients
  2403.  
  2404.     2    0    Simple packing 
  2405.         1    Second order ("Complex") Packing 
  2406.  
  2407.      3    0    Original data were floating point values
  2408.         1    Original data were integer values
  2409.  
  2410.     4    0    No additional flags at octet 14
  2411.         1    Octet 14 contains flag bits 5 - 12
  2412.             
  2413. The following gives the meaning of the bits in octet 14 ONLY if 
  2414. bit 4 is set to 1.  Otherwise octet 14 contains regular binary 
  2415. data.  
  2416.  
  2417.     5        Reserved (set to 0)
  2418.     6    0    Single datum at each grid point
  2419.         1    Matrix of values at each grid point
  2420.  
  2421.     7    0    No secondary bit maps
  2422.         1    Secondary bit maps present
  2423.  
  2424.     8    0    Second order values have constant width
  2425.         1    Second order values have different widths
  2426.  
  2427.     9-12        Reserved (set to 0)
  2428.  
  2429. Notes:
  2430. (1)    Bit 4 is set to 1 to indicate that bits 5 to 12 are 
  2431. contained in octet 14 of the data section.
  2432. (2)    Bit 3 is set to 1 to indicate that the original data was 
  2433. integers; when this is the case any non-zero reference 
  2434. values should be rounded to an integer value.
  2435. (3)    When secondary bit maps are present in the data (used in 
  2436. association with second order packing and, optionally, 
  2437. with a matrix of values at each point) this is indicated 
  2438. by setting bit 7 to 1.
  2439. (4)    When octet 14 contains the extended flag information 
  2440. octets 12 and 13 will also contain "special" 
  2441. information; the actual data will begin in a subsequent 
  2442. octet.  See above.
  2443. At present, the "extension" of Table 11 into octet 14 and the 
  2444. associated "advanced" features of GRIB are limited to spherical 
  2445. harmonics and second order("complex") packing in the National 
  2446. Weather Service.  Additional variations are included in the WMO 
  2447. Documentation.
  2448.  
  2449. SECTION 5: END SECTION
  2450.  
  2451. The end section serves a human readable indication of the end 
  2452. of a GRIB record.  It can also be used for computer verification 
  2453. that a complete GRIB record is available for data extraction.  It 
  2454. should not be used as a search target since a '7777' bit 
  2455. combination could exist anywhere in the binary data stream.
  2456.  
  2457. Octet no.
  2458.  
  2459.  1-4          '7777' (Coded CCITT-ITA No. 5)
  2460.  
  2461.  
  2462.  
  2463.  
  2464.  
  2465.  
  2466.  
  2467.  
  2468.  
  2469.  
  2470.  
  2471.  
  2472. APPENDIX A
  2473.  
  2474.  
  2475.  
  2476.  
  2477.  
  2478.  
  2479. OUTLINE OF WMO BULLETIN HEADERS
  2480.  
  2481.  
  2482.  
  2483.  
  2484. USED WITH
  2485.  
  2486.  
  2487.  
  2488. G  R  I  B
  2489.  
  2490.  
  2491.  WMO BULLETIN HEADER
  2492.  
  2493. The WMO abbreviated heading is used to identify the NMC GRIB 
  2494. messages; however, it is not a complete description of their 
  2495. content.  The user is cautioned against using the header as the 
  2496. sole determiner of the record content; she should, of course, rely 
  2497. on the Product Definition Section for that purpose.
  2498.  
  2499. Note: In the following, a hexadecimal number is enclosed in 
  2500. parentheses followed by the designation "hex".
  2501. The information needed to identify the NMC product is 
  2502. contained in 21 octets.  The characters are encoded using the 
  2503. CCITT-ITA No. 5, also known (in the US) as ASCII characters, and 
  2504. are defined as follows:
  2505.  
  2506.  Octet no.                Header Content
  2507.  
  2508.  1      The character 'H' for GRIB bulletins sent to the NWS 
  2509.     Family of Services, used for the WAFS program, and for 
  2510.     general International Exchange
  2511.     or
  2512.     The characters 'Y' or 'Z' for GRIB bulletins intended 
  2513.     for the NWS AWIPS program.
  2514.  2      A letter character specifying the type parameter as 
  2515.     shown in Table A.1.
  2516.  3      A letter character specifying the grid area as defined 
  2517.     in Table A.2.
  2518.  4      A letter or numeric character indicating the time 
  2519.     difference between the reference time and valid time of 
  2520.     the data as listed in Table A.3, i.e., the forecast 
  2521.     length.
  2522.  5-6    Numeric characters as defined in Table A.4.  Usually the 
  2523.     pressure level, sometimes just a sequence number.  Some 
  2524.     values have special level or layer meanings.
  2525.  7      Blank (20)hex
  2526.  8-11   Four characters identifying the originating center.  
  2527.     These are always 'KWBC' for NMC-produced messages.
  2528.  12     Blank (20)hex
  2529.  13-14  Two numeric characters providing the reference day of 
  2530.     the month (01-31) of the data.
  2531.  15-18  Four numeric characters providing the reference hour and 
  2532.     minute of the data.
  2533.  19-22  Four OPTIONAL characters: one blank (20)hex, then 'Pxx', 
  2534.     where xx=01-99.  Used to indicate sequential parts of 
  2535.     very long messages that have been divided using the BLOK 
  2536.     feature. See Appendix B.
  2537.      19-21 OR 23-25  Two ASCII carriage returns and a line feed, 
  2538.     (0D0D0A)hex.
  2539.  
  2540. The first six characters are commonly referred to as
  2541. T1 T2 A1 A2 ii
  2542.  
  2543. In summary...
  2544.  
  2545. Generic Meaning of   T1  T2  A1  A2  ii:
  2546.  
  2547. T1:    Type of bulletin:      "H" for GRIB messages for
  2548.                 Family of Services, WAFS, and
  2549.                 International Exchange;
  2550.                 "Y" or "Z" for AWIPS GRIB messages
  2551. T2:    Type of data/parameter
  2552. A1:    Grid 
  2553. A2:    Analysis or forecast hour
  2554.  
  2555.   ii:    Numeric.  Usually the pressure level, sometimes just a 
  2556. sequence number.  Some values have special level or 
  2557. layer meanings.
  2558.  
  2559. In the following tables, the columns headed AWIPS are 
  2560. augmentations to the common Family of Services (FOS),National, and 
  2561. International Exchange variables.  FOS, National and International 
  2562. GRIB messages (with H as the initial character) draw upon the left 
  2563. hand columns only.  AWIPS GRIB messages (with Y or Z as the 
  2564. initial character) use letters from both columns.  If both columns 
  2565. contain entries for the same designator, the T1 character (H, Y, 
  2566. or Z) indicates which entry to use.
  2567.  
  2568.  
  2569. TABLE A.1   TYPE PARAMETERS - T2
  2570. (Header Octet 2)
  2571.  
  2572.  DESIGNATOR                 PARAMETER              
  2573.                      Usage
  2574.  
  2575.        FOS & International (H)            AWIPS (Y or Z)
  2576.  
  2577. A
  2578. B    Vertical Wind Shear
  2579. C    Vorticity
  2580. D    Thunderstorm probability
  2581. E       Total Precipitation                
  2582. F       Long Wave Radiation    Precipitable Water
  2583. G    Convective Precip.
  2584. H       Height (geopotential)    
  2585. I
  2586. J
  2587. K       Primary Wave Period      
  2588. L       Primary Wave Direction   
  2589. M       Secondary Wave Period
  2590. N       Secondary Wave Direction
  2591. O       Vertical velocity        
  2592. P       Pressure                 
  2593. Q    Stability Index
  2594.     (Best 4-layer index)
  2595. R       Relative humidity        
  2596. S       Snow                     
  2597. T       Temperature              
  2598. U       u wind component  
  2599. V       v wind component 
  2600. W
  2601. X       Surface Lifted index
  2602. Y
  2603. Z
  2604.  
  2605.  
  2606.  
  2607.  
  2608. TABLE A.2   GRID DESIGNATOR - A1
  2609. (Header Octet 3)
  2610.  
  2611.       DESIGNATOR            GRID Number 
  2612.                (See Table B)
  2613.  
  2614.       FOS & International (H)         AWIPS (Y or Z)
  2615.  
  2616.     A    21    201 - Northern Hemisphere
  2617.     B    22
  2618.     C    23
  2619.     D    24
  2620.     E    25
  2621.     F    26
  2622.     G    50
  2623.     H        213 - National CONUS with
  2624.                   Double Resolution
  2625.     I    37    202 - National CONUS
  2626.     J    38    203 - National Alaska
  2627.     K    39    204 - National Hawaii
  2628.     L    40    205 - National Puerto Rico
  2629.     M    41    206 - Regional MARD
  2630.     N    42    207 - Regional Alaska
  2631.     O    43    208 - Regional Hawaii
  2632.     P    44    210 - Regional Puerto Rico
  2633.     Q        211 - Regional CONUS
  2634.     R        212 - Regional CONUS with
  2635.                     Double Resolution
  2636.     S        209 - Regional MARD with
  2637.                     Double Resolution
  2638.     T    61    214 - Regional Alaska with
  2639.                     Double Resolution
  2640.     U    62
  2641.     V    63
  2642.     W    64
  2643.     X        (Used for experimental transmissions)
  2644.     Y
  2645.     Z
  2646.  
  2647.  
  2648.  
  2649. TABLE A.3   FORECAST HOUR DESIGNATOR - A2
  2650. (Header Octet 4)
  2651.  
  2652. DESIGNATOR       HOUR
  2653.  
  2654.            FOS & International (H)
  2655.  
  2656.     A       00 hour analysis
  2657.     B       06 hour fcst
  2658.     C       12     "
  2659.     D       18     "
  2660.     E       24     "
  2661.     F       30     "
  2662.     G       36     "
  2663.     H       42     "
  2664.     I       48     "
  2665.     J       60     "
  2666.     K       72     "
  2667.     L       84     "
  2668.     M       96     "
  2669.     N      108     "
  2670.     O      120     "
  2671.     P      132     "
  2672.     Q      144     "
  2673.     R      156     "
  2674.     S      168     "
  2675.     T      180     "
  2676.     U      192     "
  2677.     V      204     "
  2678.     W      216     "
  2679.     X      228     "
  2680.     Y      240     "
  2681.     Z      Reserved for special purposes
  2682.  
  2683. Note: The following designators are used for AWIPS only, with "Z" 
  2684. as the first character in the header.
  2685.  
  2686. DESIGNATOR    HOUR
  2687.  
  2688.     A    2 hour fcst
  2689.     B    3    "
  2690.     C    4    "
  2691.     D    8    "
  2692.     E    9    "
  2693.     F    10    "
  2694.     G    14    "
  2695.     H    15    "
  2696.     I    16    "
  2697.     J    20    "
  2698.     K    21    "
  2699.     M    54    "
  2700.     N    66    "
  2701.  
  2702.  
  2703. TABLE A.4   LEVEL DESIGNATORS - ii
  2704. (Header Octets 5 and 6)
  2705. (H, Y, or Z)
  2706.  
  2707. DESIGNATOR        LEVEL or LAYER
  2708.  
  2709. 00    Entire Atmosphere
  2710. 99    1000 hPa
  2711. 98    Air Properties at Surface of Earth
  2712. 97    Level of the tropopause
  2713. 96    Level of the maximum wind
  2714. 95    950 hPa
  2715. 94    Level of 0 deg C isotherm
  2716. 93    Land/Water Properties at Surface of
  2717.     Earth/Ocean
  2718. 92    Boundary Layer
  2719. 91    Any parameter reduced to Sea Level
  2720.  
  2721. Note: The following levels are used to indicate 
  2722. geometric height for aviation flight levels, not 
  2723. pressure levels
  2724.  
  2725. 81    810 hPa ~ 1828 m = 6000 ft FL
  2726. 73    730 hPa ~ 2743 m = 9000 ft FL
  2727. 64    640 hPa ~ 3658 m = 12000 ft FL
  2728.  
  2729.  
  2730. Otherwise, the designator given is the hundreds and tens digits of 
  2731. the hPa level in the atmosphere, e.g. 70=700hPa; 03=30hPa, etc..
  2732.  
  2733.  
  2734. SPECIAL NOTE
  2735.  
  2736. The following version of Table A.4 contains changes recently 
  2737. approved by the WMO.  They are NOT in effect as yet but are 
  2738. scheduled to go into effect on November 3, 1993.  The table is 
  2739. presented here for your edification, so you can make proper 
  2740. preparations, so I won't have to print a new copy of this document 
  2741. after Nov. 3, and so I can say "I told you so!" when all your 
  2742. codes fail on Nov. 4, 1993
  2743.  
  2744. TABLE A.4   LEVEL DESIGNATORS - ii
  2745. (Header Octets 5 and 6)
  2746. (H, Y, or Z)
  2747.  
  2748.  DESIGNATOR        LEVEL or LAYER
  2749.  
  2750. 00    Entire Atmosphere
  2751. 99    1000 hPa
  2752. 98    Air Properties at Surface of Earth
  2753. 97    Level of the tropopause
  2754. 96    Level of the maximum wind
  2755. 95    950 hPa
  2756. 94    Level of 0 deg. C isotherm
  2757. 93    Not assigned
  2758. 92    925 hPa 
  2759. 91    Not assigned
  2760. 90    900 hPa
  2761. 89    Any parameter reduced to Sea Level
  2762. 88    Land/Water Properties at Surface of
  2763.     Earth/Ocean
  2764. 87    Not assigned
  2765. 86    Boundary Layer
  2766.  
  2767. Note: The following levels are used to indicate 
  2768. geometric height for aviation flight levels, not 
  2769. pressure levels
  2770.  
  2771. 81    810 hPa ~ 1828 m = 6000 ft FL
  2772. 73    730 hPa ~ 2743 m = 9000 ft FL
  2773. 64    640 hPa ~ 3658 m = 12000 ft FL
  2774.  
  2775.  
  2776. Otherwise, the designator given is the hundreds and tens 
  2777. digits of the hPa level in the atmosphere, e.g. 70=700hPa; 
  2778. 03=30hPa, etc.
  2779.  
  2780.  
  2781.  
  2782.  
  2783.  
  2784.  
  2785.  
  2786.  
  2787.  
  2788.  
  2789.  
  2790.  
  2791. APPENDIX B
  2792.  
  2793.  
  2794.  
  2795.  
  2796.  
  2797.  
  2798. The BLOK feature
  2799.  
  2800. for subdividing large GRIB (and/or BUFR) bulletins
  2801.  
  2802.  
  2803.  BLOK
  2804. The BLOK feature is used to subdivide large GRIB bulletins to 
  2805. allow them to fit into existing (limited) communications or data 
  2806. storage facilities.  Once divided, the individual subdivisions 
  2807. (BLOKs) can not stand alone - they must be reassembled back into 
  2808. the single bulletin whence they came for any processing.  However, 
  2809. from a communications or storage standpoint, each individual BLOK 
  2810. is considered as a distinct bulletin or record and will be 
  2811. uniquely identified.
  2812.  
  2813. The application of the BLOK feature is quite straightforward: 
  2814. a given GRIB record - all the bits from "GRIB" through "7777" - 
  2815. may be partitioned at any point (without any regard for the 
  2816. contents) or any number of points.  The only rule is that the 
  2817. separate parts must contain an even number of octets.  The 
  2818. separate parts are then encased in a BLOK envelope (details 
  2819. follow), and that's it.  It is, of course, up to the receiver of a 
  2820. collection of BLOKs to strip off the BLOK envelopes and put the 
  2821. GRIB message back together again.  Just get all the king's horses 
  2822. and all the king's men to help do so.
  2823. Here is the structure and content of the BLOK envelope.
  2824.  
  2825.     Section 0 - Indicator section
  2826.  
  2827.     Octet No.    Contents
  2828.  
  2829.     1-4    'BLOK' - 4 ASCII characters
  2830.     5-7    Total length of this BLOK, in octets
  2831.      8    BLOK Edition Number - currently 0
  2832.     9-11    Total length of original GRIB message, 
  2833.         in octets
  2834.     12    Flag - see Table B.1 - indicates presence 
  2835.         or absence of Section 1
  2836.     13    Total number of related BLOKs
  2837.     14    Sequence number of this BLOK
  2838.     15-16    reserved, set to 0
  2839.  
  2840.  
  2841.     Section 1 - Identification section - optional
  2842.  
  2843. If present, this section contains the complete Product 
  2844. Definition Section (PDS) from the original GRIB message.  If 
  2845. this section is included in one BLOK, it must be included in 
  2846. all related BLOKs.
  2847.  
  2848.  
  2849.     Section 2 - Data section
  2850.  
  2851. This section contains an arbitrary part of the original GRIB 
  2852. message - the only restriction is that this section contain 
  2853. an even number of octets.
  2854.  
  2855.  
  2856.     Section 3 - End section
  2857.  
  2858.     Octet No.    Contents
  2859.  
  2860.     1-4    '7777' - 4 ASCII characters
  2861.  
  2862.  
  2863. Table B.1
  2864.  
  2865. Section 1 present Flag
  2866.  
  2867.     Bit    Value    Meaning
  2868.  
  2869.     1    0    Optional Section 1 omitted
  2870.         1    Optional Section 1 present
  2871.  
  2872.     2-8        Reserved (set to 0)
  2873.  
  2874. Keep in mind that each subdivision of the original bulletin 
  2875. will be completely surrounded by a BLOK envelope, from 'BLOK' 
  2876. through '7777'.
  2877.  
  2878. Note that the last BLOK of a set for a given bulletin will 
  2879. have two '7777's in a row; the first is the one that marks the end 
  2880. of the original bulletin, the second marks the end of the (last) 
  2881. BLOK.
  2882.  
  2883. When BLOKs are sent out as individual messages with 
  2884. identifying WMO headers, the 'Pxx' characters that are an optional 
  2885. part of the header shall be included in the header.  See Appendix 
  2886. A.  In this way the complete WMO header shall be unique for each 
  2887. message even though the TTAAii portion of the headers will be the 
  2888. same, reflecting that each BLOK, for a single GRIB message,  
  2889. contains the same information. 
  2890.  
  2891. < >    World Meteorological Organization publication No. 306, Manual 
  2892. on Codes, Vol. 1, Part B, Secretariat of the WMO, Geneva, 
  2893. Switzerland, 1988, plus Supplements No. 1, 2, & 3 
  2894.  
  2895.  
  2896.