wgrib2: -timer (requires wgrib2 v3.0.0+)
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
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
This option uses the OpenMP funcion omp_get_wtime(), and require
compilation with OpenMP.
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
$ 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
Writing of the CSV is taking about 0.06 seconds per field.