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

wgrib2: -submsg

Introduction

Usually wgrib2 ignores the distinction between messages and submessages; wgrib2 treats sugmessages like messages except that the "message number" in the inventory is replaced by a "message number.submessage number" in the inventory. If you want to work with submessages, the following options are availble.

  1. -GRIB FILE : copy a message to FILE
  2. -ncep_uv FILE : combine U,V into a message like in NCEP operations
  3. -tosubmsg FILE : create a file with submessages
  4. -submsg N : process by submessage number

The -tosubmsg N option allows to process by submessage number. If the N is zero, all the submessages are processed which pretty pointless as this the default operation. If N is one, then all the messages are processed once. (Messages with only one field are considered to have one submessage.) The following will copy from IN.grb to OUT.grb and preserve the submessage structure.

$ wgrib2 IN.grb -submsg 1 -GRIB OUT.grb
This will copy all the 200 mb fields assuming U/V are in the same message and keep U/V in the same message.
$ wgrib2 IN.grb -submsg 1 -if ":200 mb:" -GRIB 200mb.grb

Usage

-submsg N
N is an integer, usually 1

Example

$ wgrib2 test.grb2 -submsg 1 -if ":200 mb:" -GRIB 200.grb2 -if ":100 mb:" -GRIB 100.grb2

See also: -ncep_uv, -GRIB, -tosubmsg


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

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