Open alexgleith opened 4 months ago
Possibly found a fix by pinning an old version of xarray xarray==2023.1.0
I reckon issue is in odc.algo
use of MultiIndex
for spec
dim/coord. I think this was a wrong solution that happened to work for a while, and then xarray
changed something.
There is no need for multi-index I don't think, one can represent all of that with a single spec
dimension (one entry per dataset) and then separate coords along spec
dimension for time, uuid, grid
. I think that all stemmed from misunderstanding that dim <-> coord
relationship can be any to any and not only 1:1.
coords = [np.asarray(time, dtype="datetime64[ms]"), idx, uuids, grid]
names = ["time", "idx", "uuid", "grid"]
if solar_day is not None:
coords.append(solar_day)
names.append("solar_day")
coord = pd.MultiIndex.from_arrays(coords, names=names)
return xr.DataArray(
data=data, coords=dict(spec=coord), attrs={"grid2crs": grid2crs}, dims=("spec",)
)
I've been getting an error, below, and I'm finding it hard to reproduce in other environments.
If I run with group_by = None, I can get stats to finish happily.
But when including group_by solar day, it's failing for some regions.
Has anyone seen a similar error and know how to fix it?
Key software versions include: