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

Nc load latlon fix #4470

Merged
merged 2 commits into from
Jan 4, 2022
Merged

Nc load latlon fix #4470

merged 2 commits into from
Jan 4, 2022

Conversation

pp-mo
Copy link
Member

@pp-mo pp-mo commented Dec 20, 2021

🚀 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
)

Copy link
Member

@bjlittle bjlittle left a 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 🍻

@bjlittle bjlittle merged commit 76b580d into SciTools:main Jan 4, 2022
@bjlittle
Copy link
Member

bjlittle commented Jan 5, 2022

@pp-mo Forgot to mention that this is totally worthy of a whatsnew entry... fancy pushing a follow-on PR and I'll bank that for you?

tkknight added a commit to tkknight/iris that referenced this pull request Jan 5, 2022
* 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)
tkknight added a commit to tkknight/iris that referenced this pull request Jan 6, 2022
* 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)
pp-mo added a commit to pp-mo/iris that referenced this pull request Jan 7, 2022
@pp-mo pp-mo mentioned this pull request Jan 7, 2022
bjlittle pushed a commit that referenced this pull request Jan 7, 2022
@pp-mo pp-mo deleted the nc_load_latlon_fix branch October 23, 2024 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error reading NetCDF file dimensions with units degrees
2 participants