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

Represent Realization and Iteration as virtual objects #312

Open
perolavsvendsen opened this issue Mar 27, 2024 · 1 comment
Open

Represent Realization and Iteration as virtual objects #312

perolavsvendsen opened this issue Mar 27, 2024 · 1 comment

Comments

@perolavsvendsen
Copy link
Member

perolavsvendsen commented Mar 27, 2024

While Realization and Iteration (Ensemble) are not explicitly represented as objects in Sumo (no explicit metadata made by fmu-dataio), they are well known concepts, also in the context of results.

Needs a bit of discussions, and is likely to involve some breaking changes.

Suggest iteration and realization objects that programmatically behave similar to the case object, something like:

mycase = sumo.get_case_by_uuid(<uuid4>)
mycase.iterations
>> ["iter-0", "iter-1"]

myiteration = mycase.iterations["iter-0"]
myiteration.uuid
>> <uuid4>

myiteration.name
>> iter-0

# get all polygons under this iteration
myiteration.polygons
>> [Polygons, Polygons, Polygon, ...]

myiteration.realizations
>> [0,1,2,3,4,5,6, ...]

myrealization = myiteration.realizations[0]
myrealization.uuid
>> <uuid4>

myrealization.name
>> "realization-0"

# get parameters for this realization
myrealization.parameters

# get surfaces for this realization (similar as e.g. `case.surfaces`)
myrealization.surfaces
[Surface, Surface, Surface, ...]

This will also make for a more unified user experience, as this virtualization is already done in the front-end. We could for instance envision that the front-end could produce ready Python snippets for interacting with specific ensembles/iterations.

  • Should be possible to initialize a Realization object or a Iteration object directly, and then use it similar to how we use Case object today.
@perolavsvendsen
Copy link
Member Author

perolavsvendsen commented Mar 27, 2024

Perhaps we create iteration and realization objects (similar to case) in Sumo when first child object is seen referencing an iteration?

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

No branches or pull requests

1 participant