GRIB2 Encoding Details for the National Weather Service Digital Forecast Database

Background

The National Weather Service (NWS) is creating a National Digital Forecast  Database (NDFD) which will contain gridded forecasts of several weather  elements.  In general, the weather parameters in the NDFD will be ground-based, sensible weather elements.  The forecast grids  that comprise the NDFD will come from multiple sources, including the NWS' Weather Forecast Offices   (WFO) and the National Centers for Environmental  Prediction (NCEP).  The World Meteorological Organization (WMO) has  adopted Edition 2 of the GRIB code as a standard for sharing GRI dded B inary data.  GRIB, Edition 2 (GRIB2) will be involved  in the NDFD in two ways.  GRIB2 will be one of the primary formats used to transmit NDFD data to NWS customers and partners.

The purpose of this document is to describe, in detail, the techniques that will be used to encode NWS forecasts into NDFD GRIB2 bulletins.  When dealing with a code as general and as flexible as GRIB2, one often encounters multiple, plausible ways to accomplish the encoding task.  It is hoped that this document will clarify the many decisions made during the creation of the NDFD.

References

This document will assume that the reader has access to and a working knowledge of the WMO publication FM 92-XII GRIB General Regularly-distributed Information in Binary Form.  This link should provide access to a version that has been formatted for web access.  Additionally, the following links provide access to several documents that describe encode/ decode routines developed by the NWS' Meteorological Development Laboratory (MDL).  These documents provide valuable commentary on some of the fields used in the GRIB2 code form.

The NWS has created an NDFD information web page.  There you will find the latest news regarding NDFD plans and recent developments.  In addition, MDL developers have written software that may be downloaded and used for accessing and decoding NDFD GRIB2 files from the NWS Telecommunications Gateway (NWSTG).  To obtain the latest version of this software, follow this link.

File, and Bulletin Structure

A single file will contain multiple GRIB2 bulletins.  One file will contain multiple forecast projections for a given weather element covering a specific geographic region.  There are NDFD grids available for the lower 48 states (CONUS), 16 different CONUS sub-sectors, Puerto Rico, Hawaii, Guam, and Alaska.  For Tropical Prediction Center grids, there is an additional domain that covers the entire AWIPS 227 area.   See this link for a detailed list of geographic sectors, filenames, and WMO header information with regards to NDFD data.

GRIB2 files for a given element and region will be split into two files, one containing the forecast grids for the period Day 1 through Day 3, the other containing the forecast grids for the period Day 4 through Day 7.  These files are located in different directories at the NWSTG FTP download site.

Every NDFD GRIB file begins with a flag field separator of the format:

****nnnnnnnnnn****\lf

where the "nnnnnnnnnn" is the size in bytes of the file, (minus the separator),   right justified with leading zeroes, and with a trailing "\lf".  The "\lf" character represents a single octet with the decimal value of 10.  The size of the Flag field separator is 19 bytes.

Following the flag field separator is a WMO super header.  Check  this  link for the specific format of NDFD WMO headers.  The WMO super header  is 21  bytes long, the trailing "\cr\cr\lf" inclusive.  The "\cr" character represents a single octet with the decimal value of 13.  Immediately  following the super header is another flag field separator for the first GRIB2 bulletin in the file.  It contains the size of the bulletin to follow.

The bulletin itself begins with a WMO header.  Again, refer to the link above to get detailed information regarding the format of  the header.  The header contains the valid time of the GRIB2 bulletin.  The WMO  header is also 21 bytes long, the trailing "\cr\cr\lf" inclusive.  Following the header is the packed GRIB2 grid.  It begins with the ASCII text "GRIB"  and ends with the ASCII text "7777".  The packed data contains all the GRIB2 sections for that grid, as well as the packed grid.

Here's an example of the file format (individual components are bracketed with "< >"):

