Skip to content

Commit 2db8797

Browse files
committed
BUG: Workaround for rechunking issue in to_iris (#2046)
1 parent e469b95 commit 2db8797

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

xarray/convert.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,10 @@ def to_iris(dataarray):
124124
# Create the right type of masked array (should be easier after #1769)
125125
if isinstance(dataarray.data, dask_array_type):
126126
from dask.array import ma as dask_ma
127-
masked_data = dask_ma.masked_invalid(dataarray)
127+
# masked_invalid can be applied directly to the dataarray, but
128+
# results in a bad chunksize. So instead we use the internal
129+
# dask array (#2046)
130+
masked_data = dask_ma.masked_invalid(dataarray.data)
128131
else:
129132
masked_data = np.ma.masked_invalid(dataarray)
130133

0 commit comments

Comments
 (0)