WeatherBench

Model Introduction

WeatherBench is a dataset and evaluation benchmark for data-driven global weather forecasting. This reproduction implements the paper's five-layer fully convolutional CNN for three- and five-day Z500 and T850 evaluation.

Paper: WeatherBench: A Benchmark Data Set for Data-Driven Weather Forecasting
https://arxiv.org/abs/2002.00469

Model Description

The benchmark was proposed by teams from the Technical University of Munich, ECMWF, Stockholm University, the University of Washington, and the University of Toronto. It uses ERA5 reanalysis from 1979–2018 with multiresolution global fields and 13 pressure levels. The paper CNN predicts Z500 and T850 directly or iteratively and is compared with persistence, climatology, linear regression, and IFS.

Use Cases

Use Case Description
Medium-range forecasting Evaluate three- and five-day Z500 and T850.
Baseline comparison Compare forecasts with persistence and climatology.
Latitude-weighted scoring Compute WeatherBench RMSE and ACC.
ModelScope/OneCode execution Validate structured data, training, inference, weather metrics, and visualization.
Multi-GPU training Start multi-process training through torchrun.

Usage Instructions

hf download OneScience-Group/WeatherBench --local-dir ./WeatherBench
cd WeatherBench

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
python scripts/fake_data.py
python scripts/train.py
torchrun --nproc_per_node=2 --nnodes=1 --master_addr="localhost" --master_port=29500 scripts/train.py
python scripts/inference.py
python scripts/result.py

Synthetic data retain Z500 and T850 on the paper's 32x64 grid and the six-hour iterative protocol. The five-layer fully convolutional CNN completes MSE optimization and parameter updates in verified single-process and two-process DDP runs. Inference restores the checkpoint, performs 12-step and 20-step rollouts with periodic longitude boundaries, and produces finite outputs with shape [4,2,2,32,64]. Training results are saved to result/checkpoints/weatherbench_cnn.pt; forecasts and latitude-weighted metrics are saved under result/output/ and result/evaluation/.

Official OneScience Information

Citation and License

This repository is an independent engineering reproduction of the public WeatherBench specifications.

The original paper, WeatherBench code, and ERA5 data remain subject to their respective licenses and terms.


中文说明

模型简介

WeatherBench 是用于数据驱动全球天气预报(weather forecasting)的数据集和评估基准。本次复现实现论文中的五层全卷积 CNN,以评估三天和五天的 Z500 与 T850 预报。

论文《WeatherBench:数据驱动天气预报的基准数据集》
https://arxiv.org/abs/2002.00469

模型描述

该基准由慕尼黑工业大学、ECMWF、斯德哥尔摩大学、华盛顿大学和多伦多大学的团队提出,使用 1979–2018 年的 ERA5 再分析(reanalysis)数据,包含多分辨率全球场和 13 个气压层。论文中的 CNN 直接或迭代地预测 Z500 和 T850,并与持续性预报、气候态、线性回归及 IFS 比较。

使用场景

使用场景 说明
中期预报(Medium-range forecasting) 评估三天和五天的 Z500 和 T850 预报。
基线比较 将预报与持续性预报和气候态比较。
纬度加权评分 计算 WeatherBench 的 RMSE 和 ACC。
在 ModelScope/OneCode 中运行 验证结构化数据、训练、推理(inference)、天气预报指标和可视化。
多 GPU 训练 通过 torchrun 启动多进程训练。

使用说明

hf download OneScience-Group/WeatherBench --local-dir ./WeatherBench
cd WeatherBench

环境依赖

硬件要求

  • 建议使用 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
python scripts/fake_data.py
python scripts/train.py
torchrun --nproc_per_node=2 --nnodes=1 --master_addr="localhost" --master_port=29500 scripts/train.py
python scripts/inference.py
python scripts/result.py

合成数据保留了论文 32x64 网格上的 Z500 和 T850,以及六小时间隔的迭代协议。经过验证,五层全卷积 CNN 在单进程和双进程 DDP 运行中完成 MSE 优化和参数更新。推理恢复模型权重(检查点)(checkpoint),在经度方向采用周期性边界,执行 12 步和 20 步滚动预测,生成形状为 [4,2,2,32,64] 的有限值输出。训练结果保存到 result/checkpoints/weatherbench_cnn.pt,预报和纬度加权指标保存在 result/output/ 和 result/evaluation/ 下。

OneScience 官方信息

引用与许可证

本仓库依据公开的 WeatherBench 规范进行了独立工程复现。

原论文、WeatherBench 代码和 ERA5 数据仍受各自许可证和条款约束。

Downloads last month
7
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Paper for OneScience-Group/WeatherBench