-
Notifications
You must be signed in to change notification settings - Fork 295
2D coord bounds handling #3401
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
Comments
My intuition is to have the shape of 2D bounds be And potentially a bunch of places with load/save rules. |
Having re-read the CF Conventions, I've reconsidered my position on this. It seems like CF Conventions is consistent with what we are doing currently. With that said, it still seems like we are not comparing enough points for discontiguity. |
Another concern I have about Line 1078 in d0213d8
seems to be inappropriately comparing a boolean array to a float. I feel like it would make more sense to either replace diffs_along_axis with diffs_between_cells or else remove this line and replace the next line with
|
Also, there seems to be some inconsistency as to what is returned by |
I have suggested a fix to everything I currently think is an issue in #3404. |
Definitely a bug. It looks very much like a change to the implementation but then failing to delete a line of the previous version ! Thanks for making the effort here.. |
See #3345 |
@stephenworsley has confirmed that there is still a problem here, but would like to describe it better before discussing further. |
I think this issue has got garbled somewhat by my initial observation being mistaken, but my additional observations still (I think) being valid. There are two problems I've identified with 2D contiguous bounds checking I've found:
In order to do a full comparison, we would also need to compare the vertices indexed at 1 and 2 and the vertices indexed at 2 and 3:
Both of these are addressed by #3404 which has currently stalled. |
closed by #4975 |
Uh oh!
There was an error while loading. Please reload this page.
Currently, a 2D coordinate point is expected to have 4 bounds. There ought to be 8. Assuming the 2D variable is defined over lattitude and longitude, there should be 4 latbounds and 4 lonbounds. http://cfconventions.org/Data/cf-conventions/cf-conventions-1.7/cf-conventions.html#cell-boundariesThe current way these bounds are handled is incomplete. _discontiguity_in_bounds should be making more comparisons. It is currently comparing
bounds[*,*,0]
withbounds[*,*,1]
andbounds[*,*,0]
withbounds[*,*,3]
. it should also be comparingbounds[*,*,1]
withbounds[*,*,2]
andbounds[*,*,2]
withbounds[*,*,3]
. These comparisons should be done for both latbounds and lonbounds.It's also worth noting that it's possible to end up with a coordinate which has bounds in one dimension but not another. This is in fact the case for the gallery example https://scitools.org.uk/iris/docs/v1.9.2/examples/General/cross_section.html . It's unclear how such cases should be treated (they are currently unable to be handled by pcolor/pcolormesh. That is perhaps the correct approach, but in order for something like that to be possible, it seems like there would need to be some more thought put into the structure of bounds handling).The text was updated successfully, but these errors were encountered: