Skip to main content

TOAD

TOAD: Tipping and Other Abrupt events Detector

Documentation PyPI version CI Python License
DOI Code style

TOAD is a Python package designed for detecting and clustering spatio-temporal patterns in gridded Earth-system datasets, such as model outputs. The input data should be structured as a 3D array in the format space × space × time, where time can represent actual time or some other forcing variable or bifurcation parameter. TOAD provides a streamlined pipeline for identifying and analyzing spatio-temporal regions or clusters that exhibit similar dynamical responses to external forcing.

Currently, TOAD focuses on identifying regions that experience similar abrupt transitions, such as the sudden loss of ice volume in a specific area. The goal, however, is to expand the package's functionality to support broader use cases, enabling the detection and clustering of diverse types of dynamical shifts across a wide range of systems.

The TOAD pipeline consists of three main components:

  1. Shift Detection: Performs time series analysis at each individual grid cell to identify abrupt transitions or dynamical shifts using configurable detection methods (e.g., ASDETECT) with adjustable sensitivity parameters.
  2. Clustering: Groups the detected shifts spatially and temporally (or along a bifurcation parameter) to reveal cohesive patterns using clustering methods (e.g., HDBSCAN) with configurable space/time scaling.
  3. Aggregation & Synthesis: Aggregates results across multiple cluster maps from different datasets, models, variables, realisations, or methods to produce consensus clusters and statistics, and generates plots and summaries of the identified clusters for insights and interpretation.

TOAD Pipeline

TOAD's core functionality is exposed through the TOAD class, which analyzes netCDF files or xarray datasets. The primary methods - compute_shifts, compute_clusters, and compute_consensus() - handle the three main pipeline steps. The pipeline supports aggregation of results across multiple runs, enabling consensus-based analysis. Additional helper functions and visualization tools make it easy to explore and understand the results.

Installation

PyPI version

$ pip install tipmip-toad

or

$ git clone https://github.com/tipmip-methods/toad.git
$ cd toad
$ pip install .

Simple use case

from toad import TOAD
from toad.shifts import ASDETECT
from sklearn.cluster import HDBSCAN


# init TOAD object with ice-thickness field and a custom time dimension.
td = TOAD("ice_thickness.nc", time_dim="GMST")

# Compute shifts for variable 'thk' using the method ASDETECT (Boulton & Lenton, 2019)
td.compute_shifts("thk", method=ASDETECT(timescale=(0.5, 3.5)))

# Compute clusters using HDBSCAN from scikit-learn (McInnes, 2017)
td.compute_clusters(
    var="thk",
    method=HDBSCAN(min_cluster_size=25),
    time_weight=2.0,
)

# Plot largest clusters in ccrs.SouthPolarStereo() projection
td.plot.overview("thk", map_style={"projection": "south_pole"}, mode="aggregated");
Cluster Overview Example

For more details, check out the tutorials.

Tutorials

  • Basics: Learn the core concepts and workflow
  • Aggregation: Explore how to identify regions of abrupt shifts that are consistent across models/members/variables/methods.
  • Custom clustering: Implement new clustering methods
  • Custom event detection: Implement new event detection algorithms

Community additions

Alternative detection methods contributed to TOAD. These are not part of the peer-reviewed TOAD methodology, but may be useful for comparison or follow-up work.

  • EDGE shift detection: Alternative abrupt-shift detector based on Bathiany et al. (2020) and Terpstra et al. (2025); TOAD implementation by Sjoerd Terpstra. See the tutorial for usage notes

Documentation

Read the documentation, which includes a short video introduction!

About

TOAD is developed at the Potsdam Institute for Climate Impact Research (PIK) and the Max Planck Institute of Geoanthropology. The project originated from early prototype work by Sina Loriani in 2022. Since 2024, Jakob Harteg has led the full development of the package as part of his PhD project. Over time, numerous contributors have played important roles at various stages, including Lukas Röhrich and Fritz Kühlein. The project has also benefited greatly from scientific advice and guidance from Sina Loriani, Jonathan Donges, Ricarda Winkelmann, and many others. Community contributions, such as feature suggestions, bug reporting, or even extensions like new detection algorithms, are very welcome.

Citation

If you use TOAD in your research, please cite:

TOAD package: Harteg, J., Roehrich, L., De Maeyer, K., Garbe, J., Sakschewski, B., Klose, A. K., Donges, J., Winkelmann, R., and Loriani, S.: TOAD: Tipping and Other Abrupt events Detector, Zenodo, https://doi.org/10.5281/zenodo.18316437, 2026.

TOAD methodology paper (preprint): Harteg, J., Röhrich, L., De Maeyer, K., Garbe, J., Sakschewski, B., Klose, A. K., Donges, J. F., Winkelmann, R., and Loriani, S.: TOAD v1.0: A Python Framework for Detecting Abrupt Shifts and Coherent Spatial Domains in Earth-System Data, EGUsphere [preprint], https://doi.org/10.5194/egusphere-2026-356, 2026.

License

TOAD is licensed under the BSD 2-Clause License. See LICENSE.txt for details.

References

Metadata

Release files for tipmip-toad 1.0.9

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

Source distribution (sdist)

Source distribution for tipmip-toad 1.0.9
File Size Uploaded
tipmip_toad-1.0.9.tar.gz 160.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tipmip-toad 1.0.9
File Interpreter ABI Platform
tipmip_toad-1.0.9-py3-none-any.whl Python 3 none any Details

Total release size: 336.1 kB

Release files / tipmip_toad-1.0.9.tar.gz

Download URL tipmip_toad-1.0.9.tar.gz
Size 160.9 kB
Tags Source
SHA-256 checksum
How to use checksums
51b59bcb0a4199b5d0bcd9cb06b80bf4b648025e6e6e51c9249c027231df0bbf
BLAKE2b-256 checksum
How to use checksums
633cad63c170790850985a4ef5606de2db6067b62ca56f3eb23325e0c107dda9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.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.

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 Oct 8, 2026.

Transparency log

Release files / tipmip_toad-1.0.9-py3-none-any.whl

Download URL tipmip_toad-1.0.9-py3-none-any.whl
Size 175.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e5a90cdd7d16266c32b703e00116c98482bd237a51e2f5a8f591719cdc1d5e57
BLAKE2b-256 checksum
How to use checksums
2ead1ccc7c1f2f480c2184b60be1d417451cbc176e41164e372b76ef4a7ca677
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.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.

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 Oct 8, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.9 This release

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

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