-
Notifications
You must be signed in to change notification settings - Fork 291
Investigate: subsetting a MeshCoord
should return a MeshCoord
?
#5991
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
MeshCoord
should return a MeshCoord
?MeshCoord
should return a MeshCoord
?
This is very closely linked to #4751 - it's probably a choice between 1 and the other |
Another potential route for subsetting a mesh is proposed here #6014. After considering this I see essentially two alternatives to the current behaviour for subsetting a MeshCoord.
This second alternative, implemented above as the It should be noted that a MeshCoord superficially appears like an AuxCoord (indeed, this appearance is why the existing behaviour "falls out" as a natural consequence). Therefore, changing the behaviour to return MeshCoords yields a result which looks superficially similar to the existing behaviour, and only adds extra information. This means there is a good case to be made that changing this behaviour would not be a breaking change, especially since returning a MeshCoord as the result of a slice of a MeshCoord already seems like the more natural result. In the meantime, it is worth highlighting that the existing behaviour of returning an AuxCoord may be liable to change if we are unable to put in a change before taking mesh code out of experimental. A warning when slicing a MeshCoord may suffice. |
The below code demonstrates the currently typical way of recreating a mesh after subsetting (#4751 refers to this as 'remeshing'). If we make the suggestions here work then the below code could create some confusing situations - no If we made that work I would be comfortable implementing changes even after mesh support becomes non-experimental. iris/lib/iris/experimental/geovista.py Lines 324 to 333 in 409f92c
|
Closing now the intent is captured in #6120. |
I might have some code that could help with this:
iris/lib/iris/tests/stock/__init__.py
Lines 840 to 886 in 6adac1b
The text was updated successfully, but these errors were encountered: