Skip to content

Commit

Permalink
Fix for new xr(?)
Browse files Browse the repository at this point in the history
  • Loading branch information
aulemahal committed Sep 27, 2023
1 parent de60313 commit c846ca6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xclim/sdba/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ def duck_empty(dims, sizes, dtype="float64", chunks=None):
def _decode_cf_coords(ds):
"""Decode coords in-place."""
crds = xr.decode_cf(ds.coords.to_dataset())
for crdname in ds.coords.keys():
for crdname in list(ds.coords.keys()):
ds[crdname] = crds[crdname]
# decode_cf introduces an encoding key for the dtype, which can confuse the netCDF writer
dtype = ds[crdname].encoding.get("dtype")
Expand Down

0 comments on commit c846ca6

Please sign in to comment.