Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gdalinfo reports wrong corner coordinates for DWD grib2 #10655

Closed
trufanov-nok opened this issue Aug 27, 2024 · 0 comments · Fixed by #10656
Closed

gdalinfo reports wrong corner coordinates for DWD grib2 #10655

trufanov-nok opened this issue Aug 27, 2024 · 0 comments · Fixed by #10656
Assignees

Comments

@trufanov-nok
Copy link

What is the bug?

I have a grib2 file which corner coordinates is reported as:

Upper Left  ( 179.9375000,  90.0625000) (179d56'15.00"E, 90d 3'45.00"N)
Lower Left  ( 179.9375000, -90.0625000) (179d56'15.00"E, 90d 3'45.00"S)
Upper Right (     539.812,      90.062) (Invalid angle, 90d 3'45.00"N)
Lower Right (     539.812,     -90.062) (Invalid angle, 90d 3'45.00"S)
Center      (     359.875,       0.000) (359d52'30.00"E,  0d 0' 0.01"N)

by gdalinfo --version:

GDAL 3.8.4, released 2024/02/08
and
GDAL 3.6.2, released 2023/01/02

and same command and input file gives

Upper Left  (-180.0625000,  90.0625000) (180d 3'45.00"W, 90d 3'45.00"N)
Lower Left  (-180.0625000, -90.0625000) (180d 3'45.00"W, 90d 3'45.00"S)
Upper Right ( 179.8125000,  90.0625000) (179d48'45.00"E, 90d 3'45.00"N)
Lower Right ( 179.8125000, -90.0625000) (179d48'45.00"E, 90d 3'45.00"S)
Center      (  -0.1250000,   0.0000000) (  0d 7'30.00"W,  0d 0' 0.01"N)

with

$ gdalinfo --version
GDAL 2.4.0, released 2018/12/1

Steps to reproduce the issue

The grib2 file is attached:
1.grib2.zip

Just execute gdalinfo 1.grib2 with a proper gdalinfo version

Versions and provenance

non-working:
Kubuntu 24.04 with GDAL 3.8.4, released 2024/02/08
Astra Linux 1.8 with GDAL 3.6.2, released 2023/01/02

working:
Astra Linux 1.7 with GDAL 2.4.0, released 2018/12/1

Additional context

The details on how to generate such file:

Basically it's a DWD ICON meteo file obtained fronm one of these folders:
https://opendata.dwd.de/weather/nwp/icon/grib/18/clct/
It's originally in icosaedric projection thus need to be converted to cartesian with cdo tool. It must be 2.2.1+ due to this bug.

I tried 2.2.1 and 2.4.3 - both produce the file that has this issue.
Conversion command is:
cdo -O -f grb2 remap,target_grid_world_0125.txt,weights_icogl2world_0125.nc original.grib2 1.grib2
here 1.grib2 is a result file (it's attached)
original.grib2 - is a file downloaded from DWD
target_grid_world_0125.txt and weights_icogl2world_0125.nc files are auxilary data that should be downloaded from here according to their manual

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants