PrecipitationSRCNN

Model Introduction

PrecipitationSRCNN reconstructs low-resolution daily precipitation as a field with finer spatial structure, providing a low-cost complement to dynamical downscaling for regional precipitation and extreme-event analysis.

Paper: Complementing Dynamical Downscaling With Super-Resolution Convolutional Neural Networks
https://doi.org/10.1029/2024GL111828

Model Description

The method was proposed by research teams at Oak Ridge National Laboratory, Lawrence Berkeley National Laboratory, and the University of California, Berkeley. The paper trains and evaluates the method with ERA5 daily precipitation, dynamically downscaled ERA5DD precipitation, and elevation data. It is intended for daily precipitation super-resolution, dynamical-downscaling emulation, and precipitation-climatology reconstruction.

Use Cases

Use Case Description
Daily precipitation downscaling Convert low-resolution precipitation and elevation conditions into a target-grid precipitation field.
SRCNN super-resolution Validate external upsampling followed by three-layer SRCNN spatial reconstruction.
ModelScope/OneCode execution Validate synthetic-data generation, training, inference, paper metrics, and visualization in ModelScope or OneCode environments.
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/PrecipitationSRCNN --local-dir ./PrecipitationSRCNN
cd PrecipitationSRCNN

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 daily synthetic samples to validate the engineering workflow. Inputs contain low-resolution precipitation and elevation, while targets are same-date high-resolution precipitation on the 216×488 grid in mm/day. The synthetic data preserve the real target grid and daily correspondence while reducing only sample count, model width, and training epochs. They validate SRCNN training, inference, and evaluation but do not represent the official ERA5 or ERA5DD distribution and scale.

python scripts/fake_data.py

This command uses scripts/fake_data.py to create data/daily_precipitation.npz.

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

The default configuration reduces sample count, model width, and training epochs while preserving the 216×488 target grid. Training outputs are saved to:

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

Trained Weights

This delivery contains no official checkpoint. The repository's training workflow generates an engineering checkpoint, but this project copies or bundles no official weights and does not claim that its engineering weights are or equal official weights.

Inference

python scripts/inference.py

Inference loads the trained checkpoint and generates 216×488 high-resolution precipitation fields from low-resolution daily precipitation and same-grid elevation. Complete numerical results are saved to result/output/predictions.npz.

Evaluation and Visualization

python scripts/result.py

Evaluation follows the paper's precipitation protocol for mean precipitation, annual P95, wet days, extreme days, bias, and spatial correlation, saving results to result/evaluation/metrics.json; this is not a multi-step forecasting task, so metrics are aggregated by date and year rather than saved per lead time. It also generates a precipitation-field comparison of input, target, prediction, and error. Synthetic-data results validate the engineering workflow only and do not represent formal paper performance.

Official OneScience Information

Citation and License

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

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

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