Skip to content

Commit

Permalink
Keep attrs when slicing (feature #908) (#909)
Browse files Browse the repository at this point in the history
The current `_slice_face_indices` does not copy dataarray attributes to
a sliced grid. This change copies the attrs from the original dataarray
to a sliced grid.

#908
  • Loading branch information
kjnam authored Aug 28, 2024
1 parent 855e88c commit b346270
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions uxarray/grid/slice.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ def _slice_face_indices(grid, indices, inclusive=True):
ds[conn_name].values
),
dims=ds[conn_name].dims,
attrs=ds[conn_name].attrs,
)

elif "_connectivity" in conn_name:
Expand Down

0 comments on commit b346270

Please sign in to comment.