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

wgrib2: -tosubmsg

Introduction

The -tosubmsg writes out the current field as a submessage in a larger grib message. This can save space as various sections do not have to be repeated. For example, often you only need one grid definition section for all the submessages. This feature can save space when the bitmaps are repeated. By combining the fields into one message, only one copy of the bitmap is needed.

  • A few codes do not handle submessages
  • Decoders tend to load the entire grib message into memory. Loading a 2 GB grib message could be a problem on smaller machines.
  • Inefficient with "partial-http downloading" (of concern to web servers)

    Usage

    -tosubmsg OUTPUT_FILE
    -1 for the checksum of the entire message
    1..8 for the checksum of section N
    

    Example

    $ wgrib2 test.grb2 -tosubmsg new.grb2
    
    1:0:d=2008120200:TMP:800 mb:anl:
    2:4786:d=2008120200:TMP:750 mb:anl:
    3:9572:d=2008120200:RH:800 mb:anl:
    4:13335:d=2008120200:RH:750 mb:anl:
    5:17098:d=2008120200:TMP:2743 m above mean sea level:anl:
    
    Submessage statistics:
    - # submessages written  : 5
    - Kbytes saved           : 0
    - Kbytes written         : 20
    $ wgrib2  new.grb2
    1.1:0:d=2008120200:TMP:800 mb:anl:
    1.2:0:d=2008120200:TMP:750 mb:anl:
    1.3:0:d=2008120200:RH:800 mb:anl:
    1.4:0:d=2008120200:RH:750 mb:anl:
    1.5:0:d=2008120200:TMP:2743 m above mean sea level:anl:
    

    See also:


  • NOAA/ National Weather Service
    National Centers for Environmental Prediction
    Climate Prediction Center
    5200 Auth Road
    Camp Springs, Maryland 20746
    Climate Prediction Center Web Team
    Page last modified: May 15, 2005

    See also: -undefine


    NOAA/ National Weather Service
    National Centers for Environmental Prediction
    Climate Prediction Center
    5200 Auth Road
    Camp Springs, Maryland 20746
    Climate Prediction Center Web Team
    Page last modified: May 15, 2005
    Disclaimer Privacy Policy