Skip to content

CliMA/ClimaTimeSteppers.jl

Repository files navigation

ClimaTimeSteppers.jl Logo

ClimaTimeSteppers.jl

High-performance ODE solvers for climate model time-stepping. Designed for distributed and GPU computation with minimal memory footprint.

ClimaTimeSteppers.jl provides the time integration layer for ClimaAtmos.jl, ClimaLand.jl, and ClimaCoupler.jl.

Stable Release stable docs-stable
Unit Tests unit tests codecov
Downloads Downloads

Features

  • IMEX methods: 30+ implicit-explicit additive Runge-Kutta tableaux (ARS, IMKG, SSP, ARK families) up to 5th order
  • SSP methods: Strong stability preserving methods with built-in limiter support
  • Rosenbrock methods: Linearly implicit — single linear solve per stage, no Newton iteration
  • Low-storage Runge-Kutta: 2N-storage explicit methods (only two state-sized arrays)
  • Multirate methods: MIS and Wicker-Skamarock schemes for separated timescales
  • Flexible Newton solver: Krylov (GMRES), Jacobian-free Newton-Krylov (JFNK), configurable update strategies
  • AD compatible: Propagates dual numbers and works with automatic differentiation packages (e.g., ForwardDiff.jl) for gradient-based calibration
  • GPU ready: Type-stable, allocation-free stepping kernels

Quick Example

using ClimaTimeSteppers
import ClimaTimeSteppers as CTS

# Define du/dt = -u (exponential decay)
f = ClimaODEFunction(; T_exp! = (du, u, p, t) -> (du .= -u))
prob = CTS.ODEProblem(f, [1.0], (0.0, 5.0), nothing)

# Solve with an explicit RK4 algorithm
alg = ExplicitAlgorithm(RK4())
sol = CTS.solve(prob, alg; dt = 0.1)

# Or step manually
integrator = CTS.init(prob, alg; dt = 0.1)
CTS.step!(integrator)
CTS.solve!(integrator)

For IMEX problems (e.g., stiff vertical diffusion + explicit horizontal advection), provide an implicit tendency with a Jacobian:

T_imp! = CTS.ODEFunction(T_imp!; jac_prototype = W, Wfact = Wfact!)
f = ClimaODEFunction(; T_exp!, T_imp!, dss!)
alg = IMEXAlgorithm(ARS343(), NewtonsMethod(; max_iters = 2))

See the documentation for the full tutorial.

Installation

ClimaTimeSteppers.jl is a registered Julia package:

using Pkg
Pkg.add("ClimaTimeSteppers")

Contributing

See the contributor guide for information on contributing.

Release Policy

ClimaTimeSteppers.jl is a core component of the CliMA ecosystem and can have a significant impact on downstream packages. Before making a breaking release, a stable patch release must be exercised by user repos (ClimaAtmos, ClimaLand, ClimaCoupler) without new issues.

Related Packages

ClimaTimeSteppers.jl is part of the CliMA ecosystem:

About

GPU-ready IMEX and multirate ODE solvers for large-scale scientific models

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages