FA-71079 / Weather index computation / Member archive
Cloud and altitude adjusted UV index: half-up rounding · case 04
An index of 2.6 is published as 2 (low) instead of 3 (moderate).
Case contract
Clear-sky erythemal irradiance in mW/m2; UVI = irradiance/25. Multiply by the cloud factor for 0..8 octas [1,1,1,0.89,0.89,0.73,0.73,0.31,0.2], by 1 + 0.06*altitude_km (continuous) and by 1.3 over snow. Round half up to an integer; category 0-2 low, 3-5 moderate, 6-7 high, 8-10 very high, 11+ extreme.
Why this case matters
Sun-safety advice is keyed to the published integer UV index and category.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 62.5 mW/m2 8 octas 0 m | [0, "low"] | [1, "low"] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