[gdal-dev] Problem opening new format ECMWF grib files

Simon Proud - STFC UKRI simon.proud at stfc.ac.uk
Tue Jul 11 12:01:47 PDT 2023


Hello,
I'm trying to open a grib format file from ECMWF. The file is generated using the ECMWF open data python library as follows:

from ecmwf.opendata import Client
client = Client()

result = client.retrieve(
    type="fc",
    param="skt",
    step="0",
    target="data.grb2",
)

This produces a grib file I can read with cfgrib and eccodes but not with gdal:
>>>gdalinfo data.grib2
      getdrstemplate: DRS Template 5.42 not defined.
      ERROR 4: data.grib2 is a grib file, but no raster dataset was successfully identified.
             gdalinfo failed - unable to open 'data.grib2'.


I suspect this may be due to changes in their grib format, see: https://confluence.ecmwf.int/display/COPSRV/Implementation+of+IFS+cycle+48r1+for+CAMS#ImplementationofIFScycle48r1forCAMS-DefaultpackingtypesfordatafromDisseminationandMARS


Am I correct in this assumption and, if so, is there a way around it in GDAL? Otherwise, any clues what could be the problem with this grib?

Thanks,
Simon

--
Dr Simon Proud (he/him)
Senior Remote Sensing Scientist
RAL Space | National Centre for Earth Observation
Science and Technology Facilities Council
simon.proud at stfc.ac.uk<mailto:simon.proud at stfc.ac.uk> | www.ralspace.stfc.ac.uk<https://www.ralspace.stfc.ac.uk/>
Rutherford Appleton Laboratory | Harwell Campus | Didcot
Tel: +44 1235 445620
Twitter: @simon_sat

[X]  [signature_165909100]
STFC and NCEO are part of UK Research and Innovation. www.ukri.org<https://www.ukri.org/>


-----

Due to childcare arrangements, my normal working hours may not be the same as yours. If you receive an email from me at an odd time, please do not feel the need to reply until your own normal working day.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230711/660aade3/attachment-0001.htm>


More information about the gdal-dev mailing list