Skip to content

Implement Grid3D.find_index() and enable da.sel() for dfs3 data#919

Open
ecomodeller wants to merge 1 commit into
mainfrom
feature/grid3d-sel
Open

Implement Grid3D.find_index() and enable da.sel() for dfs3 data#919
ecomodeller wants to merge 1 commit into
mainfrom
feature/grid3d-sel

Conversation

@ecomodeller

Copy link
Copy Markdown
Member

Summary

  • Implement Grid3D.find_index() supporting x, y, z, coords, and area arguments
  • Update DataArray.sel() to handle 3-tuple indices from Grid3D
  • Add bbox, contains, _xy_to_index, _bbox_to_index helpers to Grid3D

Grid3D.find_index() was raising NotImplementedError, making da.sel(x=..., y=..., z=...)
unusable for dfs3 data. This implements the full find_index method mirroring Grid2D's
approach, along with bbox, contains, _xy_to_index, and _bbox_to_index helpers.
DataArray.sel() is updated to handle the 3-tuple (ii, jj, kk) return values.
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.

1 participant