wgrib2: -GRIB
Introduction
The -GRIB option is used to copy an entire
GRIB2 message (including all the submessages) to a specified file.
This is useful if you want to preserve to keep the submessages.
This is in contrast to the -grib option which writes
submessages into its own grib message.
The -GRIB option should only be used
to copy the original grib message to another file. Unlike the
the -grib option, changing the metadata
is not recommended.
Usage
-GRIB file_name
Example
The grib standard allows arbitrary data between grib messages.
Sometimes one want to remove this "junk" and only keep the grib
messages. For grib files with no submessages, the cleaning
operation is simple.
$ wgrib2 IN.grb -grib OUT.grb
For files with grib submessages, the cleaning can be done by,
$ wgrib2 IN.grb -if "^[0-9]*(\.1:|:)" -GRIB OUT.grb all versions of wgrib2
$ wgrib2 IN.grb -if "^[0-9]*(\.1:|:)" -GRIB OUT.grb -endif wgrib2 v3.0.0+
-if "^[0-9]*(\.1:|:)" matches message number XXX or XXX.1, single grib message or first grib submessage
-GRIB write grib message including any submessage
See also: -grib
-ncep_uv
-submsg
-tosubmsg
-append
|