Skip to content

Fixes for different formats for gate ID metadata attributes - #131

Merged
zssherman merged 3 commits into
ARM-Development:mainfrom
rcjackson:space_sep
Aug 14, 2026
Merged

Fixes for different formats for gate ID metadata attributes#131
zssherman merged 3 commits into
ARM-Development:mainfrom
rcjackson:space_sep

Conversation

@rcjackson

Copy link
Copy Markdown
Collaborator

The metadata attributes between the CMAC DOD and the original CMAC format have changed from a "notes" variable to a "flag_meanings" and "flag_values" metadata tags. This ensures that the quicklook plots can take in both formats with all of the possible types of separation between values in the metadata. This PR was coded by Claude Sonnet 5.

Robert Jackson added 3 commits August 10, 2026 16:28
The PPI and RHI quicklook hydrometeor ID plots only understood the
colon-separated notes attribute for gate_id categories. Add a shared
gate_id helper that also recognizes the CF-style flag_values/flag_meanings
attributes (space-separated meanings paired with integer codes).
notes pairs may separate the index from the label with whitespace
instead of a colon, and flag_meanings is generally comma separated
rather than the CF-standard whitespace separation. Handle both forms
for each attribute.
Fix a KeyError seen in production: a gate_id field whose notes attribute
is just a whitespace-separated list of labels with no indices or commas
(e.g. "rain snow no_scatter melting clutter terrain_blockage") was being
misparsed as an "index label" pair, collapsing all but the first label
into a single bogus category key. Detect indexed vs. plain notes by
whether the comma split yields more than one piece or the first piece
contains a colon.
@zssherman
zssherman merged commit f42b220 into ARM-Development:main Aug 14, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants