iris
iris copied to clipboard
iris.load() and iris.load_raw() interact differently with iris.util.equalise_attributes() when merging a CubeList
🐛 Bug Report
When using iris.util.equalise_attributes(cubes) before merging a CubeList, I noticed different behaviour based on whether I used iris.load() or iris.load_raw() to generate the CubeList.
load_raw() seems to lead to a successful equalisation of the attributes in the CubeList and a successful merge.
load() seems to successfully equalisation of the attributes in the CubeList but the merge results in the same as the input CubeList i.e. no merge, despite the input CubeList containing compatible cubes.
How To Reproduce
Successful merge
cubes = iris.load_raw(fnames)
iris.util.equalise_attributes(cubes)
cubes.merge()
Unsuccessful merge
cubes = iris.load_raw(fnames)
iris.util.equalise_attributes(cubes)
cubes.merge()
Data to recreate this issue can be found at: https://metdatasa.blob.core.windows.net/covid19-response/index.html#metoffice_ukv_daily--rain_mean
Specifically:
- ukv_daily_rain_mean_20210327.nc
- ukv_daily_rain_mean_20210329.nc
- ukv_daily_rain_mean_20210330.nc
Expected behaviour
That both cases of the example code return exactly the same merged CubeList.
Screenshots

Environment
- OS & Version: REHL7.9
- Iris Version: 3.0.1
Hi Kevin !
I just responded to this. But, we are all very tight on support time due to NG-VAT work, so I doubt I’ll be working on this myself. In a couple of weeks we should be having a bit of a breather from the NG-VAT project, so there might be a bit of space to push this through then.
Cheers ! Patrick
From: Kevin Donkers @.> Sent: 13 April 2021 21:51 To: SciTools/iris @.> Cc: Subscribed @.***> Subject: [SciTools/iris] iris.load() and iris.load_raw() interact differently with iris.util.equalise_cubes.equalise_attributes() when merging a CubeList (#4097)
This email was received from an external source. Always check sender details, links & attachments.
🐛 Bug Report
When using iris.util.equalise_attributes(cubes) before merging a CubeList, I noticed different behaviour based on whether I used iris.load() or iris.load_raw() to generate the CubeList. load_raw() seems to lead to a successful equalisation of the attributes in the CubeList and a successful merge. load() seems to successfully equalisation of the attributes in the CubeList but the merge results in the same as the input CubeList i.e. no merge, despite the input CubeList containing compatible cubes.
How To Reproduce
Successful merge
cubes = iris.load_raw(fnames)
iris.util.equalise_attributes(cubes)
cubes.merge()
Unsuccessful merge
cubes = iris.load_raw(fnames)
iris.util.equalise_attributes(cubes)
cubes.merge()
Data to recreate this issue can be found at: https://metdatasa.blob.core.windows.net/covid19-response/index.html#metoffice_ukv_daily--rain_mean
Specifically:
- ukv_daily_rain_mean_20210327.nc
- ukv_daily_rain_mean_20210329.nc
- ukv_daily_rain_mean_20210330.nc
Expected behaviour
That both cases of the example code return exactly the same merged CubeList.
Screenshots
Environment
- OS & Version: REHL7.9
- Iris Version: 3.0.1
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/SciTools/iris/issues/4097, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAP6A3NXUNGECP2UTG5SESLTISVEHANCNFSM424CBZJA.
Presumably load_raw is returning 24 2D cubes, and merge then creates the new time dimension. load returns a pre-merged list, so the time dimension already exists, so you need concatenate rather than merge to join the two cubes together.
So this could be another one to add to the list at #3234?
Good idea @rcomer - Done :)
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.
This stale issue has been automatically closed due to a lack of community activity.
If you still care about this issue, then please either:
- Re-open this issue, if you have sufficient permissions, or
- Add a comment stating that this is still relevant and someone will re-open it on your behalf.