Hi everyone,
I'm working in Python to compute the UVI (Ultraviolet Index). Here’s my approach:
I activated the solar diagnostics in WRF to obtain SZA (Solar Zenith Angle) and CLRNIDX (Clearness Index).
So, the formula is:
UVI = 40 × FCLR × CLRNIDX
If the wrfout files contain valid values, this works fine. However, in my case all CLRNIDX values were -999.0, so I used another expression to estimate the clearness index:
CLRNIDX = SWDOWN / GHI_clear

If anyone has a better approach, I’d really appreciate it if you could share it here.
I'm working in Python to compute the UVI (Ultraviolet Index). Here’s my approach:
I activated the solar diagnostics in WRF to obtain SZA (Solar Zenith Angle) and CLRNIDX (Clearness Index).
So, the formula is:
UVI = 40 × FCLR × CLRNIDX
If the wrfout files contain valid values, this works fine. However, in my case all CLRNIDX values were -999.0, so I used another expression to estimate the clearness index:
CLRNIDX = SWDOWN / GHI_clear
- SWDOWN = downward shortwave radiation at the surface (from WRF)
- GHI_clear = clear-sky global horizontal irradiance (computed with pvlib)

- μ₀ = cos(SZA)
- Ω = total ozone in Dobson Units (200–400 DU for SZA 0–60°, with ~10% uncertainty)
If anyone has a better approach, I’d really appreciate it if you could share it here.