Skip to main content

Copernicus climate and hydrology data pipeline toolkit with analytics-ready outputs.

Project description

spatioClimata

spatioClimata is a Python package for requesting, validating, downloading, and transforming Copernicus climate and hydrology datasets into analytics-ready outputs.

It is designed for ERA5, GloFAS, and extensible CDS/EWDS datasets, with an opinionated data engineering pipeline and optional Dask acceleration.

Why spatioClimata

  • Unified access to CDS and EWDS with one API key workflow.
  • Dataset capability checks before large downloads.
  • Hourly and daily workflows with optional frequency conversion.
  • Resumable, idempotent download pipeline for long-running jobs.
  • Analytics-ready outputs as xarray Dataset with NetCDF/Zarr export.
  • Optional Dask integration for chunked processing at scale.

Installation

pip install spatioClimata

For Dask-enabled workflows:

pip install "spatioClimata[dask]"

For development:

pip install "spatioClimata[dev,dask]"

Quick Start

from spatioclimata import (
    AreaBBox,
    TimeRange,
    FetchRequest,
    fetch,
)

request = FetchRequest(
    dataset="derived-era5-single-levels-daily-statistics",
    variables=["total_precipitation", "2m_temperature"],
  time_range=TimeRange.from_strings("2020-01-01", "2020-12-31"),
  area=AreaBBox.from_sequence([6.22, 80.41, 5.91, 80.64]),
    frequency="daily",
    output_dir="./outputs",
)

result = fetch(request, open_browser_on_missing_key=True)
print(result.saved_files)

CLI Usage

Initialize credentials:

spatioclimata auth init --open-browser

List datasets:

spatioclimata datasets list

Run a download:

spatioclimata fetch \
  --dataset derived-era5-single-levels-daily-statistics \
  --variables total_precipitation,2m_temperature \
  --start 2020-01-01 \
  --end 2020-12-31 \
  --area 6.22,80.41,5.91,80.64 \
  --frequency daily \
  --output-dir ./outputs

Account and API Key Onboarding

The package needs a Copernicus API key.

  • spatioclimata auth init --open-browser opens signup and API key pages.
  • Credentials are saved to a local config file with restricted permissions when possible.
  • Environment variables are also supported:
    • SPATIOCLIMATA_API_KEY
    • ERA5_Key

Project Layout

  • src/spatioclimata/: package source
  • tests/: unit tests
  • examples/: runnable usage examples
  • docs/: architecture and usage guides
  • .github/workflows/: CI
  • website/: static project website (GitHub Pages source)
  • scripts/: helper scripts for repo bootstrap, website sync, and releases

Documentation Index

Status

Current release is an MVP foundation intended to be expanded with additional dataset adapters and transformations.

Release and Deployment

PyPI Publish

  • Workflow: .github/workflows/publish-pypi.yml
  • Trigger: push a version tag (example: v0.1.0)
  • Recommended: configure PyPI Trusted Publishing for this repository

Website Deploy

  • Workflow: .github/workflows/deploy-pages.yml
  • Source folder: website/
  • Trigger: push to main when website files change
  • GitHub setting required: enable GitHub Pages with "GitHub Actions" as source

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spatioclimata-0.1.0.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spatioclimata-0.1.0-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

Details for the file spatioclimata-0.1.0.tar.gz.

File metadata

  • Download URL: spatioclimata-0.1.0.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for spatioclimata-0.1.0.tar.gz
Algorithm Hash digest
SHA256 beacd3916298e1d09d43fae25f1de261e19426d6660a6d5aeaf53ef59aa72d77
MD5 aefc2838fc82bf85ffd130c74e73c4d8
BLAKE2b-256 954687b8bf18bb1f53dbe7d59f56551895d520e68b6fb1d33e04e1c50454ae29

See more details on using hashes here.

File details

Details for the file spatioclimata-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: spatioclimata-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for spatioclimata-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 673422a0eb28d2faf7c8e3b9cc4ac7e3d48183d55261c4978787e2d89090e119
MD5 cb0c8dddb02f398c51f87a38549556ba
BLAKE2b-256 1347f8722a070f96ebe15a5bfaaa22b56bc659785aa21516b9b6dd0443101db9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page