Skip to content

iris.load() and iris.load_raw() interact differently with iris.util.equalise_attributes() when merging a CubeList #4097

@kaedonkers

Description

@kaedonkers

🐛 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

image

Environment

  • OS & Version: REHL7.9
  • Iris Version: 3.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions