Theil-Sen estimated median change in rain normalised soil moisture 2001-2016, Indonesia

Map: Theil-Sen estimated median change in rain normalised soil moisture 2001-2016, Indonesia

CDSAPI

Thomas Gumbricht bio photo By Thomas Gumbricht

Introduction

The Copernicus Climate Change Service (C3S) and its Climate Data Store (CDS) is summarised in the previous post. This post is a brief introduction to the CDS Application Program Interface (API), or CDSAPI, the recommended path to retrieve data from the CDS.

CDSAPI

CDSAPI is a Python programming package and requires that you have Python installed. If you have no experience with Python, Copernicus provides a page with details on How to use the CDS API.

Install CDSAPI in conda virtual environment

To download the CDS data using Karttur’s GeoImagine Framework, you need to install the Python package cdsapi with the Anaconda virtual environment you use for the Framework. activate the Framework virtual environment. You can then either use conda install or pip install to install the package:

(your-virtual-python-environ) % conda install -c conda-forge cdsapi

(your-virtual-python-environ) % pip install cdsapi

Create Python Package

To save the download commands for future reference I use Karttur’s GeoImagine Framework Eclipse setup for creating special packages for accessing the ERA5 and CERRA products. Also to allow me to save the different downloads for future reference, but that is not necessary. Once you have created an order for CDS data you can simply run the python script you receive from anywhere - as long as you have activated the correct virtual Python environment.