Skip to main content

Climate data analysis toolkit

Project description

Climakitae

codecov CI Documentation Status PyPI version Python License Code style: black DOI:10.5281/zenodo.18111936

A powerful Python toolkit for climate data analysis and retrieval from the Cal-Adapt Analytics Engine (AE).

Climakitae provides intuitive tools for accessing, analyzing, and visualizing downscaled CMIP6 data, enabling researchers and practitioners to perform comprehensive climate impact assessments for California.

[!WARNING] This package is under active development. APIs may change between versions.

Key Features

  • 🌡️ Comprehensive Climate Data Access: Retrieve climate variables from hosted climate models
  • 📊 Downscaled Climate Models: Access dynamical (WRF) and statistical (LOCA2) downscaling methods
  • 🗺️ Spatial Analysis Tools: Built-in support for geographic subsetting and spatial aggregation
  • 📈 Climate Indices: Calculate heat indices, warming levels, and extreme event metrics
  • 🔧 Flexible Data Export: Export to NetCDF, CSV, and Zarr
  • 📱 GUI Integration: Works seamlessly with climakitaegui for interactive analysis

About Cal-Adapt

Climakitae is developed as part of the Cal-Adapt Analytics Engine, a platform for California climate data and tools. Cal-Adapt provides access to cutting-edge climate science to support adaptation planning and decision-making.

Getting Started

Installation via Conda

Prerequisites

Install latest release with conda on Linux

For additional details on the latest version and step-by-step installation instructions please visit the wiki

# create a conda environment with 
conda create -n climakitae python=3.13 -y
conda activate climakitae
pip install climakitae

Installation via Pip

Prerequisites

  • Python 3.12
  • pip

Install latest release with pip on Linux

For additional details on the latest version and step-by-step installation instructions please visit the wiki

pip install --upgrade pip
pip install climakitae

Basic Usage

from climakitae.core.data_interface import get_data

# Retrieve temperature data for California
data = get_data(
    variable="Air Temperature at 2m",
    downscaling_method="Dynamical", 
    resolution="9 km",
    timescale="monthly",
    scenario="SSP 3-7.0",
    cached_area="CA"
)

# Data is returned as an xarray Dataset
print(data)

Documentation

Resource Description
AE Navigation Guide Interactive notebook tutorial
API Reference Complete API documentation
AE Notebooks Sample notebooks and scripts
Contributing Development guidelines

Development Setup

Prerequisites

Dev Environment Setup (Linux)

git clone https://github.com/cal-adapt/climakitae.git
cd climakitae
conda create -n climakitae --file conda-linux-64.lock
conda activate climakitae

Running Tests

# Run basic tests
pytest -m "not advanced"

# Run all tests
pytest

# Run with coverage
pip install pytest-cov
pytest --cov=climakitae --cov-report=html

Code Formatting (pre-commit hook)

This repo uses Black for code formatting. To ensure your commits are formatted consistently with CI, install the pre-commit hook:

pip install pre-commit
pre-commit install

Black will now run automatically on every commit. To run it manually:

pre-commit run black --all-files

Contributing

We welcome contributions! Please see our contributing guidelines for details on:

  • 🐛 Reporting bugs
  • 💡 Requesting features
  • 🔧 Submitting code changes
  • 📖 Improving documentation

Quick Development Workflow

Open a ⚙️ code improvement issue describing the feature you'd like to develop.

Then, checkout and setup your branch:

# Fork the repo and create a feature branch
git checkout -b feature/your-feature-name

# Make your changes and add tests
# ...

# Run tests and linting
pytest
pre-commit run black --all-files

# Submit a pull request

When submitting a pull request, please tag at least two project maintainers/developers for review.

License

This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.

Related Projects

Support


Contributors

Contributors

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

climakitae-1.5.2.tar.gz (99.1 MB view details)

Uploaded Source

Built Distribution

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

climakitae-1.5.2-py3-none-any.whl (30.7 MB view details)

Uploaded Python 3

File details

Details for the file climakitae-1.5.2.tar.gz.

File metadata

  • Download URL: climakitae-1.5.2.tar.gz
  • Upload date:
  • Size: 99.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for climakitae-1.5.2.tar.gz
Algorithm Hash digest
SHA256 cafcb090d9b3a94214383fb3d8a5aebb24f00a8fe6c42c4d58c33d06f028d1e1
MD5 660da0d84581435f82369ce74e725e4f
BLAKE2b-256 c669a4ea011043db94d31fc0c4b86be6ed8e532b70e35e62c2f1b3760e795568

See more details on using hashes here.

Provenance

The following attestation bundles were made for climakitae-1.5.2.tar.gz:

Publisher: publish.yml on cal-adapt/climakitae

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file climakitae-1.5.2-py3-none-any.whl.

File metadata

  • Download URL: climakitae-1.5.2-py3-none-any.whl
  • Upload date:
  • Size: 30.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for climakitae-1.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d789955e17e651c7e37633f3c0e2dec0daa4384068dbe9dbdd7dc505c0c0a10d
MD5 1611b32034b559bbbbb51a8737bb9cd8
BLAKE2b-256 10057938d70e623f3db88baa9a4e9c90aa38cb414eab5bbc5929891945e17df1

See more details on using hashes here.

Provenance

The following attestation bundles were made for climakitae-1.5.2-py3-none-any.whl:

Publisher: publish.yml on cal-adapt/climakitae

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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