/DownClim

Snakemake and Singularity workflow to Downscale Climate Projections

Primary LanguageTeX

DownClim - Downscale Climate Projections

Sylvain Schmitt - Dec 6, 2023

snakemake workflow to downscale climate projections.

Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.

Description.

Workflow.

Installation

This workflow is built on:

conda activate base
mamba create -c conda-forge -c bioconda -n snakemake snakemake
conda activate snakemake
snakemake --help

Once installed simply clone the workflow:

git clone git@github.com:sylvainschmitt/DownClim.git
cd DownClim
snakemake -np 

Credentials

To further update following the get_cordex rule with pyesgf.

Data are retrieve from the Institut Pierre-Simon Laplace node. You need first to create an account on this page (create account link at corner right).

Then you’ll need to register credentials locally to use the workflow. A help page is available. In linux, you need myproxy-logon installed and to run this command line (with your user name):

myproxy-logon -sesgf-node.ipsl.upmc.fr -l {user_name} -b -T -t 72 -o ~/.esg/credentials.pem

To run the workflow on a cluster, you can simply copy your local credentials to the cluster. For instance:

cp ~/.esg/credentials.pem /my_cluster/

Usage

module load bioinfo/Snakemake/7.20.0 # for test on nod depending on your HPC
snakemake -np # dry run
snakemake --dag | dot -Tsvg > dag/dag.svg # dag
snakemake -j 1 --resources mem_mb=10000 # local run (test)
sbatch job_muse.sh # HPC run with slurm

Config

Workflow

Area

Python script to get area limits with GADM if country or continent, or based simply on a user-defined bounding-box. Sampling points are further defined on the land for evaluation.

Baseline

Python script to download, crop, adjust CHELSA monthly variables.

Projection

Python script to download, crop, reproject, and adjust CORDEX monthly variables.

Downscaling

Python script to compute downscaled projection with bias correction (delta or change-factor method). Baseline and projections are summarised by means across an historical and a projected period (e.g. monthly means over 30 years). Anomalies between historical and projected periods are computed for the projections. Anomalies are interpolated and added to the historical period of the baseline.

Evaluation

Python script to evaluate downscaled versus raw projection against a baseline on the defined evaluation period for bias correctino downscaling.

Data

CORDEX: Coordinated Regional Climate Downscaling Experiment

The CORDEX vision is to advance and coordinate the science and application of regional climate downscaling through global partnerships.

CHELSA V2.1.1: Climatologies at high resolution for the earth’s land surface areas

CHELSA (Climatologies at high resolution for the earth’s land surface areas) is a very high resolution (30 arc sec, ~1km) global downscaled climate data set currently hosted by the Swiss Federal Institute for Forest, Snow and Landscape Research WSL. It is built to provide free access to high resolution climate data for research and application, and is constantly updated and refined.

Dev

Develop how-to dev with envs/dev.yml and mamba.