Commit 2ef8bbb3 authored by Jan Klaus Rieck's avatar Jan Klaus Rieck

getbox(): do not try to remove halo-points from coordinates that do not exist

parent 70e9ba10
Pipeline #3618 failed with stage
in 1 minute and 30 seconds
......@@ -281,7 +281,7 @@ def getbox(dataset, time=None, depth=None, y=None, x=None, surf=False):
# make sure the halo points of the global ORCA grid are dropped
if 'x_c' in dataset:
dataset = dataset.isel(x_c=slice(1, len(dataset['x_c']) - 1))
elif 'x_r' in dataset:
if 'x_r' in dataset:
dataset = dataset.isel(x_r=slice(1, len(dataset['x_r']) - 1))
ds = dataset
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment