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

Some GRIB2 files cause GDAL to emit unsuppressable warnings and errors to console, despite successful parsing and processing of the file #8574

Closed
potion-cellar opened this issue Oct 18, 2023 · 1 comment
Assignees

Comments

@potion-cellar
Copy link

Expected behavior

I can use GDAL to process GRIB2 files successfully in quiet mode without messages being logged to console.

Actual behavior

GDAL logs warning and error messages to console in quiet mode, despite successfully processing the GRIB2 file.

Reproduction

Attached is a GRIB2 file from the HRRR weather model, which is the most frequent culprit. When handling these GRIB2 files, the console is cluttered with

Warning: Inside GRIB2Inventory, Message # 2
ERROR: Couldn't find 'GRIB' or 'TDLP'

despite running GDAL in quiet mode.

Regardless, the file is processed correctly.

When this weather model is processed as part of a data processing pipeline, the console is filled with thousands of these messages with no easy way to suppress them.

You can gdalinfo this file and see the warning message emitted before the gdalinfo output:
hrrr_temperature.grib2.zip

Operating system

All

GDAL version and provenance

3.7.2 (but this has been an issue for years)

@rouault rouault self-assigned this Oct 18, 2023
@rouault
Copy link
Member

rouault commented Oct 18, 2023

the warning message is legitimate (there is 1 trailing byte at the end of the GRIB file), but in #8576 I've reduced its verbosity as a GDAL debug message (so not visible by default)

rouault added a commit that referenced this issue Oct 27, 2023
GRIB: only emit a CPLDebug() instead of a message on stdout when there are trailing bytes (fixes #8574)
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