ClimateTools.jl is a climate-analysis toolkit built on top of YAXArrays.jl for gridded observations, reanalyses, and climate-model simulations.
The package focuses on the typical climate-services workflow:
- Read CF-style gridded datasets as
YAXArrayorCubeobjects. - Subset them in time and space.
- Regrid simulations and observations onto a common domain.
- Bias-correct simulations with quantile mapping, extreme-value correction, or time-variability correction.
- Compute indicators, aggregations, and diagnostics.
ClimateTools switched to YAXArrays xmap and mapCube pattern for whole-dimension transforms and reductions instead of the custom ClimGrid.
- Active development
- Julia 1.10+
- Data model:
YAXArray/Cube - YAXArrays compatibility:
0.7
using Pkg
Pkg.add("ClimateTools")For local development:
using Pkg
Pkg.develop(path="/path/to/ClimateTools")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)
ann = annualmax(qq)That small example already illustrates the main ClimateTools workflow: open data, bias-correct, then compute a climate summary.
For quantile mapping, qqmap is the seasonally varying method: it removes leap days, groups samples by day of year using a moving +/- window, and applies an additive or multiplicative correction that changes through the annual cycle. Use qqmap_bulk only when one full-sample correction is acceptable and seasonal variation in the bias is not important.
- Dataset opening and subsetting with YAXArrays and DimensionalData selectors
- Regridding on regular, curvilinear, and rotated-pole grids
- Bias correction with
qqmap,qqmap_bulk,biascorrect_extremes, andtvc - Aggregations such as
daymean,daysum,annualmax,annualmean, andannualsum - A large catalog of temperature, precipitation, threshold, and spell-duration indices
- Ensemble summaries and time-series diagnostics
- Thermodynamic helper functions and return-level estimation
The stable documentation is organized around workflows first and reference second.
- Quick start: open data, inspect dimensions, compute a first result
- Data and subsetting: time ranges, polygons, coordinate conventions
- Interpolation and regridding: regular, rotated, and curvilinear workflows
- Bias correction: method selection, assumptions, and validation
- Building climate scenarios: observations plus simulations, interpolation, correction, diagnostics, and derived indicators
- Indices and aggregations: grouped by climate-analysis task
- API overview: exported functions by category
One of the primary use cases for ClimateTools is climate-scenario construction. A typical scenario workflow is:
- Choose a reference observation or reanalysis dataset.
- Open one or more model simulations for a historical and future period.
- Align calendars, time windows, and grids.
- Interpolate observations and simulations to a common grid if necessary.
- Bias-correct the model series using a method suited to the variable and objective.
- Validate the corrected fields and compute indicators, maps, or summary tables.
The documentation includes a dedicated guide for this workflow.
See the built documentation at: