27.03.2013 Views

Guide to WMO Table Driven Code Forms

Guide to WMO Table Driven Code Forms

Guide to WMO Table Driven Code Forms

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

1.2.2 <strong>Code</strong> Templates<br />

Although not referred <strong>to</strong> as such, the template concept is used in GRIB1 in the Grid Description<br />

Section, where octets 6 – 32 are defined as follows:<br />

Octet 6 Data representation type (see <strong>Table</strong> 6)<br />

Octets 7 – 32 Grid definition (according <strong>to</strong> data representation type – octet 6<br />

above)<br />

Thus, the contents of octets 7 – 32 are not explicitly defined. Rather, the value in octet 6 refers <strong>to</strong><br />

an entry in GRIB1 <strong>Table</strong> 6, and that entry defines the contents of octets 7 – 32. In the<br />

nomenclature of GRIB2, the contents of octet 6 would be referred <strong>to</strong> as the template number, and<br />

the contents of octets 7 – 32 would be referred <strong>to</strong> as the template. In GRIB2, this powerful<br />

concept has been retained in the Grid Definition Section, but expanded <strong>to</strong> product definition and<br />

data representation as well. It has also been made more flexible by leaving variable the number of<br />

octets used for the template. The separation of identification, product definition and data<br />

representation in<strong>to</strong> separate sections facilitates this application of the template concept in GRIB2.<br />

Thus, there are three categories of GRIB2 templates – Grid Definition Templates, Product<br />

Definition Templates, and Data Representation Templates. They are identified by the Grid<br />

Definition Template Number, Product Definition Template Number, and Data Representation<br />

Template Number, respectively. These template numbers are coded in the appropriate section.<br />

Two octets are allocated for each template number, ensuring table space will not become<br />

exhausted.<br />

When a new product, new grid, or new type of data representation is needed, one has <strong>to</strong> simply<br />

define the appropriate new template(s) and submit them <strong>to</strong> the ICT/DRC for approval (the approval<br />

process is described in Section 1.3 of this Layer). With ample table space allowed, GRIB2 thus<br />

possesses the flexibility <strong>to</strong> represent virtually any product using virtually any type of data<br />

representation on virtually any type of grid projection both now and in the future.<br />

The templates themselves are somewhat complicated. They are described in detail in Layer 2 of<br />

this <strong>Guide</strong>.<br />

1.2.3 <strong>Table</strong>s<br />

Because of the extensive use of templates, there are two categories of tables in GRIB2 –<br />

Template <strong>Table</strong>s and <strong>Code</strong> and Flag <strong>Table</strong>s. The tables in both categories are numerous and, at<br />

times, complicated. In fact, the tables form by far the largest part of the documentation of GRIB2<br />

in the Manual on <strong>Code</strong>s. Both types of tables are described briefly below and in detail in Layer 2<br />

of this <strong>Guide</strong>.<br />

1.2.3.1 Template <strong>Table</strong>s<br />

All templates are described in the Template <strong>Table</strong>s. These <strong>Table</strong>s are categorized by the Section<br />

number in which the templates are found. In the tables, the templates themselves are labelled<br />

m.n, where m is the number of the section is which the template is found and n is the template<br />

number coded in the appropriate section. The name of the template is given by a code table and<br />

is also referred <strong>to</strong> by the template number n. The first quantity in each template is in the octet<br />

specified in its respective section. Although the templates have variable lengths, the last octet of<br />

the template can always be calculated from values coded in the section.<br />

6

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!