Skip to content
Snippets Groups Projects
Commit 6db0b41f authored by Nils Brüggemann's avatar Nils Brüggemann
Browse files

pyic_anim.py: If open_mfdataset fails with parallel=True, we try without and continue.

parent fe9725da
No related branches found
No related tags found
No related merge requests found
......@@ -221,10 +221,17 @@ if not iopts.only_animation:
# --- open dataset and select data
ts = pyic.timing(ts, string='open_mfdataset')
mfdset_kwargs = dict(combine='nested', concat_dim='time',
data_vars='minimal', coords='minimal',
compat='override', join='override', parallel=True)
ds = xr.open_mfdataset(flist, **mfdset_kwargs)
try:
mfdset_kwargs = dict(combine='nested', concat_dim='time',
data_vars='minimal', coords='minimal',
compat='override', join='override', parallel=True)
ds = xr.open_mfdataset(flist, **mfdset_kwargs)
except:
print('open_mfdset: parallel=True did not work, try without.')
mfdset_kwargs = dict(combine='nested', concat_dim='time',
data_vars='minimal', coords='minimal',
compat='override', join='override')
ds = xr.open_mfdataset(flist, **mfdset_kwargs)
data = ds[iopts.var]
data = data.assign_attrs(uuidOfHGrid=ds.attrs['uuidOfHGrid'])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment