FAILURE MAP
← Case archive

FA-70926 / Weather index computation / Open access

Humidex with discomfort band: saturated air acceptance · case 01

Foggy saturated air with dew point equal to temperature returns no humidex.

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

ROOT CAUSE

The rejection treats dew point equal to air temperature as impossible.

THE FAILURE

The rejection treats dew point equal to air temperature as impossible.

Unsuccessful approach: Allowing a one-degree tolerance accepts physically impossible dew points.

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 + 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 35 C dew point 36 C', [35, 36], None]], [['air 20 C dew point 20 C', [20, 20], [28, 'comfortable']], ['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 26 C', [25, 26], None]], [['air 20 C dew point 20 C', [20, 20], [28, 'comfortable']], ['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 40 C dew point 41 C', [40, 41], None]], [['air 20 C dew point 20 C', [20, 20], [28, 'comfortable']], ['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 35 C dew point 36 C', [35, 36], None]], [['air 20 C dew point 20 C', [20, 20], [28, 'comfortable']], ['air 25 C dew point 26 C', [25, 26], None], ['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']]]]
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[19, 'comfortable'][19, 'comfortable']Passed
air 20 C dew point 12 C[22, 'comfortable'][22, 'comfortable']Passed
air 20 C dew point 18 C[26, 'comfortable'][26, 'comfortable']Passed
air 20 C dew point 20 CNone[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 35 C dew point 36 CNoneNonePassed

SHA-256 / e71b7c95795cae05339c0570660b1c1d6374a78fbc5c42a4622ed67f13e3ccd0

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 + 1:
        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 35 C dew point 36 C', [35, 36], None]], [['air 20 C dew point 20 C', [20, 20], [28, 'comfortable']], ['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 26 C', [25, 26], None]], [['air 20 C dew point 20 C', [20, 20], [28, 'comfortable']], ['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 40 C dew point 41 C', [40, 41], None]], [['air 20 C dew point 20 C', [20, 20], [28, 'comfortable']], ['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 35 C dew point 36 C', [35, 36], None]], [['air 20 C dew point 20 C', [20, 20], [28, 'comfortable']], ['air 25 C dew point 26 C', [25, 26], None], ['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']]]]
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[19, 'comfortable'][19, 'comfortable']Passed
air 20 C dew point 12 C[22, 'comfortable'][22, 'comfortable']Passed
air 20 C dew point 18 C[26, 'comfortable'][26, 'comfortable']Passed
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 35 C dew point 36 C[64, 'heat stroke imminent']NoneFailed

SHA-256 / 8d0535b75df708287837abc6b8c527a8728ff0d141fc0420389cc6e5f75a8670

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

Case digest / 56889ef03b64621a6aac75731c508f3bd8c3feafdd6ee288bc8e0a7c5bb8bf09