Skip to content

DownClim/DownClim

Repository files navigation

DownClim - Downscale Climate Projections

Sylvain Schmitt - Thomas Arsouze - Ghislain Vieilledent

Actions Status Documentation Status

PyPI version Conda-Forge PyPI platforms

GitHub Discussion

The purpose of DownClim is to offer a tool for regional and national climate projections including the mechanistic ‘dynamic’ downscaling of the CORDEX initiative. DownClim is opposed to the direct statistical downscaling of global climate projections found in WorldClim and CHELSA. The approach is justified by an improvement in regional projections of CORDEX compared to CMIP, although it can increase uncertainty and sometimes be less reliable. The tool is an automated snakemake workflow easily reproducible and scalable associated to conda environments for enhance reproducibility and portability.

Workflow.

Installation

git clone git@github.com:DownClim/DownClim.git
cd DownClim

# Using conda (recommended)
conda env create -f environment.yml
conda activate downclim
pip install -e .

# Or using pip
pip install -e .

Credentials

Earth Engine

Some datasets (CHIRPS, GSHTD, ERA5) are hosted on Google Earth Engine. You need a Google Earth Engine project ID. Set it in your config:

ee_project: "my-project-id"

You will be prompted to authenticate the first time you download data from Earth Engine.

ESGF (CORDEX only)

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

Then register credentials locally. Use a yaml file with keys openid and password, referenced in your config:

esgf_credentials: "config/esgf_credential.yaml"

Example credential file (config/esgf_credential.yaml):

openid=https://esgf-node.ipsl.upmc.fr/esgf-idp/openid/{user}
pwd={pwd}
echo -e "openid: $openid\npwd: $pwd" > config/esgf_credential.yaml

Note: ESGF credentials are only required when using CORDEX data (use_cordex: true).

Usage

Please follow the documentation for usage instructions. Start with the getting started guide, and then dive deeper in the advanced usage section.

Python API

from downclim import (
    DownClimContext,
    define_DownClimContext_from_file,
    generate_DownClimContext_template_file,
)

# Generate a configuration template
generate_DownClimContext_template_file("config.yaml")
# Edit config.yaml with your parameters, then load it:
context = define_DownClimContext_from_file("config.yaml")
context.download_data()

Tests

conda activate downclim
pytest -m "not network"

Configuration

Very minimal set of information is needed by DownClim to run. Generate a configuration template with:

python -c "from downclim import generate_DownClimContext_template_file; generate_DownClimContext_template_file('config.yaml')"

Then edit config.yaml with your parameters:

  • Area of interest
    • aoi: names of the area to work with, e.g. New-Caledonia.
  • Time
    • time_frequency: time frequency of data (month “mon”, day “day” or x-hourly “3hr”), currently only “mon” is available.
    • historical_period: period on which to adjust projections, _e.g.* 1980-2005.
    • evaluation_period: period on which to evaluate projections, _e.g.* 2006-2019.
    • projection_period: period on which to downscale the projections, _e.g.* 2071-2100.
  • Variables
    • variables: variables to downscale, _e.g. temperature at surface ’tas”, minimum temperature “tasmin”, maximum temperature “tasmax”, precipitations “pr”.
  • Baseline
    • baseline_product: climate product for the baseline (CHELSA V2, GSHTD, CHIRPS).
  • Projection
    • CMIP6Context: information about the CMIP6 projections to use.
    • CORDEXContext: information about the CORDEX projections to use.
    • esgf_credentials: path to the file defining the user credentials on esgf.
  • Downscaling
    • aggregation: time aggregation before downscaling, currently only “monthly-means” are available.
    • downscaling_method: downscaling method to be used (bias correction “bc”, quantile-based “qt”, currently only bc is available).
  • Evaluation
    • evaluation_product: climate product for the evaluation (CHELSA V2, CHRIPS, GSHTD).

Data

Baselines

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.

CHIRPS: Rainfall Estimates from Rain Gauge and Satellite Observations

Climate Hazards Group InfraRed Precipitation with Station data (CHIRPS) is a 35+ year quasi-global rainfall data set. Spanning 50°S-50°N (and all longitudes) and ranging from 1981 to near-present, CHIRPS incorporates our in-house climatology, CHPclim, 0.05° resolution satellite imagery, and in-situ station data to create gridded rainfall time series for trend analysis and seasonal drought monitoring.

ERA5: Global atmospheric reanalysis from ECMWF

ERA5 is the fifth generation ECMWF atmospheric reanalysis of the global climate, covering the period from 1940 to present. It is produced by the Copernicus Climate Change Service (C3S) and provides hourly estimates of a large number of atmospheric, land and oceanic climate variables. Data is accessed via Google Earth Engine.

GSHTD: Global Seamless High-resolution Temperature Dataset

The Global Seamless High-resolution Temperature Dataset (GSHTD) presented in this study offers a comprehensive and valuable resource for researchers across various fields. Covering the period from 2001 to 2020, this dataset focuses on land surface temperature (Ts) and near-surface air temperature (Ta). A unique feature of GSHTD is its incorporation of seven types of temperature data, including clear-sky daytime and nighttime Ts, all-sky daytime and nighttime Ts, and mean, maximum, and minimum Ta. Notably, the dataset achieves global coverage with an impressive 30 arcsecond or 1km spatial resolution.

Projections

CMIP: Coupled Model Intercomparison Project

CMIP is a project of the World Climate Research Programme (WCRP) providing climate projections to understand past, present and future climate changes. CMIP and its associated data infrastructure have become essential to the Intergovernmental Panel on Climate Change (IPCC) and other international and national climate assessments.

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.

Contributors

Languages