-
Notifications
You must be signed in to change notification settings - Fork 44
Get iris-grib working with latest versions of its dependencies (Iris, eccodes, cftime, cartopy, proj) #288
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
Conversation
|
This is currently pointing at the v0.17.x branch, but we are going to do the mergeback of v0.17.x onto main first (#289). Once that is in, I will rebase onto main and instead point this at main instead. I will put it into draft until then to ensure this doesn't accidentally get merged |
0525657 to
27a0f77
Compare
|
This PR now bases of the |
I'm in two minds about this. Is there much value in catching breaking Iris changes early if it means we are constantly breaking iris-grib's CI. Or could we rather just manually test against |
|
Coincidentally eccodes just released version 2.25 although it's not yet on conda-forge. That being said I'd still like to get this PR in then we can address any potential issues with 2.25 next week/when it is available |
pp-mo
left a comment
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.
Can't see anything wrong, but a couple of things where I thought it might be worth considering an alternative. See what you think
iris_grib/tests/results/integration/iris_integration/callback/TestCallbacks/load_callback.cml
Show resolved
Hide resolved
27a0f77 to
9c3743f
Compare
|
I have updated this PR addressing some of the comments @pp-mo raised, particularly this comment: Changes:
I haven't included changes to using grib_set_missing as I found issues with that as we discussed over the phone |
|
Thanks @lbdreyer for persisting with this ! |
The
0.17.xmainbranch has become quite stale. The lockfile that defines the CI environment had not been updated so was still using older versions of packages. I have since updated the lockfile and noticed a few test failures that this PR addresses.I have split the commits so they each address a separate point:
d3c5112
This commit addresses lockfile related updates:
requirements/nox.locktorequirements/ci/nox.lockAdds pip as an optional dependency (as we do for iris)
a389ed9
Since cftime 1.4,
cftime.date2numreturns integers rather than floats so some cml needed updating:Since eccodes 2.24, if you try to set an unsigned key to be a negative value it raises an error. This was raising a number of errors as we use
gribapi.set_*(grib_message, <KEY>, -1)in a few places, for example:I have replaced these all to be either GRIB_MISSING_LONG for longs or 255 for bytes.
7ff42d1
Since cartopy 0.20 and proj 8.0.1,
ccrs.Mercator.transform_point()returns very slightly different values!. This is causing problems in a test for grid_definition_template_10 in which we compare whatiris_grib._load_convert.grid_definition_template_10returns against expected values. As that function callsccrs.Mercator.transform_point(), the 'projection_y_coordinate' now has slightly different values to the expected values. As our coord comparison is so strict (expects exact match for coordinate points) the test fails. I have update the expected number so that it now matches.27a0f77
Since Iris 3.2, loading NAME files that we use as part of iris-grib testing has slightly changed. The tests for NameII and NameII test loading in the NAME file, saving it out to GRIB then the loading it back in to check that is keeps the metadata we want to keep. The initial loading of the NAME file has changed, in particular:
iris.coords(axis='z')would return nothing. This is a problem when we try to save out to grib. Previously, when checking for vertical coordinatesiris.coords(axis='z')would return nothing so it would just ignore the 'z' coordinate and it wouldn't get saved out to GRIB. Now, when checking for vertical coordinates,iris.coords(axis='z')returns thezcoordinate so it is failing as it doesn't know what to do with it. To solve this I just removed that coordinate.Note this also includes some CML updates related to the cftime issue mentioned earlier