|
|
MDL Use of 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 MOS 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 weather, the Local Use
section is omitted.
MDL Local Use Template 2.1
| Octet No. |
Content |
| 1-4 |
Length of the section in octets (N) |
| 5 |
Number of the section (2) |
| 6 |
MDL Section 2 template number (1) |
| 7-8 |
Total number of data groups in the local use section |
| 9-12 |
Number of values in first group of local use data |
| 13-16 |
Reference value of first group of data (R) (IEEE 32-bit floating-point value) |
| 17-18 |
Decimal scale factor (D) |
| 19 |
Number of bits to pack each value of the first group of data with |
| 20 |
Type of data in first group ("0"=floating point, "1"=integer) |
| 21-N |
The first group of data packed using the simple packing method |
Data Encoding Details
Grids of weather are stored as two distinct entities.
The first entity is a grid of small integer values that will
generally store very compactly in Section 5. The second
entity is a series of null-terminated strings of ASCII
characters called keys (weather keys). The integers on the
weather grid serve as indices, each pointing to one of the
unique keys in the series. Each key is comprised of one or
more subkeys, separated by a caret "^".
The metadata packed in the Local Use Section for the weather
element 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 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
key. The tables that follow show the specific contents of
the weather keys/subkeys.
Data: Weather Keys and Subkeys
A weather subkey 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.
- zero or more attribute codes, separated by commas ",". See Attribute Codes, below.
Weather Type Codes
| Code |
Value |
Code |
Value |
| <NoWx> | No Weather | T | Thunder |
R | Rain | RW | Rain Showers |
| ZR | Freezing Rain | IP | Ice Pellets (sleet) |
| S | Snow | SW | Snow Showers |
| Weather Types Not Currently Used in GMOS Weather |
| A |
Hail |
L |
Drizzle |
| ZL |
Freezing Drizzle |
F |
Fog |
| H |
Haze |
BS |
Blowing Snow |
| K |
Smoke |
BD |
Blowing Dust |
| BN |
Blowing Sand |
Coverage/Probability Codes
| Code | Meaning | Code | Meaning |
| SChc | Slight Chance |
Iso | Isolated |
| Chc | Chance of |
Sct | Scattered |
| Lkly | Likely |
Num | Numerous |
| Def | Definite |
<NoCov> | No Coverage / probability |
| Coverage/Probability Codes Not Currently Used in GMOS Weather |
| Wide |
Widespread |
Ocnl |
Occasional |
| Patchy |
Patchy |
Areas |
Areas of |
| Pds |
Periods of |
Frq |
Frequent |
| Inter |
Intermittent |
Brf |
Brief |
Intensity Codes
| Code | Meaning | Code | Meaning |
| <NoInten> | No Intensity |
+ | Heavy |
| - | Light |
m | Moderate |
| Coverage/Probability Codes Not Currently Used in GMOS Weather |
| -- |
Very Light |
Visibility Codes
The following visibility codes may appear in MOS 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
MOS weather grids will not generally have attribute codes.
Size Limitations for MOS Weather Grids
There is no (practical) limit to the number of weather keys,
subkeys, etc. For MOS weather grids, a maximum of 5 weather
subkeys in a weather key will be present.
Weather Key Examples
| Sample Weather Key |
Meaning |
| Sct:SW:-:<NoVis>: |
Scattered snow showers |
Ocnl:R:-:<NoVis>:^S:Ocnl:-:<NoVis>:^
SChc:ZR:-:<NoVis>: |
Occasional rain and snow, with a slight chance of freezing rain |
| Wide:FR:-:<NoVis>:OLA |
Widespread frost in the outlying areas |
| <NoWx>:<NoCov>:<NoInten>:<NoVis>: |
No weather |
| Sct:RW:-:<NoVis>:^T:Iso:m:<NoVis>: |
Scattered showers with isolated thunderstorms |
| Sct:T:+:<NoVis>:DmgW,LgA |
Scattered severe thunderstorms with damaging winds and large hail |
Page Last Modified: August 11 2011 19:37:26 UTC
|