There was an error while loading. Please reload this page.
1 parent 96a8b9e commit 8fdd7b7Copy full SHA for 8fdd7b7
1 file changed
psyplot/data.py
@@ -2637,9 +2637,11 @@ def _gridweights_cdo(self):
2637
ds = arr.isel(**{d: 0 for d in set(dims) - sdims}).to_dataset()
2638
for coord in six.itervalues(ds.coords):
2639
bounds = coord.attrs.get('bounds', coord.encoding.get('bounds'))
2640
- if bounds and bounds in set(base.coords) - set(ds.coords):
+ if (bounds and bounds in set(base.coords) - set(ds.coords) and
2641
+ sdims.intersection(base.coords[bounds].dims)):
2642
ds[bounds] = base.sel(
- **{d: arr.coords[d] for d in sdims}).coords[bounds]
2643
+ **{d: arr.coords[d].values for d in sdims}
2644
+ ).coords[bounds]
2645
ds = ds.drop([c.name for c in six.itervalues(ds.coords)
2646
if not c.ndim])
2647
to_netcdf(ds, fname)
0 commit comments