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

Cleanup of GRIB2 message indexing and allow for GRIB1 message to be ignored #129

Merged
merged 5 commits into from
Jan 23, 2024

Conversation

EricEngle-NOAA
Copy link
Collaborator

No description provided.

The indexing code has been cleaned up significantly.  The index
dictionary now contains offsets and sizes for all sections, for all
messages.  This will help for a future change to allow for in-place
modification of GRIB2 metdata back into the input file -- similar to how
you can edit NetCDF attributes with mode = 'a'.

The new code logic allows for a simplified process for managing GRIB2
messages that contain submessages.

Additionally with this commit, grib2io can now safely ignore GRIB1
messages. ECMWF GRIB files can contains GRIB1 and GRIB2 (...ugh...).
Replace with datetime.timestamp(timestamp, datetime.UTC)
Some necessary changes to the grib2io xarray backend because of changes
to the index dictionary structure.
Handle getting timestamp for different Python versions.
[skip ci]
@EricEngle-NOAA EricEngle-NOAA marked this pull request as ready for review January 23, 2024 16:03
@EricEngle-NOAA EricEngle-NOAA merged commit 46e669e into master Jan 23, 2024
@EricEngle-NOAA EricEngle-NOAA deleted the index-cleanup branch January 23, 2024 16:03
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 this pull request may close these issues.

1 participant