-
Notifications
You must be signed in to change notification settings - Fork 283
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
Add GRIB product definition template 40 #2020
Conversation
Concerningly, the test file I have with pdt 40 doesn't have a "ForecastTime" despite the grib spec saying there should be one. |
It looks like "forecastTime" is being encoded as "startStep":
|
c22524e
to
cb760e5
Compare
constituent_type = section['constituentType'] | ||
|
||
# Add the constituent type as an attribute. | ||
metadata['attributes']['constituent_type'] = constituent_type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may I suggest we make this name more specific, perhaps
WMO_constituent_type
or
GRIB_constituent_type
?
especially as a code table value is being stored
I wonder if this is a mistake in the GRIB API
looks like it to me perhaps you could add a code comment that this is a suspected bug in the GRIB API, so that we can remove it later if we can get the bug fixed? |
the testing looks great and the logic seems sound to me i think agreeing on the name of the custom attribute is outstanding, I have a small preference for looks pretty close to me |
I have:
|
Hi @lbdreyer looks great, please squish and I will merge mark |
How does this relate to the deprecation of grib support within iris and the move to an external package for grib handling? Should be be adding more features to a deprecated API, or are we not worrying, and once 1.10 is out we'll sync up iris.fileformats.grib and iris-grib? |
I have added this to iris, rather than just iris-grib, as a user needs this before Iris 1.10 is due to come out. |
@marqh squashed and tests are passing 😃 |
ace, nice one |
Not sure if I should tag this as 1.10 then. |
This adds support for product definition template 40.
The only difference between pdt 0 and 40 is the inclusion of "constituent type".
Grib does have a mapping for the constituent type value (e.g. 0 is ozone) but for now this mapping hasn't been implemented. Instead this PR just sets the value as an attribute of the cube.
Saving to pdt 40 to come in the next commit...