-
Notifications
You must be signed in to change notification settings - Fork 281
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
Load of nimrod files with multiple fields and period of interest #507
Conversation
calendar=iris.unit.CALENDAR_STANDARD) | ||
points = np.array([iris.unit.date2num(valid_date, | ||
'hours since 1970-01-01 00:00:00', | ||
iris.unit.CALENDAR_STANDARD)]) |
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.
Since you already have units
defined, this could simplify to:
points = units.date2num(valid_date)
Thanks for the PR @munslowa - it's a very useful step forward for the NIMROD capability. Hard to believe we haven't been hit by the single-field issue before! Other than some minor tweaks, it's really just some fixes to the tests/data that are needed and then it'll be good to go. 😄 |
Thanks for the updates @munslowa - that tidies things up nicely. The list of remaining tweaks is now much smaller. With the change to v1.2 of the test data a small problem has popped up in one of the visual regrid tests, which now fails because it's trying to plot what is now a 3D cube. There are two obsolete result files which need to be removed:
We could still do with an extra newline before here. Once these are sorted please push your extra commit(s) and I'll give it a last look over. Once that's done you can squash your commits ready for the merge. NB. There is no policy for "Signed-off-by" usage with this project, so these annotations don't have any real meaning. |
Excellent 😄 - with 9849c17cabb8862624cbfcff2006f57f62c1b70a we're good to go. Please squash your commits and I'll merge. (If you'd like help with the squash then please just ask.) |
"projection_y_coordinate"], | ||
levels=np.linspace(-25000, 6000, 10)) | ||
ax.coastlines() | ||
self.check_graphic() |
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.
If you are going to drop the visual test (which I liked by the way as it's clear the data follows the coastline) you can remove all the associated imports that are now unused, i.e. matplotlib, cartopy and iris.quickplot. I'd suggest you also consider changing the test type from GraphicsTest to IrisTest.
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.
Test type has changed from GraphicsTest to IrisTest.
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.
Line 40 still says tests.GraphicsTest
rather than tests.IrisTest
in the diff on github, but it may be playing up or I may have missed a commit.
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.
I am pretty sure it has IrisTest in the PR looking commit. I was delayed in pushing up the update from when I made the comment of the change. Had a few problems with the squash, but I think I got there.
Signed-off-by: Andrew Munslow <[email protected]> Update post PR review Signed-off-by: Andrew Munslow <[email protected]> Test result for period of interest test Signed-off-by: Andrew Munslow <[email protected]> Use updated version of test data old test files removed. extra newline added test_osgb_to_latlon now uses the first index of the time dimension for the test unused imports removed
Load of nimrod files with multiple fields and period of interest
Super stuff @munslowa |
This PR addresses issue #502. Nimrod files with multiple fields are now loaded. If any fields have the period of interest set then the time coordinate has bounds added. The validity time is then taken to be the end of the time-period.