FAILURE MAP
← Case archive

FA-70916 / Weather index computation / Open access

Humidex with discomfort band: vapour pressure temperature · case 01

Humidex no longer depends on moisture; dry and humid afternoons read the same.

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

ROOT CAUSE

Vapour pressure is computed from the air temperature instead of the dew point.

THE FAILURE

Vapour pressure is computed from the air temperature instead of the dew point.

Unsuccessful approach: Subtracting the dew point from 273.15 inverts the Kelvin conversion.

Case contract

Input air temperature and dew point in degC. If dew point exceeds air temperature return None. e = 6.11*exp(5417.7530*(1/273.16 - 1/(273.15+Td))); H = T + 0.5555*(e - 10); report the humidex rounded half up to an integer and a band on that integer: <30 comfortable, 30-39 some discomfort, 40-45 great discomfort, 46-53 dangerous, >=54 heat stroke imminent.

Why this case matters

Summer heat bulletins publish humidex with a discomfort band.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(t_c, td_c):
    if td_c > t_c:
        return None
    e = 6.11 * math.exp(5417.7530 * (1 / 273.16 - 1 / (273.15 + t_c)))
    h = t_c + 0.5555 * (e - 10.0)
    hx = int(math.floor(h + 0.5))
    if hx < 30:
        band = "comfortable"
    elif hx <= 39:
        band = "some discomfort"
    elif hx <= 45:
        band = "great discomfort"
    elif hx <= 53:
        band = "dangerous"
    else:
        band = "heat stroke imminent"
    return [hx, band]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['air 20 C dew point 5 C', [20, 5], [19, 'comfortable']], ['air 20 C dew point 12 C', [20, 12], [22, 'comfortable']], ['air 20 C dew point 18 C', [20, 18], [26, 'comfortable']], ['air 20 C dew point 20 C', [20, 20], [28, 'comfortable']], ['air 20 C dew point 22 C', [20, 22], None], ['air 20 C dew point 24 C', [20, 24], None], ['air 20 C dew point 26 C', [20, 26], None], ['air 20 C dew point 28 C', [20, 28], None]], [['air 20 C dew point 28 C', [20, 28], None], ['air 20 C dew point 30 C', [20, 30], None], ['air 20 C dew point 36 C', [20, 36], None], ['air 20 C dew point 41 C', [20, 41], None], ['air 25 C dew point 5 C', [25, 5], [24, 'comfortable']], ['air 25 C dew point 12 C', [25, 12], [27, 'comfortable']], ['air 25 C dew point 18 C', [25, 18], [31, 'some discomfort']], ['air 25 C dew point 20 C', [25, 20], [33, 'some discomfort']]], [['air 25 C dew point 20 C', [25, 20], [33, 'some discomfort']], ['air 25 C dew point 22 C', [25, 22], [34, 'some discomfort']], ['air 25 C dew point 24 C', [25, 24], [36, 'some discomfort']], ['air 25 C dew point 26 C', [25, 26], None], ['air 25 C dew point 28 C', [25, 28], None], ['air 25 C dew point 30 C', [25, 30], None], ['air 25 C dew point 36 C', [25, 36], None], ['air 28 C dew point 12 C', [28, 12], [30, 'some discomfort']]], [['air 25 C dew point 41 C', [25, 41], None], ['air 28 C dew point 5 C', [28, 5], [27, 'comfortable']], ['air 28 C dew point 12 C', [28, 12], [30, 'some discomfort']], ['air 28 C dew point 18 C', [28, 18], [34, 'some discomfort']], ['air 28 C dew point 20 C', [28, 20], [36, 'some discomfort']], ['air 28 C dew point 22 C', [28, 22], [37, 'some discomfort']], ['air 28 C dew point 24 C', [28, 24], [39, 'some discomfort']], ['air 28 C dew point 26 C', [28, 26], [41, 'great discomfort']]], [['air 28 C dew point 20 C', [28, 20], [36, 'some discomfort']], ['air 28 C dew point 26 C', [28, 26], [41, 'great discomfort']], ['air 28 C dew point 28 C', [28, 28], [44, 'great discomfort']], ['air 28 C dew point 30 C', [28, 30], None], ['air 28 C dew point 36 C', [28, 36], None], ['air 28 C dew point 41 C', [28, 41], None], ['air 30 C dew point 5 C', [30, 5], [29, 'comfortable']], ['air 30 C dew point 20 C', [30, 20], [38, 'some discomfort']]]]
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
air 20 C dew point 5 C[28, 'comfortable'][19, 'comfortable']Failed
air 20 C dew point 12 C[28, 'comfortable'][22, 'comfortable']Failed
air 20 C dew point 18 C[28, 'comfortable'][26, 'comfortable']Failed
air 20 C dew point 20 C[28, 'comfortable'][28, 'comfortable']Passed
air 20 C dew point 22 CNoneNonePassed
air 20 C dew point 24 CNoneNonePassed
air 20 C dew point 26 CNoneNonePassed
air 20 C dew point 28 CNoneNonePassed

