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 10 |
+
- Probabilistic Evaluation
|
| 11 |
+
frameworks: PyTorch
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
<p align="center"><strong><span style="font-size: 30px;">WeatherBench2</span></strong></p>
|
| 15 |
+
|
| 16 |
+
# Model Introduction
|
| 17 |
+
|
| 18 |
+
WeatherBench2 is an evaluation benchmark for the next generation of data-driven global weather models. It covers deterministic, ensemble-probabilistic, bias, and spectral diagnostics.
|
| 19 |
+
|
| 20 |
+
Paper: WeatherBench 2: A Benchmark for the Next Generation of Data-Driven Global Weather Models
|
| 21 |
+
https://arxiv.org/abs/2308.15560
|
| 22 |
+
|
| 23 |
+
# Model Description
|
| 24 |
+
|
| 25 |
+
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.
|
| 26 |
+
|
| 27 |
+
# Use Cases
|
| 28 |
+
|
| 29 |
+
| Use Case | Description |
|
| 30 |
+
| :---: | :--- |
|
| 31 |
+
| Deterministic evaluation | Compute RMSE, ACC, bias, and SEEPS. |
|
| 32 |
+
| Probabilistic evaluation | Compute CRPS and spread-skill ratio. |
|
| 33 |
+
| Ensemble diagnosis | Compare ensemble means, spread, and skill. |
|
| 34 |
+
| ModelScope/OneCode execution | Validate data, training, inference, evaluation, and visualization. |
|
| 35 |
+
| Multi-GPU training | Validate a compact baseline through `torchrun`. |
|
| 36 |
+
|
| 37 |
+
# Usage Instructions
|
| 38 |
+
|
| 39 |
+
```bash
|
| 40 |
+
hf download OneScience-Group/WeatherBench2 --local-dir ./WeatherBench2
|
| 41 |
+
cd WeatherBench2
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
### Environment Dependencies
|
| 45 |
+
|
| 46 |
+
**Hardware Requirements**
|
| 47 |
+
|
| 48 |
+
- A GPU or DCU is recommended.
|
| 49 |
+
- A CPU can be used for connectivity validation with the default small-sample configuration.
|
| 50 |
+
- DCU users should install DTK 25.04.2 or a compatible OneScience-recommended version first.
|
| 51 |
+
|
| 52 |
+
**DCU Environment**
|
| 53 |
+
|
| 54 |
+
```bash
|
| 55 |
+
# Activate DTK and Conda first
|
| 56 |
+
conda create -n onescience311 python=3.11 -y
|
| 57 |
+
conda activate onescience311
|
| 58 |
+
pip install onescience[earth-dcu] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
**GPU Environment**
|
| 62 |
+
|
| 63 |
+
```bash
|
| 64 |
+
# Activate Conda first
|
| 65 |
+
conda create -n onescience311 python=3.11 -y libstdcxx-ng=12 libgcc-ng=12 gcc_linux-64=12 gxx_linux-64=12
|
| 66 |
+
conda activate onescience311
|
| 67 |
+
pip install onescience[earth-gpu] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai
|
| 68 |
+
```
|
| 69 |
+
|
| 70 |
+
### Training Data
|
| 71 |
+
|
| 72 |
+
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.
|
| 73 |
+
|
| 74 |
+
```bash
|
| 75 |
+
python scripts/fake_data.py
|
| 76 |
+
```
|
| 77 |
+
|
| 78 |
+
### Training
|
| 79 |
+
|
| 80 |
+
For single-process training, use:
|
| 81 |
+
|
| 82 |
+
```bash
|
| 83 |
+
python scripts/train.py
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
For multi-process training, use:
|
| 87 |
+
|
| 88 |
+
```bash
|
| 89 |
+
torchrun --standalone --nproc_per_node=2 scripts/train.py
|
| 90 |
+
```
|
| 91 |
+
|
| 92 |
+
Training results are saved to:
|
| 93 |
+
|
| 94 |
+
```text
|
| 95 |
+
result/checkpoints/weatherbench2.pt
|
| 96 |
+
result/training/metrics.json
|
| 97 |
+
```
|
| 98 |
+
|
| 99 |
+
### Trained Weights
|
| 100 |
+
|
| 101 |
+
No weights are bundled under `weight/`. WeatherBench2 is a benchmark rather than a single pretrained model, so there is no unified official weight artifact.
|
| 102 |
+
|
| 103 |
+
### Inference
|
| 104 |
+
|
| 105 |
+
```bash
|
| 106 |
+
python scripts/inference.py
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
Inference generates an ensemble with shape `[8,8,8,24,48]`. Results are saved to:
|
| 110 |
+
|
| 111 |
+
```text
|
| 112 |
+
result/output/predictions.npz
|
| 113 |
+
```
|
| 114 |
+
|
| 115 |
+
### Evaluation and Visualization
|
| 116 |
+
|
| 117 |
+
```bash
|
| 118 |
+
python scripts/result.py
|
| 119 |
+
```
|
| 120 |
+
|
| 121 |
+
Evaluation reports RMSE, CRPS, and spread-skill ratio and creates a spatial error map. Results are saved to:
|
| 122 |
+
|
| 123 |
+
```text
|
| 124 |
+
result/evaluation/metrics.json
|
| 125 |
+
result/evaluation/comparison.png
|
| 126 |
+
```
|
| 127 |
+
|
| 128 |
+
# Official OneScience Information
|
| 129 |
+
|
| 130 |
+
| Platform | OneScience Main Repository | Skills Repository |
|
| 131 |
+
|---|---|---|
|
| 132 |
+
| Gitee | https://gitee.com/onescience-ai/onescience | https://gitee.com/onescience-ai/oneskills |
|
| 133 |
+
| GitHub | https://github.com/onescience-ai/OneScience | https://github.com/onescience-ai/oneskills |
|
| 134 |
+
|
| 135 |
+
# Citation and License
|
| 136 |
+
|
| 137 |
+
This repository is an independent engineering reproduction of the public WeatherBench2 specifications.
|
| 138 |
+
|
| 139 |
+
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.
|