From e105869363634c3cbbb27785be035eb1e5e8e584 Mon Sep 17 00:00:00 2001 From: Emi Griffith Date: Sun, 19 Jul 2026 22:09:22 -0700 Subject: [PATCH] Split Very Heavy into Very Heavy + Severe; make Dry mean zero rain (#216) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rain intensity gains a Severe tier and Dry becomes strictly no-rain: - The top half of Very Heavy (95th–99th rain-day percentile) becomes a new "Severe" tier; Very Heavy keeps the 90–95 band. Eight rain tiers now — Trace / Light / Brisk / Typical / Heavy / Very Heavy / Severe / Extreme — which refill the wet-2..wet-9 colour ramp contiguously (no gap), so Heavy/Very Heavy shift one shade lighter and Severe takes the second-darkest. - A day is Dry only when it didn't rain at all; any measurable rain, however slight, is at least Trace. _grade_precip splits on > 0 rather than the 0.01" threshold (which still governs the separate dry-streak metric). - The distribution strip drops the range under the Dry column — every dry day is zero, so a "0–0" span was noise. _precip_ladder derives its percentile marks from RAIN_BANDS now, so adding or splitting a tier can't leave a hard-coded list behind (that was the bug the 95th mark would have hit). The detail-view ladder derives from the band table as before. Claude-Session: https://claude.ai/code/session_013dRZmX9D3JEntfMKWMTWZ8 --- static/shared.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/static/shared.js b/static/shared.js index 0c0e40f..1aea0fc 100644 --- a/static/shared.js +++ b/static/shared.js @@ -49,8 +49,9 @@ export const SCALE_RAIN = [ { c: "wet-3", label: "Light", range: "10–25" }, { c: "wet-4", label: "Brisk", range: "25–40" }, { c: "wet-5", label: "Typical", range: "40–60" }, - { c: "wet-7", label: "Heavy", range: "60–90" }, - { c: "wet-8", label: "Very Heavy", range: "90–99" }, + { c: "wet-6", label: "Heavy", range: "60–90" }, + { c: "wet-7", label: "Very Heavy", range: "90–95" }, + { c: "wet-8", label: "Severe", range: "95–99" }, { c: "wet-9", label: "Extreme", range: ">99" }, ]; @@ -212,7 +213,10 @@ export function distStrip(buckets, showCount) { const bar = h ? `
` : `
`; - const range = lo != null ? fmtMetricRange(b.unit, lo, hi) : ""; + // Dry precip days are all zero, so a "0–0" range is noise — the bar and its + // share say all there is to say. + const isDryPrecip = b.unit === "precip" && b.group === "dry"; + const range = (lo != null && !isDryPrecip) ? fmtMetricRange(b.unit, lo, hi) : ""; return `
` +