Skip to content

Check for scalar cubes before attempting to concatenate a CubeList #4941

@valeriupredoi

Description

@valeriupredoi

📰 Custom Issue

Hi guys, a variation on the theme of concatenation/merge on which there are a few issues already open - it'd be nice if iris handled scalar cubes as big bad wolves and looked for them in, say, a CubeList to be concatenated/merged, and raise a nice exception that identifies that (or those) scalar cubes - I recently found out that scalar cubes produce havoc when one tries to concatenate - raised (inadvertently) by @bouweandela in this comment - it all happens in _io._concatenate_overlapping_cubes(cubes) - after extract_time() (one of our utilities) the resulting cube may be scalar - so iris concatenation fails due to scalar cubes not having dim_metadata attributes in iris._concatenate_CubeSignature class (they do, but they are empty lists).

Cheers muchos 🍺

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions