wgrib2: -set_var
Introduction
Please see new grib for the basic
concepts of making new grib files.
The -set_var option changes the variable
name of the in-memory grib (sub-)message. You can write
out the message with the new name by the
-grib (fast) and
-grib_out (slow) options. Of course
if the in-memory grid values have changed, you have to use
the latter option.
Usage
-set_var X X=valid grib variable name such as HGT or TMP
Example
$ wgrib2 p.grb
1:0:d=2009072100:PRES:mean sea level:anl:
$ wgrib2 p.grb -set_var TMP -grib out.grb
1:0:d=2009072100:TMP:mean sea level:anl:
$ wgrib2 out.grb
1:0:d=2009072100:TMP:mean sea level:anl:
The -set_var option will rename
all the fields in a grib file. If you only want to rename
specific fields, you will have to use the
-if and -fi options.
See also:
-fi,
-grib,
-grib_out,
-if
-set_metadata
|