Repository navigation
Weather vs S2S scales, one-call forecast/compare API, new models (0.3.0) - #3
Merged
Merged
Conversation
- Split forecasts into weather (<= 15 d, fields at lead hours) and S2S (> 15 d, weekly means); lead strings like "48h", "7d", "6w", "week3-4" - wp.forecast(model, variable, lead, init) and wp.compare(...) returning a Comparison (table, ranking, plots, multi-init averaging); legacy keyword calls still work - Model catalog drives routing, `weatherpre models` and README tables - New hosted models: NOAA GEFSv12 ens. mean, NOAA CFSv2, ECMWF extended range (WB2), climatology and persistence baselines - S2S verification vs ERA5 weekly means (RMSE, ACC) with WeatherBench-X - Earth2Studio route rewritten (AIFS v2, Aurora 1.5, FCN3, Atlas, U-CAST, WeatherNext 2, FuXi-S2S, DLESyM, ACE2, any "e2s:<Class>"), tested on CPU with Persistence - New CLI (forecast / compare / models --scale), tests, CI, CONTRIBUTING, CITATION, CHANGELOG, bilingual README - Fix exit crash when eccodes loads before PROJ; fix single-lead scoring Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XaUZ3NVhMrZPpC27Jw2Js
- ECMWF extended range, GEFS, CFSv2, persistence and climatology scored for weeks 1-6 against ERA5 weekly means; tables in both READMEs - Maps show the scores of the init they draw, not the multi-init mean Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XaUZ3NVhMrZPpC27Jw2Js
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.
Summary
Two forecast scales, one interface. Leads ≤ 15 days are weather (fields at lead hours); leads > 15 days are S2S (weekly means, week k = days 7(k-1)..7k after init).
Simple interface
wp.forecast(model, variable, lead, init=...). Lead strings:48h,7d,15d,6w,45d,week3-4,w3,24,48,72. Variable aliases work (precip,mslp,T2M).wp.compare(...)returns aComparisonwith.table(),.ranking(),.summary(),.plot()and.plot_maps().init="START..END"averages over several inits: RMSE is pooled as the square root of the mean MSE, ACC is the plain mean.lead_days=,lead_hours=,preset=, andinitas the second positional argument.weatherpre forecast MODEL [VAR] [LEAD],weatherpre compare MODELS [VAR] [LEAD],weatherpre models --scale s2s [--all].compare --models ...command is nowcompare-wb2.Model catalog and new models
weatherpre/catalog.pyis now the single source of truth. It drives backend routing,weatherpre models, and the generated README tables (scripts/gen_model_table.py)."e2s:<ClassName>"also works.S2S verification
wp.anomaly,maps.plot_s2s), plus a combined RMSE/ACC skill plot.Project / README
README.mdin English,README_zh.mdin Chinese), with a hero figure and real accuracy tables.docs/EXAMPLES.md.ci.yml(ruff + pytest on 3.11 and 3.12; live-data tests are opt-in), CONTRIBUTING, CITATION.cff, CHANGELOG and issue templates.pyprojectnow has the extras[gpu],[hf]and[dev], and the version is unified at 0.3.0.Fixes
Results (real runs, in the README)
Test plan
pytest -q: 52 passed (offline)WEATHERPRE_NETWORK=1 pytest -m network: 5 passed. Covers WeatherBench 2, GEFS, ifs-ext vs climatology, single lead/week scoring, and Earth2StudioPersistenceon CPU.ruff check weatherpre tests scriptspython -m compileall weatherpre scripts hf(thecheckworkflow from main)models,forecast,comparerun end to end. Each README example was run once. Exceptions: theaurora/e2s:FCN3lines need a GPU or HF token, and latest AIFS was reached only through the AWS mirror (data.ecmwf.int is blocked here), where S3 throttled it.ci.yml. It installs weatherbenchX from git and may need tuning.🤖 Generated with Claude Code
https://claude.ai/code/session_012XaUZ3NVhMrZPpC27Jw2Js
Generated by Claude Code