Skip to content

Handling of Exceptions from coord(axis="x") #2029

Open
@MoseleyS

Description

@MoseleyS

The IMPROVER code contains a few places where axes are selected using their abbreviation ("x", "y", "z", "t") rather than a full name. This is particularly useful if we don't know what the full name is.

The behaviour of Iris in the instance where the requested abbreviation does not match any coord is to return None, which will then raise an obscure error message when the code attempts to use the None object like a Coord object.

It would be helpful to developers and users of IMPROVER code if we trapped these cases and raised a useful error message. I believe we have not so far as we rely on the standardise plugin to ensure that our Cubes meet a specific standard.

Originally posted by @MoseleyS in #2017 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions