efficiently. Climate Prediction Center - wgrib2: -set_grib_max_bits
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 -set_grib_max_bits
 

wgrib2: -set_grib_max_bits

Introduction

With the grib format, the binary precision of the grid point values is specified when the file is written. The grib format allows a precision up to 254 (simple packing) but no grib decoder supports that high precision. A reasonable limit to the precision is 24 which is the precision of an IEEE 4-byte floating point numbers and is easy for 32-bit computers to handle efficiently.

The -set_grib_max_bits option sets the maximum number of bits that can be used when encoding data into grib. The value should never be greater than 25 if you want to remain compatible with wgrib2 on 32-bit computers. (The limit may be different with other software.) The -set_grib_max_bits option does not set the binary precision of the grib output but prevents the precision from getting too large.

Usage

-set_grib_max_bits N
  N = maximum number of bits used to encode data

Comments

The -set_grib_max_bits option does not affect grib data written using the -grib option because the -grib option does not encode data but uses the current "in-memory" copy of the encoded data.

See alse: -set_scaling -set_bin_prec


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: May 15, 2005
Disclaimer Privacy Policy