wgrib2: -g2clib
Introduction
Originally wgrib2 used the g2clib library for unpacking grid data section.
The first break from a complete dependence on the g2clib was adding support
for ieee-type grib files. Then grib1-style packing was moved from g2clib
to the optimized wgrib routines. Then jpeg, png and complex packing were
moved from g2clib to internal routines. For most files, you can use
either the internal routines or g2clib for decoding. The default
docoder is g2clib because g2clib is 100% compatible NCEP grib files.
The internal routines are follow the WMO standard. The cases were
the operational NCEP routines do not follow the WMO standard are
flagged.
Wgrib2 uses its own routines for encoding grib files. The
encoding follow the WMO standard but operatinal NCEP libraries
(g2clib and g2lib).
Differences as of October 2008
The NCEP encoding/decoding routines have a problem
with constant fields. The routines are consistent
with themselves so the problem wasn't noticed for many years.
The wgrib2 internal routines have the bug fix for this
problem. Note that wgrib2 still uses the g2clib for complex packing.
Consequently wgrib2 still has this bug with constant fields
using complex packing. (Status Nov 2011: no change)
The routines are slightly faster and don't complain when a "unknown"
grid template is found.
-g2clib
The -g2clib option allows you to select the internal/g2clib
decoder if the option exists. If X is 0, then internal routines are selected.
If X is 1, then the g2clib are selected. You would want to use the g2clib
when decoding NCEP files. This option is ignored for files that
are only supported by one of the decoders (ex. ieee and RLE packing).
Usage
-g2clib N N is 0 or 1
|