FAILURE MAP
← Case archive

FA-71151 / Weather index computation / Open access

Haines lower-atmosphere severity index: unknown elevation variant · case 01

An unsupported alpine variant silently reports the low-elevation Haines value.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Unknown elevation variants fall back to the low table.

THE FAILURE

Unknown elevation variants fall back to the low table.

Unsuccessful approach: Returning a zero index still fabricates a very-low rating.

Case contract

temps/dews map pressure level (hPa) to degC. low: stability T950-T850 (<=3:1, <=7:2, else 3), moisture T850-Td850 (<=5:1, <=9:2, else 3); mid: T850-T700 (<=5, <=10), T850-Td850 (<=5, <=12); high: T700-T500 (<=17, <=21), T700-Td700 (<=14, <=20). Unknown elevation returns None. Return [sum, label] with 2-3 very low, 4 low, 5 moderate, 6 high.

Why this case matters

Fire behaviour analysts use the Haines index for plume-dominated fire potential.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(elev, temps, dews):
    levels = {"low": (950, 850, 850, 850, (3, 7), (5, 9)),
              "mid": (850, 700, 850, 850, (5, 10), (5, 12)),
              "high": (700, 500, 700, 700, (17, 21), (14, 20))}
    if elev not in levels:
        elev = "low"
    lo, up, tm, dm, (a1, a2), (b1, b2) = levels[elev]
    stab = temps[lo] - temps[up]
    moist = temps[tm] - dews[dm]
    sa = 1 if stab <= a1 else 2 if stab <= a2 else 3
    sb = 1 if moist <= b1 else 2 if moist <= b2 else 3
    total = sa + sb
    label = "very low" if total <= 3 else "low" if total == 4 else "moderate" if total == 5 else "high"
    return [total, label]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['low elevation sounding', ['low', {950: 13, 850: 9, 700: 3, 500: -20}, {850: 1, 700: -6}], [4, 'low']], ['low elevation sounding', ['low', {950: 12, 850: 1, 700: -5, 500: -24}, {850: -11, 700: -17}], [6, 'high']], ['low elevation sounding', ['low', {950: 13, 850: 8, 700: 3, 500: -22}, {850: -2, 700: -8}], [5, 'moderate']], ['low elevation sounding', ['low', {950: 18, 850: 10, 700: -4, 500: -26}, {850: -6, 700: -8}], [6, 'high']], ['low elevation sounding', ['low', {950: 15, 850: 10, 700: 6, 500: -6}, {850: 8, 700: 3}], [3, 'very low']], ['low elevation sounding', ['low', {950: 29, 850: 22, 700: 20, 500: 7}, {850: 14, 700: 14}], [4, 'low']], ['alpine elevation sounding', ['alpine', {950: 19, 850: 22, 700: 12, 500: -12}, {850: 15, 700: -11}], None], ['alpine elevation sounding', ['alpine', {950: 10, 850: 2, 700: -14, 500: -27}, {850: -1, 700: -26}], None]], [['low elevation sounding', ['low', {950: 13, 850: 13, 700: 2, 500: -19}, {850: 2, 700: -3}], [4, 'low']], ['low elevation sounding', ['low', {950: 13, 850: 1, 700: -9, 500: -31}, {850: -5, 700: -17}], [5, 'moderate']], ['low elevation sounding', ['low', {950: 24, 850: 21, 700: 12, 500: -12}, {850: 12, 700: -4}], [3, 'very low']], ['low elevation sounding', ['low', {950: 18, 850: 18, 700: 15, 500: -10}, {850: 16, 700: 7}], [2, 'very low']], ['low elevation sounding', ['low', {950: 18, 850: 18, 700: 16, 500: 2}, {850: 5, 700: 13}], [4, 'low']], ['low elevation sounding', ['low', {950: 26, 850: 27, 700: 19, 500: 0}, {850: 22, 700: 2}], [2, 'very low']], ['alpine elevation sounding', ['alpine', {950: 18, 850: 17, 700: 11, 500: -10}, {850: 8, 700: 5}], None], ['alpine elevation sounding', ['alpine', {950: 23, 850: 20, 700: 6, 500: -6}, {850: 8, 700: -16}], None]], [['mid elevation sounding', ['mid', {950: 23, 850: 23, 700: 17, 500: -2}, {850: 11, 700: 10}], [4, 'low']], ['mid elevation sounding', ['mid', {950: 24, 850: 12, 700: 9, 500: -12}, {850: 8, 700: -6}], [2, 'very low']], ['mid elevation sounding', ['mid', {950: 18, 850: 7, 700: 5, 500: -20}, {850: -5, 700: -8}], [3, 'very low']], ['mid elevation sounding', ['mid', {950: 10, 850: 2, 700: -11, 500: -32}, {850: -9, 700: -26}], [5, 'moderate']], ['mid elevation sounding', ['mid', {950: 18, 850: 10, 700: 4, 500: -16}, {850: 4, 700: 3}], [4, 'low']], ['mid elevation sounding', ['mid', {950: 30, 850: 18, 700: 4, 500: -12}, {850: 15, 700: -8}], [4, 'low']], ['alpine elevation sounding', ['alpine', {950: 23, 850: 20, 700: 6, 500: -6}, {850: 8, 700: -16}], None], ['alpine elevation sounding', ['alpine', {950: 12, 850: 13, 700: 0, 500: -23}, {850: 8, 700: -22}], None]], [['mid elevation sounding', ['mid', {950: 28, 850: 22, 700: 12, 500: -14}, {850: 11, 700: 4}], [4, 'low']], ['mid elevation sounding', ['mid', {950: 13, 850: 15, 700: 11, 500: -13}, {850: 9, 700: 11}], [3, 'very low']], ['mid elevation sounding', ['mid', {950: 17, 850: 12, 700: -3, 500: -23}, {850: 4, 700: -8}], [5, 'moderate']], ['mid elevation sounding', ['mid', {950: 17, 850: 14, 700: 3, 500: -19}, {850: 4, 700: -6}], [5, 'moderate']], ['mid elevation sounding', ['mid', {950: 21, 850: 23, 700: 13, 500: -13}, {850: 18, 700: -3}], [3, 'very low']], ['mid elevation sounding', ['mid', {950: 30, 850: 27, 700: 20, 500: 1}, {850: 15, 700: 13}], [4, 'low']], ['alpine elevation sounding', ['alpine', {950: 22, 850: 11, 700: 5, 500: -12}, {850: 1, 700: 5}], None], ['alpine elevation sounding', ['alpine', {950: 12, 850: 1, 700: -14, 500: -36}, {850: 0, 700: -14}], None]], [['high elevation sounding', ['high', {950: 30, 850: 20, 700: 11, 500: -13}, {850: 10, 700: 9}], [4, 'low']], ['high elevation sounding', ['high', {950: 18, 850: 18, 700: 14, 500: -1}, {850: 17, 700: -8}], [4, 'low']], ['high elevation sounding', ['high', {950: 14, 850: 11, 700: 5, 500: -14}, {850: -3, 700: 1}], [3, 'very low']], ['high elevation sounding', ['high', {950: 27, 850: 18, 700: 16, 500: -8}, {850: 15, 700: 8}], [4, 'low']], ['high elevation sounding', ['high', {950: 21, 850: 11, 700: 3, 500: -11}, {850: -3, 700: -4}], [2, 'very low']], ['high elevation sounding', ['high', {950: 12, 850: 11, 700: -3, 500: -26}, {850: 6, 700: -7}], [4, 'low']], ['alpine elevation sounding', ['alpine', {950: 25, 850: 21, 700: 13, 500: -12}, {850: 5, 700: 10}], None], ['alpine elevation sounding', ['alpine', {950: 21, 850: 10, 700: -3, 500: -18}, {850: -2, 700: -6}], None]]]
