Skip to content

Commit

Permalink
Merge pull request #975 from akrherz/mww_vtec_channels
Browse files Browse the repository at this point in the history
Tweak MWW product channels
  • Loading branch information
akrherz authored Nov 18, 2024
2 parents 4aa43c7 + f399096 commit f9d4de2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ci:
autoupdate_schedule: quarterly
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.7.3"
rev: "v0.7.4"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ generating plots of HRRR ptype.
- Accomodate ancient LSRs using `TRACE` as the magnitude field.
- Ensure geometries going into masking helper are CCW, to mask outside of.
- Properly check USDM service response prior to parsing it.
- Refine which `MWW` products are not defaulted into the main WFO Channels,
those being VTEC codes `SC`, `MF`, and `GL`.
- Support parsing `CLI` products circa 2007 with a bad space.

## **1.21.0** (6 Sep 2024)
Expand Down
10 changes: 6 additions & 4 deletions src/pyiem/nws/products/_vtec_jabber.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@

# Local
from pyiem.nws.ugc import ugcs_to_text
from pyiem.nws.vtec import get_action_string
from pyiem.nws.vtec import VTEC, get_action_string
from pyiem.reference import TWEET_CHARS


def build_channels(prod, segment, vtec) -> list:
def build_channels(prod, segment, vtec: VTEC) -> list:
"""Build a list of channels for the given segment/vtec."""
ps = f"{vtec.phenomena}.{vtec.significance}"
channels = []
# Two noisey products that don't default to the main WFO channel
if prod.afos[:3] in ["MWW", "RFW"]:
# Noisey products that don't default to the main WFO channel
if prod.afos[:3] == "RFW" or (
prod.afos[:3] == "MWW" and vtec.phenomena in ("SC", "GL", "MF")
):
channels.append(f"{prod.afos[:3]}{prod.source[1:]}")
else:
channels.append(prod.source[1:])
Expand Down

0 comments on commit f9d4de2

Please sign in to comment.