-
Notifications
You must be signed in to change notification settings - Fork 286
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
Nc load latlon fix #4470
Nc load latlon fix #4470
Conversation
…anch 'nc_load_latlon_further_RETRO'.
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.
@pp-mo Looks good to me.
The removal of PyKE and it's re-implementation was a BIG change, so it's inevitable that these types of issues will start to surface from users reporting unexpected behaviour.
This is something that we're going to have to rely on somewhat as we're only as good as our test coverage, so thanks to @PAGWatson for letting us know 👍
@pp-mo Thanks again for the fix 🍻
@pp-mo Forgot to mention that this is totally worthy of a |
* main: rtd with latest mambaforge image for faster building (SciTools#4476) Show acceptable image test results in the docs (SciTools#4392) Nc load latlon fix (SciTools#4470) update matplotlib links (SciTools#4474) Whatsnew for PR 4462 (SciTools#4475) Clarify the return type of iris.load (AVD-1899) (SciTools#4462) [pre-commit.ci] pre-commit autoupdate (SciTools#4472) Updated environment lockfiles (SciTools#4467)
* main: Use partial to make cube pickleable (SciTools#4377) Add edit via github method to Iris docs (SciTools#4461) Broken cartopy links in docs (SciTools#4464) rtd with latest mambaforge image for faster building (SciTools#4476) Show acceptable image test results in the docs (SciTools#4392) Nc load latlon fix (SciTools#4470) update matplotlib links (SciTools#4474) Whatsnew for PR 4462 (SciTools#4475) Clarify the return type of iris.load (AVD-1899) (SciTools#4462) [pre-commit.ci] pre-commit autoupdate (SciTools#4472) Updated environment lockfiles (SciTools#4467)
🚀 Pull Request
Description
Closes #4460
I realised that the reported problem was due to a mistake which I introduced in #4198 :
I had retained unchanged the trusted older routines, 'is_latitude/longitude' and 'is_rotated_latitude/longitude' , but changed the way in which they are used : As written, 'is_rotated' relies on your having already ensured the truth of 'is_latitude_longitude'.
The small changes here to
iris.fileformats._nc_load_rules.actions
fix that.Since there were no specific tests before, I have now developed a test harness for this aspect of the translation process.
Having encountered the problems described at #4469 (see below), I have only included simpler testcases, and particularly excluded some more complex ones which show potentially problematic changes in behaviour. However, I think the remaining tests do show utility, and demonstrate that the problem raised was fixed.
(
Note:
During this process I stumbled over a whole lot more unexpected complexity.
It turns out that within #4198 I may have oversimplified the logic and behaviours of the old Pyke rules, and that should now probably be reviewed : see #4469
)