Skip to content

Add original I,J,K as properties in the NestedHybridGrid #470

Description

@tnatt

The original I, J, K values (row, col, layer) should be preserved and added as properties on the NestedHybridGrid class.

There are multiple use cases where the original IJK is necessary to know, e.g. for post-processing purposes. These properties could easily be transferred from the original input grid to the nested grid by appending them as properties to the coarse grid before the grid merge is run. This will transfer the property automatically to the nested grid by the grid_merge() functionality.

In the _build_nested_hybrid_grid() we could after appending the input region add these lines:

for prop in coarse_grid.get_ijk(names=("I_orig", "J_orig", "K_orig")):
    coarse_grid.append_prop(prop)

This will append I,J,K to the grid with the names I_orig, J_orig, and K_orig. They will then appear and be available in the properties property and can also be fetched from the final nested hybrid grid like so nhg.grid.get_prop_by_name("I_orig")

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions