Recent/forecast grade window has date gaps and boundary-row artifacts (missing 07-22/07-23, future-dated rows, spurious 100th-pct boundary lows) #66
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Jinemi/thermograph#66
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom (reproduced independently twice, across 3 unrelated cells)
A 14-day grade call "graded to 2026-07-24" returns rows spanning 07-10→08-03:
high == low == feels(74.84 at the Durham cell), the shape of a partial/single-observation day.1241_-2203), West Seattle (1641_-2849), and Waterloo/Greater London (1776_-3) — same two calendar dates missing at all three, on two continents. This points at the ingest chain, not any one location.Related, likely same root cause: spurious 100th-percentile boundary lows
At every cell graded, today's low (07-24) grades as exactly 100th percentile "Near Record", and the final forecast row (08-03, where high==low==feels) also grades 100th pct everywhere tested (Durham 74.84, West Seattle 80.42, London 71.96). Identical behavior at the first and last row of the window across three unrelated cells is not a climate signal — it's what a partial/single-observation day looks like when the day's minimum is computed before the night has actually happened. This is user-facing: a Discord bot surfaced "abnormally warm nights" / "100th pct every day" narratives built partly on this artifact.
Suspected root cause (from independent code review of
backend/data/climate.py)FORECAST_DAYS:_metno_to_framereturns every day in MET Norway's timeseries (~10 days), not the intendedFORECAST_DAYS = 8— explains the future-dated 08-01→08-03 rows.max(t) == min(t)→tmax == tmin == feels— explains thehigh==low==feelsboundary-row artifact.RECENT_END_LAG_DAYS = 2: this assumes NASA POWER NRT lags 2 days behind real-time, but NASA POWER's actual NRT latency commonly runs 3-5 days. NASA's range ends attoday-2while MET Norway's forward range starts attoday, leaving a hole for whatever days fall in the real latency gap — matches the missing 07-22/07-23 window if lag is actually running ~3-5 days rather than 2.Not yet verified against a live repro with fix in hand — flagging the hypothesis so whoever picks this up doesn't start from zero.
Suggested fix
_metno_to_frame's output toFORECAST_DAYSand drop the partial trailing day.RECENT_END_LAG_DAYSto match (or backfill the gap from the history record instead).Why this matters
Thermograph's entire product claim is that a percentile means something. A spurious 100th-percentile boundary row, and forecast days presented with fabricated calendar gaps, both quietly corrode that claim in exactly the shape of a real weather story — which is how this surfaced (as an apparent "persistent warm-night pattern") before anyone traced it to a data artifact.