<file flag field separator\lf>
<WMO super header\cr\cr\lf>
<bulletin 1 flag field separator\lf>
<WMO header 1 for bulletin\cr\cr\lf>
<"GRIB"packed data7777><bulletin 2 flag field separator\lf>
<WMO header 2 for bulletin\cr\cr\lf>
<"GRIB"packed data7777><bulletin 3 flag field separator\lf>
.
.
.
<WMO header nn for bulletin\cr\cr\lf>
<"GRIB"packed data7777>

Octet Contents

The sections that follow list the contents of the GRIB2 bulletin, octet by octet.  When contents are described as "Missing," all bits are set to "1" in accordance with regulation 92.1.4.  When contents are described by a number, that number will be stored in the apprpriate octet.

Section 0--Indicator Section


Octet No. Contents
1-4 "GRIB"
5-6 0
7 0 - for Meteorological Products, 10 - for Oceanographic Products
8 2
9-16 Total length of GRIB message in octets (including Section 0)

Section 1--Identification Section

In Section 1, octets 13-19 contain the reference time for the GRIB bulletin.  The NDFD is currently produced once an hour.  The reference time in Section 1 represents the day/hour of the current NDFD production cycle.
 

Octet No. Contents
1-4 21
5 1
6-7 8
8-9 Missing
10 1
11 0 - Value will be used to designate the version number of the GRIB2-encoding software that produced the bulletin.  When changes to this published format occur, this version number will be updated.
12 1
13-14 Year (4 digits)
15 Month
16 Day
17 Hour
18 Minute
19 Second
20 0 or 1 - depending on the operational status of the encoded NDFD product (0 = operational, 1 = operational TEST)
21 1

Section 2--Local Use Section

Certain weather elements have provided particular challenges in encoding   them in GRIB2.  Using Section 2 to encode various forms of metadata provides one solution.  For the NDFD element Weather, ("Wx"), MDL GRIB2 encoding software uses the Local Use section for packing metadata unique to each grid.  At this time, for parameters other than Wx, the Local Use section is omitted.

Grids of Wx are stored as two distinct entities.  The   first entity is a grid  of small integer values that will generally  store very compactly in Section  6.  The second entity is a series  of null-terminated strings of ASCII  characters called Weather Keys.    The integers on the weather grid serve  as indices, each pointing to one of the Weather Keys in the series.    Each Weather Key is comprised  of one or more weather subkeys, separated by  a caret "^".

Essentially, the metadata packed in the Local Use Section for the parameter Wx is a lookup table.  The ASCII characters are loaded, one per octet, and then compressed using the Simple Packing Scheme for integers defined for Section 5.  The Simple Packing Scheme treats the set of Weather Keys as an integer array.  Each integer in the array is a decimal representation that corresponds to an ASCII character.  For instance, the integer 65 translates to the ASCII character "A".  The null character is represented by the integer 0, so that whenever a 0 is encountered in the array, it marks the ending of a unique Weather Key.  The tables that follow show the specific contents of the Weather Keys and subkeys.
 


Octet No. Contents
1-4 Length of section in octets (nn)
5 2
6 1 - Simple packing flag
7-nn The Weather Keys needed to describe the weather on the grid, packed using the Simple Packing scheme

Weather Keys and Subkeys

