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
temporary fix to an issue with cube intersection when cube has bounds #800
Conversation
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 can confirm that this works, but I'm not keen on workarounds like this. Let's also try to get the issue fixed in iris.
Co-authored-by: Peter Kalverla <peter.kalverla@gmx.com>
I don't mind about codacy (all the more reason to get back to this at some point), but we should solve the flake8 error. |
Neither am I. It will be possible to, at least, remove the bounds only if we need it and keep them unchanged in all the other cases? I am not keen on dumping metadata so easily |
yeah we could kill the bounds and re-guess them only if |
Are you guys sure this solves the issue? lon = -1.25, 1.25, 3.75, 6.25, 8.75, 11.25, 13.75, 16.25, 18.75, 21.25, 23.75, 26.25, 28.75, 31.25, 33.75, 36.25, 38.75, 351.25, 353.75, 356.25 with the fix its it gets rid of the -1.25 which is good, but at the end it still jumps from 38.75 to 351.25. Or is this a second issue? that extract_region does not work properly for regions crossing the 0 meridian? |
This is a known behaviour of Iris (I think @mwjury also experimented this). Although it is quite of weird when you check the file itself, it should not interfere with anything, I have seen it been interpreted correctly in diagnostics, but if it break yours we can look for a solution. |
Yes, at first I was very confused when looking at the maps I produced, though it made sense looking at the data in ncview. But aside from that everything has been working correctly further downstream. Iris has it's problem with plotting such data, so the only solution was to center lon on zero in the diagnostics. |
Thanks for the clarification. I do not think it breaks anything, just looks weird and makes the comparison to another implementation more difficult. We will keep this feature in mind ;-) |
just tested for the unwanted behavor with iris=3.0.1 (current version we use) and it's still there, reported in this comment - do we want to go ahead with this patch here (more of a kluge rather than a patch) or wait for the iris folk to sort it out? Asking since we need to do some maintenance on this branch if we want to go ahead with it 🍺 |
I think it's a good idea to have this as a workaround, but we should be a bit more sophisticated about how to implement in. For example, we could add a test that triggers this error and mark it with xfail, linking to the iris issue or this one. Then, if it's fixed in iris, we should see it because the xfail test suddenly passes. I also still like the suggestion to do this only if strictly necessary. |
I think you could get the same effect using |
Looks like this may be fixed in iris soon now SciTools/iris#4046, nice work @rcomer! |
yes, my apologies @rcomer - I got distracted and forgot to thank you for your work! 🍺 |
We're going to pull @rcomer's fix into HTH 👍 |
Due to some terrifying conflicts, the fix has moved to a new PR: SciTools/iris#4059 |
cheers muchly guys! we'll close this one when the iris work is released to the masses 😁 |
fixed (and tested by meself) by the good people at Iris in SciTools/iris#4059 |
Before you start, please read our contribution guidelines.
Tasks
yamllint
to check that your YAML files do not contain mistakesIf you need help with any of the tasks above, please do not hesitate to ask by commenting in the issue or pull request.
Closes #issue_number #799 and addresses an inherently iris issue firt posted in SciTools/iris#3391