Skip to content

Grid class intersection method optional z argument #1208

@jdhughes-dev

Description

@jdhughes-dev

Add optional z argument to Grid.intersect() method. By default it would be

cellid = modelgrid.intersect(x, y, z=None),

which would return (i, j) for StructuredGrid, (cell2d) for VertexGrid, and None for UnstructuredGrid. This is what the current .intersect() method does. And if z != None is passed it would be

cellid = modelgrid.intersect(x, y, z=z)

which would return (k, i, j) for StructuredGrid, (k, cell2d) for VertexGrid, and (node) for UnstructuredGrid.

Adding z would make it possible to implement the .intersect() method for UnstructuredGrid.

Discussion started based on PR #1205

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions