_slice_from_grid
may need to use coords from a sliced dataarray
#945
Labels
bug
Something isn't working
_slice_from_grid
may need to use coords from a sliced dataarray
#945
Version
v2024.08.2
How did you install UXarray?
Conda
What happened?
_slice_from_grid
in UxDataArray create a new subset dataarray using coordinates info from the original dataarray as shown in the lines below:uxarray/uxarray/core/dataarray.py
Lines 1099 to 1106 in f71e11b
This does not cause an issue when the original dataarray does not have coordinates that are sliced, but the constructor fails otherwise with a conflicting size for dimension. Probably a better or a right approach is creating a new sliced dataarray with coordinates from the sliced
d_var
not from the originalself
.What did you expect to happen?
A new sliced (subset) dataarray needs to be created with a correctly sliced coordinate variables, not from the original unsliced coordinate variables.
Can you provide a MCVE to repoduce the bug?
No response
The text was updated successfully, but these errors were encountered: