Commit 63bd7922 authored by Klaus Zimmermann's avatar Klaus Zimmermann
Browse files

Small technical improvements (closes #237)

parent 0cef7bd6
......@@ -70,7 +70,9 @@ def dask_take_along_axis(x, index, axis):
offset_axes,
x_size=x.shape[axis],
axis=axis,
meta=np.empty((0,) * index.ndim, dtype=x.dtype),
meta=sparse.COO(np.empty((0, 0), dtype=int),
np.empty((), dtype=x.dtype),
shape=(0,)*len(p_axes)),
dtype=x.dtype,
)
......
......@@ -17,6 +17,8 @@ MISSVAL = 1.0e20
def ignore_cb(cube, field, filename):
cube.attributes.pop('creation_date', None)
cube.attributes.pop('tracking_id', None)
cube.attributes.pop('history', None)
cube.attributes.pop('history_of_appended_files', None)
def prepare_input_data(datafiles):
......@@ -40,6 +42,10 @@ def prepare_input_data(datafiles):
'\n'.join(map(lambda c: str(c), cubes))))
raise ValueError('Found too many cubes for var_names {}. '
'See log for details.'.format(inconsistent_var_names))
for c in cubes:
time = c.coord('time')
if not time.has_bounds():
time.guess_bounds()
return cubes
......
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