WeatherBench2
Model Introduction
WeatherBench2 is an evaluation benchmark for the next generation of data-driven global weather models. It covers deterministic, ensemble-probabilistic, bias, and spectral diagnostics.
Paper: WeatherBench 2: A Benchmark for the Next Generation of Data-Driven Global Weather Models
https://arxiv.org/abs/2308.15560
Model Description
The benchmark was proposed by teams from Google Research, Google DeepMind, and ECMWF. It uses 2020 global forecasts from ERA5, IFS, and multiple data-driven systems. It supports deterministic, probabilistic, bias, and spatial-scale evaluation of global forecasts from one to fourteen days.
Use Cases
| Use Case | Description |
|---|---|
| Deterministic evaluation | Compute RMSE, ACC, bias, and SEEPS. |
| Probabilistic evaluation | Compute CRPS and spread-skill ratio. |
| Ensemble diagnosis | Compare ensemble means, spread, and skill. |
| ModelScope/OneCode execution | Validate data, training, inference, evaluation, and visualization. |
| Multi-GPU training | Validate a compact baseline through torchrun. |
Usage Instructions
hf download OneScience-Group/WeatherBench2 --local-dir ./WeatherBench2
cd WeatherBench2
Environment Dependencies
Hardware Requirements
- A GPU or DCU is recommended.
- A CPU can be used for connectivity validation with the default small-sample configuration.
- DCU users should install DTK 25.04.2 or a compatible OneScience-recommended version first.
DCU Environment
# Activate DTK and Conda first
conda create -n onescience311 python=3.11 -y
conda activate onescience311
pip install onescience[earth-dcu] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai
GPU Environment
# Activate Conda first
conda create -n onescience311 python=3.11 -y libstdcxx-ng=12 libgcc-ng=12 gcc_linux-64=12 gxx_linux-64=12
conda activate onescience311
pip install onescience[earth-gpu] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai
Training Data
WeatherBench2 evaluates 2020 global forecasts from ERA5, IFS, and data-driven systems on a common 1.5-degree grid. Synthetic data retain eight headline variables and the ensemble dimension while reducing times and grid size.
python scripts/fake_data.py
Training
For single-process training, use:
python scripts/train.py
For multi-process training, use:
torchrun --standalone --nproc_per_node=2 scripts/train.py
Training results are saved to:
result/checkpoints/weatherbench2.pt
result/training/metrics.json
Trained Weights
No weights are bundled under weight/. WeatherBench2 is a benchmark rather than a single pretrained model, so there is no unified official weight artifact.
Inference
python scripts/inference.py
Inference generates an ensemble with shape [8,8,8,24,48]. Results are saved to:
result/output/predictions.npz
Evaluation and Visualization
python scripts/result.py
Evaluation reports RMSE, CRPS, and spread-skill ratio and creates a spatial error map. Results are saved to:
result/evaluation/metrics.json
result/evaluation/comparison.png
Official OneScience Information
| Platform | OneScience Main Repository | Skills Repository |
|---|---|---|
| Gitee | https://gitee.com/onescience-ai/onescience | https://gitee.com/onescience-ai/oneskills |
| GitHub | https://github.com/onescience-ai/OneScience | https://github.com/onescience-ai/oneskills |
Citation and License
This repository is an independent engineering reproduction of the public WeatherBench2 specifications.
The WeatherBench2 evaluation code, ERA5, IFS, and forecast data from participating systems remain subject to the licenses and data-use terms of their respective source projects.
中文说明
模型简介
WeatherBench2 是面向下一代数据驱动全球天气模型的评估基准,涵盖确定性诊断、集合概率诊断、偏差诊断和频谱诊断。
论文《WeatherBench 2:下一代数据驱动全球天气模型的基准》
https://arxiv.org/abs/2308.15560
模型描述
该基准由 Google Research、Google DeepMind 和 ECMWF 的团队提出,使用 ERA5、IFS 和多个数据驱动系统的 2020 年全球预报。它支持一天至十四天全球预报的确定性评估、概率评估、偏差评估和空间尺度评估。
使用场景
| 使用场景 | 说明 |
|---|---|
| 确定性评估 | 计算 RMSE、ACC、偏差和 SEEPS。 |
| 概率评估 | 计算 CRPS 和离散度与技巧比。 |
| 集合诊断 | 比较集合平均值、离散度和预报技巧。 |
| 在 ModelScope/OneCode 中运行 | 验证数据、训练、推理(inference)、评估和可视化。 |
| 多 GPU 训练 | 通过 torchrun 验证精简的基线模型。 |
使用说明
hf download OneScience-Group/WeatherBench2 --local-dir ./WeatherBench2
cd WeatherBench2
环境依赖
硬件要求
- 建议使用 GPU 或 DCU。
- 可以使用 CPU 在默认小样本配置下进行连通性验证。
- DCU 用户应先安装 DTK 25.04.2 或 OneScience 推荐的兼容版本。
DCU 环境
# Activate DTK and Conda first
conda create -n onescience311 python=3.11 -y
conda activate onescience311
pip install onescience[earth-dcu] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai
GPU 环境
# Activate Conda first
conda create -n onescience311 python=3.11 -y libstdcxx-ng=12 libgcc-ng=12 gcc_linux-64=12 gxx_linux-64=12
conda activate onescience311
pip install onescience[earth-gpu] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai
训练数据
WeatherBench2 在统一的 1.5 度网格上评估 ERA5、IFS 和数据驱动系统的 2020 年全球预报。合成数据保留八个主要变量和集合维度,同时减少时间点并缩小网格。
python scripts/fake_data.py
训练
单进程训练使用以下命令。
python scripts/train.py
多进程训练使用以下命令。
torchrun --standalone --nproc_per_node=2 scripts/train.py
训练结果保存到以下位置。
result/checkpoints/weatherbench2.pt
result/training/metrics.json
训练权重
weight/ 下没有随附的权重。WeatherBench2 是一个基准,因此没有面向单个预训练模型的统一官方权重文件。
推理
python scripts/inference.py
推理生成形状为 [8,8,8,24,48] 的集合。结果保存到以下位置。
result/output/predictions.npz
评估与可视化
python scripts/result.py
评估报告 RMSE、CRPS 及离散度与技巧比,并生成空间误差图。结果保存到以下位置。
result/evaluation/metrics.json
result/evaluation/comparison.png
OneScience 官方信息
| 平台 | OneScience 主仓库 | Skills 仓库 |
|---|---|---|
| Gitee | https://gitee.com/onescience-ai/onescience | https://gitee.com/onescience-ai/oneskills |
| GitHub | https://github.com/onescience-ai/OneScience | https://github.com/onescience-ai/oneskills |
引用与许可证
本仓库依据公开的 WeatherBench2 规范进行了独立工程复现。
WeatherBench2 评估代码、ERA5、IFS 和各参与系统的预报数据仍受各来源项目的许可证及数据使用条款约束。
- Downloads last month
- 17