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

Problem with NOAA GRIB2 Files #6613

Closed
simoneves opened this issue Nov 4, 2022 · 1 comment
Closed

Problem with NOAA GRIB2 Files #6613

simoneves opened this issue Nov 4, 2022 · 1 comment
Assignees

Comments

@simoneves
Copy link

One of our customers has some files from NOAA which are causing our GDAL-based raster loader some issues.

An example file, and associated index file:
https://nomads.ncep.noaa.gov/pub/data/nccf/com/nam/prod/nam.20221101/nam.t00z.awphys00.tm00.grib2
https://nomads.ncep.noaa.gov/pub/data/nccf/com/nam/prod/nam.20221101/nam.t00z.awphys00.tm00.grib2.idx

gdalinfo fails after a few bands with:

Band 9 Block=614x1 Type=Float64, ColorInterp=Undefined
  Description = VGRD:planetary boundary layer:anl
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_M_construct null not valid
Aborted (core dumped)

...and our loader throws basically the same error. gdalwarp has the same issue with an attempt to copy to a GeoTIFF.

If you hide the .idx file, we can load it, and both tools also run to completion, but apparently this isn't acceptable because the band indexing is mixed up.

The issue appears to be that the .idx file contains some fractional index numbers (e.g. 8.1 and 8.2)

We are currently building with 3.4.1 but I tried a build of 3.5.3 and it fails the same way.

I thought that PR #5569 might be related but apparently not, given the above.

@rouault rouault self-assigned this Nov 4, 2022
@rouault rouault closed this as completed in 7274b48 Nov 4, 2022
rouault added a commit that referenced this issue Nov 4, 2022
GRIB2: fix crash and invalid metadata when processing index .idx file with sub-messages (fixes #6613)
rouault added a commit that referenced this issue Nov 4, 2022
@simoneves
Copy link
Author

@rouault thank you, as always! :)

rouault added a commit that referenced this issue Nov 6, 2022
[Backport release/3.6] GRIB2: fix crash and invalid metadata when processing index .idx file with sub-messages (fixes #6613)
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

No branches or pull requests

2 participants