FA-70911 / Weather index computation / Open access
Humidex with discomfort band: some-discomfort band upper edge · case 01
A humidex of exactly 39 is reported as great discomfort.
ROOT CAUSE
The some-discomfort band excludes its upper value 39.
THE FAILURE
The some-discomfort band excludes its upper value 39.
Unsuccessful approach: Testing the unrounded humidex sends a published 39 (raw 39.3) into great discomfort.
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 28 C dew point 24 C', [28, 24], [39, 'some discomfort']], ['air 30 C dew point 22 C', [30, 22], [39, 'some discomfort']]], [['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 33 C dew point 18 C', [33, 18], [39, 'some discomfort']], ['air 40 C dew point 5 C', [40, 5], [39, '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 33 C dew point 18 C', [33, 18], [39, 'some discomfort']], ['air 40 C dew point 5 C', [40, 5], [39, '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 30 C dew point 22 C', [30, 22], [39, '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 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 22 C', [30, 22], [39, '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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 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 C | None | None | Passed |
| air 20 C dew point 24 C | None | None | Passed |
| air 28 C dew point 24 C | [39, 'great discomfort'] | [39, 'some discomfort'] | Failed |
| air 30 C dew point 22 C | [39, 'great discomfort'] | [39, 'some discomfort'] | Failed |
SHA-256 / d697922d85b57774d2334fa2bbe318f2a0a5c215b589f57dfc73b5f4550c37a8
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 h <= 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 28 C dew point 24 C', [28, 24], [39, 'some discomfort']], ['air 30 C dew point 22 C', [30, 22], [39, 'some discomfort']]], [['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 33 C dew point 18 C', [33, 18], [39, 'some discomfort']], ['air 40 C dew point 5 C', [40, 5], [39, '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 33 C dew point 18 C', [33, 18], [39, 'some discomfort']], ['air 40 C dew point 5 C', [40, 5], [39, '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 30 C dew point 22 C', [30, 22], [39, '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 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 22 C', [30, 22], [39, '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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 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 C | None | None | Passed |
| air 20 C dew point 24 C | None | None | Passed |
| air 28 C dew point 24 C | [39, 'great discomfort'] | [39, 'some discomfort'] | Failed |
| air 30 C dew point 22 C | [39, 'great discomfort'] | [39, 'some discomfort'] | Failed |
SHA-256 / 1d9201cdf12e5fd50c431d7c585f64b36cdbeb2e78c085f847b44a8b140b2468
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:24.985601+00:00.
Case digest / 993810dbab1a8e55dea07138d4c1c0b80987d860de1020c68026876a1c9a9be5