wgrib2: -import_bin, -import_ieee, -import_text
Introduction
wgrib2 will decode the grib file when necessary and save the decoded
grid point values in a floating point array (DATA). The -import
options read grid point values from a specified file and replace the values of DATA.
You would use the -import options to fix old grib files or
make new ones.
Note that the import functions will reset the precision of the grib writing (new files)
to 12 bits. Any -set_metadata should be done after the -import functions.
Usage
-import_bin data.txt .. a binary (native format floating point) file
-import_ieee data.ieee .. a big-endian 32-bit ieee file
-import_text data.txt .. a text file
note that the -header and -no_header affect the data file format
Example
wgrib2 IN.grb -bin dump.bin .. make a binary sequential file of the fields
Fix.sh dump.bin dump.bin.new .. alter dump.bin
wgrib2 IN.grb -set_grib_type same -import_bin dump.bin.new -grib_out IN.new.grb
The -import options reads the data for one field and overwrites
the current grid point values. The -grib_out option writes a new
grib message with the new grid point values.
See also:
-set_grib_type,
-undefine,
-grib_out,
|