ML-MODIS

Model Introduction

ML-MODIS reproduces the satellite-based machine-learning workflow proposed by Chen et al. (2022), estimating cloud-property counterfactuals without the 2014 volcanic aerosol perturbation and using them to diagnose aerosol-cloud effects and their shortwave radiative contributions.

Paper: Machine learning reveals climate forcing from aerosols is dominated by increased cloud cover
https://doi.org/10.1038/s41561-022-00991-6

Model Description

The method was proposed by a research team from the University of Exeter, the Met Office, ETH Zurich, the University of Cambridge, NASA Goddard Space Flight Center, the University of Leeds, Ludwig Maximilian University of Munich, and collaborating institutions. The paper pairs MODIS Collection 6.1 cloud products with ERA5 meteorological data and trains independent random forests by month and cloud-property target using samples from years other than 2014. The model generates counterfactual cloud properties from meteorological conditions and compares them with 2014 MODIS observations to diagnose volcanic-aerosol cloud responses and their shortwave radiative-forcing contributions.

Use Cases

Use Case Description
Counterfactual cloud prediction Estimate unperturbed Nd, reff, LWP, and CF from ERA5 meteorology and compare them with 2014 observations.
OOB interpretation and radiative diagnostics Calculate OOB skill and permutation importance, then diagnose relative Twomey, LWP, and CF shortwave radiative contributions.
Local workflow validation Validate data generation, training, checkpoint restoration, inference, evaluation, and visualization with structured synthetic data.
ModelScope/OneCode execution Validate structured data, training, inference, counterfactual and radiative-diagnostic metrics, and visualization in ModelScope or OneCode environments.
Multi-GPU training Validate distributed training and the checkpoint workflow through 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/ML-MODIS --local-dir ./ML-MODIS
cd ML-MODIS

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 in advance. DTK 25.04.2 or later, or the OneScience-recommended version matching the current 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

The paper uses MODIS Collection 6.1 cloud products and ERA5 meteorological data aligned by year, month, Terra/Aqua platform, and coordinates, excluding 2014 samples from training. Each sample contains 114 predictors, comprising 90 fields from nine profile variables at ten pressure levels and 24 single-level fields, with Nd, reff, LWP, and CF as targets. The synthetic data contain structured meteorological, spatiotemporal, and cloud-property relationships for engineering validation only and do not represent the real MODIS or ERA5 distributions, training scale, or paper performance.

python scripts/fake_data.py

Training

For single-GPU 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 builds separate random forests for four cloud properties in September and October; the default reduces each forest from the paper's 100 trees to 12 without reducing the 114 predictors, months, targets, or multimodal alignment protocol. Formal experiments require real MODIS and ERA5 data and field-level verification against the supplementary material, with training artifacts saved to:

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

Trained Weights

No official weights are bundled under weight/, and no public model weights or directly downloadable checkpoint from the paper authors were identified. The paper states only that code is available from the corresponding author upon reasonable request; the local checkpoint is an engineering artifact and makes no compatibility claim with unreleased author weights.

Inference

python scripts/inference.py

Inference loads the training checkpoint and generates counterfactual predictions for all four cloud properties from ERA5 meteorological conditions, saving per-tree predictions, forest means, observations, and alignment metadata. Complete numerical results are saved to result/output/predictions.npz.

Evaluation and Visualization

python scripts/result.py

Evaluation computes OOB MSE, R², Pearson correlation, permutation importance, area-weighted 2014 responses, susceptibilities, and relative shortwave radiative contributions. Results are saved to result/evaluation/metrics.json and result/evaluation/comparison.png; synthetic-data results validate engineering only and do not represent paper performance or climate-attribution evidence.

Official OneScience Information

Citation and License

This repository is an independent engineering reproduction of the public ML-MODIS specifications.

Its code is licensed under Apache-2.0; the paper and author code remain subject to their respective copyright and usage terms.

Use of MODIS Collection 6.1 and ERA5 remains subject to the current NASA Earthdata/LAADS DAAC and Copernicus Climate Data Store/ECMWF terms, respectively.


中文说明

模型简介

