Fixes for different formats for gate ID metadata attributes - #131
Merged
Conversation
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
approved these changes
Aug 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.