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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The reference value R is placed in the data section as an IEEE 32-bit floating-point value, and<br />

hence occupies 4 octets. The IEEE representation of the reference value R used in GRIB2 is a<br />

departure from GRIB1, which used the standard IBM representation for a 32-bit real floating-point<br />

number. The IEEE single precision floating-point representation is specified in the standard<br />

ISO/IEC 559-1985 and ANSI/IEEE 754-1985 (R1991), which should be consulted for more details.<br />

The representation occupies four octets and is<br />

seeeeeee emmmmmmm mmmmmmmm mmmmmmmm<br />

where<br />

s is the sign bit; 0 means positive, 1 negative<br />

e…e is an 8 bit biased exponent<br />

m…m is the mantissa, with the first bit deleted.<br />

The following table gives the value of R:<br />

e…e m…m Value of R<br />

0 Any (-1) s (m…m)2 -23 2 -126 = (-1) s (m…m)2 -149<br />

1…254 Any (-1) s (1.0 + (m…m)2 -23 )2 ((e…e)-127)<br />

255 0 positive (s = 0) or negative (s = 1) infinity<br />

255 >0 NaN (Not A valid Number, result of illegal operations)<br />

Normally, only biased exponent values from 1 <strong>to</strong> 254 inclusive are used, except for positive or<br />

negative zero that are represented by setting both the biased exponent and the mantissa <strong>to</strong> 0.<br />

The numbers are s<strong>to</strong>red with the high order octet first. The sign bit will be the first bit of the first<br />

octet. The low order bit of the mantissa will be the last (eighth) bit of the fourth octet.<br />

This floating-point representation has been chosen because it is in common use in modern<br />

computer hardware. Some computers use this representation with the order of the octets<br />

reversed. They will have <strong>to</strong> convert the representation, either by reversing the octets or by<br />

computing the floating-point value directly using the above formulae.<br />

The uses of D, E, R, X1, and X2 in the various compression schemes allowed in GRIB2 are<br />

discussed in the remainder of this section.<br />

2.3.1 Grid Point Data - Simple Packing<br />

As we found in Section 2.2.3, when the Grid Point Data - Simple Packing compression scheme is<br />

used, the Data Representation Section becomes:<br />

36

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

Saved successfully!

Ooh no, something went wrong!