Skip to main content

Copernicus Downloader

A flexible incremental downloader for Copernicus CDS / ADS datasets, designed for reproducible and automated pipelines.
Supports yearly, monthly, daily granularities with incremental catch-up, local or S3 storage, and .env + YAML configuration.

Repository: celine-eu/copernicus-downloader
License: Apache-2.0


Features

  • Incremental yearly / monthly / daily downloads
  • Automatic skipping of already-requested files
  • min_date clamp to avoid overlap between monthly backfill and daily updates
  • Local FS or S3 (Minio) storage abstraction
  • Configurable with .env + YAML
  • Logging with LOG_LEVEL
  • uv for fast Python environment management

Setup

1. Clone the repo

git clone https://github.com/celine-eu/copernicus-downloader.git
cd copernicus-downloader

2. Install dependencies (via uv)

uv sync

This will create and manage a virtual environment automatically.

Environment variables

Create a .env file in the repo root:

# Copernicus CDS API credentials (find them in your CDS profile)
CDS_API_KEY="abcdefg-your-key"
CDSAPI_URL="https://cds.climate.copernicus.eu/api"

# Optional: Atmosphere ADS API credentials
ADS_API_KEY="hijklmn-your-key"
ADSAPI_URL="https://ads.atmosphere.copernicus.eu/api"

# Optional: storage backend
AWS_ACCESS_KEY_ID="minio"
AWS_SECRET_ACCESS_KEY="minio123"
AWS_DEFAULT_REGION="us-east-1"
# AWS_ENDPOINT_URL=http://localhost:19000
# AWS_BUCKET=local-data

# Logging
LOG_LEVEL=INFO

# Optional: temporary dir for downloads
CDS_TMPDIR=/var/tmp/cds
# Optional: data storage path
DATA_DIR=./data

Configuration

By default, the downloader loads cds_config.yaml (or path from CDS_CONFIG). Supports ${VAR} placeholders, expanded from .env.

Example config

cat > cds_config.yaml <<'YAML'
years: [2020, 2021, 2022, 2023, 2024]

storage:
  type: fs
  base_dir: ./data

# Example for Minio
# storage:
#   type: s3
#   bucket: my-bucket
#   endpoint_url: http://localhost:9000

datasets:
  era5:
    name: reanalysis-era5-single-levels
    url: ${CDSAPI_URL}
    key: ${CDS_API_KEY}
    granularity: daily
    min_date: 2025-08-01   # daily starts after monthly backfill
    request:
      product_type: ["reanalysis"]
      variable: ["2m_temperature", "total_precipitation"]
      time: ["00:00","06:00","12:00","18:00"]
      data_format: grib
      download_format: unarchived
      area: [45.96, 11.11, 45.84, 11.36]

Running

Download all datasets

uv run python -m copernicus_downloader.main

Download only one dataset (e.g., era5)

uv run python -m copernicus_downloader.main era5

Contributing

Issues and PRs are welcome! Please open an issue or submit a pull request.

License

This project is licensed under the Apache-2.0 License.

Metadata

Release files for copernicus-downloader 1.2.2

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

Source distribution (sdist)

Source distribution for copernicus-downloader 1.2.2
File Size Uploaded Provenance
copernicus_downloader-1.2.2.tar.gz 15.7 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for copernicus-downloader 1.2.2
File Interpreter ABI Platform
copernicus_downloader-1.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 32.8 kB

Release files / copernicus_downloader-1.2.2.tar.gz

Download URL copernicus_downloader-1.2.2.tar.gz
Size 15.7 kB
Tags Source
SHA-256 checksum
How to use checksums
96b92a0ec1e832d8eafac2d9fb1126f8bfdc102f9be516c93c27e7414def8a2c
BLAKE2b-256 checksum
How to use checksums
36915e545b81b26993da12016a1244697f9b07d73e0b2430ef6f44009455fad2
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 Dec 24, 2025.

Transparency log

Release files / copernicus_downloader-1.2.2-py3-none-any.whl

Download URL copernicus_downloader-1.2.2-py3-none-any.whl
Size 17.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a38d15b1b087604134972b707c0be7f8d35cdb2fbde903916b0a6c670edfac70
BLAKE2b-256 checksum
How to use checksums
6d0cf72694596486086e4706663c8c08d7c9697179702f0b3452831b3c02e5a9
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 Dec 24, 2025.

Transparency log

Security for copernicus-downloader 1.2.2

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for copernicus_downloader-1.2.2.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 Dec 24, 2025.

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