Add WPC Winter Weather Outlook (PWPF) snow/freezing-rain feed - #34
Merged
Merged
Conversation
New WpcPwpfService + Pwpf settings block monitor WPC's Probabilistic Winter Precipitation Forecast contour KMZ files for Day 1/2: probability of >=1/4/8/12" snow (configurable from WPC's 1/2/4/6/8/12/18) and >=0.10/0.25" freezing rain (from 0.01/0.10/0.25/0.50) in 24 hours at any configured zone/county centroid. - Posts when a threshold's contour band reaches MinProbabilityPercent (default 40) - Re-posts a given day only when the forecast goes up (higher threshold qualifies, or same threshold's band rises) - checked against the persisted posted_alerts.txt so restarts don't re-post - Severity keyed to the highest qualifying threshold; new per-platform IncludePwpf - No new NuGet: KMZ = zip + KML parsed with System.IO.Compression/System.Xml.Linq into NetTopologySuite polygons - Unit tests for KML parsing, band lookup, file naming, alert building, severity - Docs: README feed table, TECHNICAL config reference + "How It Works", CHANGELOG, CLAUDE.md feed lists Closes #33 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UokAERat9fVzmcmsfJzsJF
…red area Instead of WPC's national CONUS gif, the triggering threshold's contour ring is unioned, clipped to a padded box around the configured zones/counties, and set as alert.GeometryJson so MapService's existing Mapbox path renders it exactly like an NWS warning polygon. Falls back to the national gif when Mapbox isn't configured or the ring can't be clipped. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UokAERat9fVzmcmsfJzsJF
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.
Summary
New synthetic-alert feed for WPC's Probabilistic Winter Precipitation Forecast (PWPF), Day 1/2 only. Closes #33.
Pwpfsettings block:Enabled,CheckIntervalSeconds(1800),MinProbabilityPercent(40),SnowThresholds("1,4,8,12"),IceThresholds("0.10,0.25")WpcPwpfServicedownloads WPC's per-threshold contour KMZ (/pwpf/latest_kml/prb_24h{snow|icez}_ge{..}_f{024|048}_cntr_latest.kmz), unzips, parses the KML contour rings into NTS polygons, and takes the highest contour level covering any monitored zone/county centroidWPC Day 1 Snowfall Outlook,WPC Day 1 Freezing Rain Outlook, …) when the highest configured threshold's band ≥MinProbabilityPercent; body lists every threshold's bandWPC-PWPF-Day{n}-{Snow|Ice}-{validDate}-ge{thr}-p{band}; the service checksposted_alerts.txtfor any higher-threshold or same-threshold-higher-band ID before returning an alert, so unchanged/downgraded 00Z→12Z cycles are silent and restarts don't re-postIncludePwpfper-platform flag (defaulttrue);IsPwpf/PwpfThreshold/PwpfBandonNwsAlertalert.GeometryJsonsoMapService's existing Mapbox path draws it like a warning polygon. Falls back to WPC's static CONUS gif when Mapbox isn't configured.Why PWPF and not the WWD KML/shapefiles
The forecaster-drawn
/kml/winwx/and/shapefiles/ww/products only exist for ≥4/8/12" — no ≥1" product. The PWPF contour KMZ has 1/2/4/6/8/12/18" plus freezing rain, in plain KML. Details in #33.Test plan
dotnet test— 135 pass (27 new: KML parse, valid-window regex,FindBandnesting, file naming, threshold parsing,BuildAlert, severity, overlay clipping, image URL fallback)prb_24hsnow_ge01_f024_cntr_latest.kmz(Sept — one 1% ring over the Canadian Rockies) — valid window + polygon parse, point-in-ring correctPwpfon the CI/CD instance once there's an actual snow forecast and confirm one post per day/type, the zoomed Mapbox overlay renders, and no re-post on an unchanged cycleDocs
README feed table + feed-list mentions + Mapbox note,
docs/TECHNICAL.mdConfiguration Reference (Pwpfblock,IncludePwpfrow) + new "WPC Winter Weather Outlook (PWPF) — How It Works" section, CHANGELOG, CLAUDE.md feed/interface lists.🤖 Generated with Claude Code
https://claude.ai/code/session_01UokAERat9fVzmcmsfJzsJF