<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">For example, this file:</div><div class=""><a href="https://nomads.ncep.noaa.gov/pub/data/nccf/com/blend/prod/blend.20200224/17/grib2/blend.t17z.master.f001.co.grib2" class="">https://nomads.ncep.noaa.gov/pub/data/nccf/com/blend/prod/blend.20200224/17/grib2/blend.t17z.master.f001.co.grib2</a></div><div class=""><br class=""></div><div class="">The grib specifies a lower bound latitude which isn’t being properly converted to the upper bound latitude that gdal wants.</div><div class=""><br class=""></div><div class="">I traced this back to here: <a href="https://github.com/OSGeo/gdal/blob/master/gdal/frmts/grib/gribdataset.cpp#L2127" class="">https://github.com/OSGeo/gdal/blob/master/gdal/frmts/grib/gribdataset.cpp#L2127</a> 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 & <span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">GRIB2BIT_2) </span>== GRIB2BIT_2)) but this line hasn’t changed from GDAL 2.</div><div class=""><br class=""></div><div class="">I did see this comment <a href="https://github.com/OSGeo/gdal/blob/master/gdal/frmts/grib/degrib/degrib/metaparse.cpp#L1259" class="">https://github.com/OSGeo/gdal/blob/master/gdal/frmts/grib/degrib/degrib/metaparse.cpp#L1259</a></div><div class="">which makes me think something changed with the underlying grib2 libraries?</div><div class=""><br class=""></div><div class="">Any thoughts on the best way forward?</div><div class=""><br class=""></div><div class="">Zac</div></body></html>