wgrib2: -var, -ext_name, -set_ext_name
Introduction
The -var option prints the VARIABLE name of
the grib message. Common names would be HGT and TMP for the geopotential
height and the temperature. For most knowing the variable name,
the level and the timimg information is all you need. Then things
became more complicated. Eventually a file came along which had only
one variable type (MASSDEN, mass density) but had a couple of
important qualifier chemical type (H2O/O3/N02) and ensemble member ID.
The -AAIG output was useless because its output
used the variable name.
To fix the -AAIG output, an extended name
was introduced. You can see the extended name by
the -ext_name option.
-sh-2.05b$ ./wgrib2 chem.grb2
1:0:d=2009012600:MASSDEN:surface:anl:ENS=hi-res ctl chemical=Water Vapour
-sh-2.05b$ ./wgrib2 chem.grb2 -ext_name
1:0:MASSDEN.hi-res_ctl.Water_Vapour
-sh-2.05b$ ./wgrib2 chem.grb2 -misc
1:0:ENS=hi-res ctl:chemical=Water Vapour
The extended name takes the output of -misc,
changes the colons to periods, spaces to underscores and removes the
text up to the equal size and appends it to the variable name. As of
wgrib2 v1.9.0, the extended name is used with
-AAIGc, -csv, and -netcdf.
To stop using the extended name in -AAIG, -csv and -netcdf, use the option
-set_ext_name 0.
Usage
-ext_var
-set_ext_name 0/1
-var
Examples
-sh-2.05b$ ./wgrib2 chem.grb2 -var
1:0:MASSDEN
-sh-2.05b$ ./wgrib2 chem.grb2 -ext_name
1:0:MASSDEN.hi-res_ctl.Water_Vapour
See also: -s
|