Skip Navigation Links 
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, -import_grib


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. The -import options are the means that wgrib2 creates new grib files (read existing grib file, import data, change metadata, write new grib file).

Note that the import functions will the precision of the grib writing (new files) to the default (12 bits which can be changed).


-import_bin data.txt              .. a binary (native format floating point) file
                                       -header and -no_header affect the format
-import_ieee            .. a big-endian 32-bit ieee file
                                       -header and -no_header affect the format
-import_text data.txt		  .. a text file
                                       -header and -no_header affect the format
-import_grib data.grb2            .. a grib2 file, only -g2clib 0 and -g2clib 1 supported
                                       conversion to we:sn and we:ns is done

Note: the bin/ieee/text/grib formats are the same as from the output options
  -bin, -ieee, -text and -grib/-grib_out  with the exception that little_endian ieee
  is not supported.

Many scripts use the import option.

  1. - grads script a field to grib2
  2. - grib1 to grib2 conversion
  3. - compare two grib2 files
  4. - compare two grib1 and grib2 files

See also:

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