Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

SerpentFlow-CLIM

Official implementation of SerpentFlow-CLIM, a climatology-aware extension of SerpentFlow for statistical climate downscaling using conditional flow matching.


Overview

Global Climate Models (GCMs) provide long-term climate projections but operate at coarse spatial resolutions that are insufficient for many regional climate-impact studies.

SerpentFlow-CLIM is a climatology-aware generative downscaling framework that learns high-resolution climate fields from ERA5 reanalysis while preserving large-scale climate signals from GCM simulations.

The method extends SerpentFlow through three complementary components:

  • Climatology-aware temperature decomposition
  • Hybrid CDFt correction during inference
  • Auxiliary geographical and seasonal conditioning

The underlying conditional flow-matching generator remains unchanged.

Keywords:

  • climate downscaling
  • flow matching
  • generative AI
  • precipitation downscaling
  • ERA5
  • GCM
  • climate models

Method

Unlike the original SerpentFlow, SerpentFlow-CLIM explicitly separates climatology from transient variability.

For temperature, the network predicts only the anomaly component while climatology is reconstructed using CDFt.

For surface wind speed and precipitation, the original SerpentFlow training objective is retained, while inference applies CDFt to the low-frequency conditioning field before generation.

Additional conditioning includes

  • land–sea mask
  • terrain descriptors
  • day-of-year embedding

Repository Structure

notebooks/

01_Data_Preparation.ipynb
02_Training_and_Inference.ipynb
03_Visualization_and_Metrics.ipynb

Notebook 1 – Data Preparation

This notebook prepares ERA5 and CMIP6 datasets before model training.

The workflow includes

  • downloading datasets from the Copernicus Climate Data Store
  • reading NetCDF files
  • selecting the France study region
  • temporal alignment
  • unit conversion
  • spatial interpolation
  • saving processed datasets

Notebook 2 – Training and Inference

This notebook reproduces all experiments.

Implemented models

  • SerpentFlow-Single
  • SerpentFlow-Concat
  • SerpentFlow-CLIM

The notebook performs

  • preprocessing
  • pseudo-pair generation
  • conditional flow matching training
  • checkpoint saving
  • inference on CMIP6 projections
  • climatology reconstruction
  • ensemble generation

Notebook 3 – Visualization and Metrics

Generates every figure and quantitative metric reported in the paper.

Implemented evaluations include

ERA5 fidelity

  • Mean Difference
  • Standard Deviation Difference
  • KS Statistic
  • Spatial Power Spectrum
  • Inter-variable Correlation Bias
  • Wasserstein Distance

GCM consistency

  • Temporal Correlation
  • Annual Anomaly Error
  • Relative Climate Change Signal
  • Seasonal Change Signal

The notebook also reproduces

  • spatial maps
  • CDFs
  • PSDs
  • annual anomalies
  • temporal evolution
  • inter-variable diagnostics

Study Area

France

Latitude

41°N – 52°N

Longitude

-6°W – 10°E

Variables

Variable Description Unit
tas Near-surface air temperature °C
sfcWind Surface wind speed m s⁻¹
pr Daily precipitation mm day⁻¹

Data

ERA5

Reference dataset

Resolution

0.25°

Source

Copernicus Climate Data Store


CMIP6 GCM

Used as coarse-resolution inputs.

The repository supports both

  • bicubic interpolation
  • frequency-based interpolation

to match the ERA5 grid.


Main Results

ERA5 Fidelity

SerpentFlow-CLIM substantially reduces the temperature climatological bias while maintaining competitive spatial fidelity for wind speed and precipitation.


GCM Consistency

The proposed method preserves projected climate change signals while improving climatological consistency.

Citation

If you use this repository, please cite

@article{serpentflowclim2026,
  title={SerpentFlow-CLIM: Climatology-Aware Conditional Flow Matching for Statistical Climate Downscaling},
  author={...},
  journal={...},
  year={2026}
}

License

This repository is released under the MIT License.


Acknowledgements

This work uses

  • ERA5 reanalysis
  • CMIP6 climate simulations
  • Copernicus Climate Data Store

and builds upon the SerpentFlow framework.s

About

SerpentFlow-CLIM: A climatology-aware flow matching framework for climate downscaling.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages