Skip to content

[DOC] Include object/string repesentation comparison in STASH code example #3063

@kaedonkers

Description

@kaedonkers

A suggestion from @nhsavage:

It would be useful to have an example of comparing the stash object to its string representation in the documentation:
https://scitools.org.uk/iris/docs/latest/iris/iris/fileformats/pp.html?highlight=iris%20fileformats%20pp%20stash#iris.fileformats.pp.STASH

This would be very useful but is currently not obvious, IMHO.

e.g.

>>> cube=iris.load_cube('sample_theta.pp')
>>> cube.attributes.get('STASH')
STASH(model=1, section=0, item=4)
>>> cube.attributes.get('STASH') == 'm01s0i004'
True

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions