Skip to content

Conversation

@pp-mo
Copy link
Member

@pp-mo pp-mo commented Oct 26, 2020

As mentioned : SciTools-incubator/iris-ugrid#24 (comment)
I think this is desirable, to enable iris-ugrid to represent unstructured data with a new derived class Ucube(Cube).

By allowing the post-modify action to return a new object, the iris-ugrid loader can replace Cube-s with Ucube-s, instead of patching a cube instance.

Apart from being cleaner, I think it will eventually prove essential for unstructured cubes to belong to a specialised subclass of Cube, so that we can use inheritance and overriding to efficiently extend features.
See for example #3914, which assumes we will use a Ucube(Cube) class to extend cube.summary().

@pp-mo pp-mo requested a review from trexfeathers October 26, 2020 15:44
Copy link
Contributor

@trexfeathers trexfeathers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, LGTM 👍

@trexfeathers trexfeathers merged commit 5eaa58a into SciTools:ugrid Oct 26, 2020
@pp-mo pp-mo deleted the cube_adjust_replace branch November 29, 2025 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants