Official implementation of SerpentFlow-CLIM, a climatology-aware extension of SerpentFlow for statistical climate downscaling using conditional flow matching.
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
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
notebooks/
01_Data_Preparation.ipynb
02_Training_and_Inference.ipynb
03_Visualization_and_Metrics.ipynb
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
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
Generates every figure and quantitative metric reported in the paper.
Implemented evaluations include
- Mean Difference
- Standard Deviation Difference
- KS Statistic
- Spatial Power Spectrum
- Inter-variable Correlation Bias
- Wasserstein Distance
- 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
France
Latitude
41°N – 52°N
Longitude
-6°W – 10°E
| Variable | Description | Unit |
|---|---|---|
| tas | Near-surface air temperature | °C |
| sfcWind | Surface wind speed | m s⁻¹ |
| pr | Daily precipitation | mm day⁻¹ |
Reference dataset
Resolution
0.25°
Source
Copernicus Climate Data Store
Used as coarse-resolution inputs.
The repository supports both
- bicubic interpolation
- frequency-based interpolation
to match the ERA5 grid.
SerpentFlow-CLIM substantially reduces the temperature climatological bias while maintaining competitive spatial fidelity for wind speed and precipitation.
The proposed method preserves projected climate change signals while improving climatological consistency.
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}
}This repository is released under the MIT License.
This work uses
- ERA5 reanalysis
- CMIP6 climate simulations
- Copernicus Climate Data Store
and builds upon the SerpentFlow framework.s

