Hi,
We noticed that somewhere along the line to GDAL 3 something changed with
respect to grib support and it now doesn’t correctly parse some projections.
For example, this file:
https://nomads.ncep.noaa.gov/pub/data/nccf/com/blend/prod/blend.20200224/17/grib2/blend.t17z.master.f001.co.grib2
<https://nomads.ncep.noaa.gov/pub/data/nccf/com/blend/prod/blend.20200224/17/grib2/blend.t17z.master.f001.co.grib2>
The grib specifies a lower bound latitude which isn’t being properly converted
to the upper bound latitude that gdal wants.
I traced this back to here:
https://github.com/OSGeo/gdal/blob/master/gdal/frmts/grib/gribdataset.cpp#L2127
<https://github.com/OSGeo/gdal/blob/master/gdal/frmts/grib/gribdataset.cpp#L2127>
where scan in this file is set to 80 not 64 so the if statement isn’t true.
This is fixable if we do proper flag checks i.e. (if ((meta->gds.scan &
GRIB2BIT_2) == GRIB2BIT_2)) but this line hasn’t changed from GDAL 2.
I did see this comment
https://github.com/OSGeo/gdal/blob/master/gdal/frmts/grib/degrib/degrib/metaparse.cpp#L1259
<https://github.com/OSGeo/gdal/blob/master/gdal/frmts/grib/degrib/degrib/metaparse.cpp#L1259>
which makes me think something changed with the underlying grib2 libraries?
Any thoughts on the best way forward?
Zac
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev