Public API
Simulation
FastIsostasy.Simulation — Type
A superstruct needed for the forward integration of the model.
Fields
domain: theAbstractDomaindefining the spatial discretization.c: thePhysicalConstantsdefining the physical constants of the model.bcs: theBoundaryConditionsdefining the boundary conditions of the model.sealevel: theRegionalSeaLeveldefining the sea level evolution.solidearth: theSolidEarthdefining the solid earth properties.opts: theSolverOptionscontrolling the solver options.tools: theGIAToolsproviding tools for GIA computations.ref: theReferenceStatedefining the reference state of the model.now: theCurrentStatedefining the current state of the model.ncout: theNetcdfOutputcontrolling the NetCDF output.nout: theNativeOutputcontrolling the native output.timer: theTimercontrolling and recording timing information.simobs: a vector ofSimulatedObservabledefining simulated observables to be computed during integration.
FastIsostasy.SolverOptions — Type
Control options relative to solving a Simulation.
Fields
integ: theAbstractIntegratorused to integrate the ODE forward in time, one ofBS3Integrator(adaptive, default),Tsit5Integrator(adaptive),RKCIntegrator(adaptive, stabilised for stiff problems) orEulerIntegrator(fixed step). Each integrator carries its own settings — tolerances, step-size bounds — as fields of its own struct.dt_sparse_diagnostics: the time interval between updates of the diagnostics variables (elastic displacement, sea-surface elevation, etc.).show_progress: whether to report the simulation progress. Whentrue,run!displays a live progress bar (ForwardProgress).dt_walltime: minimum wall time in seconds between two refreshes of that progress bar. Refreshing reduces over the whole grid, so this bounds the reporting cost by wall time rather than by step count.fft: theAbstractFFTBackendused for the spectral step. A purely numerical choice, orthogonal to the mantle rheology.transition: theAbstractTransitionused to smooth the transition between grounded and floating ice, and between ocean and land.
integ is a concrete type parameter rather than an abstract field, so sim.opts.integ infers to the integrator's own type. Code that branches on the integrator — the AD extensions in particular — then resolves that branch at compile time instead of paying to compile every arm of it.
FastIsostasy.run! — Function
run!(sim::Simulation)
Solve the isostatic adjustment problem defined in sim::Simulation, integrating it forward over sim.timer.t_span with the integrator in sim.opts.integ::AbstractIntegrator and writing output at the requested times.
FastIsostasy.step! — Function
step!(integ::FastIsostasy.AbstractIntegratorState, Δt)
step!(
integ::FastIsostasy.AbstractIntegratorState,
Δt,
force_dt::Bool
)
Advance integrator by the interval Δt, using internal adaptive substeps and writing any output that falls within the interval. force_dt is accepted for backward compatibility; the step always stops exactly at t + Δt.
FastIsostasy.init_integrator — Function
init_integrator(f!, u0, tspan, alg::AbstractIntegrator, p = nothing)Build (and prime) the integrator state for the in-place ODE f!(du, u, p, t), ready to be advanced by solve_to! / step!. Returns a TableauIntegratorState, or an RKCIntegratorState when alg is an RKCIntegrator.
Tolerances and step-size bounds are read off alg — set them there, e.g. Tsit5Integrator(reltol = 1e-8) or EulerIntegrator(dt = 100.0).
See init_integrator(sim::Simulation) for the Simulation-level entry point, which takes alg from sim.opts.integ.
init_integrator(
sim::Simulation
) -> Union{FastIsostasy.RKCIntegratorState{_A, _B, typeof(update_diagnostics!), P} where {_A, _B, P<:Simulation}, FastIsostasy.TableauIntegratorState}
Initialise the integrator of sim::Simulation, which can subsequently be advanced manually with step!(integrator, Δt, force_dt) (e.g. when coupling to an external ice-sheet model).
FastIsostasy.PhysicalConstants — Type
Carry physical constants, with default values that can be changed by the user. For instance:
c = PhysicalConstants(rho_ice = 0.93) # (kg/m^3)All constants are given in SI units (kilogram, meter, second).
Fields
mE: Earth's mass (kg)r_equator: Earth radius at equator (m)r_pole: Earth radius at pole (m)A_ocean_pd: Ocean surface (m^2) as in Goelzer (2020) before Eq. (9)g: Mean Earth acceleration at surface (m/s^2)G: Gravity constant (m^3 kg^-1 s^-2)seconds_per_year: (s)rho_ice: (kg/m^3)rho_water: (kg/m^3)rho_seawater: (kg/m^3)rho_sw_ice: (dimensionless)
Time integrators
See Time integration for the algorithms and how to choose between them.
FastIsostasy.AbstractIntegrator — Type
Define a self-contained, dependency-free time integrator for in-place ODEs.
Available subtypes:
FastIsostasy.EulerIntegrator — Type
EulerIntegrator(dt)
EulerIntegrator(; dt)Fixed-step explicit Euler. Non-adaptive, so dt is the step size and is required — there is no error estimate to adapt it with.
Fields
dt::AbstractFloat: the fixed step size
FastIsostasy.BS3Integrator — Type
BS3Integrator(; kwargs...)
BS3Integrator{T}(; kwargs...)Bogacki-Shampine 3(2) embedded pair (FSAL, adaptive). Third-order accurate solution with a second-order embedded error estimate.
Fields
reltol::AbstractFloat: relative error tolerance of the adaptive controllerabstol::AbstractFloat: absolute error tolerance of the adaptive controllerdt_min::AbstractFloat: lower bound on the adaptive step sizedt_max::AbstractFloat: upper bound on the adaptive step sizedt0::AbstractFloat: initial step size; the controller grows it from here, at most 10x per step
FastIsostasy.Tsit5Integrator — Type
Tsit5Integrator(; kwargs...)
Tsit5Integrator{T}(; kwargs...)Tsitouras 5(4) embedded pair (FSAL, adaptive). Fifth-order accurate solution with a fourth-order embedded error estimate.
Fields
reltol::AbstractFloat: relative error tolerance of the adaptive controllerabstol::AbstractFloat: absolute error tolerance of the adaptive controllerdt_min::AbstractFloat: lower bound on the adaptive step sizedt_max::AbstractFloat: upper bound on the adaptive step sizedt0::AbstractFloat: initial step size; the controller grows it from here, at most 10x per step
FastIsostasy.RKCIntegrator — Type
RKCIntegrator(; kwargs...)
RKCIntegrator{T}(; kwargs...)Stabilised explicit Runge-Kutta-Chebyshev method (RKC2, Sommeijer-Shampine- Verwer 1997), second order, damped. Real-axis stability interval grows with the square of the stage count. For stiff systems with ~1.75x speedup.
Fields
damping::AbstractFloat: SSV damping parameterε; must be> 0safety::AbstractFloat: safety factor fordt * λ_maxwhen choosing the stage countsmax::Int64: hard cap on the stage count per stepreestimate_every::Int64: re-run the power iteration every N accepted steps (0= never)reltol::AbstractFloat: relative error tolerance of the adaptive controllerabstol::AbstractFloat: absolute error tolerance of the adaptive controllerdt_min::AbstractFloat: lower bound on the adaptive step sizedt_max::AbstractFloat: upper bound on the adaptive step sizedt0::AbstractFloat: initial step size; the controller grows it from here, at most 10x per step
FastIsostasy.integrate — Function
integrate(f!, u0, tspan, alg::AbstractIntegrator, p = nothing; kwargs...) -> (ts, us)Integrate the in-place ODE f!(du, u, p, t) from tspan[1] to tspan[2].
Returns the sorted save times ts and a vector us of solution snapshots (copies) at those times.
Error tolerances and step-size bounds are fields of alg — e.g. integrate(f!, u0, tspan, Tsit5Integrator(reltol = 1e-8)) or integrate(f!, u0, tspan, EulerIntegrator(dt = 0.05)).
Keyword arguments:
saveat: times at which to store the solution (defaults totspan[2]). Must lie withintspan. The endpoint is always included.maxiters: safety cap on the number of steps per save interval.
Transitions
FastIsostasy.AbstractTransition — Type
AbstractTransitionSupertype of the transition traits, which decide how the model's non-smooth switches — grounded/ocean masks, the max(0, ·) clamps in the water column — are evaluated. Stored on SolverOptions.
SharpTransition (the default) keeps the exact max/Heaviside behaviour at zero cost. SmoothTransition replaces them by ε-smoothed counterparts, which is what makes the model differentiable across the grounding line; the masks then become eltype-T arrays instead of Bool.
FastIsostasy.SharpTransition — Type
SharpTransition()Exact, non-differentiable grounding-line switches (max, min, >). Default; produces Boolean masks and leaves the forward model unchanged.
FastIsostasy.SmoothTransition — Type
SmoothTransition(ε)Differentiable grounding-line switches with transition length scale ε (in metres of height-above-flotation). Uses the branch-free approximations
max(x, 0) ≈ (x + √(x² + ε²)) / 2
min(x, 0) ≈ (x − √(x² + ε²)) / 2
(x > 0) ≈ (1 + x / √(x² + ε²)) / 2which are symmetric, GPU-friendly and converge to the exact operators as ε → 0 (error confined to |x| ≲ ε). Masks become floating-point fields in [0, 1].
Computation domains
FastIsostasy.AbstractDomain — Type
Abstract type for domain representation in the model.
Available subtypes:
RegionalDomainGlobalDomain: Not implemented yet, but hopefully in v3.0!
FastIsostasy.RegionalDomain — Type
Define a regional domain, including its geometry and the architecture it should be running on.
Initialization
For a square domain with half-width W and 2^n grid points in each dimension:
domain = RegionalDomain(W, n)For a rectangular domain with half-widths Wx and Wy and nx and ny grid points in each dimension:
domain = RegionalDomain(Wx, Wy, nx, ny)For a rectangular domain with spanning vectors x and y:
domain = RegionalDomain(x, y) # rectangular domain: spanning vectors x, yHardware
The backend keyword selects where the arrays live and where the kernels run. It takes a KernelAbstractions.jl backend, so FastIsostasy is not tied to any single GPU vendor:
backend | needs |
|---|---|
CPU() (default) | — |
CUDABackend() | using CUDA |
ROCBackend() | using AMDGPU |
MetalBackend() | using Metal |
oneAPIBackend() | using oneAPI |
using CUDA
domain = RegionalDomain(3000e3, 7, backend = CUDABackend())Everything downstream — SolidEarth, BoundaryConditions, Simulation — picks the backend up from the domain, so this is the only place hardware is named.
FastIsostasy.GlobalDomain — Type
Not implemented yet!
Version 3.0 will allow for global domains.
Boundary conditions
FastIsostasy.BoundaryConditions — Type
Define the boundary conditions of the problem.
Fields
ice_thickness: an instance ofAbstractIceThicknessthat defines how the ice thickness is updated.viscous_displacement: a boundary condition for the viscous displacement, defined as anOffsetBC.elastic_displacement: a boundary condition for the elastic displacement, defined as anOffsetBC.sea_surface_perturbation: a boundary condition for the sea surface perturbation, defined as anOffsetBC.
FastIsostasy.apply_bc! — Function
apply_bc!(H, t, it::TimeInterpolatedIceThickness)
Update the ice thickness H at time t using the method defined in it.
apply_bc!(X, bc::OffsetBC)
Apply the boundary condition bc to the matrix X in-place.
Ice thickness
FastIsostasy.AbstractIceThickness — Type
Determine how the ice thickness is updated in the model by implementing update_ice! for different subtypes.
Available subtypes
FastIsostasy.TimeInterpolatedIceThickness — Type
Update the ice thickness based on a time interpolation.
Fields
t_vec: a vector of time points at which the ice thickness is defined.H_vec: a vector of ice thickness values corresponding tot_vec.H_itp: a function that interpolates the ice thickness based on time.
FastIsostasy.ExternallyUpdatedIceThickness — Type
Update the ice thickness externally, without any internal update.
Boundary condition spaces
FastIsostasy.AbstractBCSpace — Type
An abstract type representing the space in which boundary conditions are defined. This typically needs to be defined when initializing an AbstractBCSpace.
Available subtypes
FastIsostasy.RegularBCSpace — Type
Singleton struct to impose boundary conditions at the edges of the computation domain.
FastIsostasy.ExtendedBCSpace — Type
Singleton struct to impose boundary conditions at the edges of the extended computation domain, which naturally arises from convolutions.
Boundary condition rules
FastIsostasy.AbstractBC — Type
An abstract type representing a boundary condition in the context of a computational domain.
Available subtypes
FastIsostasy.OffsetBC — Type
Apply an offset to the values at the boundaries of a computational domain.
Fields
space: theAbstractBCSpacein which the boundary condition is defined.x_border: the offset value to be applied at the boundaries.W: a weight matrix to apply the boundary condition according to someAbstractBC.
FastIsostasy.NoBC — Type
A singleton struct representing the absence of a boundary condition.
FastIsostasy.CornerBC — Type
Impose a Dirichlet-like boundary condition at the corners of the computational domain.
FastIsostasy.BorderBC — Type
Impose a Dirichlet-like boundary condition at the borders of the computational domain.
FastIsostasy.DistanceWeightedBC — Type
Impose a Dirichlet-like boundary condition at the borders of the computational domain, weighted by the distance from the center of the domain.
FastIsostasy.MeanBC — Type
Impose a mean value for the field.
Sea level
FastIsostasy.RegionalSeaLevel — Type
A struct that gathers the modelling choices for the sea-level component of the simulation. It contains:
surface: an instance ofAbstractSeaSurfaceto represent the sea surface.load: an instance ofAbstractSealevelLoadto represent the sea-level load.bsl: an instance ofAbstractBSLto represent the barystatic sea level.update_bsl: an instance ofAbstractBSLUpdateto represent the update mechanism for the barystatic sea level.
Barystatic sea level (BSL)
FastIsostasy.AbstractBSL — Type
Abstract type to compute the evolution of the barystatic sea level.
Available subtypes
ConstantBSLConstantOceanSurfaceBSLPiecewiseConstantBSLPiecewiseLinearOceanSurfaceBSL(requiresusing NLsolve)ImposedBSLCombinedBSL
All subtypes implement the update_bsl! function:
T, delta_V, t = Float64, 1.0e9, 0.0 # Example values
bsl = PiecewiseConstantBSL() # or any other subtype!
update_bsl!(bsl, delta_V, t)FastIsostasy.ReferenceBSL — Type
Define a reference of barystatic sea level and ocean surface area. Used in all subtypes of AbstractBSL to compute the BSL evolution.
Fields
z: the reference BSL (m), which defaults to 0 (reference year 2020).A: the reference ocean surface area (m^2) computed based onz.z_vec: a vector of BSL values (m) used for interpolation.A_vec: a vector of ocean surface area values (m^2) used for interpolation.A_itp: an interpolator function for ocean surface area over BSL.
In the constructor, T determines the floating point arithmetic used in all computations, and itp_kwargs allows customization of the interpolation.
Example usage:
ref = ReferenceBSL() # assume BSL = 0Custom:
ref = ReferenceBSL(z = 0.1) # assume BSL = 0.1 m and compute A accordinglyFastIsostasy.ConstantBSL — Type
A mutable struct containing:
ref: an instance ofReferenceBSL.z: the BSL, considered constant in time.A: the ocean surface area, considered constant in time.
Assume that the BSL is constant in time.
FastIsostasy.ConstantOceanSurfaceBSL — Type
A mutable struct containing:
ref: an instance ofReferenceBSL.z: the BSL at current time step.A: the ocean surface area, considered constant in time.
Assume that the ocean surface is constant in time and that the BSL evolves only according to the changes in ice volume covered by the RegionalDomain.
FastIsostasy.PiecewiseConstantBSL — Type
A mutable struct containing:
ref: an instance ofReferenceBSL.z: the BSL at current time step.A: the ocean surface at current time step.
Assume that the ocean surface evolves in time according to a piecewise constant function of the BSL, which evolves in time according to the changes in ice volume covered by the RegionalDomain.
FastIsostasy.ImposedBSL — Type
A mutable struct containing:
ref: an instance ofReferenceBSL.z: the BSL at current time step.t_vec: the time vector.z_vec: the BSL values corresponding to the time vector.z_itp: an interpolation ofz_vecovert_vec.
Impose an externally computed BSL, which is internally computed via a time interpolation.
FastIsostasy.CombinedBSL — Type
A mutable structcontaining:
bsl1: anImposedBSL.bsl2: anAbstractBSL.
This imposes a mixture of BSL. For instance, if you simulate Antarctica over the LGM, you can impose an offline BSL contribution from the other ice sheets via bsl1. The contribution of Antarctica will be intercatively added to this via bsl2.
FastIsostasy.AbstractBSLUpdate — Type
An abstract type to determine how the barystatic sea level (BSL) is updated over time.
Available subtypes
FastIsostasy.InternalBSLUpdate — Type
Update BSL internally by the model based on the change in ice volume.
FastIsostasy.ExternalBSLUpdate — Type
Update the BSL is externally, without any internal update.
FastIsostasy.update_bsl! — Function
update_bsl!(bsl::ConstantBSL, delta_V, t)
Update the BSL and ocean surface based on the input delta_V (in m^3) and on a subtype of AbstractBSL.
Sea surface (gravitional response)
FastIsostasy.AbstractSeaSurface — Type
Abstract type for sea surface representation. Available subtypes are:
FastIsostasy.LaterallyConstantSeaSurface — Type
Assume a laterally constant sea surface across the domain. This means that the gravitatiional response is ignored.
FastIsostasy.LaterallyVariableSeaSurface — Type
Assume a laterally variable sea surface across the domain. This means that the gravitational response is included in the sea surface perturbation.
FastIsostasy.update_dz_ss! — Function
update_dz_ss!(
sim::Simulation,
sl::LaterallyVariableSeaSurface
)
Update the SSH perturbation dz_ss by convoluting the Green's function with the load anom.
Sea level load
FastIsostasy.AbstractSealevelLoad — Type
Abstract type for sea-level load representation. Available subtypes are:
FastIsostasy.NoSealevelLoad — Type
Assume no sea-level load, i.e. the bedrock deformation is not influenced by the sea-level.
FastIsostasy.InteractiveSealevelLoad — Type
Assume an interactive sea-level load, i.e. the bedrock deformation is influenced by the sea-level.
FastIsostasy.columnanom_water! — Function
columnanom_water!(
sim::Simulation,
ol::InteractiveSealevelLoad
)
Update the water column based on the instance of AbstractSealevelLoad.
Solid Earth
FastIsostasy.SolidEarth — Type
Return a struct containing all information related to the lateral variability of solid-Earth parameters. To initialize with values other than default, run:
domain = RegionalDomain(3000e3, 7)
lb = [100e3, 300e3]
lv = [1e19, 1e21]
solidearth = SolidEarth(domain, layer_boundaries = lb, layer_viscosities = lv)which initializes a lithosphere of thickness $T_1 = 100 \mathrm{km}$, a viscous channel between $T_1$and $T_2 = 300 \mathrm{km}$and a viscous halfspace starting at $T_2$. This represents a homogenous case. For heterogeneous ones, simply make lb::Vector{Matrix}, lv::Vector{Matrix} such that the vector elements represent the lateral variability of each layer on the grid of domain::RegionalDomain.
Lithosphere
FastIsostasy.AbstractLithosphere — Type
Available subtypes are:
FastIsostasy.RigidLithosphere — Type
Assume a rigid lithosphere, i.e. the elastic deformation is neglected.
FastIsostasy.LaterallyConstantLithosphere — Type
Assume a laterally constant lithospheric thickness (and rigidity) across the domain. This generally improves the performance of the solver, but is less realistic.
FastIsostasy.LaterallyVariableLithosphere — Type
Assume a laterally variable lithospheric thickness (and rigidity) across the domain. This generally improves the realism of the model, but is more computationally expensive.
FastIsostasy.update_elasticresponse! — Function
update_elasticresponse!(
sim::Simulation,
lithosphere::AbstractLithosphere
)
Update the elastic response by convoluting the Green's function with the load anom. To use coefficients differing from [Farrell1972], see GIATools.
Mantle
The mantle rheology says what is modelled. How the spectral step is computed is the orthogonal FFT-backend axis below.
FastIsostasy.AbstractMantle — Type
The rheology of the mantle. This axis describes what is modelled; how the spectral step is computed is the orthogonal AbstractFFTBackend axis.
Note that none of these subtypes carries the unrelaxed elastic response: that is computed separately by the Farrell Green's-function convolution, which dispatches on AbstractLithosphere.
Available subtypes are:
FastIsostasy.RigidMantle — Type
Assume a rigid mantle that does not deform.
FastIsostasy.RelaxedMantle — Type
Assume a relaxed mantle that deforms according to a relaxation time. This is generally less realistic and offers worse performance than a viscous mantle. It is only included for legacy purpose (e.g. comparison among solvers).
FastIsostasy.ViscousMantle — Type
Assume a viscous mantle that deforms according to a viscosity, i.e. steady-state (secondary) creep only.
The name is deliberately not MaxwellMantle: a Maxwell body is a spring in series with a dashpot, but the spring — the unrelaxed elastic response — is not handled here. It is computed independently by the Farrell Green's-function convolution in update_elasticresponse!, which dispatches on AbstractLithosphere and can be switched off entirely (RigidLithosphere). This type supplies the viscous half-space only.
Whether the spectral step uses complex or half-spectrum FFTs is a separate, orthogonal choice — see AbstractFFTBackend and the fft field of SolverOptions.
This is the most realistic mantle model with a steady creep law and generally offers the best performance. It is the default mantle model used in the solver.
FastIsostasy.TransientCreepMantle — Type
TransientCreepMantle(; shearmodulus, relaxation_strength, kelvin_time)Transient (primary) creep on top of the steady creep of ViscousMantle: the steady Maxwell dashpot (viscosity η₁, taken from SolidEarth) in series with N Kelvin-Voigt branches forming a Prony series, so that the total viscous displacement splits as u = u_M + Σⱼ u_K[j]. N = 1 is the classic Burgers body; N ≈ 3-5 log-spaced branches approximate the extended Burgers / Faul-Jackson relaxation spectrum of Ivins & Caron (2021).
Named for the phenomenon rather than for one rheological body, because the N-branch Prony form is the general case and Burgers is only its N = 1 member.
Note that, unlike ViscousMantle, this model does carry shear moduli: each branch has μ₂ⱼ = shearmodulus / Δⱼ and η₂ⱼ = τⱼ μ₂ⱼ. These are internal to the transient band and remain distinct from the unrelaxed elastic response, which the Farrell convolution keeps handling as for every other mantle. It extends ViscousMantle rather than replacing it: as Δⱼ → 0 the Kelvin branches lock (u_K → 0) and the model reduces to it exactly.
Scalar (laterally constant) parameters only, and supported solely on the semi-implicit path — LaterallyConstantLithosphere or RigidLithosphere with ComplexFFTBackend and a fixed step (SolverOptions(integ = EulerIntegrator(dt = ...))).
Fields
shearmodulus::AbstractFloat: unrelaxed shear modulusμ₁of the mantle [Pa]relaxation_strength::NTuple{N, T} where {T<:AbstractFloat, N}: relaxation strengthΔⱼ = μ₁/μ₂ⱼof each Kelvin branchkelvin_time::NTuple{N, T} where {T<:AbstractFloat, N}: retardation timeτⱼ = η₂ⱼ/μ₂ⱼof each Kelvin branch [yr]
Example
Classic Burgers body with the Ivins & Caron (2021) Fig. 8 parameters:
julia> using FastIsostasy
julia> m = TransientCreepMantle(shearmodulus = 67e9, relaxation_strength = 1.2,
kelvin_time = 7.14);
julia> FastIsostasy.nbranches(m)
1See roadmaps/burgers.md for the design and derivation.
FastIsostasy.BurgersMantle — Function
BurgersMantle(
;
shearmodulus,
relaxation_strength,
kelvin_time
)
Classic Burgers body: the N = 1 member of TransientCreepMantle, a Maxwell dashpot in series with a single Kelvin-Voigt element. Thin naming convenience over TransientCreepMantle(; shearmodulus, relaxation_strength, kelvin_time) for when (Δ, τ) are already known (e.g. from a published fit), as opposed to ExtendedBurgersMantle, which fits them from a continuous relaxation-time spectrum.
FastIsostasy.ExtendedBurgersMantle — Function
ExtendedBurgersMantle(
;
shearmodulus,
relaxation_strength,
alpha,
tau_L,
tau_H,
nbranches
)
Extended Burgers mantle: a TransientCreepMantle with nbranches Kelvin branches fit, via fit_prony_series, to the continuous Faul-Jackson absorption-band spectrum of the extended Burgers model (EBM) of Ivins & Caron (2021). See fit_prony_series for the fitting procedure and its fit_error; this constructor discards fit_error — call fit_prony_series directly first to check it before committing to nbranches.
FastIsostasy.update_dudt! — Function
update_dudt!(dudt, u, sim, t, earth::SolidEarth) -> Any
Update the time derivative of the viscous displacement based on a dispatch is along three mainly orthogonal axes: the mantle rheology, the lithosphere, and the FFT backend.
Main supported combinations are:
RigidMantle: no deformation,dudtis zero.RelaxedMantlewithLaterallyConstantLithosphere: uses ELRA Le Meur and Huybrechts (1996) to compute the viscous response. This also works with laterally-variable relaxation time, as proposed by Coulon et al. (2021) and by van Calcar et al. (2026).RelaxedMantlewithLaterallyVariableLithosphere: not implemented. This corresponds to what is described by Coulon et al. (2021) but is not yet implemented.ViscousMantlewithLaterallyConstantLithosphereorRigidLithosphere: not implemented. This corresponds to what is described by Bueler et al. (2007) but is not yet implemented.ViscousMantlewithLaterallyVariableLithosphere: This corresponds to the approach of Swierczek-Jereczek et al. (2024).
FFT backend
FastIsostasy.AbstractFFTBackend — Type
Which FFT plans the spectral solver builds. This is a numerical choice and is deliberately orthogonal to the rheology: it selects how a transform is computed, never what is being modelled. Set it through the fft field of SolverOptions.
Available subtypes:
FastIsostasy.ComplexFFTBackend — Type
Complex-to-complex plans (plan_fft / plan_ifft) over the full (nx, ny) spectrum. The default, and the FFT backend to use for production runs.
FastIsostasy.RealFFTBackend — Type
Real-to-complex plans (plan_rfft / plan_irfft). The frequency-domain arrays are (nx÷2+1, ny) rather than (nx, ny), roughly halving the memory and arithmetic cost of the spectral step.
In laterally-variable lithosphere setups the half-spectrum views introduce extra complexity that can produce larger numerical errors than ComplexFFTBackend, and the expected performance gain may not materialise on all hardware. A runtime warning is emitted when this FFT backend is selected.
Layering
FastIsostasy.AbstractLayering — Type
Abstract type for layering models. Subtypes should implement the layer_boundaries function. Available subtypes are:
FastIsostasy.UniformLayering — Type
Struct to enforce uniform layering when passed to get_layer_boundaries. Contains:
n_layers: the number of layers in the model.boundaries: the layer boundaries, which are constant across the domain.
FastIsostasy.ParallelLayering — Type
Struct to enforce parallel layering when passed to get_layer_boundaries. Contains:
n_layers: the number of layers in the model.thickness: the thickness of each layer.tol: a tolerance value to add to the layer boundaries.
FastIsostasy.EqualizedLayering — Type
Struct to enforce equalized layering when passed to get_layer_boundaries. Contains:
n_layers: the number of layers in the model.boundaries: the layer boundaries.tol: a tolerance value to add to the layer boundaries.
FastIsostasy.FoldedLayering — Type
Struct to enforce folded layering when passed to get_layer_boundaries. Contains:
n_layers: the number of layers in the model.max_depth: the maximum depth of the layers.tol: a tolerance value to add to the layer boundaries.
FastIsostasy.get_layer_boundaries — Function
get_layer_boundaries(
domain::RegionalDomain,
litho_thickness,
layering
) -> Any
Compute the layer boundaries for a given AbstractLayering. Output is typically passed to SolidEarth to create a layered Earth model.
Calibration
FastIsostasy.apply_calibration! — Function
apply_calibration!(eta, calibraton::NoCalibration) -> Any
Apply the calibration to the viscosity eta.
Viscosity lumping
FastIsostasy.get_effective_viscosity_and_scaling — Function
get_effective_viscosity_and_scaling(
domain,
layer_viscosities,
layer_boundaries,
maskactive,
lumping::TimeDomainViscosityLumping
) -> Tuple{Any, Any}
Compute equivalent viscosity for multilayer model by recursively applying the formula for a halfspace and a channel from Lingle and Clark (1975).
Material utilities
FastIsostasy.get_rigidity — Function
get_rigidity(t, E, nu) -> Any
Compute rigidity D based on thickness t, Young modulus E and Poisson ration nu.
FastIsostasy.get_shearmodulus — Function
get_shearmodulus(youngmodulus, poissonratio) -> Any
Compute shear modulus G based on Young modulus E and Poisson ratio nu, or based on seismic velocities.
FastIsostasy.get_elastic_green — Function
get_elastic_green(
domain::RegionalDomain,
greenintegrand_function,
quad_support,
quad_coeffs
) -> Any
Integrate load response over field by using 2D quadrature with specified support points and associated coefficients.
FastIsostasy.get_flexural_lengthscale — Function
get_flexural_lengthscale(
litho_rigidity,
rho_uppermantle,
g
) -> Any
Compute the flexural length scale, based on Coulon et al. (2021), Eq. in text after Eq. 3. The flexural length scale will be on the order of 100km.
Arguments
litho_rigidity: Lithospheric rigidityrho_uppermantle: Density of the upper mantleg: Gravitational acceleration
Returns
L_w: The calculated flexural length scale
FastIsostasy.get_relaxation_time — Function
get_relaxation_time(eta, m, p) -> Any
Convert the viscosity to relaxation times following Van Calcar et al. (in rev.).
FastIsostasy.get_relaxation_time_weaker — Function
get_relaxation_time_weaker(eta) -> Any
Compute the relaxation time for a weaker mantle, following Van Calcar et al. (in rev.).
FastIsostasy.get_relaxation_time_stronger — Function
get_relaxation_time_stronger(eta) -> Any
Compute the relaxation time for a stronger mantle, following Van Calcar et al. (in rev.).
FastIsostasy.absorption_band_density — Function
absorption_band_density(τ, alpha, tau_L, tau_H) -> Any
Faul-Jackson power-law absorption-band density underlying the extended Burgers model (EBM) of Ivins & Caron (2021, §2): a probability density (∫[τ_L,τ_H] = 1) of retardation times over [tau_L, tau_H] with exponent alpha.
FastIsostasy.fit_prony_series — Function
fit_prony_series(
;
relaxation_strength,
alpha,
tau_L,
tau_H,
nbranches,
ntest,
nquad
)
Fit an nbranches-branch Prony series (Δⱼ, τⱼ) to the continuous Faul-Jackson absorption-band spectrum underlying the extended Burgers model (EBM) of Ivins & Caron (2021), so that the transient term of their creep function
relaxation_strength * ∫[tau_L, tau_H] F(τ) (1 − exp(−t/τ)) dτ(F the density returned by absorption_band_density) is approximated by the nbranches-branch Kelvin sum Σⱼ Δⱼ (1 − exp(−t/τⱼ)) used by TransientCreepMantle.
nbranches log-spaced bins partition [tau_L, tau_H]. Each Δⱼ is the exact probability mass of its bin (so sum(Δⱼ) == relaxation_strength to machine precision for any nbranches, since the bins exactly partition the band) and τⱼ is the F-weighted mean retardation time within it — both closed-form (the density is a power law, so its CDF and first moment are elementary), no optimizer needed.
Returns (Δⱼ, τⱼ, fit_error), where fit_error is the maximum relative difference (against relaxation_strength) between the continuous and nbranches-branch transient term, sampled log-spaced over t ∈ [tau_L, tau_H] (ntest points; the continuous term is evaluated by Gauss-Legendre quadrature via quadrature1D with nquad points). Use fit_error to pick nbranches: I&C 2021 report that N ≈ 3-5 typically fits their spectrum to a few percent (roadmaps/burgers.md §6).
Example
julia> Δ, τ, err = fit_prony_series(relaxation_strength = 1.2, alpha = 0.5,
tau_L = 1.0, tau_H = 100.0, nbranches = 4);
julia> sum(Δ)
1.2
julia> round.(τ, sigdigits = 3)
(1.98, 6.26, 19.8, 62.6)
julia> round(err, sigdigits = 2)
0.014Input/Output (I/O)
FastIsostasy.load_dataset — Function
load_dataset(
name::String;
kwargs...
) -> Union{Nothing, Tuple{Union{Tuple{Any, Any}, Tuple{Any, Any, Any}, Vector{Float64}}, Any, Any}}
Return the dims::Tuple{Vararg{Vector}}, the field<:Array and the interpolator corresponding to a data set defined by a unique name::String. For instance:
(lon180, lat, t), Hice, Hice_itp = load_dataset("ICE6G_D")Following options are available for parameter fields:
- "ICE6GD": ice loading history from ICE6GD.
- "Wiens2022": viscosity field from (Wiens et al. 2022)
- "Lithothickness_Pan2022": lithospheric thickness field from (Pan et al. 2022)
- "Viscosity_Pan2022": viscosity field from (Pan et al. 2022)
Following options are available for model results:
- "Spada2011"
- "LatychevGaussian"
- "LatychevICE6G"
FastIsostasy.NetcdfOutput — Type
Define the output NetCDF file for the simulation.
Fields
t: a vector of time points at which the variable is defined.filename: the name of the NetCDF file.buffer: a buffer to store the output data before writing to the NetCDF file.vars3D: a vector of symbols representing the 3D variables to be output.vars1D: a vector of symbols representing the 1D variables to be output.params2D: a vector of symbols representing the 2D parameters to be output.oc: an instance ofAbstractOutputCropthat defines the cropping strategy for the output.k: the current time step index for writing to the NetCDF file.
FastIsostasy.NativeOutput — Type
Define the native output which will be updated over the simulation.
Initialization example:
nout = NativeOutput(vars = [:u, :ue, :b, :dz_ss, :H_ice, :H_water, :u_x, :u_y],
t = collect(0:1f3:10f3))Fields
t: a vector of time points at which the variable is defined.vars: a vector of symbols representing the variables to be output.vals: a dictionary mapping each variable symbol to a vector of matrices containing the output data.computation_time: the total computation time for the simulation.k: the current time step index for writing to the output.