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

Grid class intersection method optional z argument #1208

Closed
jdhughes-usgs opened this issue Aug 20, 2021 · 0 comments · Fixed by #1326
Closed

Grid class intersection method optional z argument #1208

jdhughes-usgs opened this issue Aug 20, 2021 · 0 comments · Fixed by #1326
Assignees
Milestone

Comments

@jdhughes-usgs
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants