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-get_hex

wgrib2: -get_hex


The -get_hex option is identical to the -get_byte option excepts it prints the bytes in hexidecimal format. see the 20 and 21 octet (byte in WMO speak) of section 4, you would use -get_byte 4 20 2. The first arguement is the section number. The second is the byte (octet) number starting from 1 (consistent with WMO documentation) and the third is the number of octets to display.

The input arguments to the option are in decimal rather than in hexidecimal because all the grib2 documentation uses decimal numbers to specify the byte locations.


SECTION = section to print
OCTET = starting octet to print
NUMBER = number of octets/bytes to print


$ wgrib2 f.grb2 -get_hex 0 1 12
See also: new grib, -set_byte -get_ieee -get_int

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