Note

This page was generated from examples/datasets.ipynb.
Interactive online version: Binder badge

Datasets accessible with DownClim

DownClim is designed to be a simple and easy-to-use tool for downloading climate datasets.

In this page, we provide a brief description of all the datasets that are accessible with DownClim, as well as a short example of how to download them.

First define the areas of interest (AOI) we want to work on.

[ ]:
from __future__ import annotations

import ee

from downclim.aoi import get_aoi

[ ]:
aoi1 = get_aoi("Vanuatu")     # AOI by name, from GADM
aoi2 = get_aoi((10, 10, 20, 20, "box"))   # AOI by coordinates, associated with a name
aois = [aoi1, aoi2]

Dataset on Google Earth Engine

DownClim uses Google Earth Engine (GEE) to access and download some climate datasets.

In particular, we use it to download CHIRPS and GSHTD datasets.

Products hosted on Earth Engine now require authentication with a google account AND to have an Earth Engine project. Under certain conditions (among which academic projects), the use of the service remains free.

Check instructions [here](https://developers.google.com/earth-engine)

You first need (only the first time on your machine) to authenticate and follow the instructions.

Then you need to have an Earth Engine project. You can create one and manage your projects here. Having a project is free for non profit use. Full information can be found here.

[ ]:
your_ee_project_id = "downclim"
[ ]:
# Authenticate to Earth Engine
# ee.Authenticate() if necessary, only need to do this once on your machine
ee.Initialize(opt_url="https://earthengine-highvolume.googleapis.com", project=your_ee_project_id)

Successfully saved authorization token.

Historical datasets based on observations

CHELSA2 dataset

CHELSA2 dataset is a very high-resolution (30 arc sec, ~1km) downscaled climate dataset for the entire globe. Currently it is updated in version v2.1, and data is available from 1979 to 2020. Reference product used for downscaling is ERA5 reanalysis data.

If you use monthly mean variables (the only option available so far), available variables are:

Variable

Description

clt

Cloud cover

cmi

Climatic moisture index (difference between precipitation amount and potential evapotranspiration)

hurs

Near surface relative humidity

pet

Potential evapotranspiration

pr

Precipitation

rsds

Downward shortwave radiation flux

sfcWind

Near surface wind speed

tas

near-surface mean air temperature

tasmin

near-surface minimum air temperature

tasmax

near-surface maximum air temperature

vpd

Vapour pressure deficit

Let’s download the CHELSA2 dataset for the areas of interest defined above.

[7]:
from downclim.dataset.chelsa2 import get_chelsa2

get_chelsa2(
    aoi=aois,
    variable=["pr", "tas", "tasmin", "tasmax"],
    period=(1980, 1981),
    keep_tmp_dir=True,
)
Downloading CHELSA data...
CHELSA data for year '1980' and variable 'pr' already downloaded. Not downloading,
              but the behaviour of the function is not affected.
              If this is not the desired behavior, please remove the file(s) from the temporary folder
              ./results/tmp/chelsa and rerun the function.CHELSA data for year '1981' and variable 'pr' already downloaded. Not downloading,
              but the behaviour of the function is not affected.
              If this is not the desired behavior, please remove the file(s) from the temporary folder
              ./results/tmp/chelsa and rerun the function.

CHELSA data for year '1980' and variable 'tas' already downloaded. Not downloading,
              but the behaviour of the function is not affected.
              If this is not the desired behavior, please remove the file(s) from the temporary folder
              ./results/tmp/chelsa and rerun the function.
CHELSA data for year '1981' and variable 'tas' already downloaded. Not downloading,
              but the behaviour of the function is not affected.
              If this is not the desired behavior, please remove the file(s) from the temporary folder
              ./results/tmp/chelsa and rerun the function.
CHELSA data for year '1980' and variable 'tasmin' already downloaded. Not downloading,
              but the behaviour of the function is not affected.
              If this is not the desired behavior, please remove the file(s) from the temporary folder
              ./results/tmp/chelsa and rerun the function.CHELSA data for year '1981' and variable 'tasmin' already downloaded. Not downloading,
              but the behaviour of the function is not affected.
              If this is not the desired behavior, please remove the file(s) from the temporary folder
              ./results/tmp/chelsa and rerun the function.

CHELSA data for year '1980' and variable 'tasmax' already downloaded. Not downloading,
              but the behaviour of the function is not affected.
              If this is not the desired behavior, please remove the file(s) from the temporary folder
              ./results/tmp/chelsa and rerun the function.CHELSA data for year '1981' and variable 'tasmax' already downloaded. Not downloading,
              but the behaviour of the function is not affected.
              If this is not the desired behavior, please remove the file(s) from the temporary folder
              ./results/tmp/chelsa and rerun the function.

Merging files by aoi...
File for area Vanuatu and period (1980, 1981) already exists. Not downloading.
                Please make sure this is the expected behaviour
File for area box and period (1980, 1981) already exists. Not downloading.
                Please make sure this is the expected behaviour

CHIRPS dataset

CHIRPS dataset is a high-resolution (0.05°, ~5km) quasi-global (50°S - 50°N) gridded rainfall dataset. Data is available from 1981 to near-present. Data is available at daily time scale, and is retrieved from the Earth Engine Data Catalog

Only one variable is available for this dataset: | Variable | Description | | — | — | | pr | Precipitation |

Let’s download the CHIRPS dataset for the areas of interest defined above.

[8]:
from downclim.dataset.chirps import get_chirps

get_chirps(
    aoi=aois,
    period=(1981, 1982),
)
Already connected to Earth Engine with project 'downclim'.
Downloading CHIRPS data...
Getting CHIRPS data for period : "(1981, 1982)" and area of interest : "Vanuatu"
Getting CHIRPS data for period : "(1981, 1982)" and area of interest : "box"
WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine-highvolume.googleapis.com. Connection pool size: 10

GSHTD dataset

The “Global Seamless High-resolution Temperature Dataset” (citation) is a high-resolution (30 arc sec, ~1km) temperature dataset for the entire globe. It is based on the MODIS land surface temperature product and is available from 2001 to 2020. It uses the Estimation of Temperature Difference (ETD) method and employs a machine learning algorithm to estimate monthly values of temperature mean, min and max.

It is available on the Google Earth Engne data catalog.

Available variables are:

Variable

Description

tas

near-surface mean air temperature

tasmin

near-surface minimum air temperature

tasmax

near-surface maximum air temperature

[9]:
from downclim.dataset.gshtd import get_gshtd

# Warning : starts from 2001
get_gshtd(
    aoi=aois,
    variable=["tas", "tasmin", "tasmax"],
    period=(2001, 2002),
)
Already connected to Earth Engine with project 'downclim'.
Downloading GSHTD data...
Getting GSHTD data for period : "(2001, 2002)" and variable : "tas" on area of interest : "Vanuatu"
Getting GSHTD data for period : "(2001, 2002)" and variable : "tasmin" on area of interest : "Vanuatu"
Getting GSHTD data for period : "(2001, 2002)" and variable : "tasmax" on area of interest : "Vanuatu"
Getting GSHTD data for period : "(2001, 2002)" and variable : "tas" on area of interest : "box"
WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine-highvolume.googleapis.com. Connection pool size: 10
Getting GSHTD data for period : "(2001, 2002)" and variable : "tasmin" on area of interest : "box"
WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine-highvolume.googleapis.com. Connection pool size: 10
WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine-highvolume.googleapis.com. Connection pool size: 10
Getting GSHTD data for period : "(2001, 2002)" and variable : "tasmax" on area of interest : "box"
WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine-highvolume.googleapis.com. Connection pool size: 10
WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: earthengine-highvolume.googleapis.com. Connection pool size: 10

Simulations datasets for historical and future periods

DownClim provides easy access to both CMIP6 and CORDEX simulations datasets. Please refer to the “Get available simulations” page to see how to efficiently retrieve simulations datasets.

CMIP6 dataset

CMIP6 stands for “Coupled Model Intercomparison Project Phase 6”. It is a collection of climate model simulations from the World Climate Research Programme (WCRP).

Access to this dataset is provided by Google Cloud. This database may not be complete and up-to-date, as it is an ongoing project to transfer all the data to the cloud. However, cloud access is particularly efficient.

CORDEX dataset

To access this dataset, you need to create an account on the ESGF portal.

CORDEX stands for “Coordinated Regional Climate Downscaling Experiment”. As CMIP6, it is a WCRP framework to evaluate regional climate models simulations for different regions of the world. Regional climate models, applied over limited areas and driven by global climate models, are used to provide information at higher resolution than the global models. This is particularly useful for impact and adaptation assessments.

You can find a description of the different regions here.

Access to this dataset is provided by the Earth System Grid Federation (ESGF) infrastructure, and can be accessed by one of its portals. It is free of access but credentials are required.