AtmosphericDA-DModel

Model Introduction

AtmosphericDA-DModel learns and corrects systematic errors in atmospheric numerical dynamical models by combining a knowledge-based model with the paper's D model error corrector to improve data-assimilation analyses and short- to medium-range forecasts.

Paper: Using machine learning to correct model error in data assimilation and forecast applications
https://doi.org/10.1002/qj.4116

Model Description

The method reproduced by AtmosphericDA-DModel was proposed by research teams from CEREA, École des Ponts ParisTech, EDF R&D, and the European Centre for Medium-Range Weather Forecasts. The paper trains the error-correction model with data-assimilation analysis trajectories generated from complete noise-free and sparse noisy observations of a two-layer, two-dimensional quasi-geostrophic channel model with perturbed-parameter error. The model is suitable for dynamical model-error learning, hybrid surrogate forecasting, and improvement of data-assimilation analyses.

Use Cases

Use Case Description
Dynamical model-error studies Study perturbed-parameter error in two-layer streamfunction channel dynamics.
Hybrid forecast validation Combine the perturbed dynamics with Dense D-model analysis increments.
Data-assimilation experiments Generate executable approximate analyses from complete sparse-observation windows; the interface can be replaced by full 4D-Var.
ModelScope/OneCode execution Validate training, inference, evaluation, visualization, and checkpoint workflows in ModelScope or OneCode.
Multi-GPU training Launch distributed data-parallel training with torchrun.

Usage Instructions

1.OneCode

Experience intelligent, one-click AI4S programming through the OneCode online environment:

Try intelligent, one-click AI4S programming

2. Download and Installation

hf download OneScience-Group/AtmosphericDA-DModel --local-dir ./AtmosphericDA-DModel
cd AtmosphericDA-DModel

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 must install DTK first. DTK 25.04.2 or later, or the OneScience-recommended version matching the cluster, is recommended.

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

This repository uses a small number of structured two-layer quasi-geostrophic streamfunction samples to validate the engineering workflow. Each sample retains the complete 2×20×40 state and 12 batches of 50 bilinear observations at random locations. The input is an analysis state, and the target is the model-error increment between the next analysis and the original-model forecast; only the sample count is reduced, not the state or observation-window dimensions. Synthetic data validate model-error learning, training, inference, and evaluation only and do not represent the paper data distribution or formal performance.

python scripts/fake_data.py

Training

For single-device training, use:

python scripts/train.py

For multi-GPU training, use:

torchrun --nproc_per_node=8 --nnodes=1 --rdzv_id=1000 --rdzv_backend=c10d --max_restarts=0 --master_addr="localhost" --master_port=29500 scripts/train.py

Training validates the state, observation, and target formats and fits the model with Adam and MSE. The default configuration reduces the number of epochs for quick workflow validation, and results are saved to:

result/checkpoints/d_model.pt
result/training/metrics.json

Trained Weights

This repository does not include weights under weight/. The paper does not provide a confirmed official checkpoint, and the current engineering checkpoint is not claimed to be compatible with external weights.

Inference

python scripts/inference.py

Inference results include the reference analysis states, original-model forecasts, error corrections, and hybrid-model forecasts. Complete numerical results are saved to result/output/predictions.npz.

Evaluation and Visualization

python scripts/result.py

Evaluation reports streamfunction RMSE for the dynamics and hybrid next analyses, plus strict analysis-increment RMSE, while validating complete dimensions and finite values. Metrics and the figure are saved to result/evaluation/metrics.json and result/evaluation/comparison.png. Synthetic results validate the workflow only and do not represent paper performance.

Official OneScience Information

Citation and License

This repository is an independent engineering reproduction of the public AtmosphericDA-DModel specifications.

Use of this repository's code, official model weights, and data remains subject to the licenses and terms of their respective projects.


中文说明

模型简介

AtmosphericDA-DModel 将基于知识的模型与论文中的 D 模型误差校正器结合,学习并校正大气数值动力模型的系统误差,改善资料同化(data assimilation)分析及短期至中期预报(medium-range forecast)。

论文:利用机器学习校正资料同化和预报应用中的模型误差
https://doi.org/10.1002/qj.4116

模型描述

AtmosphericDA-DModel 复现的方法由 CEREA、巴黎高等路桥学院、EDF R&D 和欧洲中期天气预报中心的研究团队提出。论文使用资料同化分析轨迹训练误差校正模型。轨迹源自具有参数扰动误差的双层二维准地转槽道模型的完整无噪观测和稀疏含噪观测。该模型适用于动力模型误差学习、混合代理预报和资料同化分析改进。

使用场景

使用场景 说明
动力模型误差研究 研究双层流函数槽道动力学中的参数扰动误差。
混合预报验证 将受扰动力学与 Dense D 模型的分析增量相结合。
资料同化试验 从完整的稀疏观测窗口生成可执行的近似分析,接口可替换为完整的 4D-Var。
ModelScope/OneCode 运行 在 ModelScope 或 OneCode 中验证训练、推理(inference)、评估、可视化及模型权重(检查点)(checkpoint)流程。
多 GPU 训练 使用 torchrun 启动分布式数据并行训练。

使用指南

1.OneCode

通过 OneCode 在线环境体验智能一键 AI4S 编程。

体验智能一键 AI4S 编程

2. 下载与安装

hf download OneScience-Group/AtmosphericDA-DModel --local-dir ./AtmosphericDA-DModel
cd AtmosphericDA-DModel

环境依赖

硬件要求

  • 建议使用 GPU 或 DCU。
  • 可使用 CPU 在默认小样本配置下进行连通性验证。
  • DCU 用户须先安装 DTK。建议使用 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

训练数据

本仓库使用少量结构化双层准地转流函数样本验证工程流程。每个样本保留完整的 2×20×40 状态及 12 批随机位置的双线性观测,每批有 50 个观测。输入为分析状态,目标为下一时刻分析与原模型预报之间的模型误差增量。样本数量有所缩减,状态和观测窗口维度保持完整。合成数据仅用于验证模型误差学习、训练、推理和评估,无法代表论文数据分布或正式性能。

python scripts/fake_data.py

训练

单设备训练

python scripts/train.py

多 GPU 训练

torchrun --nproc_per_node=8 --nnodes=1 --rdzv_id=1000 --rdzv_backend=c10d --max_restarts=0 --master_addr="localhost" --master_port=29500 scripts/train.py

训练验证状态、观测和目标的格式,并使用 Adam 和 MSE 拟合模型。默认配置减少了训练轮次以快速验证流程,结果保存到以下位置。

result/checkpoints/d_model.pt
result/training/metrics.json

训练权重

本仓库未在 weight/ 下附带权重。论文未提供已确认的官方模型权重(检查点),当前用于工程验证的模型权重也未声称与外部权重兼容。

推理

python scripts/inference.py

推理结果包括参考分析状态、原模型预报、误差校正和混合模型预报。完整数值结果保存到 result/output/predictions.npz。

评估与可视化

python scripts/result.py

评估报告动力模型和混合模型的下一时刻分析的流函数 RMSE,以及严格的分析增量 RMSE,同时验证维度是否完整、数值是否有限。指标和图像分别保存到 result/evaluation/metrics.json 和 result/evaluation/comparison.png。合成数据的结果仅用于验证流程,无法代表论文性能。

OneScience 官方信息

引用与许可证

本仓库是对公开 AtmosphericDA-DModel 规范的独立工程复现。

本仓库代码、官方模型权重和数据的使用仍受各自项目的许可证和条款约束。

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