ML-MODIS 复现 Chen 等人(2022)提出的基于卫星数据的机器学习流程,估计没有 2014 年火山气溶胶扰动时的反事实云属性,并用这些属性诊断气溶胶对云的影响及其短波辐射贡献。

论文《机器学习揭示气溶胶的气候强迫主要由云量增加主导》
https://doi.org/10.1038/s41561-022-00991-6

模型描述

该方法由来自埃克塞特大学、英国气象局、苏黎世联邦理工学院、剑桥大学、NASA 戈达德太空飞行中心、利兹大学、慕尼黑路德维希-马克西米利安大学及合作机构的研究团队提出。论文将 MODIS Collection 6.1 云产品与 ERA5 气象数据配对,使用 2014 年以外的样本按月份和云属性目标分别训练独立的随机森林。模型根据气象条件生成反事实云属性,并将其与 2014 年 MODIS 观测对比,诊断云对火山气溶胶的响应及其短波辐射强迫贡献。

使用场景

使用场景 说明
反事实云属性预测 根据 ERA5 气象数据估计无扰动的 Nd、reff、LWP 和 CF,并与 2014 年观测对比。
OOB 解读与辐射诊断 计算 OOB 技巧和置换重要性,再诊断 Twomey 效应、LWP 和 CF 的相对短波辐射贡献。
本地流程验证 使用结构化合成数据验证数据生成、训练、模型权重(检查点)(checkpoint)恢复、推理(inference)、评估和可视化。
ModelScope/OneCode 运行 在 ModelScope 或 OneCode 环境中验证结构化数据、训练、推理、反事实和辐射诊断指标及可视化。
多 GPU 训练 使用 torchrun 验证分布式训练及模型权重(检查点)流程。

使用说明

1.OneCode

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

体验智能一键 AI4S 编程

2. 下载与安装

hf download OneScience-Group/ML-MODIS --local-dir ./ML-MODIS
cd ML-MODIS

环境依赖

硬件要求

  • 建议使用 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

训练数据

论文使用按年份、月份、Terra/Aqua 平台和坐标对齐的 MODIS Collection 6.1 云产品与 ERA5 气象数据,训练时排除 2014 年样本。每个样本包含 114 个预测因子,包括 90 个由九个剖面变量在十个气压层上构成的场,以及 24 个单层场,以 Nd、reff、LWP 和 CF 为目标。合成数据包含结构化的气象、时空和云属性关系,仅用于工程验证,不代表真实的 MODIS 或 ERA5 数据分布、训练规模或论文性能。

python scripts/fake_data.py

训练

单 GPU 训练使用以下命令。

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

训练针对九月和十月的四个云属性分别建立随机森林。默认配置将论文中每个森林的树数从 100 棵减至 12 棵,保留全部 114 个预测因子、月份、目标和多模态对齐协议。正式实验需要使用真实的 MODIS 和 ERA5 数据,依据补充材料逐字段核验。训练产物保存至以下路径。

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

训练权重

weight/ 中未附带官方权重,也未找到论文作者公开发布的模型权重或可直接下载的模型权重(检查点)。论文仅指出,可向通讯作者提出合理请求以获取代码。本地模型权重(检查点)是工程产物,未声明与作者未发布的权重兼容。

推理

python scripts/inference.py

推理加载训练所得的模型权重(检查点),根据 ERA5 气象条件生成全部四个云属性的反事实预测,并保存各棵树的预测、森林均值、观测和对齐元数据。完整数值结果保存到 result/output/predictions.npz。

评估与可视化

python scripts/result.py

评估计算 OOB MSE、R²、Pearson 相关系数、置换重要性、面积加权的 2014 年响应、敏感度和相对短波辐射贡献。结果保存至 result/evaluation/metrics.json 和 result/evaluation/comparison.png。合成数据结果仅用于工程验证,不代表论文性能,也不能作为气候归因证据。

OneScience 官方信息

引用与许可证

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

本仓库代码采用 Apache-2.0 许可证。论文和作者代码仍受各自的版权和使用条款约束。

MODIS Collection 6.1 和 ERA5 的使用分别受 NASA Earthdata/LAADS DAAC 和 Copernicus Climate Data Store/ECMWF 的现行条款约束。

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