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 -set_ftime (new version v2.0.7)

wgrib2: -set_ftime


The wgrib2 inventory has a fragment that looks like

   :d=2014122500:12 hour fcst:vt=2014122512

   d=2014122500 is the Reference time, usually the analysis or start of the forecast time.
   12 hour fcst is the "ftime", the time is 12 hours after the reference time
   vt=2014122512 is the verification time (ref time + 12 hours)
Wgrib2 has options to change the reference time (-set_time) and to set the ftime. The -set_ftime v2 (introduced with wgrib2 v2.0.7) is easier to use and will change the Product Definition Templates as needed. For compatibility, -set_ftime v1 is still available on wgrib2 v2.0.7+. However, -set_ave and -set_ftime v1 should not be used as they will be eventually removed.

To change the ftime, you add the option -set_ftime FTIME. What are the allowed formats of FTIME? The formats are the same as ftimes from a wgrib2 inventory.

Original: :d=2014113018:6 hour fcst:
options:  -set_date 2014122500 -set_ftime "12 hour fcst"
New:      :d=2014122500:12 hour fcst:

Original: :d=2014113018:6 hour fcst:
options:  -set_date 2014122500 -set_ftime "0-6 hour ave fcst"
New:      :d=2014122500:0-6 hour ave fcst:

Original: :d=2014113018:6 hour fcst:
options:  -set_date 2014122500 -set_ftime "124@6 hour ave(0-6 hour ave fcst),missing=0"
New:      :d=2014122500:124@6 hour ave(0-6 hour ave fcst),missing=0:

After changing the time stamp, you can save the file with -grib NEW.grb

With wgrib2 v2.0.6 or earlier, you have to use -set_ave and -set_ftime (v1). Only a subset of PDTs were supported by -set_ave and -set_ftime (v1). 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: May 15, 2005, April 2020, Nov 2023
Disclaimer Privacy Policy