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

Load of nimrod files with multiple fields and period of interest #507

Merged
merged 1 commit into from
May 18, 2013

Conversation

munslowa
Copy link
Contributor

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.

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)])
Copy link
Member

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)

@ghost ghost assigned rhattersley May 15, 2013
@rhattersley
Copy link
Member

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. 😄

@rhattersley
Copy link
Member

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:

  • lib/iris/tests/results/nimrod/load.cml
  • lib/iris/tests/results/visual_tests/test_nimrod.TestLoad.test_load.0.png

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.
But if you do feel you need to use them, please ensure any "Signed-off-by" line you add to the commit message occurs at the end.

@rhattersley
Copy link
Member

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()
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

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
esc24 added a commit that referenced this pull request May 18, 2013
Load of nimrod files with multiple fields and period of interest
@esc24 esc24 merged commit 7d939c9 into SciTools:master May 18, 2013
@esc24
Copy link
Member

esc24 commented May 18, 2013

Super stuff @munslowa

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.

None yet

3 participants