Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • before encoding, in order to tell ecCodes what units are we dealing with
  • when decoding, in order to tell ecCodes what units to get the step in

Examples:

Code Block
languagebash
# grib_ls and grib_get will return the step in hours by default (stepUnits=h)

   % grib_set -s step=3600 file.grib out.grib 
   % grib_get -p startStep,endStep,stepRange,stepUnits:s,stepType out.grib
   3600 3600 3600 h instant 
   % grib_set -s stepUnits=m,step=3600 file.grib out.grib 
   % grib_get -p startStep,endStep,stepRange,stepUnits:s,stepType out.grib
   60 60 60 h instant

# To get the step in the units we want, one could use grib_filter like this:

   % cat step.filter
   set stepUnits="m";
   print "[startStep] [endStep] [stepRange] [stepUnits:s] [stepType]";
   
   % grib_filter step.filter out.grib
   3600 3600 3600 m instant

...