Skip to main content

DataLad extension for the Copernicus Climate Data Store

What?

A DataLad extension to integrate with the Copernicus Climate Data Store (CDS). So far this just implements a datalad download-cds command that can be used to fetch data from the CDS and record this action in a way so that datalad get (or just git annex get) can redo the download in the future.

Why?

This extension enables automated provenance tracking for fetching data from the CDS. In a dataset that retrieves data from the CDS using this extension it will become visible how this data was initially fetched and how it can be retrieved again in the future.

How?

You will first have to create an account with the CDS, if you don't have one already. You can do so here: https://cds.climate.copernicus.eu/user/register?destination=%2F%23!%2Fhome

Next, you will need to create the "~/.cdsapirc" file as described here: https://cds.climate.copernicus.eu/api-how-to#install-the-cds-api-key. This file is required since the datalad-cds extension internally uses the cdsapi package and therefore uses its authentication mechanism.

Also, you need to install datalad and the datalad-cds extension. Both can be had through pip.

Now you are ready to use the extension. When you look through the CDS you will notice that for any given dataset you can select a subset of the data using the "Download data" tab. After you do that you can use the "Show API request" button at the bottom to get a short python script that would fetch the chosen subset using the cdsapi. The following is an example of that:

#!/usr/bin/env python
import cdsapi
c = cdsapi.Client()
c.retrieve(
    "reanalysis-era5-pressure-levels",
    {
        "variable": "temperature",
        "pressure_level": "1000",
        "product_type": "reanalysis",
        "year": "2008",
        "month": "01",
        "day": "01",
        "time": "12:00",
        "format": "grib"
    },
    "download.grib",
)

To fetch the same data to the same local file using datalad-cds we just need to adapt this a little:

$ datalad download-cds --path download.grib '
    {
        "dataset": "reanalysis-era5-pressure-levels",
        "sub-selection": {
            "variable": "temperature",
            "pressure_level": "1000",
            "product_type": "reanalysis",
            "year": "2008",
            "month": "01",
            "day": "01",
            "time": "12:00",
            "format": "grib"
        }
    }
'

The local path to save to ("download.grib") becomes the --path argument. The dataset name ("reanalysis-era5-pressure-levels" in this case) becomes the value of the dataset key in a json object that describes the data to be downloaded. The sub-selection of the dataset becomes the value of the sub-selection key.

After executing the above datalad download-cds command in a DataLad dataset a file called "download.grib" should be newly created. This file will have its origin tracked in git-annex (you can see that by running git annex whereis download.grib). If you now datalad drop the file and then datalad get it you'll see that git-annex will automatically re-retrieve the file from the CDS as if it was just another location to get data from.

To see more possible usage options take a look at the help page of the command (datalad download-cds --help) or the documentation at https://matrss.github.io/datalad-cds/.

Metadata

Release files for datalad-cds 0.0.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for datalad-cds 0.0.14
File Size Uploaded Provenance Actions
datalad_cds-0.0.14.tar.gz 45.2 kB With provenance Details for datalad_cds-0.0.14.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for datalad-cds 0.0.14
File Interpreter ABI Platform Actions
datalad_cds-0.0.14-py3-none-any.whl Python 3 none any Details for datalad_cds-0.0.14-py3-none-any.whl

Total release size: 58.1 kB

Release files / datalad_cds-0.0.14.tar.gz

Download URL datalad_cds-0.0.14.tar.gz
Size 45.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c8921edf1ef3b4177ca03c220187b0d56c1b4e926f77606e181a794773efb9b0
BLAKE2b-256 checksum
How to use checksums
139b8ab3448b4d6789382ad83cf4d0098922e68612b494f28bad9e78b98bc169
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 28, 2026.

Transparency log

Release files / datalad_cds-0.0.14-py3-none-any.whl

Download URL datalad_cds-0.0.14-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
496de51c559b1299d4ded34cd30fef778eb36185eee51991fd10e98179de900f
BLAKE2b-256 checksum
How to use checksums
c7df351c754313f5179a8bf230e819398042b02baa8f1a9effb5f5131ed75ea2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 28, 2026.

Transparency log

Security for datalad-cds 0.0.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for datalad_cds-0.0.14.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page