Skip to content

Commit 8fdd7b7

Browse files
committed
Minor changes
1 parent 96a8b9e commit 8fdd7b7

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

psyplot/data.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2637,9 +2637,11 @@ def _gridweights_cdo(self):
26372637
ds = arr.isel(**{d: 0 for d in set(dims) - sdims}).to_dataset()
26382638
for coord in six.itervalues(ds.coords):
26392639
bounds = coord.attrs.get('bounds', coord.encoding.get('bounds'))
2640-
if bounds and bounds in set(base.coords) - set(ds.coords):
2640+
if (bounds and bounds in set(base.coords) - set(ds.coords) and
2641+
sdims.intersection(base.coords[bounds].dims)):
26412642
ds[bounds] = base.sel(
2642-
**{d: arr.coords[d] for d in sdims}).coords[bounds]
2643+
**{d: arr.coords[d].values for d in sdims}
2644+
).coords[bounds]
26432645
ds = ds.drop([c.name for c in six.itervalues(ds.coords)
26442646
if not c.ndim])
26452647
to_netcdf(ds, fname)

0 commit comments

Comments
 (0)