A weather subkey has can have up to five parts, each part separated by colons ":".
The parts are:
  • one weather type code.  See Weather Type Codes, below.
  • one coverage/probability code.  See Coverage/probability Codes, below.
  • one intensity code.  See Intensity Codes, below.
  • one visibility code.  See Visibility Codes, below.
  • Weather Type Codes


    Code Meaning Code Meaning
    <NoWx> No Weather T Thunder
    A Hail R Rain
    RW Rain Showers L Drizzle
    ZR Freezing Rain ZL Freezing Drizzle
    S Snow SW Snow Showers
    IP Ice Pellets (sleet) F Fog
    H Haze BS Blowing Snow
    K Smoke BD Blowing Dust
    FR Frost BN Blowing Sand
    IF Ice Fog IC Ice Crystals
    ZF Freezing Fog ZY Freezing Spray
    VA Volcanic Ash WP Water Spouts

    Coverage/probability Codes


    Code Meaning Code Meaning
    <NoCov> No Coverage/probability Iso Isolated
    Sct Scattered Num Numerous
    Wide Widespread Ocnl Occasional
    SChc Slight Chance Chc Chance
    Lkly Likely Def Definite
    Patchy Patchy Areas Areas of
    Brf Brief Pds Periods of
    Frq Frequent Inter Intermittent

    Intensity Codes


    Code Meaning Code Meaning
    <NoInten> No Intensity -- Very Light
    - Light m Moderate
    + Heavy

    Visibility Codes

    The following visibility codes may appear in WFO-generated GRIB2 bulletins.  The units are statute miles:  <NoVis>, 0SM, 1/4SM, 1/2SM, 3/4SM, 1SM, 11/2SM, 2SM, 21/2SM, 3SM, 4SM, 5SM, 6SM, P6SM.

    Attribute Codes


    Code Meaning Code Meaning
    FL Frequent Lightning GW Gusty Winds
    HvyRn Heavy Rain DmgW Damaging Winds
    SmA Small Hail LgA Large Hail
    OLA on Outlying Areas OBO on Bridges and Overpasses
    OGA on Grassy Areas OR Or
    Dry Dry Primary Highest Ranking
    Mention Include Unconditionally TOR Tornado
    Mx Mixture

    Size Limitations for NDFD National Grids

    There is no (practical) limit to the number of weather keys, subkeys, etc.  For NDFD grids that are national mosaics of WFO-generated grids, the following limitations will be applied:

    Item Maximum number that will be present
    Weather Attributes in a Weather Subkey 5
    Weather Subkeys in a Weather Key 5

    Weather Key Examples


    Sample Weather Key Meaning
    Sct:SW:-:<NoVis>: Light scattered snow showers
    Ocnl:R:-:<NoVis>:^S:Ocnl:-:<NoVis>:^
    SChc:ZR:-:<NoVis>:
    Occasional light rain and snow, with a slight chance of light freezing rain
    Wide:FR:-:<NoVis>:OLA Widespread light frost in the outlying areas
    <NoWx>:<NoCov>:<NoInten>:<NoVis>: No weather
    Sct:RW:-:<NoVis>:^T:Iso:m:<NoVis>: Scattered light showers with isolated moderate thunderstorms
    Sct:T:+:<NoVis>:DmgW,LgA Scattered severe thunderstorms with damaging winds and large hail

    Section 3--Grid Definition Section

    Section 3 will vary depending upon the map projection the grid is defined.  A table listing more detailed information for each NDFD geographic region (CONUS, CONUS subsectors, Puerto Rico, Hawaii, Guam, Alaska) can be found here.  Latitude and longitude values are encoded in 10 -6 degrees.  All longitudes are east.

    Lambert Conformal (includes CONUS and CONUS subsectors)


    Octet No. Contents
    1-4 81 - Length of section in octets (nn)
    5 3
    6 0
    7-10 Number of data points (Nx * Ny) 
    11 0
    12 0
    13-14 30 - template number
    15 1
    16 0
    17-20 6371200 - Radius of the earth
    21 0
    22-25 0
    26 0
    27-30 0
    31-34 Nx - number of points along the X-axis.   (Click here to see Nx values for all Lambert Conformal NDFD grids)
    35-38 Ny - number of points along the Y-axis   (Click here to see Ny values for all Lambert Conformal NDFD grids)
    39-42 La1 - latitude of first grid point   (Click here to see La1 values for all Lambert Conformal NDFD grids)
    43-46 Lo1 - longitude of first grid point   (Click here to see Lo1 values for all Lambert Conformal NDFD grids)
    47 0
    48-51 25,000,000 - Latitude where grid spacing is defined
    52-55 265,000,000 - Orientation longitude
    56-59 5,079,406 - Dx, X-direction grid length
    60-63 5,079,406  - Dy, Y-direction grid length 
    64 0
    65 80 - Scanning Mode
    66-69 25,000,000 - Latin1, first secant latitude
    70-73 25,000,000 - Latin2, second secant latitude
    74-77 -90,000,000 - Latitude of southern pole 
    78-81 0 - Longitude of southern pole

    Polar Stereographic (Alaska)


    Octet No. Contents
    1-4 65 - Length of section in octets (nn)
    5 3
    6 0
    7-10 Number of data points (Nx * Ny)
    11 0
    12 0
    13-14 20 - template number
    15 1
    16 0
    17-20 6371200 - Radius of the earth
    21 0
    22-25 0
    26 0
    27-30 0
    31-34 Nx - number of points along the X-axis   (Click here to see Nx values for all Polar Stereographic NDFD grids)
    35-38 Ny - number of points along the Y-axis   (Click here to see Ny values for all Polar Stereographic NDFD grids)
    39-42 La1 - latitude of first grid point   (Click here to see La1 values for all Polar Stereographic NDFD grids)
    43-46 Lo1 - longitude of first grid point   (Click here to see Lo1 values for all Polar Stereographic NDFD grids)
    47 0
    48-51 60,000,000 - LaD, Latitude where mesh length defined
    52-55 210,000,000 - LoV, Orientation longitude
    56-59 5,953,125 - Dx, X-direction grid length
    60-63 5,953,125 - Dy, Y-direction grid length
    64 0 - Projection center flag
    65 80 - Scanning mode

    Mercator (includes Puerto Rico, Hawaii, and Guam)


    Octet No. Contents
    1-4 72 - Length of section in octets (nn)
    5 3
    6 0
    7-10 Number of data points   (Nx * Ny)
    11 0
    12 0
    13-14 10 - template number
    15 1
    16 0
    17-20 6371200 - Radius of the earth
    21 0
    22-25 0
    26 0
    27-30 0
    31-34 Nx - number of points along the X-axis   (Click here to see Nx values for all Mercator NDFD grids)
    35-38 Ny - number of points along the Y-axis   (Click here to see Ny values for all Mercator NDFD grids)
    39-42 La1 - latitude of first grid point   (Click here to see La1 values for all Mercator NDFD grids)
    43-46 Lo1 - longitude of first grid point   (Click here to see Lo1 values for all Mercator NDFD grids)
    47 0
    48-51 LaD - latitude where mesh length is defined   (Click here to see LaD values for all Mercator NDFD grids)
    52-55 La2 - latitude of last gridpoint   (Click here to see La2 values for all Mercator NDFD grids)
    56-59 Lo2 - longitude of last gridpoint   (Click here to see Lo2 values for all Mercator NDFD grids)
    60 80 - Scanning mode
    61-64 0.0000 - Orientation angle of the grid
    65-68 2,500,000 - Di, longitudinal direction grid length - (Exception: Puerto Rico = 1,250,000)
    69-72 2,500,000 - Dj, latitudinal direction grid length - (Exception: Puerto Rico = 1,250,000)

    Section 4--Product Definition Section

    Section 4 will vary from one weather element to the next.  The formats for the various elements are detailed in the following sections:

    Maximum Temperature (MaxT), Minimum Temperature (MinT)


    Octet No. Contents
    1-4 58 - Length of section in octets (nn)
    5 4
    6-7 0
    8-9 8
    10 0
    11 4 for MaxT 
    5 for MinT
    12 2
    13 0
    14 0
    15-16 255
    17 Missing
    18 1
    19-22 Hours from reference time to beginning of MaxT/MinT valid period. 
    23 1
    24 0
    25-28 0
    29 Missing
    30 0
    31-34 Missing
    35-36 Year of end of MaxT/MinT valid period in GMT.
    37 Month of end of MaxT/MinT valid period in GMT. 
    38 Day of end of MaxT/MinT valid period in GMT.
    39 Hour of end of MaxT/MinT valid period in GMT.
    40 Minute of end of MaxT/MinT valid period in GMT.
    41 Second of end of MaxT/MinT valid period in GMT.
    42 1
    43-46 0
    47 2 for MaxT.  3 for MinT.
    48 Missing
    49 1
    50-53 12
    54 1
    55-58 0

    Twelve-hour Probability of Precipitation (PoP12)


    Octet No. Contents
    1-4 71 - Length of section in octets (nn)
    5 4
    6-7 0
    8-9 9
    10 1
    11 8
    12 2
    13 0
    14 0
    15-16 Missing
    17 Missing
    18 1
    19-22 Hours from reference time to beginning of PoP12 valid period. 
    23 1
    24 0
    25-28 0
    29 Missing
    30 Missing
    31-34 Missing
    35 Missing
    36 Missing
    37 1
    38 Missing
    39-42 Missing
    43 3
    44-47 254
    48-49 Year of end of PoP12 valid period in GMT.
    50 Month of end of PoP12 valid period in GMT.
    51 Day of end of PoP12 valid period in GMT.
    52 Hour of end of PoP12 valid period in GMT.
    53 Minute of end of PoP12 valid period in GMT.
    54 Second of end of PoP12 valid period in GMT.
    55 1
    56-59 0
    60 1
    61 Missing
    62 1
    63-66 12
    67 1
    68-71 0

    Temperature, Dewpoint, Sky, Wind Speed, Wind Direction, Wave Height, Weather, Apparent Temperature, Relative Humidity, Wind Gust


    Octet No. Contents
    1-4 34 - Length of section in octets (nn)
    5 4
    6-7 0
    8-9 0
    10 Parameter Category (FM 92 GRIB, Code Table 4.1) See table below for specific values
    11 Parameter Number (FM 92 GRIB, Code Table 4.2) See table below for specific values
    12 2
    13 0
    14 0
    15-16 255
    17 Missing
    18 1
    19-22 Forecast projection in hours
    23 1
    24 0
    25-28 0
    29 0
    30 -1
    31-34 Missing

    Parameter Categories and Parameter Numbers for Temperature, Dewpoint, Sky, Wind Speed, Wind Direction, Wave Height, Weather, Apparent Temperature, Relative Humidity, Wind Gust


    Parameter Name Category Number
    Temperature 0 0
    Dewpoint 0 6
    Sky 6 1
    Wind Speed 2 1
    Wind Direction 2 0
    Wave Height (see Note 1) 0 5
    Weather 1 192
    Apparent Temperature 0 193
    Relative Humidity 1 1
    Wind Gust 2 22

    Note 1: Wave Height is defined as an Oceanographic Product in Section 0 (Indicator Section, octet 7 = 10).

    QPF and Snow Amount


    Octet No. Contents
    1-4 58 - Length of section in octets (nn)
    5 4
    6-7 0
    8-9 8
    10 1
    11 8     for QPF
    29   for Snow Amount 
    12 2
    13 0
    14 0
    15-16 255
    17 Missing
    18 1
    19-22 Hours from reference time to beginning of valid period. 
    23 1
    24 0
    25-28 0
    29 Missing
    30 -1
    31-34 Missing
    35-36 Year of end of valid period in GMT. 
    37 Month of end of valid period in GMT.
    38 Day of end of valid periodin GMT.
    39 Hour of end of valid period in GMT.
    40 Minute of end of valid period in GMT.
    41 Second of end of valid period in GMT. 
    42 1
    43-46 0
    47 1
    48 Missing
    49 1
    50-53 6
    54 1
    55-58 0

    Tropical Wind Speed Probabilities (Incremental and Cumulative) greater than 34, 50, and 64 knots - from Tropical Prediction Center

    Octet No. Contents
    1-4 71 - Length of section in octets (nn)
    5 4
    6-7 0
    8-9 9
    10 2 - Momentum
    11 1 - Wind Speed
    12 2
    13 0
    14 0
    15-16 Missing
    17 Missing
    18 1
    19-22 0
    23 103 - specified height above ground level
    24 0
    25-28 10 (meters)
    29 Missing
    30 0
    31-34 0
    35 Missing
    36 Missing
    37 1 - probability of event above upper limit
    38 0
    39-42 0
    43 3 - scale factor of upper limit
    44-47 17491 (m/s), or 25722 (m/s), or 32924 (m/s) - corresponds to 34, 50, and 64 knots 
    48-49 Year of end WindSpd Prob valid period in GMT
    50 Month of end WindSpd Prob valid period in GMT
    51 Day of end WindSpd Prob valid period in GMT
    52 Hour of end WindSpd Prob valid period in GMT
    53 Minute of end WindSpd Prob valid period in GMT
    54 Second of end WindSpd Prob valid period in GMT
    55 1
    56-59 0
    60 1
    61 2 - (incremental probability), 192 - (cumulative probability)
    62 1 - type of time increment between successive fields (hours)
    63-66 6 - (incremental probability),  variable number of hours from the reference time to the end time of the valid period - cumulative probability)
    67 1
    68-71 0

    Hazard Probabilities - from Storm Prediction Center (Includes Probabilities of Tornado, Hail, and Damaging Winds, Probabilities of Extreme Tornado, Hail, and Damaging Winds, Total Probability of Severe, and Extreme Severe Thunderstorms

    Octet No. Contents
    1-4 71 - Length of section in octets (nn)
    5 4
    6-7 0
    8-9 9
    10 Parameter Category (FM 92 GRIB, Code Table 4.1) See table below for specific values
    11 Parameter Number (FM 92 GRIB, Code Table 4.2) See table below for specific values
    12 2
    13 0
    14 0
    15-16 255
    17 255
    18 1
    19-22 Hours from reference time to beginning of valid period
    23 1
    24 0
    25-28 0
    29 255
    30 -1
    31-34 -1
    35 255
    36 255
    37 1
    38 -1
    39-42 -1
    43 0
    44-47 0
    48-49 Year of end of valid period in GMT. 
    50 Month of end of valid period in GMT.
    51 Day of end of valid period in GMT.
    52 Hour of end of valid period in GMT.
    53 Minute of end of valid period in GMT.
    54 Second of end of valid period in GMT. 
    55 1
    56-59 0
    60 0
    61 255
    62 1
    63-66 24
    67 1
    68-71 0

    Parameter Categories and Parameter Numbers for Hazard Probabilities

    Parameter Name Parameter Category Parameter No.
    Probability of Tornado 19 197
    Probability of Hail 19 198
    Probability of Damaging Winds 19 199
    Probability of Extreme Tornado 19 200
    Probability of Extreme Hail 19 201
    Probability of Extreme Damaging Winds 19 202
    Total Probability of Severe Thunderstorms 19 203
    Total Probability of Extreme Severe Thunderstorms 19 204

    Categorical Convective Outlooks - from Storm Prediction Center

    Octet No. Contents
    1-4 58 - Length of section in octets
    5 4
    6-7 0
    8-9 8
    10 19
    11 194
    12 2
    13 0
    14 0
    15-16 255
    17 255
    18 1
    19-22 Hours from reference time to beginning of valid period
    23 1
    24 0
    25-28 0
    29 255
    30 -1
    31-34 -1
    35-36 Year of end of valid period in GMT. 
    37 Month of end of valid period in GMT.
    38 Day of end of valid periodin GMT.
    39 Hour of end of valid period in GMT.
    40 Minute of end of valid period in GMT.
    41 Second of end of valid period in GMT. 
    42 1
    43-46 0
    47 1
    48 255
    49 1
    50-53 24
    54 1
    55-58 0

    Climate Outlook Probability Elements - from Climate Prediction Center (Average Temperature and Total Precip Above and Below Normal for 8-14 Day Outlook, 1 Month Outlook, and Seasonal Outlook)

    Octet No. Contents
    1-4 71- Length of section in octets (nn)
    5 4
    6-7 0
    8-9 9
    10 Parameter Category (FM 92 GRIB, Code Table 4.1)    0 = Temperature, 1 = Moisture
    11 Parameter Number (FM 92 GRIB, Code Table 4.2)     0 = Temperature, 8 = Total Precipitation
    12 2
    13 0
    14 0
    15-16 255
    17 255
    18 Indicator of unit of time range - 8-14 Day Outlooks = 2 (days); Monthly and Seasonal Outlooks = 3 (months)
    19-22 Time from beginning of issuance day (8-14 Day Outlooks) or issuance month (Monthly/Seasonal Outlooks) to beginning of valid period in units specified by octet 18 
    23 1
    24 0
    25-28 0
    29 255
    30 -1
    31-34 -1
    35 255
    36 2 - Total Number of forecast probabilities
    37 3 - Probability type
    38 0
    39-42 0
    43 0
    44-47 0
    48-49 Year of end of valid period in GMT. 
    50 Month of end of valid period in GMT.
    51 Day of end of valid periodin GMT.
    52 Hour of end of valid period in GMT.
    53 Minute of end of valid period in GMT.
    54 Second of end of valid period in GMT. 
    55 1
    56-59 0
    60 0
    61 255
    62 Indicator of unit of time for time range over which statistical processing is done.   8-14 Day Outlooks = 2 (days); Monthly and Seasonal Outlooks = 3 (months)
    63-66 Length of time range over which statistical processing is done.  8-14 Day Outlooks = 6 (days); Monthly Outlooks = 1 (month); Seasonal Outlooks = 3 (months)
    67 1
    68-71 0

    Section 5--Data Representation Section

    The GRIB2 standard supports eight forms of data packing.  Grids transmitted as part of the NDFD will use complex packing (Data Representation Template 5.2), and optionally, second order spatial differencing (Data Representation Template 5.3).

    NDFD grids will generally contain a significant number of missing values.  National mosaic grids are defined to be rectangles, and they generally extend into areas where NWS WFOs do not have forecast responsibility.


    Octet No. Contents
    1-4 47 or 49 - Length of section in octets (nn) (47 for Template 5.2, 49 for Template 5.3)
    5 5
    6-9 Total number of data points.
    10-11 2 or 3
    12-15 Reference value (R) as an IEEE 32-bit floating-point value.  Varies from grid to grid.
    16-17 Binary scale factor (E).  Varies from weather element to weather element.  See Element Encoding Characteristics Table for values.
    18-19 Decimal scale factor (D).  Varies from weather element to weather element.  See Element Encoding Characteristics Table for values.
    20 Number of bits used for each group reference value.
    21 1 (integer) for Weather grids; 0 (floating point) for all other weather elements.
    22 1
    23 1
    24-27 Primary missing value substitute.  See Element Encoding Characteristics Table for values.  The values in the table will appear in the GRIB2 bulletins in Section 5, but will not appear with the data in section 7.  The GRIB2 standard calls for missing values to be carried as the largest value possible in a particular group.
    28-31 0
    32-47 See GRIB2 documentation.
    48 2 - Order of spatial differencing   (Template 5.3 only)
    49 See GRIB2 documentation.   (Template 5.3 only)

    Section 6--Bit-map Section

    Bit-maps will not be used in NDFD GRIB bulletins.  Missing values will appear in those grid locations where forecasts are not valid.
     

    Octet No. Contents
    1-4 6 - Length of section in octets (nn)
    5 6
    6 255

    Section 7--Data Section


    Octet No. Contents
    1-4 Length of section in octets (nn)
    5 7
    6-nn See GRIB2 documentation.

    Section 8--End Section


    Octet No. Contents
    1-4 "7777"

    Element Encoding Characteristics


    Weather
    Element
    Original
    NDFD
    Units
    GRIB-
    encoded
    Units
    Binary Scale
    Factor
    Decimal Scale
    Factor
    Primary Missing 
    Value Substitute
    MaxT Fahrenheit Kelvin 0 1 9999
    MinT Fahrenheit Kelvin 0 1 9999
    PoP12 Percent Probability Percent
    Probability
    0 0 9999
    T Fahrenheit Kelvin 0 1 9999
    Td Fahrenheit Kelvin 0 1 9999
    Sky Percentage
    Total sky coverage
    Percentage
    Total sky
    coverage
    0 0 9999
    Wind Speed knots ms-1 0 1 9999
    Wind Direction degrees true degrees true 0 0 9999
    Weather N/A N/A 0 0 9999
    QPF inches kgm-2 0 2 9999
    SnowAmt inches meters 0 3 9999
    Wave Height feet meters 0 1 9999
    Apparent Temperature Fahrenheit Kelvin 0 1 9999
    Relative Humidity Percent Percent 0 0 9999
    Wind Gust knots ms-1 0 1 9999
    Tropical Wind Speed Probabilities 
    (34, 50, 65 kts)
    Cumulative and Incremental
    Percent Probability Percent
    Probability
    0 0 9999

     

    NDFD Grid Location and Sizes (by geographic region/sector)

    Lambert Conformal

    Sector Name Item Value
    CONUS
    Nx 1073
    Ny 689
    La1 2019199
    Lo1 2384459
    Central Great Lakes
    Nx 173
    Ny 219
    La1 3876136
    Lo1 2715378
    Central Mississippi Valley
    Nx 197
    Ny 187
    La1 3409910
    Lo1 2646187
    Central Plains
    Nx 223
    Ny 187
    La1 3469884
    Lo1 2550276
    Central Rockies
    Nx 254
    Ny 185
    La1 3510457
    Lo1 2462040
    Eastern Great Lakes
    Nx 187
    Ny 192
    La1 3925241
    Lo1 2735126
    Mid-Atlantic
    Nx 194
    Ny 200
    La1 3139028
    Lo1 2742057
    Northeast
    Nx 187
    Ny 229
    La1 3869834
    Lo1 2812826
    Northern Plains
    Nx 252
    Ny 239
    La1 3968270
    Lo1 2546129
    Northern Rockies
    Nx 306
    Ny 228
    La1 3944028
    Lo1 2439814
    Pacific Northwest
    Nx 313
    Ny 212
    La1 3949451
    Lo1 2341168
    Pacific Southwest
    Nx 312
    Ny 252
    La1 2926025
    Lo1 2368744
    Southeast
    Nx 243
    Ny 201
    La1 2407851
    Lo1 2691026
    Southern Mississippi Valley
    Nx 199
    Ny 184
    La1 2860611
    Lo1 2640133
    Southern Plains
    Nx 314
    Ny 275
    La1 2510639
    Lo1 2528770
    Southern Rockies
    Nx 267
    Ny 190
    La1 3031159
    Lo1 2451204
    Upper Mississippi Valley
    Nx 245
    Ny 270
    La1 3818489
    Lo1 2597956

    Polar Stereographic

    Sector Name Item Value
    Alaska
    Nx 825
    Ny 553
    La1 4053010
    Lo1 1814290

    Mercator

    Sector Name Item Value
    Puerto Rico
    Nx 339
    Ny 227
    La1 1697739
    Lo1 2919721
    La2 195445
    Lo2 296016
    LaD 2000000
    Hawaii
    Nx 321
    Ny 225
    La1 1806678
    Lo1 1983747
    La2 2308200
    Lo2 2060310
    LaD 2000000
    Guam
    Nx 193
    Ny 193
    La1 1234988
    Lo1 1436865
    La2 1679439
    Lo2 1482800
    LaD 2000000