Examples#
The following notebooks illustrate the spatial interpolation functions of grid_process.grid_interp with open
data from MeteoSwiss, ECMWF, Copernicus, swisstopo and NOAA. Each one compares several interpolation methods visually
and with a runtime benchmark. The first four examples cover Switzerland, the last two the whole globe.
The notebooks are rendered with the outputs of their last execution. Since open forecast data are only kept for a few days, re-running them retrieves more recent forecasts. To run them, install the extra dependencies with:
poetry install --with example
The forecast and reanalysis data are downloaded with earthkit-data. To
keep them between sessions, enable its cache once, e.g. in ~/.config/earthkit/data/config.yaml:
cache-policy: user
user-cache-directory: /path/to/a/large/disk/earthkit-cache
The ERA5-Land and ERA5 examples additionally need a free account on the
Copernicus Climate Data Store, with the API token in ~/.cdsapirc and the
licences of the datasets accepted once on their download pages.
All data are open data under the CC BY 4.0 licence (MeteoSwiss, ECMWF, Copernicus Climate Change Service), the open data terms of swisstopo, or in the public domain (NOAA). The data sources are credited in each notebook.
- Interpolation to stations: ICON-CH2 wind gusts
- Interpolation to stations: IFS-HRES 2 m temperature
- Regridding: ERA5-Land yearly precipitation on the RhiresY grid
- Regridding: IFS-HRES and ICON-CH2 2 m temperature on a 200 m grid over Valais
- Interpolation to stations worldwide: GFS 2 m temperature
- Regridding: ERA5 2 m temperature on the global IFS 0.1° grid