- Jupyter Notebook 99.8%
- Python 0.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
* add summary of failed/successful notebooks in CI * add try/except to prevent notebook 10 from failing due to unavailable pollen data |
||
| developer_notebooks | ||
| images | ||
| plot_utils | ||
| .mch-ci.yml | ||
| .python-version | ||
| 01_retrieve_process_precip.ipynb | ||
| 02_download_soil_temp.ipynb | ||
| 03_calculate_wind_speed.ipynb | ||
| 04_calculate_rel_humidity.ipynb | ||
| 05_interpolate_vertically.ipynb | ||
| 06_calculate_global_rad_flux.ipynb | ||
| 07_where_will_it_rain_next_24h.ipynb | ||
| 08_where_will_the_sun_shine.ipynb | ||
| 09_constant_parameters.ipynb | ||
| 10_icon_ch2_pollen_forecast.ipynb | ||
| 11_analysis_data.ipynb | ||
| check_notebooks.py | ||
| computing_nx_ny.md | ||
| Jenkinsfile | ||
| LICENSE | ||
| poetry.lock | ||
| pyproject.toml | ||
| README.md | ||
OGD Model Data Access & Processing
Jupyter Notebook Examples Using MeteoSwiss NWP Data
This repository provides Jupyter notebook examples for accessing and processing numerical weather prediction (NWP) model data from MeteoSwiss, released through Switzerland’s Open Government Data (OGD) initiative.
📓 Notebooks
You can run the notebooks locally or directly in Google Colab.
| Notebook | Description | Open in Colab |
|---|---|---|
| 01_retrieve_process_precip.ipynb | Retrieve and load precipitation forecasts as an Xarray object, then process, analyze, and visualize the data using Python tools. | |
| 02_download_soil_temp.ipynb | Download forecast files to disk for offline storage, external tools, or advanced manual processing. | |
| 03_calculate_wind_speed.ipynb | Retrieve wind component forecasts as Xarray objects and derive the horizontal wind speed using meteodata-lab. | |
| 04_calculate_rel_humidity.ipynb | Retrieve specific humidity, temperature and pressure as Xarray objects and compute relative humidity. | |
| 05_interpolate_vertically.ipynb | Retrieve temperature forecasts and perform vertical interpolation from model levels to pressure levels or target altitude. | |
| 06_calculate_global_rad_flux.ipynb | Retrieve radiation fluxes and compute the global radiation flux. | |
| 07_where_will_it_rain_next_24h.ipynb | Visualize the probability of precipitation over Switzerland for the next 24 hours. | |
| 08_where_will_the_sun_shine.ipynb | Map the probability of experiencing over 6 hours of sunshine on the day after tomorrow. | |
| 09_constant_parameters.ipynb | Retrieve constant model parameters and verify grid consistency with forecast parameters. | |
| 10_icon_ch2_pollen_forecast.ipynb | Retrieve, convert, and visualize ICON-CH2-EPS pollen forecasts. | |
| 11_analysis_data.ipynb | Retrieve and visualize KENDA CH1 analysis data. |
🚀 Getting Started
You can run the notebooks in two ways.
Option 1: Open a single notebook in Google Colab
Use Google Colab if you want to open one notebook directly.
Click the Open in Colab badge next to the notebook in the table above, then run the notebook cells from top to bottom.
The first cell installs the required Python dependencies.
Option 2: Run locally
Clone the repository and install all required packages. This project requires Python >=3.11,<3.13 and Poetry to manage dependencies and environments.
-
Install Python dependencies using Poetry:
poetry install -
Install the Jupyter kernel:
poetry run python -m ipykernel install --user --name=notebooks-nwp-env --display-name "Python (notebooks-nwp-env)" -
Open the notebook in VS Code or JupyterLab and select the kernel Python (notebooks-nwp-env).
📚 Related Documentation
For more context on the available numerical weather forecast data and how it’s structured, see:
🔗 MeteoSwiss Forecast Data Documentation
💬 Feedbacks
Feel free to open issues to suggest improvements or contribute new examples!
🧑💻 Developers
When making a change:
- Work on the notebook in
developer_notebooks/. - Developer notebooks should use the
_cleansuffix, for example09_notebook_clean.ipynb. - Commit the developer notebook without outputs. This keeps PR review manageable and avoids noisy diffs from generated output.
- Once the developer notebook has been reviewed, run it and save the corresponding notebook with outputs at the top level of the repository, without the
_cleansuffix. This is the version users will look at.