Repository navigation
Add a benchmark script of the operational cases (synthetic data) - #16
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o the benchmark The applications may switch from the grid database ICON fields to native ICON (e.g. a Swiss cut-out from polytope): native counterparts of the grid database ICON cases on the native points within the grid database area, and one whole-domain ICON-CH1 and ICON-CH2 case as upper bounds. The lake-masked grid cases are removed (only data4web masks, and interp2grid keeps all-NaN points). AGENTS.md: native cases, example notebooks, NaN masking in interp2poi only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
run stays offline: fetch-native downloads a run of native ICON-CH1/CH2-EPS (all members and lead times, by blocks of lead times into one float32 array: 3.8 GB peak) once and writes the --data-dir files, with HSURF and the land fraction (lake mask of data4web). A real native file with fewer members or lead times is noted in the results. Synthetic native radiation has no NaN, as the open data. AGENTS.md: the intended NaN difference between interp2poi (POIs on the ground) and interp2grid (lakes kept in the destination grid), and fetch-native. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
benchmarks/operational_cases.py, a benchmark of the operational uses of grid-process on synthetic data of operational size, to compare a branch withmainbefore merging changes that can affect runtime, memory or results.Cases (39), with the operational settings of the applications:
interp2poi(try_reg=False)to 5 622 POIs:idw,nearest_alt,nearest,temp,snowlim,upscaled;slice_coarsentheninterp2grid(try_reg=False)to the Swiss 2 km grid:nearest_alt,idw,temp_fixgrad;nearest, topographic descriptors to the POIs withlinear, and the 50 m DEM to the 2 km grid withlinear.Sources: IFS-ENS, ICON-CH1/CH2-EPS (including the snow limit with NaN and the lake-masked temperature to the POIs), ICON-CH2-EPS in LV95, INCA.
Native ICON (the applications may switch to it, e.g. a Swiss cut-out from polytope):
Measurements, each case in fresh processes:
Synthetic data: same structure, CRS attributes, sizes, dtypes, chunking and NaN patterns as the operational files:
A single orography function gives the altitude of all grids and POIs.
Commands:
list;run, with--case(shell patterns),--repeat,--grid-process(benchmark a worktree ofmain),--save-outputs, and--data-dir(real files instead of the synthetic data);compare A B: runtime and memory ratios per case, and outputs identical or the size of their differences;fetch-native --out DIR: downloads a run of native ICON-CH1/CH2-EPS from the open data of MeteoSwiss once (all members and lead times; needspoetry install --with example), as real data forrun --data-dir.runnever downloads, so both sides of a comparison use the same data. A native case on a real file with fewer members or lead times than operational is noted.Checked against the real data:
--data-dirfor absolute times.A full run takes about 12 minutes.
test/test_benchmarks.pysmoke-tests every case at a small scale, the NaN patterns (grid database and native), the conversion of the open data and the lake masking (without network), andrun+compareend to end (about 30 s in CI).AGENTS.md:fetch-native;interp2poidrops the points that are NaN in all fields, on purpose: POIs are on the ground, while lakes stay in the destination grid ofinterp2grid.No change to the library.
Related issue
None
Checklist
CLAUDE.local.md🤖 Generated with Claude Code