for label, args, expected in fixtures[N - 1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
low elevation sounding[4, 'low'][4, 'low']Passed
low elevation sounding[6, 'high'][6, 'high']Passed
low elevation sounding[5, 'moderate'][5, 'moderate']Passed
low elevation sounding[6, 'high'][6, 'high']Passed
low elevation sounding[3, 'very low'][3, 'very low']Passed
low elevation sounding[4, 'low'][4, 'low']Passed
alpine elevation sounding[3, 'very low']NoneFailed
alpine elevation sounding[4, 'low']NoneFailed

SHA-256 / 91b727bf7479c040b6f93fc994574e6e4ed5387c0f4d84950b1478b4635f2b5f

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(elev, temps, dews):
    levels = {"low": (950, 850, 850, 850, (3, 7), (5, 9)),
              "mid": (850, 700, 850, 850, (5, 10), (5, 12)),
              "high": (700, 500, 700, 700, (17, 21), (14, 20))}
    if elev not in levels:
        return [0, "very low"]
    lo, up, tm, dm, (a1, a2), (b1, b2) = levels[elev]
    stab = temps[lo] - temps[up]
    moist = temps[tm] - dews[dm]
    sa = 1 if stab <= a1 else 2 if stab <= a2 else 3
    sb = 1 if moist <= b1 else 2 if moist <= b2 else 3
    total = sa + sb
    label = "very low" if total <= 3 else "low" if total == 4 else "moderate" if total == 5 else "high"
    return [total, label]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['low elevation sounding', ['low', {950: 13, 850: 9, 700: 3, 500: -20}, {850: 1, 700: -6}], [4, 'low']], ['low elevation sounding', ['low', {950: 12, 850: 1, 700: -5, 500: -24}, {850: -11, 700: -17}], [6, 'high']], ['low elevation sounding', ['low', {950: 13, 850: 8, 700: 3, 500: -22}, {850: -2, 700: -8}], [5, 'moderate']], ['low elevation sounding', ['low', {950: 18, 850: 10, 700: -4, 500: -26}, {850: -6, 700: -8}], [6, 'high']], ['low elevation sounding', ['low', {950: 15, 850: 10, 700: 6, 500: -6}, {850: 8, 700: 3}], [3, 'very low']], ['low elevation sounding', ['low', {950: 29, 850: 22, 700: 20, 500: 7}, {850: 14, 700: 14}], [4, 'low']], ['alpine elevation sounding', ['alpine', {950: 19, 850: 22, 700: 12, 500: -12}, {850: 15, 700: -11}], None], ['alpine elevation sounding', ['alpine', {950: 10, 850: 2, 700: -14, 500: -27}, {850: -1, 700: -26}], None]], [['low elevation sounding', ['low', {950: 13, 850: 13, 700: 2, 500: -19}, {850: 2, 700: -3}], [4, 'low']], ['low elevation sounding', ['low', {950: 13, 850: 1, 700: -9, 500: -31}, {850: -5, 700: -17}], [5, 'moderate']], ['low elevation sounding', ['low', {950: 24, 850: 21, 700: 12, 500: -12}, {850: 12, 700: -4}], [3, 'very low']], ['low elevation sounding', ['low', {950: 18, 850: 18, 700: 15, 500: -10}, {850: 16, 700: 7}], [2, 'very low']], ['low elevation sounding', ['low', {950: 18, 850: 18, 700: 16, 500: 2}, {850: 5, 700: 13}], [4, 'low']], ['low elevation sounding', ['low', {950: 26, 850: 27, 700: 19, 500: 0}, {850: 22, 700: 2}], [2, 'very low']], ['alpine elevation sounding', ['alpine', {950: 18, 850: 17, 700: 11, 500: -10}, {850: 8, 700: 5}], None], ['alpine elevation sounding', ['alpine', {950: 23, 850: 20, 700: 6, 500: -6}, {850: 8, 700: -16}], None]], [['mid elevation sounding', ['mid', {950: 23, 850: 23, 700: 17, 500: -2}, {850: 11, 700: 10}], [4, 'low']], ['mid elevation sounding', ['mid', {950: 24, 850: 12, 700: 9, 500: -12}, {850: 8, 700: -6}], [2, 'very low']], ['mid elevation sounding', ['mid', {950: 18, 850: 7, 700: 5, 500: -20}, {850: -5, 700: -8}], [3, 'very low']], ['mid elevation sounding', ['mid', {950: 10, 850: 2, 700: -11, 500: -32}, {850: -9, 700: -26}], [5, 'moderate']], ['mid elevation sounding', ['mid', {950: 18, 850: 10, 700: 4, 500: -16}, {850: 4, 700: 3}], [4, 'low']], ['mid elevation sounding', ['mid', {950: 30, 850: 18, 700: 4, 500: -12}, {850: 15, 700: -8}], [4, 'low']], ['alpine elevation sounding', ['alpine', {950: 23, 850: 20, 700: 6, 500: -6}, {850: 8, 700: -16}], None], ['alpine elevation sounding', ['alpine', {950: 12, 850: 13, 700: 0, 500: -23}, {850: 8, 700: -22}], None]], [['mid elevation sounding', ['mid', {950: 28, 850: 22, 700: 12, 500: -14}, {850: 11, 700: 4}], [4, 'low']], ['mid elevation sounding', ['mid', {950: 13, 850: 15, 700: 11, 500: -13}, {850: 9, 700: 11}], [3, 'very low']], ['mid elevation sounding', ['mid', {950: 17, 850: 12, 700: -3, 500: -23}, {850: 4, 700: -8}], [5, 'moderate']], ['mid elevation sounding', ['mid', {950: 17, 850: 14, 700: 3, 500: -19}, {850: 4, 700: -6}], [5, 'moderate']], ['mid elevation sounding', ['mid', {950: 21, 850: 23, 700: 13, 500: -13}, {850: 18, 700: -3}], [3, 'very low']], ['mid elevation sounding', ['mid', {950: 30, 850: 27, 700: 20, 500: 1}, {850: 15, 700: 13}], [4, 'low']], ['alpine elevation sounding', ['alpine', {950: 22, 850: 11, 700: 5, 500: -12}, {850: 1, 700: 5}], None], ['alpine elevation sounding', ['alpine', {950: 12, 850: 1, 700: -14, 500: -36}, {850: 0, 700: -14}], None]], [['high elevation sounding', ['high', {950: 30, 850: 20, 700: 11, 500: -13}, {850: 10, 700: 9}], [4, 'low']], ['high elevation sounding', ['high', {950: 18, 850: 18, 700: 14, 500: -1}, {850: 17, 700: -8}], [4, 'low']], ['high elevation sounding', ['high', {950: 14, 850: 11, 700: 5, 500: -14}, {850: -3, 700: 1}], [3, 'very low']], ['high elevation sounding', ['high', {950: 27, 850: 18, 700: 16, 500: -8}, {850: 15, 700: 8}], [4, 'low']], ['high elevation sounding', ['high', {950: 21, 850: 11, 700: 3, 500: -11}, {850: -3, 700: -4}], [2, 'very low']], ['high elevation sounding', ['high', {950: 12, 850: 11, 700: -3, 500: -26}, {850: 6, 700: -7}], [4, 'low']], ['alpine elevation sounding', ['alpine', {950: 25, 850: 21, 700: 13, 500: -12}, {850: 5, 700: 10}], None], ['alpine elevation sounding', ['alpine', {950: 21, 850: 10, 700: -3, 500: -18}, {850: -2, 700: -6}], None]]]
for label, args, expected in fixtures[N - 1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
low elevation sounding[4, 'low'][4, 'low']Passed
low elevation sounding[6, 'high'][6, 'high']Passed
low elevation sounding[5, 'moderate'][5, 'moderate']Passed
low elevation sounding[6, 'high'][6, 'high']Passed
low elevation sounding[3, 'very low'][3, 'very low']Passed
low elevation sounding[4, 'low'][4, 'low']Passed
alpine elevation sounding[0, 'very low']NoneFailed
alpine elevation sounding[0, 'very low']NoneFailed

SHA-256 / 40961c6654b6879f9159a7e5687ce29ac6cf0dae5c62af6dbe5b2997607a2451

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

Stipulated deterministic teaching model of an operational weather index; coefficients and thresholds are fixed by the contract and no claim of standards conformance is made. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:48:27.177392+00:00.

Case digest / 469a99c6cfde7b8a099e858a9bd02dcf51a6b9ac263ced4be62985f23f292c82