SHA-256 / 134a6d8855914f60920516783dc998df1427025c98f1adb6ea3f7a79226095fe

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(t_c, td_c):
    if td_c > t_c:
        return None
    e = 6.11 * math.exp(5417.7530 * (1 / 273.16 - 1 / (273.15 - td_c)))
    h = t_c + 0.5555 * (e - 10.0)
    hx = int(math.floor(h + 0.5))
    if hx < 30:
        band = "comfortable"
    elif hx <= 39:
        band = "some discomfort"
    elif hx <= 45:
        band = "great discomfort"
    elif hx <= 53:
        band = "dangerous"
    else:
        band = "heat stroke imminent"
    return [hx, band]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['air 20 C dew point 5 C', [20, 5], [19, 'comfortable']], ['air 20 C dew point 12 C', [20, 12], [22, 'comfortable']], ['air 20 C dew point 18 C', [20, 18], [26, 'comfortable']], ['air 20 C dew point 20 C', [20, 20], [28, 'comfortable']], ['air 20 C dew point 22 C', [20, 22], None], ['air 20 C dew point 24 C', [20, 24], None], ['air 20 C dew point 26 C', [20, 26], None], ['air 20 C dew point 28 C', [20, 28], None]], [['air 20 C dew point 28 C', [20, 28], None], ['air 20 C dew point 30 C', [20, 30], None], ['air 20 C dew point 36 C', [20, 36], None], ['air 20 C dew point 41 C', [20, 41], None], ['air 25 C dew point 5 C', [25, 5], [24, 'comfortable']], ['air 25 C dew point 12 C', [25, 12], [27, 'comfortable']], ['air 25 C dew point 18 C', [25, 18], [31, 'some discomfort']], ['air 25 C dew point 20 C', [25, 20], [33, 'some discomfort']]], [['air 25 C dew point 20 C', [25, 20], [33, 'some discomfort']], ['air 25 C dew point 22 C', [25, 22], [34, 'some discomfort']], ['air 25 C dew point 24 C', [25, 24], [36, 'some discomfort']], ['air 25 C dew point 26 C', [25, 26], None], ['air 25 C dew point 28 C', [25, 28], None], ['air 25 C dew point 30 C', [25, 30], None], ['air 25 C dew point 36 C', [25, 36], None], ['air 28 C dew point 12 C', [28, 12], [30, 'some discomfort']]], [['air 25 C dew point 41 C', [25, 41], None], ['air 28 C dew point 5 C', [28, 5], [27, 'comfortable']], ['air 28 C dew point 12 C', [28, 12], [30, 'some discomfort']], ['air 28 C dew point 18 C', [28, 18], [34, 'some discomfort']], ['air 28 C dew point 20 C', [28, 20], [36, 'some discomfort']], ['air 28 C dew point 22 C', [28, 22], [37, 'some discomfort']], ['air 28 C dew point 24 C', [28, 24], [39, 'some discomfort']], ['air 28 C dew point 26 C', [28, 26], [41, 'great discomfort']]], [['air 28 C dew point 20 C', [28, 20], [36, 'some discomfort']], ['air 28 C dew point 26 C', [28, 26], [41, 'great discomfort']], ['air 28 C dew point 28 C', [28, 28], [44, 'great discomfort']], ['air 28 C dew point 30 C', [28, 30], None], ['air 28 C dew point 36 C', [28, 36], None], ['air 28 C dew point 41 C', [28, 41], None], ['air 30 C dew point 5 C', [30, 5], [29, 'comfortable']], ['air 30 C dew point 20 C', [30, 20], [38, 'some discomfort']]]]
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
air 20 C dew point 5 C[17, 'comfortable'][19, 'comfortable']Failed
air 20 C dew point 12 C[16, 'comfortable'][22, 'comfortable']Failed
air 20 C dew point 18 C[15, 'comfortable'][26, 'comfortable']Failed
air 20 C dew point 20 C[15, 'comfortable'][28, 'comfortable']Failed
air 20 C dew point 22 CNoneNonePassed
air 20 C dew point 24 CNoneNonePassed
air 20 C dew point 26 CNoneNonePassed
air 20 C dew point 28 CNoneNonePassed

SHA-256 / c0c623a1adab1c18c28814a6b360380312b1df4131c197ee3c813c43dc45d93d

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:25.002208+00:00.

Case digest / 411f5ea6ff985916f780d209e72c3182344e44e5ccc1a4a1ab7114f163afe170