Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the STASH_TRANS table #5716

Open
trexfeathers opened this issue Jan 25, 2024 · 0 comments
Open

Update the STASH_TRANS table #5716

trexfeathers opened this issue Jan 25, 2024 · 0 comments
Labels
Experience: Low Good First Issue A good issue to take on if you're just getting started with Iris development Release: Minor

Comments

@trexfeathers
Copy link
Contributor

trexfeathers commented Jan 25, 2024

✨ Feature Request

Include the latest STASH codes in the STASH_TRANS dictionary:

Stash = namedtuple('Stash', 'grid_code field_code pseudo_level_type')
STASH_TRANS = {
"m01s00i001": Stash(1, 8, 0),
"m01s00i002": Stash(18, 56, 0),
"m01s00i003": Stash(19, 57, 0),
"m01s00i004": Stash(1, 19, 0),

For backwards compatibility it is important that we limit to ADDITIONS and UPDATES, no deletions. Some codes have likely been retired since the last update; we can just leave those as they are.

Motivation

Iris depends on the contents of STASH_TRANS for various functions. The dictionary has not been updated for several years, and I have encountered examples where absence of a STASH code causes faulty file loading - e.g. not knowing that a phenomenon is associated with cell edges, thus producing coordinates with the wrong number of points (thanks to @ukmo-juan-castillo for the example).

Additional context

We historically could rely on parsing Metarelate to give what we needed (e.g. #973 (comment)). But now that Metarelate has been retired, it would still be possible to automatically parse the contents from other sources.

Met Office Codes Registry : um/stash offers many download formats, but does not appear to be up to date (2019 when I checked).

Those of us at the UK Met Office do have access to the latest 'STASHmaster' file, although I won't share details of the directory structure publicly.

@trexfeathers trexfeathers added Experience: Low Release: Minor Good First Issue A good issue to take on if you're just getting started with Iris development labels Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Experience: Low Good First Issue A good issue to take on if you're just getting started with Iris development Release: Minor
Projects
Status: No status
Development

No branches or pull requests

1 participant