-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Concatenated cubes lose their derived coordinate #2478
Comments
I've hit this too, do you have an easy workaround? |
Just adding one of the original aux factories to the concatenated Cube seems to work. |
I'll take a peek ... |
Yup, it's a known |
I just encountered the same problem in the latest version. Here is a working example: import iris
print(iris.__version__)
print("")
# Load sample data
path = iris.sample_data_path('hybrid_height.nc')
cube_0 = iris.load(path)[0]
# Copy cube
cube_0.remove_coord('time')
cube_0 = iris.util.new_axis(cube_0)
cube_1 = cube_0.copy()
time_coord_0 = iris.coords.DimCoord([1],
bounds=[0, 2],
var_name='time',
standard_name='time',
long_name='time',
units='days since 2000-01-01')
time_coord_1 = time_coord_0.copy([3], bounds=[2, 4])
cube_0.add_dim_coord(time_coord_0, 0)
cube_1.add_dim_coord(time_coord_1, 0)
print("Cubes have derived coordinate:")
print(cube_0)
print(cube_1)
print("")
# Concatenate
cubes = iris.cube.CubeList([cube_0, cube_1])
new_cube = cubes.concatenate_cube()
print("Cube does not have derived coordinate:")
print(new_cube) which gives
I would be really nice of someone could take a look at this. Thanks! @bjlittle |
In order to maintain a backlog of relevant issues, we automatically label them as stale after 500 days of inactivity. If this issue is still important to you, then please comment on this issue and the stale label will be removed. Otherwise this issue will be automatically closed in 28 days time. |
Still an important issue for me (and ESMValTool development team). |
Just opened a PR that fixes this: #5096 |
I'm pretty deep into some code, and it looks like cube.concatenate is throwing away my derived coordinates. Apologies I can't provide a SSCCE currently (happy for this issue to simply be recorded until I get a chance to look into it).
The text was updated successfully, but these errors were encountered: