Aardvark Weather
Model Overview
Aardvark Weather is an end-to-end multimodal weather forecasting model that generates global gridded forecasts and station-level predictions through an observation encoder, a global forecast processor, and a station decoder.
Paper: End-to-end data-driven weather prediction
https://www.nature.com/articles/s41586-025-08897-0
Model Description
This model package reuses the official code and weights to provide the following run pipeline:
Official Multimodal Sample
-> Encoder
-> Day-1 Processor
-> TAS Decoder
-> 1-day global forecast and station 2-meter temperature
Use Cases
| Scenario | Description |
|---|---|
| Official Model Verification | Inspect official samples, configuration, and checkpoints. |
| Global Weather Forecasting | Output a global 1.5° gridded state of 24 variables. |
| Station Temperature Forecasting | Output 2-meter temperature at 8,719 stations. |
Usage
1. OneCode
Click to experience intelligent one-click AI4S programming
2. Manual Installation & Usage
Hardware Requirements
- Inference with the official weights requires an NVIDIA GPU.
- CPU can be used for resource and checkpoint inspection; running full inference on CPU is not recommended.
Download the Model Package
hf download OneScience-Group/Aardvark-Weather --local-dir ./Aardvark-Weather
cd Aardvark-Weather
Set Up the Runtime Environment
DCU Environment
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
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
If the environment lacks Aardvark dependencies, refer to official-src/environment.yml for additional installation. The current adaptation is compatible with the Block parameter of the newer timm package.
Data & Weights
The model package already includes the resources required for 1-day temperature inference:
weights/sample_data/sample_data_final.pkl
weights/trained_model/encoder/epoch_96
weights/trained_model/processor/forecast_1/epoch_0
weights/trained_model/decoder/tas/lt_1/epoch_18
official-src/data/grid_lon_lat/
official-src/data/norm_factors/
To re-download from source:
Official Code: https://github.com/anna-allen/aardvark-weather-public
Official Weights: https://huggingface.co/datasets/av555/aardvark-weather
Training
The training entry point provides a complete pipeline with epochs, validation, early stopping, learning rate scheduling, best/latest checkpointing, and resumption. By default, the Encoder and Day-1 Processor are frozen and only the TAS Decoder is trained:
python scripts/train.py
Paper-style end-to-end joint fine-tuning:
python scripts/train.py --train-modules all --epochs 10 --train-steps 100
Resuming training:
python scripts/train.py --resume weight/training/last.pth
The default configuration resides in conf/config.yaml. --data can point to an official-schema pickle file or a directory containing multiple .pkl files; multiple files are partitioned into train and validation sets in a deterministic manner. --batch-size concatenates multiple tasks along the existing batch dimension of the official task. When only the single official sample is included, training and validation reuse the same task — this allows end-to-end validation of the training software pipeline but does not constitute an independent validation set, nor can it provide the data diversity required to reproduce paper-level accuracy.
Training artifacts:
weight/training/best.pth
weight/training/last.pth
weight/training/history.json
weight/training/train.json
Inference
python scripts/inference.py
Using weights obtained from training:
python scripts/inference.py --checkpoint weight/training/best.pth
Inference loads the official sample and the Day-1 tas weights by default. Results are saved to:
result/inference_one_day.json
result/prediction.pt
result/target.pt
Result Inspection
python scripts/result.py
Verified output shapes:
initial_state: [1, 121, 240, 24]
global_forecast: [1, 121, 240, 24]
station_tas: [1, 8719]
Current results constitute a connectivity/end-to-end verification and do not reproduce the paper's RMSE/MAE metrics.
The result script additionally produces result/metrics.json and result/comparison.png. The normalized_mae and normalized_rmse are computed in the normalized space of the official sample and should not be directly compared to the paper's physical-unit metrics.
Paper vs. Current Implementation I/O
| Item | Paper | Current Package |
|---|---|---|
| Input | Multimodal satellite, station, ship, and radiosonde observations | Bundled official sample pickle with a field structure consistent with the official Encoder |
| Global State | 24 × 121 × 240, 1.5° |
Day-1 supported; output [1,121,240,24] |
| Station Output | 2 m temperature and 10 m wind, up to Day-10 | Day-1 TAS only; [1,8719] |
| Training | Staged pre-training followed by ~25,000 steps of end-to-end fine-tuning | Configurable full training loop; supports Decoder-only or full-model joint fine-tuning |
| Evaluation | Grid-point weighted RMSE and station MAE in physical units | MAE/RMSE in normalized sample space |
All commands should be run from the project root; scripts/inference.py --root converts to an absolute path. The official model internally depends on CUDA, so CPU is currently unavailable for inference. Training data must adhere to the official multimodal task dictionary schema; the current directory does not synthesize satellite or station observations — the bundled official sample serves as the default training-pipeline validator. The model package retains only official resources under weights/ and does not carry local training artifacts under weight/ or generated outputs under result/. Paper-level training still requires preparing observation data spanning the full date range and converting it into the same .pkl task contract.
Real Data
Using real dates requires preparing ASCAT, AMSU-A/B, HIRS, IASI, GridSat, HadISD, ICOADS, IGRA, ERA5, topography, climatology, and their corresponding normalization statistics.
OneScience Official 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 & License
- Official Code: https://github.com/anna-allen/aardvark-weather-public
- This directory is an independent adaptation of the official Aardvark Weather model.
- Code, weights, and data are subject to their respective official licenses and data terms.
中文说明
模型概览
Aardvark Weather 是一种端到端的多模态天气预报(weather forecasting)模型,通过观测编码器、全球预报处理器和站点解码器生成全球网格预报和站点级预测。
论文:端到端的数据驱动天气预测
https://www.nature.com/articles/s41586-025-08897-0
模型描述
本模型包复用官方代码和权重,提供以下运行流程。
Official Multimodal Sample
-> Encoder
-> Day-1 Processor
-> TAS Decoder
-> 1-day global forecast and station 2-meter temperature
使用场景
| 场景 | 说明 |
|---|---|
| 官方模型验证 | 检查官方样本、配置和模型权重(检查点)(checkpoint)。 |
| 全球天气预报 | 输出 24 个变量的 1.5° 全球网格状态。 |
| 站点气温预报 | 输出 8,719 个站点的 2-meter 气温。 |
使用指南
1. OneCode
2. 手动安装与使用
硬件要求
- 使用官方权重进行推理(inference)需要 NVIDIA GPU。
- CPU 可用于检查资源和模型权重(检查点),不建议在 CPU 上运行完整推理。
下载模型包
hf download OneScience-Group/Aardvark-Weather --local-dir ./Aardvark-Weather
cd Aardvark-Weather
配置运行环境
DCU 环境
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 环境
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
如果环境缺少 Aardvark 依赖,请参考 official-src/environment.yml 补充安装。当前适配版本与新版 timm 包的 Block 参数兼容。
数据与权重
模型包已包含 1-day 气温推理所需的资源。
weights/sample_data/sample_data_final.pkl
weights/trained_model/encoder/epoch_96
weights/trained_model/processor/forecast_1/epoch_0
weights/trained_model/decoder/tas/lt_1/epoch_18
official-src/data/grid_lon_lat/
official-src/data/norm_factors/
如需从源端重新下载,可使用以下命令。
Official Code: https://github.com/anna-allen/aardvark-weather-public
Official Weights: https://huggingface.co/datasets/av555/aardvark-weather
训练
训练入口提供完整流程,支持按轮次训练、验证、早停、学习率调度、保存最佳及最新模型权重(检查点)和恢复训练。默认冻结 Encoder 和 Day-1 Processor,仅训练 TAS Decoder。
python scripts/train.py
按论文方式进行端到端联合微调(fine-tuning)。
python scripts/train.py --train-modules all --epochs 10 --train-steps 100
恢复训练
python scripts/train.py --resume weight/training/last.pth
默认配置位于 conf/config.yaml。--data 可指向采用官方结构的 pickle 文件,或含有多个 .pkl 文件的目录。若包含多个文件,则按确定性方式划分训练集和验证集。--batch-size 沿官方任务已有的批次维度拼接多个任务。如果只包含唯一的官方样本,训练和验证会复用同一任务。这可用于端到端验证训练软件流程,但无法形成独立的验证集,也无法提供复现论文精度所需的数据多样性。
训练产物
weight/training/best.pth
weight/training/last.pth
weight/training/history.json
weight/training/train.json
推理
python scripts/inference.py
使用训练得到的权重
python scripts/inference.py --checkpoint weight/training/best.pth
推理默认加载官方样本及 Day-1 的 tas 权重。结果保存到以下位置。
result/inference_one_day.json
result/prediction.pt
result/target.pt
结果检查
python scripts/result.py
已验证的输出形状
initial_state: [1, 121, 240, 24]
global_forecast: [1, 121, 240, 24]
station_tas: [1, 8719]
当前结果用于连通性及端到端验证,未复现论文中的 RMSE/MAE 指标。
结果脚本还会生成 result/metrics.json 和 result/comparison.png。normalized_mae 和 normalized_rmse 在官方样本的归一化空间中计算,不应与论文中以物理单位表示的指标直接比较。
论文与当前实现的输入输出对比
| 项目 | 论文 | 当前模型包 |
|---|---|---|
| 输入 | 多模态卫星、站点、船舶和无线电探空观测数据 | 内置官方样本 pickle,字段结构与官方 Encoder 一致 |
| 全球状态 | 24 × 121 × 240,1.5° |
支持 Day-1,输出 [1,121,240,24] |
| 站点输出 | 2 m 气温和 10 m 风,最远至 Day-10 | 仅支持 Day-1 TAS,输出 [1,8719] |
| 训练 | 分阶段预训练,随后进行 ~25,000 步端到端微调 | 训练循环完整且可配置,支持仅训练 Decoder 或全模型联合微调 |
| 评估 | 使用物理单位表示的网格点加权 RMSE 和站点 MAE | 归一化样本空间中的 MAE/RMSE |
所有命令均应在项目根目录下运行,scripts/inference.py --root 会转换成绝对路径。官方模型内部依赖 CUDA,因此目前无法使用 CPU 进行推理。训练数据必须符合官方多模态任务字典的结构。当前目录不会合成卫星或站点观测数据,随包提供的官方样本用作默认的训练流程验证数据。本模型包只保留 weights/ 下的官方资源,未附带 weight/ 下的本地训练产物或 result/ 下生成的输出。要达到论文的训练规模,仍需准备覆盖完整日期范围的观测数据,并将其转换为相同的 .pkl 任务格式。
真实数据
使用真实日期需要准备 ASCAT、AMSU-A/B、HIRS、IASI、GridSat、HadISD、ICOADS、IGRA、ERA5、地形、气候态以及相应的归一化统计量。
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 |
引用与许可证
- 官方代码见 https://github.com/anna-allen/aardvark-weather-public
- 本目录为官方 Aardvark Weather 模型的独立适配。
- 代码、权重和数据分别受对应的官方许可证及数据条款约束。
- Downloads last month
- 25