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

Do not implicitly set generatingProcessIdentifier when writing GRIB data #275

Merged
merged 2 commits into from
Jan 10, 2024

Conversation

sandorkertesz
Copy link
Collaborator

@sandorkertesz sandorkertesz commented Jan 9, 2024

Fixes #274

Previously, when writing a NumpyFieldList the generatingProcessIdentifier ecCodes GRIB key was always set to 255 (internally) in the output.

With this PR this key is not set implicitly but must be set explicitly in Metadata.override(). E.g.:

# ds is a fieldlist
md = ds[0].metadata().override(shortName="msl", generatingProcessIdentifier=255)
r = FieldList.from_numpy(ds[0].values, md)
r.save("my_data.grib")

@sandorkertesz sandorkertesz marked this pull request as draft January 9, 2024 18:47
@sandorkertesz sandorkertesz changed the title Add option to set generatingProcessIdentifier when writing GRIB data Do not implicitly set generatingProcessIdentifier when writing GRIB data Jan 9, 2024
@sandorkertesz sandorkertesz marked this pull request as ready for review January 10, 2024 08:04
@sandorkertesz sandorkertesz merged commit e2aa82b into develop Jan 10, 2024
52 checks passed
@sandorkertesz sandorkertesz deleted the feature/generatingProcessIdentifier branch January 10, 2024 08:05
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.

Do not implicitly set generatingProcessIdentifier when writing GRIB numpy fieldlist
1 participant