UV index
The clear-sky UV index, for any place and any date.
- Status
- live
- Year
- 2026
- Built with
- SvelteKit · TypeScript · D3 · Vercel
Why
I wanted to know at what time to cover up, in the mountains, on a given day. Weather apps give an index for today and for the town at the bottom of the valley. I wanted the whole curve, at the altitude I am at, for a date I choose.
How
No measurement: geometry. Solar declination, equation of time, Earth-Sun distance, zenith angle. Then a Beer-Lambert model with two separate air masses, Rayleigh and ozone: the ozone layer is treated as a spherical shell at 22 km, which makes the effect of ozone vary with the height of the sun instead of freezing it. The ozone amount comes from a monthly climatology by latitude band. Altitude correction of 6 % per kilometre.