Download data
Ground-based measurements
MeteoSwiss primarily uses the Federal Spatial Data Infrastructure FSDI, which is operated by swisstopo.
The documentation below relates to the data provided on the FSDI.
Numerical weather forecasting model data
'Numerical weather forecasting model ICON-CH1/2-EPS' data are made available for download by the CSCS - Swiss National Supercomputing Centre.
The different download options are documented here.
How to download files automatically
The FSDI provides a REST API which adheres to the OGC STAC API standard.
Each dataset is in its own collection - calling the /collections endpoint will show all collections available: https://data.geo.admin.ch/collections
Each collection has a description - calling the /getCollections endpoint, will show all collection metadata of a particular collection: e.g. get the details of the collection "Automatic weather stations": https://data.geo.admin.ch/api/stac/v1/collections/ch.meteoschweiz.ogd-smn
How to check for new data
When downloading data from the STAC API, you might want to make sure to always retrieve the most current data.
By default, asset objects are cached for 2 hours (Exception: Collections with 10 minute values are cached for 10 seconds).
We highly recommend to use preconditioning via the If-Match or If-None-Match headers (mostly the latter one) when making calls to the STAC API. This reduces unnecessary traffic.
- When the client sends an
If-None-Matchheader containing theETagof the current (local) version of the requested object, the server compares it to the currently available resource'sETagon the server. - Only in case the two values don't match, the requested object is sent.
- Otherwise the server responds with a
304 Not Modifiedwithout a body, which tells the user (i.e. the client) that his version of the asset is still good to use.
For more information check swisstopo's STAC API documentation.
Examples
Ground-based measurements
This Jupyter notebook shows a simplified workflow for downloading and processing ground-based measurements of station Salen-Reutenen (HAI) from the STAC API.
- The code used in the notebook is for demo purposes only. Code quality is not on production-grade level.
- The packages that are required in order to run the Jupyter notebook are specified in the Pipfile. A simple
pipenv installwill install the dependencies in a virtual environment on your machine.
Numerical weather forecasting model data
The MeteoSwiss opendata-nwp-demos repository contains a collection of Jupyter notebooks that demonstrate how to access, download, and visualise data from numerical weather prediction (NWP) ICON-CH1/2-EPS models.