Quick Start¶
This guide will get you up and running with TOAD in just a few minutes. For more detailed examples and explanations, see the Tutorials section.
Minimal Example¶
Here’s a simple example that demonstrates the core TOAD workflow:
from toad import TOAD
from toad.shifts import ASDETECT
from sklearn.cluster import HDBSCAN
# Initialize TOAD object with your data file
td = TOAD("data.nc")
# Detect abrupt shifts using ASDETECT method
td.compute_shifts("tas", method=ASDETECT())
# Cluster detected shifts using HDBSCAN
td.compute_clusters(
var="tas",
method=HDBSCAN(min_cluster_size=10),
)
# Visualize the results
td.plot.overview("tas")
Next Steps¶
Learn the basics: Check out the TOAD Basics tutorial for a comprehensive introduction
Customize methods: Learn how to Implement your own clustering method and Implement your own shifts detection method
Data Format¶
TOAD expects input data as:
NetCDF files (
.nc) readable by xarrayxarray Dataset or DataArray objects
Data structured as 3D arrays:
space × space × time
The time dimension can represent actual time or any other forcing variable or bifurcation parameter.
For more information about data requirements and formats, see the TOAD Basics tutorial.