Explain how to save data with a specific STASH code

Open
#4,178 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
documentation

Research direction

Start with the “Phenomenon identification” section of the UM files loading tech paper and review the STASH class documentation. Document how to set a STASH object when saving PP output, add the cross-link, and correct the misleading highlighted note about standard_name translation. Verify that the examples accurately describe the current saving behavior.

Written by the indexing model from the issue text.

Description

Type: Documentation

📚 Documentation

As I said in an internal support discussion ...

You can set a STASH attribute on a cube to control how it is recorded in PP output.
Like this :

  import iris.fileformats.pp as ipp
  cube.attributes['STASH'] = ipp.STASH(model=1, section2, item=34)

or

  cube.attributes['STASH'] = ipp.STASH.from_msi('m01s02i034')

This is briefly mentioned here : https://scitools-iris.readthedocs.io/en/latest/techpapers/um_files_loading.html?highlight=STASH#phenomenon-identification
But I see that is incomplete + doesn't explain exactly what you need to do to control the saving.

It is currently required that the attribure must be a STASH object
(we could fix that + allow an 'msi' string ?).
The solution should be added to the above tech-paper section.
It should also cross-link to the docs for the STASH class.

ALSO : the highlighted note-box in the above section is highly misleading

On saving data, no attempt is made to translate a cube standard_name into a STASH code, but ...

That really needs fixing too.

Dominant language
Python
Stars
724
Forks
317
Avg merge
3d 20h
Merged PRs (30d)
9

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SciTools/iris

All issues in SciTools/iris

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.