Read-only mirror of https://github.com/MeteoSwiss/opendata-nwp-demos — MeteoSwiss. Issues & pull requests at the source.
  • Jupyter Notebook 99.8%
  • Python 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
nnellen a0dff8952f
Pollen availability (#103)
* add summary of failed/successful notebooks in CI

* add try/except to prevent notebook 10 from failing due to unavailable pollen data
2026-09-08 09:23:40 +02:00
developer_notebooks Pollen availability (#103) 2026-09-08 09:23:40 +02:00
images New analysis notebook (#81) 2026-05-21 09:22:21 +02:00
plot_utils colormap notebook 4 2025-05-26 23:58:33 +02:00
.mch-ci.yml Upgrade to mchbuild 1.0 (#68) 2026-03-11 15:02:04 +01:00
.python-version Bugfix/deaccumulate running average (#96) 2026-08-06 13:42:28 +02:00
01_retrieve_process_precip.ipynb Update dep & remove renku (#102) 2026-08-28 20:14:33 +02:00
02_download_soil_temp.ipynb Update dep & remove renku (#102) 2026-08-28 20:14:33 +02:00
03_calculate_wind_speed.ipynb Update dep & remove renku (#102) 2026-08-28 20:14:33 +02:00
04_calculate_rel_humidity.ipynb Update dep & remove renku (#102) 2026-08-28 20:14:33 +02:00
05_interpolate_vertically.ipynb Update dep & remove renku (#102) 2026-08-28 20:14:33 +02:00
06_calculate_global_rad_flux.ipynb Update dep & remove renku (#102) 2026-08-28 20:14:33 +02:00
07_where_will_it_rain_next_24h.ipynb Update dep & remove renku (#102) 2026-08-28 20:14:33 +02:00
08_where_will_the_sun_shine.ipynb Update dep & remove renku (#102) 2026-08-28 20:14:33 +02:00
09_constant_parameters.ipynb Update dep & remove renku (#102) 2026-08-28 20:14:33 +02:00
10_icon_ch2_pollen_forecast.ipynb Pollen availability (#103) 2026-09-08 09:23:40 +02:00
11_analysis_data.ipynb Update dep & remove renku (#102) 2026-08-28 20:14:33 +02:00
check_notebooks.py Pollen availability (#103) 2026-09-08 09:23:40 +02:00
computing_nx_ny.md rename file 'computing_nx_nx.md' 2025-05-09 10:56:03 +02:00
Jenkinsfile Upgrade to mchbuild 1.0 (#68) 2026-03-11 15:02:04 +01:00
LICENSE Initial commit 2025-01-17 16:03:52 +01:00
poetry.lock Update dep & remove renku (#102) 2026-08-28 20:14:33 +02:00
pyproject.toml Update dep & remove renku (#102) 2026-08-28 20:14:33 +02:00
README.md Update dep & remove renku (#102) 2026-08-28 20:14:33 +02:00

OGD Model Data Access & Processing

Jupyter Notebook Examples Using MeteoSwiss NWP Data

MCH Logo              Open Data Logo

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. Open In Colab
02_download_soil_temp.ipynb Download forecast files to disk for offline storage, external tools, or advanced manual processing. Open In Colab
03_calculate_wind_speed.ipynb Retrieve wind component forecasts as Xarray objects and derive the horizontal wind speed using meteodata-lab. Open In Colab
04_calculate_rel_humidity.ipynb Retrieve specific humidity, temperature and pressure as Xarray objects and compute relative humidity. Open In Colab
05_interpolate_vertically.ipynb Retrieve temperature forecasts and perform vertical interpolation from model levels to pressure levels or target altitude. Open In Colab
06_calculate_global_rad_flux.ipynb Retrieve radiation fluxes and compute the global radiation flux. Open In Colab
07_where_will_it_rain_next_24h.ipynb Visualize the probability of precipitation over Switzerland for the next 24 hours. Open In Colab
08_where_will_the_sun_shine.ipynb Map the probability of experiencing over 6 hours of sunshine on the day after tomorrow. Open In Colab
09_constant_parameters.ipynb Retrieve constant model parameters and verify grid consistency with forecast parameters. Open In Colab
10_icon_ch2_pollen_forecast.ipynb Retrieve, convert, and visualize ICON-CH2-EPS pollen forecasts. Open In Colab
11_analysis_data.ipynb Retrieve and visualize KENDA CH1 analysis data. Open In Colab

🚀 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.

  1. Install Python dependencies using Poetry:

    poetry install
    
  2. Install the Jupyter kernel:

    poetry run python -m ipykernel install --user --name=notebooks-nwp-env --display-name "Python (notebooks-nwp-env)"
    
  3. Open the notebook in VS Code or JupyterLab and select the kernel Python (notebooks-nwp-env).

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:

  1. Work on the notebook in developer_notebooks/.
  2. Developer notebooks should use the _clean suffix, for example 09_notebook_clean.ipynb.
  3. Commit the developer notebook without outputs. This keeps PR review manageable and avoids noisy diffs from generated output.
  4. 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 _clean suffix. This is the version users will look at.