icon-uv
Calculate the UV Index from ICON weather forecasts and CAMS atmospheric composition. icon-uv provides hourly grid and point forecasts and daily JSON for towns and mountain regions, using a bundled radiation lookup table.
Point forecasts need only coordinates and elevation. They use nearby ICON cloud and snow conditions, with optional UV albedo and horizon overrides for a specific site. Hourly and daily products share the same location definitions.
Installation
Install the released package with Python 3.11 or newer:
pip install 'icon-uv[cams]'
icon-uv --help
To run the current API and bundled examples, install from the repository with uv:
git clone https://github.com/ofuhrer/icon-uv.git
cd icon-uv
uv sync --locked --extra cams
The cams extra adds the ADS download client. CAMS requires an ADS account and
accepted dataset terms; follow the CAMS API setup.
ICON downloads are public. Omit [cams] when installing for saved inputs only.
Try it without credentials
uv run --no-sync python examples/offline.py --output-dir work/offline
This creates synthetic ICON/CAMS inputs and writes hourly grid/point NetCDF and daily JSON through the real radiation table. After installation it needs no network or credentials. The output illustrates the formats, not a weather forecast.
Calculate UV fields
Follow the forecast workflow to download ICON/CAMS inputs, compute a saved UV grid and export location products. The guide explains cycle selection, daylight coverage and ensemble options.
Hourly and daily locations
Define a point with coordinates and elevation, or a regional elevation band. The same catalog drives hourly point NetCDF and daily JSON; optional albedo and terrain horizons describe a specific site. See the location API for the Python API, JSON catalog and command-line examples.
Daily products reconstruct a rolling 30-minute peak from saved cloud and atmospheric state. They include ensemble summaries, support details and freshness checks. The offline example runs the complete saved-input workflow with synthetic data.
Documentation and examples
- Daily products: peak definition, ensemble uncertainty, missing data and JSON schemas.
- Output reference: NetCDF variables, provenance and quality flags.
- Interactive map: 30 towns and six mountain regions, with a dated CTRL snapshot and export scripts.
- Calculation method and validation: physics, evidence and limits.
- Examples, development and releasing.
Scope and limitations
The cloud fit uses ICON's downward shortwave flux without orographic shading
(ASOD_S). Ambient forecasts do not apply a local terrain horizon. A town marker
is an elevation-adjusted reference point; regional elevation bands provide context
for surrounding mountains and cable-car trips. One marker cannot represent every
slope, snow condition or cloud layer in a resort.
Snow-derived UV albedo is an experimental approximation. Cloud state is hourly; subhourly products follow solar geometry and do not resolve rapid cloud changes. Point elevation adjustments retain the source cloud column. Fixed atmospheric profiles, plane-parallel radiation and approximate optional horizon screening also limit accuracy; see the method and validation guides before interpreting results.
Sources and license
- MeteoSwiss ICON OGD
- CAMS atmospheric composition forecasts, produced by ECMWF for Copernicus
- libRadtran, used to generate the radiation table
- swisstopo elevation profiles, used for the supplied Davos horizon
Licensed under BSD 3-Clause. Input datasets and dependencies retain their own licenses and attribution requirements.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file icon_uv-0.3.0.tar.gz.
File metadata
- Download URL: icon_uv-0.3.0.tar.gz
- Upload date:
- Size: 10.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1111e49c25462ac0786e7a814bb4a4dece1521e96dbf4f748418b802d27cc720
|
|
| MD5 |
286d4dad46984472f85708d416f22893
|
|
| BLAKE2b-256 |
8ee3dbb6e09ac004db81f683f211963ffa43068e16ff4d9333860b84cc851a80
|
Provenance
The following attestation bundles were made for icon_uv-0.3.0.tar.gz:
Publisher:
publish.yml on ofuhrer/icon-uv
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
icon_uv-0.3.0.tar.gz -
Subject digest:
1111e49c25462ac0786e7a814bb4a4dece1521e96dbf4f748418b802d27cc720 - Sigstore transparency entry: 2753059446
- Sigstore integration time:
-
Permalink:
ofuhrer/icon-uv@c5e2641d234f673573c1983f1fa3ab7d2f051845 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/ofuhrer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c5e2641d234f673573c1983f1fa3ab7d2f051845 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file icon_uv-0.3.0-py3-none-any.whl.
File metadata
- Download URL: icon_uv-0.3.0-py3-none-any.whl
- Upload date:
- Size: 258.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
584d0594385caf5a02df3dcf1d34dc008549de65fa333bbd20978fd77a5edd46
|
|
| MD5 |
e35b0687a77f5748210cbf5529124ffd
|
|
| BLAKE2b-256 |
6398b71b08358fb35853668a82c0e9b7e1eb95a7ae405f93ce4e1fdf3a6bbeb6
|
Provenance
The following attestation bundles were made for icon_uv-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on ofuhrer/icon-uv
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
icon_uv-0.3.0-py3-none-any.whl -
Subject digest:
584d0594385caf5a02df3dcf1d34dc008549de65fa333bbd20978fd77a5edd46 - Sigstore transparency entry: 2753059471
- Sigstore integration time:
-
Permalink:
ofuhrer/icon-uv@c5e2641d234f673573c1983f1fa3ab7d2f051845 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/ofuhrer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c5e2641d234f673573c1983f1fa3ab7d2f051845 -
Trigger Event:
workflow_dispatch
-
Statement type: