NowcastNet_Earth

Model Introduction

NowcastNet is a large model for extreme-precipitation nowcasting proposed by a team from Tsinghua University. The research was published in the main edition of Nature.

Paper: Skilful nowcasting of extreme precipitation with NowcastNet

https://www.nature.com/articles/s41586-023-06184-4

Model Description

NowcastNet combines data-driven deep learning with numerical methods based on physical equations in a unified framework. Two core networks work together to model precipitation processes at different spatial scales.

Use Cases

Scenario Description
Short-term precipitation nowcasting training Train NowcastNet with MRMS data.
Local quick validation Use synthetic data to check data loading, model training and inference, and visualization of inference results.
ModelScope / OneCode execution Download the standalone model package, install dependencies, and run the scripts directly.
Multi-GPU training Use torchrun for data-parallel training across multiple GPUs or accelerators on one host.

Usage Guide

1. OneCode Usage

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

Click to Experience Intelligent One-Click AI4S Programming

2. Manual Installation and Usage

Hardware Requirements

  • A GPU or DCU is recommended.
  • CPU can be used for import and small-scale connectivity verification; full training and inference will be slow.
  • DCU users must install DTK in advance. DTK 25.04.2 or above, or the OneScience recommended version matching your cluster, is recommended.

Download the Model Package

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

Install the Runtime Environment

DCU Environment

# Please activate DTK and CONDA first
conda create -n onescience311 python=3.11 -y
conda activate onescience311
# uv installation is supported
pip install onescience[earth-dcu] -i http://mirrors.onescience.ai:3141/pypi/simple/  --trusted-host mirrors.onescience.ai

GPU Environment

# Please 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
# uv installation is supported
pip install onescience[earth-gpu] -i http://mirrors.onescience.ai:3141/pypi/simple/  --trusted-host mirrors.onescience.ai

Generate Synthetic Data

Synthetic data is only used to check the data protocol and program flow; it does not represent real MRMS data or forecast quality:

python scripts/fake_data.py

Training

Single GPU:

python scripts/train.py

Multi-GPU:

torchrun --nproc_per_node=8 scripts/train.py

Training weights are saved to data/checkpoints/ by default.

Training Weights

This repository provides weights trained on MRMS data in the weight/ folder. The weight files will be uploaded soon and are expected to be available in the near future.

Inference

Inference reads the training weights from data/checkpoints/ by default:

python scripts/inference.py

Evaluation and Visualization

python scripts/result.py

Official OneScience Resources

Citation and License

  • This repository is a reproduction of the original NowcastNet paper.

中文说明

模型简介

NowcastNet 是清华大学团队提出的极端降水临近预报(nowcasting)大模型。研究发表于 Nature 正刊。

论文:使用 NowcastNet 实现有技巧的极端降水临近预报

https://www.nature.com/articles/s41586-023-06184-4

模型描述

NowcastNet 在统一框架中结合数据驱动的深度学习和基于物理方程的数值方法。两个核心网络协同对不同空间尺度的降水过程建模。

使用场景

场景 说明
短时降水临近预报训练 使用 MRMS 数据训练 NowcastNet。
本地快速验证 使用合成数据检查数据加载、模型训练、推理(inference)及推理结果可视化。
在 ModelScope / OneCode 中运行 下载独立模型包,安装依赖后直接运行脚本。
多 GPU 训练 使用 torchrun 在单台主机的多个 GPU 或加速器上执行数据并行训练。

使用指南

1. OneCode 使用方法

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

点击体验智能一键 AI4S 编程

2. 手动安装与使用

硬件要求

  • 建议使用 GPU 或 DCU。
  • CPU 可用于导入和小规模连通性验证,完整训练和推理速度较慢。
  • DCU 用户必须提前安装 DTK。建议使用 DTK 25.04.2 或更高版本,或使用 OneScience 推荐的与所在集群匹配的版本。

下载模型包

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

安装运行环境

DCU 环境

# Please activate DTK and CONDA first
conda create -n onescience311 python=3.11 -y
conda activate onescience311
# uv installation is supported
pip install onescience[earth-dcu] -i http://mirrors.onescience.ai:3141/pypi/simple/  --trusted-host mirrors.onescience.ai

GPU 环境

# Please 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
# uv installation is supported
pip install onescience[earth-gpu] -i http://mirrors.onescience.ai:3141/pypi/simple/  --trusted-host mirrors.onescience.ai

生成合成数据

合成数据仅用于检查数据规范和程序流程,无法代表真实 MRMS 数据或预报质量。

python scripts/fake_data.py

训练

单 GPU

python scripts/train.py

多 GPU

torchrun --nproc_per_node=8 scripts/train.py

训练权重默认保存到 data/checkpoints/。

训练权重

本仓库在 weight/ 文件夹中提供基于 MRMS 数据训练得到的权重。权重文件即将上传,预计近期可用。

推理

推理默认从 data/checkpoints/ 读取训练权重。

python scripts/inference.py

评估与可视化

python scripts/result.py

OneScience 官方资源

引用与许可证

  • 本仓库复现了 NowcastNet 的原始论文。
Downloads last month
21
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support