-
Notifications
You must be signed in to change notification settings - Fork 297
Closed
Description
Another issue which may prevent the concatenation of cubes:
import iris
# Create 1D cube with coordinate which has a long name with a space
coord = iris.coords.DimCoord([0, 1], long_name='long name')
cube = iris.cube.Cube([1, 2], dim_coords_and_dims=[(coord, 0)])
# Collapse it and print cell_methods
cube = cube.collapsed('long_name', iris.analysis.MEAN)
print(cube.cell_methods) # gives (CellMethod(method='mean', coord_names=('long name',), intervals=(), comments=()),)
# Save it and check cell methods again
iris.save(cube, 'test.nc')
cube_new = iris.load_cube('test.nc')
print(cube_new.cell_methods) # gives (CellMethod(method='mean', coord_names=('name',), intervals=(), comments=()),)Would it be possible to come up with a consistent solution that doesn't change the cell methods? This prevents merge_cube and concatenate_cube operations.