Versions Compared

Key

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

...

Examples of grib_check.py usage

grib_check options
Code Block
usage: grib_check.py [-h] [-v VERBOSITY] [-w] [-f] [-his] [-l [LISTING]]
                     [inp_file [inp_file ...]]

positional arguments:
  inp_file              enter input file name(s)

optional arguments:
  -h, --help            show this help message and exit
  -v VERBOSITY, --verbosity VERBOSITY
                        increase output verbosity [0-2]
  -w, --warning         warnings are treated as errors..
  -f, --fail            force abort for undefined parameters..
  -his, --history       add value ranges history, if exists, to listing..
  -l [LISTING], --listing [LISTING]
                        list defined parameters (search if argument provided!)

Checking LC-WVF data
export BIN=/home/ma/emos/def/s2s/s2s_prod/bin

python $BIN/grib_check.py lw.grib2
warning: lw.grib2, field 700 (Peak wave period, paramId=140231), matched definition (default) => minimum value -9.699028 is not in [0.000000,35.000000]
warning: lw.grib2, field 718 (Peak wave period, paramId=140231), matched definition (default) => maximum value 41.463626 is not in [0.000000,35.000000]
Checking parameter set up

List all defined limits

python $BIN/grib_check.py -l
165   [10 metre U wind component]   [min <-150, -0.1> max <0.1, 150>] (default)  
                                   [min <-150, -0.1> max <0.1, 150>] (class:ti, model:lam, suiteName:mogreps-mo-eua)  
166   [10 metre V wind component]   [min <-100, -1> max <0.5, 100>] (default)  
                                   [min <-100, 10> max <-10, 100>] (class:ti, model:lam, suiteName:mogreps-mo-eua)  
260260   [10 metre wind direction]   [min <0, 1> max <359, 360.1>] (default)

...

See allowed limits for parameters with paramId containing 141

...

The prerequisite is  to have eccodes python 3 modules available in the system. The tool itself consist of two python scripts attached to this page:

...