Skip Navigation Links www.nws.noaa.gov 
NOAA logo - Click to go to the NOAA home page National Weather Service   NWS logo - Click to go to the NWS home page
Climate Prediction Center
 
 

 
About Us
   Our Mission
   Who We Are

Contact Us
   CPC Information
   CPC Web Team

 
HOME > Monitoring_and_Data > Oceanic and Atmospheric Data > Reanalysis: Atmospheric Data > wgrib2-import_(bin,ieee,text)
 

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,


NOAA/ National Weather Service
National Centers for Environmental Prediction
Climate Prediction Center
5830 University Research Court
College Park, Maryland 20740
Climate Prediction Center Web Team
Page last modified: Aug 22, 2013.
Disclaimer Privacy Policy