Repository navigation
Conversation
Four notebooks in doc/examples illustrate the spatial interpolation functions with open data (MeteoSwiss OGD, ECMWF open data, ERA5-Land, swisstopo DHM25), comparing methods visually and with a runtime benchmark. They are rendered in the documentation with myst-nb without execution. Their dependencies are in the optional "example" dependency group. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ekd.config.set() is saved to the global earthkit-data config file, so the notebooks no longer set the cache policy. The examples page explains how to enable the earthkit cache instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Unit conversions use grid_process.units_conv.ds_to instead of hard-coded formulas. On regular source grids (IFS-HRES, ERA5-Land), the nearest and linear methods are run and benchmarked with try_reg=True and try_reg=False, and the differences between both paths are reported. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The run lookup of the IFS notebooks sends many small requests to data.ecmwf.int, which sometimes times out. Send them through a requests session retrying with backoff on connection errors and transient HTTP errors. The field downloads already retry within earthkit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Run the notebook with the 2024 ERA5-Land data from the Climate Data Store and write its takeaways. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With k=4 on a regular grid, weight_power=2 gives the result closest to bilinear interpolation, as recommended in the interp2poi docstring. NB4 already used it; NB1 and NB3 are re-executed with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- NB1: map the difference to the observations for each method, at the latest lead time with observations - NB2: six stations (Plateau, valleys, mountains) and temp_fixgrad - NB4: larger DHM25 domain, read_dhm25 with its fixed LV03 CRS, both models side by side in the benchmark table - all: data model set through GRID_PROCESS__ environment variables instead of renaming the station metadata, benchmark tables without the kwargs column, typed helper functions, clean mypy and pylint - outputs: download RhiresY and DHM25 with earthkit instead of pooch (its tqdm.auto import warned without ipywidgets), hide the ECMWF connection limit notice, and disable progress bars in the ICON notebooks, which showed signed download URLs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The stations now cover two valleys, two peaks, a mountain slope and the Plateau. Re-executed with complete observations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cover the plain, valleys, slopes and peaks with cases where the altitude correction works well and cases where it does not, and give the benchmark more points. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Interpolate to all SwissMetNet stations and plot the 14 selected ones, so that the benchmark covers about 160 stations instead of 14. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
earthkit always shows its download progress bars (disable=False is passed to tqdm, so TQDM_DISABLE has no effect), and for ICON they include the signed download URLs. Earlier outputs were clean only because the files came from the earthkit cache. Redirect stderr during the downloads in notebooks 01, 02 and 04 instead. Notebook 04: name IFS-HRES and ICON-CH2 in the title and print the source grid shape of each model above the benchmark table. Re-executed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds four example notebooks to the documentation (new "Examples" page) illustrating
grid_process.grid_interp.interp2poiandinterp2gridwith open data only. They replace the draft examples of the internalgridefix-processbranchfeature/sphinx-nb-display. Each notebook compares the interpolation methods visually and with a runtime benchmark table (first call vs. subsequent cached calls). On regular grids,nearestandlinearare also run withtry_reg=False(generic path) and compared with the default xarray path.interp2poiwind gustsVMAX_10M(MeteoSwiss OGD, native unstructured grid) → SwissMetNet stations measuring gusts, vs. observed hourly max gustlinear,idw(k=4, weight_power=2),nearest_alt(r_search=1.7)interp2poitemperature2t(ECMWF open data, oldest run, 0–144 h) → all SwissMetNet stations; 14 stations from the Plateau to the peaks plotted vs. 10-min observationsnearest,temp(z_fact=15, k=50, weight_power=0.75),temp_fixgrad(r_search=2)interp2gridprecipitationnearest,idw(k=4, weight_power=2),linearinterp2gridtemperature2t, same valid time → swisstopo DHM25/200 grid over Valais (496×833)nearest,linear,idw(k=4, weight_power=2),temp_fixgradDetails:
nb_execution_mode = "off": they are committed with their outputs, since open forecast data expire within days and notebook 03 needs a CDS account.exampledependency group (poetry install --with example), so CI does not install them.myst-nbis added to thedocgroup.grid_processdata model through environment variables (GRID_PROCESS__data_model__poi__coord_from,..._alt_from) instead of renaming the SwissMetNet metadata columns.zat step 0 (IFS),HSURFfrom the horizontal constants (ICON-CH2); destination altitude from DHM25/200.nbconvert --to script); no tooling was added for this.No breaking changes.
Related issue
None.
Checklist
sphinx-build -W,ruff format --checkandpytestpass🤖 Generated with Claude Code