FA-71091 / Weather index computation / Open access
Fosberg fire weather index: dry branch edge · case 01
RH exactly 10% uses the very-dry regression.
ROOT CAUSE
The dry regression includes RH = 10.
VERIFIED REPAIR
Use the dry regression only for RH < 10.
Unsuccessful approach: Shrinking the dry branch to RH < 5 pushes 5-9% RH into the middle regression.
Case contract
Equilibrium moisture m: RH<10: 0.03229+0.281073RH-0.000578RH*T; 10<=RH<=50: 2.22749+0.160107RH-0.01478T; RH>50: 21.0606+0.005565RH^2-0.00035RH*T-0.483199RH. x=m/30; eta=1-2x+1.5x^2-0.5x^3; FFWI = eta*sqrt(1+U^2)/0.3002 clamped to [0,100] and rounded to 0.1.
Why this case matters
Red flag warnings and fire-weather dashboards chart FFWI.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(t_f, rh, wind_mph):
if rh <= 10:
m = 0.03229 + 0.281073 * rh - 0.000578 * rh * t_f
elif rh <= 50:
m = 2.22749 + 0.160107 * rh - 0.01478 * t_f
else:
m = 21.0606 + 0.005565 * rh * rh - 0.00035 * rh * t_f - 0.483199 * rh
x = m / 30.0
eta = 1 - 2 * x + 1.5 * x * x - 0.5 * x ** 3
f = eta * math.sqrt(1 + wind_mph ** 2) / 0.3002
return round(min(max(f, 0.0), 100.0), 1)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['40F 5% RH wind 0 mph', [40, 5, 0], 3.0], ['40F 5% RH wind 10 mph', [40, 5, 10], 30.6], ['40F 5% RH wind 30 mph', [40, 5, 30], 91.5], ['40F 9% RH wind 0 mph', [40, 9, 0], 2.8], ['40F 9% RH wind 10 mph', [40, 9, 10], 28.5], ['40F 9% RH wind 30 mph', [40, 9, 30], 85.2], ['40F 10% RH wind 0 mph', [40, 10, 0], 2.7], ['40F 10% RH wind 10 mph', [40, 10, 10], 26.8]], [['40F 10% RH wind 10 mph', [40, 10, 10], 26.8], ['40F 10% RH wind 30 mph', [40, 10, 30], 80.1], ['40F 11% RH wind 0 mph', [40, 11, 0], 2.6], ['40F 11% RH wind 10 mph', [40, 11, 10], 26.5], ['40F 11% RH wind 30 mph', [40, 11, 30], 79.2], ['40F 30% RH wind 0 mph', [40, 30, 0], 2.1], ['70F 5% RH wind 0 mph', [70, 5, 0], 3.1], ['70F 10% RH wind 10 mph', [70, 10, 10], 27.7]], [['40F 30% RH wind 30 mph', [40, 30, 30], 63.5], ['40F 49% RH wind 0 mph', [40, 49, 0], 1.7], ['40F 49% RH wind 10 mph', [40, 49, 10], 16.8], ['40F 49% RH wind 30 mph', [40, 49, 30], 50.2], ['40F 50% RH wind 0 mph', [40, 50, 0], 1.7], ['40F 50% RH wind 10 mph', [40, 50, 10], 16.6], ['70F 9% RH wind 30 mph', [70, 9, 30], 86.1], ['95F 10% RH wind 10 mph', [95, 10, 10], 28.4]], [['40F 10% RH wind 10 mph', [40, 10, 10], 26.8], ['40F 51% RH wind 0 mph', [40, 51, 0], 1.6], ['40F 51% RH wind 10 mph', [40, 51, 10], 15.9], ['40F 51% RH wind 30 mph', [40, 51, 30], 47.5], ['40F 80% RH wind 0 mph', [40, 80, 0], 0.9], ['40F 80% RH wind 10 mph', [40, 80, 10], 8.7], ['40F 80% RH wind 30 mph', [40, 80, 30], 26.0], ['95F 9% RH wind 30 mph', [95, 9, 30], 86.9]], [['40F 9% RH wind 10 mph', [40, 9, 10], 28.5], ['40F 100% RH wind 10 mph', [40, 100, 10], 1.7], ['40F 100% RH wind 30 mph', [40, 100, 30], 5.1], ['70F 5% RH wind 0 mph', [70, 5, 0], 3.1], ['70F 5% RH wind 10 mph', [70, 5, 10], 30.8], ['70F 5% RH wind 30 mph', [70, 5, 30], 92.0], ['70F 9% RH wind 0 mph', [70, 9, 0], 2.9], ['70F 10% RH wind 30 mph', [70, 10, 30], 82.6]]]
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 |
|---|---|---|---|
| 40F 5% RH wind 0 mph | 3.0 | 3.0 | Passed |
| 40F 5% RH wind 10 mph | 30.6 | 30.6 | Passed |
| 40F 5% RH wind 30 mph | 91.5 | 91.5 | Passed |
| 40F 9% RH wind 0 mph | 2.8 | 2.8 | Passed |
| 40F 9% RH wind 10 mph | 28.5 | 28.5 | Passed |
| 40F 9% RH wind 30 mph | 85.2 | 85.2 | Passed |
| 40F 10% RH wind 0 mph | 2.8 | 2.7 | Failed |
| 40F 10% RH wind 10 mph | 28.0 | 26.8 | Failed |
SHA-256 / cb29006662b5da3ad7a6c302fafccc6c316db35e168948339af4b3f6f1d0ac8e
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(t_f, rh, wind_mph):
if rh < 5:
m = 0.03229 + 0.281073 * rh - 0.000578 * rh * t_f
elif rh <= 50:
m = 2.22749 + 0.160107 * rh - 0.01478 * t_f
else:
m = 21.0606 + 0.005565 * rh * rh - 0.00035 * rh * t_f - 0.483199 * rh
x = m / 30.0
eta = 1 - 2 * x + 1.5 * x * x - 0.5 * x ** 3
f = eta * math.sqrt(1 + wind_mph ** 2) / 0.3002
return round(min(max(f, 0.0), 100.0), 1)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['40F 5% RH wind 0 mph', [40, 5, 0], 3.0], ['40F 5% RH wind 10 mph', [40, 5, 10], 30.6], ['40F 5% RH wind 30 mph', [40, 5, 30], 91.5], ['40F 9% RH wind 0 mph', [40, 9, 0], 2.8], ['40F 9% RH wind 10 mph', [40, 9, 10], 28.5], ['40F 9% RH wind 30 mph', [40, 9, 30], 85.2], ['40F 10% RH wind 0 mph', [40, 10, 0], 2.7], ['40F 10% RH wind 10 mph', [40, 10, 10], 26.8]], [['40F 10% RH wind 10 mph', [40, 10, 10], 26.8], ['40F 10% RH wind 30 mph', [40, 10, 30], 80.1], ['40F 11% RH wind 0 mph', [40, 11, 0], 2.6], ['40F 11% RH wind 10 mph', [40, 11, 10], 26.5], ['40F 11% RH wind 30 mph', [40, 11, 30], 79.2], ['40F 30% RH wind 0 mph', [40, 30, 0], 2.1], ['70F 5% RH wind 0 mph', [70, 5, 0], 3.1], ['70F 10% RH wind 10 mph', [70, 10, 10], 27.7]], [['40F 30% RH wind 30 mph', [40, 30, 30], 63.5], ['40F 49% RH wind 0 mph', [40, 49, 0], 1.7], ['40F 49% RH wind 10 mph', [40, 49, 10], 16.8], ['40F 49% RH wind 30 mph', [40, 49, 30], 50.2], ['40F 50% RH wind 0 mph', [40, 50, 0], 1.7], ['40F 50% RH wind 10 mph', [40, 50, 10], 16.6], ['70F 9% RH wind 30 mph', [70, 9, 30], 86.1], ['95F 10% RH wind 10 mph', [95, 10, 10], 28.4]], [['40F 10% RH wind 10 mph', [40, 10, 10], 26.8], ['40F 51% RH wind 0 mph', [40, 51, 0], 1.6], ['40F 51% RH wind 10 mph', [40, 51, 10], 15.9], ['40F 51% RH wind 30 mph', [40, 51, 30], 47.5], ['40F 80% RH wind 0 mph', [40, 80, 0], 0.9], ['40F 80% RH wind 10 mph', [40, 80, 10], 8.7], ['40F 80% RH wind 30 mph', [40, 80, 30], 26.0], ['95F 9% RH wind 30 mph', [95, 9, 30], 86.9]], [['40F 9% RH wind 10 mph', [40, 9, 10], 28.5], ['40F 100% RH wind 10 mph', [40, 100, 10], 1.7], ['40F 100% RH wind 30 mph', [40, 100, 30], 5.1], ['70F 5% RH wind 0 mph', [70, 5, 0], 3.1], ['70F 5% RH wind 10 mph', [70, 5, 10], 30.8], ['70F 5% RH wind 30 mph', [70, 5, 30], 92.0], ['70F 9% RH wind 0 mph', [70, 9, 0], 2.9], ['70F 10% RH wind 30 mph', [70, 10, 30], 82.6]]]
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 |
|---|---|---|---|
| 40F 5% RH wind 0 mph | 2.8 | 3.0 | Failed |
| 40F 5% RH wind 10 mph | 28.4 | 30.6 | Failed |
| 40F 5% RH wind 30 mph | 84.7 | 91.5 | Failed |
| 40F 9% RH wind 0 mph | 2.7 | 2.8 | Failed |
| 40F 9% RH wind 10 mph | 27.1 | 28.5 | Failed |
| 40F 9% RH wind 30 mph | 81.0 | 85.2 | Failed |
| 40F 10% RH wind 0 mph | 2.7 | 2.7 | Passed |
| 40F 10% RH wind 10 mph | 26.8 | 26.8 | Passed |
SHA-256 / 9f87f33bb1a78e5749b6b975eb1cf4ec74f88f4a90c2c370542f1ca1ca2b9f3f
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(t_f, rh, wind_mph):
if rh < 10:
m = 0.03229 + 0.281073 * rh - 0.000578 * rh * t_f
elif rh <= 50:
m = 2.22749 + 0.160107 * rh - 0.01478 * t_f
else:
m = 21.0606 + 0.005565 * rh * rh - 0.00035 * rh * t_f - 0.483199 * rh
x = m / 30.0
eta = 1 - 2 * x + 1.5 * x * x - 0.5 * x ** 3
f = eta * math.sqrt(1 + wind_mph ** 2) / 0.3002
return round(min(max(f, 0.0), 100.0), 1)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['40F 5% RH wind 0 mph', [40, 5, 0], 3.0], ['40F 5% RH wind 10 mph', [40, 5, 10], 30.6], ['40F 5% RH wind 30 mph', [40, 5, 30], 91.5], ['40F 9% RH wind 0 mph', [40, 9, 0], 2.8], ['40F 9% RH wind 10 mph', [40, 9, 10], 28.5], ['40F 9% RH wind 30 mph', [40, 9, 30], 85.2], ['40F 10% RH wind 0 mph', [40, 10, 0], 2.7], ['40F 10% RH wind 10 mph', [40, 10, 10], 26.8]], [['40F 10% RH wind 10 mph', [40, 10, 10], 26.8], ['40F 10% RH wind 30 mph', [40, 10, 30], 80.1], ['40F 11% RH wind 0 mph', [40, 11, 0], 2.6], ['40F 11% RH wind 10 mph', [40, 11, 10], 26.5], ['40F 11% RH wind 30 mph', [40, 11, 30], 79.2], ['40F 30% RH wind 0 mph', [40, 30, 0], 2.1], ['70F 5% RH wind 0 mph', [70, 5, 0], 3.1], ['70F 10% RH wind 10 mph', [70, 10, 10], 27.7]], [['40F 30% RH wind 30 mph', [40, 30, 30], 63.5], ['40F 49% RH wind 0 mph', [40, 49, 0], 1.7], ['40F 49% RH wind 10 mph', [40, 49, 10], 16.8], ['40F 49% RH wind 30 mph', [40, 49, 30], 50.2], ['40F 50% RH wind 0 mph', [40, 50, 0], 1.7], ['40F 50% RH wind 10 mph', [40, 50, 10], 16.6], ['70F 9% RH wind 30 mph', [70, 9, 30], 86.1], ['95F 10% RH wind 10 mph', [95, 10, 10], 28.4]], [['40F 10% RH wind 10 mph', [40, 10, 10], 26.8], ['40F 51% RH wind 0 mph', [40, 51, 0], 1.6], ['40F 51% RH wind 10 mph', [40, 51, 10], 15.9], ['40F 51% RH wind 30 mph', [40, 51, 30], 47.5], ['40F 80% RH wind 0 mph', [40, 80, 0], 0.9], ['40F 80% RH wind 10 mph', [40, 80, 10], 8.7], ['40F 80% RH wind 30 mph', [40, 80, 30], 26.0], ['95F 9% RH wind 30 mph', [95, 9, 30], 86.9]], [['40F 9% RH wind 10 mph', [40, 9, 10], 28.5], ['40F 100% RH wind 10 mph', [40, 100, 10], 1.7], ['40F 100% RH wind 30 mph', [40, 100, 30], 5.1], ['70F 5% RH wind 0 mph', [70, 5, 0], 3.1], ['70F 5% RH wind 10 mph', [70, 5, 10], 30.8], ['70F 5% RH wind 30 mph', [70, 5, 30], 92.0], ['70F 9% RH wind 0 mph', [70, 9, 0], 2.9], ['70F 10% RH wind 30 mph', [70, 10, 30], 82.6]]]
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 |
|---|---|---|---|
| 40F 5% RH wind 0 mph | 3.0 | 3.0 | Passed |
| 40F 5% RH wind 10 mph | 30.6 | 30.6 | Passed |
| 40F 5% RH wind 30 mph | 91.5 | 91.5 | Passed |
| 40F 9% RH wind 0 mph | 2.8 | 2.8 | Passed |
| 40F 9% RH wind 10 mph | 28.5 | 28.5 | Passed |
| 40F 9% RH wind 30 mph | 85.2 | 85.2 | Passed |
| 40F 10% RH wind 0 mph | 2.7 | 2.7 | Passed |
| 40F 10% RH wind 10 mph | 26.8 | 26.8 | Passed |
SHA-256 / e38de9aea17f4a84749f28d53c521046fe28a7d3c3ef3dcc9fcd29db3741a260
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:26.638643+00:00.
Case digest / ee38159c43cd258e39fb7838b49d347356c8503d960fee32f45496d5fef17c24