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

wgrib2: -timer (requires wgrib2 v3.0.0+)

Introduction

The -start_timer and -timer options were designed for developers and people who want to know how fast wgrib2 is running. Most users can ignore these options.

The -timer option prints out the time in seconds since the last -start_timer or -timer option was executed. The -timer option is executed in the initialization phase (no output) and the finalization phase (extra output). The timer is active in the finalization phase in order to time the finialization of options.

This option uses the OpenMP funcion omp_get_wtime(), and require compilation with OpenMP.

Usage

-start_timer
   sets timer_time=0
-timer
   prints timer_time in seconds.  
   sets timer_time = 0;
   at end of processing, prints the average if these results

  note: there is only one instance of timer_time
        timer_time is set to 0 in the initialization of wgrib2

Example

$ wgrib2 gep19.aec -s -start_timer -csv junk.csv -timer
1:0:d=2009060500:HGT:200 mb:180 hour fcst:ENS=+19:time=0.068086
2:70707:d=2009060500:TMP:200 mb:180 hour fcst:ENS=+19:time=0.064850
3:96843:d=2009060500:RH:200 mb:180 hour fcst:ENS=+19:time=0.055596
...
51:2278237:d=2009060500:PRMSL:mean sea level:180 hour fcst:ENS=+19:time=0.065116
finalize-time=0.000015:ave_time=0.061512 count=51

Writing of the CSV is taking about 0.06 seconds per field.

See also: -alarm, -start_timer,


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 created: March 21, 2019
Disclaimer Privacy Policy