1

So what I am trying is converting a GRIB1 file to GRIB2 containing mostly wind data. Usually you can just change the edition to 2 and the eccodes lib does everything else.

Now the issue is that my GRIB1 file has only paramId=0 and shortName=unknown messages. What the hell am I supposed to do? When I load it into a viewer (e.g. PredictWind Offshore) it displays just fine. Any ides on how I can convert this to GRIB2 without knowing the messages? Am I missing something?

What I already tried:

❯ grib_set -s edition=2 e1.grib e2.grib
ECCODES ERROR   :  concept: no match for paramId=0
ECCODES ERROR   :  Please check the Parameter Database 'https://apps.ecmwf.int/codes/grib/param-db/?id=0'
ECCODES ERROR   :  concept: input handle edition=2
ECCODES ERROR   :  grib_set_values[0] edition (type=long) failed: Concept no match

What my GRIB1 (e1.grib) looks like:

❯ grib_dump e1.grib | egrep 'paramId|shortName'
  ...
  shortName = unknown;
  paramId = 0;
  ...

❯ grib_dump dsv1.grib | egrep 'paramId' | wc -l
     679 # all unknown and 0

Edit:

For future readers:

I ended up not using eccodes at all. My solution now involves using PyNIO which worked great for me. It is able to read GRIB1. For further info contact me directly.

b3z
  • 149
  • 1
  • 1
  • 10

0 Answers0