ClimateTools.jl
ClimateTools.jl is a workflow-oriented climate-analysis package built on top of YAXArrays.jl. It is designed for users who need to move from raw gridded observations and simulations to usable climate scenarios, bias-corrected products, indicators, and summary diagnostics.
What ClimateTools Covers
ClimateTools focuses on the common steps of applied climate analysis:
- Reading gridded CF-style datasets into
YAXArrayandCubeobjects - Selecting domains in time and space
- Regridding regular, curvilinear, and rotated-pole simulations
- Bias-correcting model simulations against observations or reanalyses
- Building climate scenarios from observational references and climate-model outputs
- Computing climate indicators, annual summaries, threshold counts, and spell statistics
- Performing selected diagnostics such as return-level estimation and time-series metrics
Data Model
The package operates on YAXArrays-native objects.
using YAXArrays
cube = Cube(open_dataset("myfile.nc"))High-level functions generally take a single YAXArray or a small group of aligned cubes and return another YAXArray, preserving axes where possible.
Typical Workflow
A realistic ClimateTools workflow usually looks like this:
- Open observational and simulation datasets.
- Inspect dimensions, calendars, and coordinate conventions.
- Subset the study period and spatial domain.
- Interpolate or regrid datasets to a common grid.
- Bias-correct model simulations.
- Compute indicators and aggregations on the corrected data.
- Validate and visualize the results.
using ClimateTools
using YAXArrays
obs = Cube(open_dataset("obs.nc"))
ref = Cube(open_dataset("ref.nc"))
fut = Cube(open_dataset("fut.nc"))
qq = qqmap(obs, ref, fut; method="additive", detrend=true)
txx = tx_max(qq)Start Here
If you are new to the package, read the pages in this order:
- Quick Start
- Data and Subsetting
- Interpolation and Regridding
- Bias Correction
- Building Climate Scenarios
- Indices and Aggregations
Building Climate Scenarios
ClimateTools is especially useful for climate-scenario construction. In that context, a scenario usually means a climate-model projection that has been aligned to an observational reference through spatial interpolation and statistical post-processing.
The dedicated Building Climate Scenarios guide walks through:
- choosing observational references
- preparing historical and future simulations
- regridding observations and simulations onto a common grid
- selecting a bias-correction method
- validating the resulting corrected fields
- computing derived indices for impact-oriented analysis
Compute Model
Internally, ClimateTools prefers the YAXArrays xmap pattern for whole-dimension transforms and reductions such as time aggregations, period-wise indices, quantile summaries, and regridding over full grids.
Some workflows still use mapCube, mainly where multiple inputs share the same dimension name but not the same coordinate values. Bias-correction workflows based on observational, historical-model, and future-model series are the main example.
Documentation Structure
- Installation: package setup and optional tooling
- Quick Start: first end-to-end result
- Data and Subsetting: opening datasets, selecting ranges, polygon masking
- Interpolation and Regridding: regular and rotated-grid workflows
- Bias Correction: method selection and usage guidance
- Building Climate Scenarios: full scenario workflow
- Indices and Aggregations: grouped catalog of indices and summaries
- Examples: worked examples by use case
- Validation and Diagnostics: how to assess outputs
- Troubleshooting: common pitfalls
- API Overview: grouped exported functions
References and Attribution
Bias-correction and indicator workflows in ClimateTools are informed by the climate-services ecosystem, including xclim’s documentation style for workflow separation and the published literature behind each correction method. The references used in the docs are collected on the References page.