...
Excerpt | ||
---|---|---|
| ||
There is an environment variable called ECCODES_DEBUG: If set to -1, it will enable brief debug-level logging messages to be displayed by the library. If set to 1, you will get very verbose output. |
How can I set the verbosity level to see debug output?
Step-by-step guide
There is an environment variable called ECCODES_DEBUG: If set to -1, it will enable brief debug-level logging messages to be displayed by the library. If set to 1, you will get very verbose output.
For example let's say we want to change the grid type of a GRIB message to be "Lambert Conformal":
...
- Here the debugging output tells us setting the key "gridType" (whose type is "string") causes a low-level key "gridDefinitionTemplateNumber" (whose type is "long" i.e. integer) to be 30 (Also see http://apps.ecmwf.int/codes/grib/format/grib2/templates/3/30).
Another example showing what happens when you set the "shortName":
Code Block % export ECCODES_DEBUG=-1 % grib_set -s shortName=2t in.grib2 out.grib2 ECCODES DEBUG grib_set_string shortName=|2t| ECCODES DEBUG grib_set_long discipline=0 ECCODES DEBUG grib_set_long parameterCategory=0 ECCODES DEBUG grib_set_long parameterNumber=0 ECCODES DEBUG grib_set_long typeOfFirstFixedSurface=103 ECCODES DEBUG grib_set_long scaleFactorOfFirstFixedSurface=0 ECCODES DEBUG grib_set_long scaledValueOfFirstFixedSurface=2
Now you can see the cascading effect of setting a key which causes others to be set. Try it when you convert from GRIB1 to GRIB2 to see how much happens behind the scenes!
Related articles
Content by Label | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...