Public API
Simulation
FastIsostasy.Simulation — Type
Simulation(domain, c, solidearth, t_out)
Simulation(domain, c, solidearth, t_out, Hice)
Simulation(domain, c, solidearth, t_out, t_Hice, Hice)Return a struct containing all the other structs needed for the forward integration of the model over domain::RegionalDomain with parameters c::PhysicalConstants and solidearth::SolidEarth. The outputs are stored at t_out::Vector{<:AbstractFloat}. To perform the whole simulation, run!(sim::Simulation) and to perform a single step:
tspan = (t_start, t_end)
integrator = init_integrator(sim)
step!(integrator, tspan)FastIsostasy.SolverOptions — Type
Return a struct containing the options relative to solving a Simulation.
FastIsostasy.DiffEqOptions — Type
Contains:
alg::ODEsolvers: the algorithm to integrate the ODE forward in time.reltol: the relative error tolerance of the integrator.
FastIsostasy.run! — Function
run!(sim::Simulation)
Solve the isostatic adjustment problem defined in sim::Simulation.
FastIsostasy.init_integrator — Function
init_integrator(sim::Simulation) -> Any
Initialise the integrator of sim::Simulation, which can be subsequently integrated forward in time by using step!.
FastIsostasy.PhysicalConstants — Type
Return a struct containing important physical constants. Comes with default values that can however be changed by the user, for instance by running:
c = PhysicalConstants(rho_ice = 0.93) # (kg/m^3)All constants are given in SI units (kilogram, meter, second).
Computation domains
FastIsostasy.AbstractDomain — Type
Abstract type for domain representation in the model.
FastIsostasy.RegionalDomain — Type
RegionalDomain
RegionalDomain(W, n)
RegionalDomain(Wx, Wy, nx, ny)Return a struct containing all information related to geometry of the domain and potentially used parallelism. To initialize one with 2*W and 2^n grid cells:
domain = RegionalDomain(W, n)If a rectangular domain is needed, run:
domain = RegionalDomain(Wx, Wy, nx, ny)FastIsostasy.GlobalDomain — Type
Not implemented yet!
Version 3.0 will allow for global domains.
Boundary conditions
FastIsostasy.BoundaryConditions — Type
A struct containing the boundary conditions of the problem:
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
An abstract type that determines how the ice thickness is updated in the model. This is done by implementing the update_ice! function for different subtypes. Available subtypes are:
FastIsostasy.TimeInterpolatedIceThickness — Type
A struct to update the ice thickness based on time interpolation. Contains:
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
ExternallyUpdatedIceThicknessA struct to indicate that the ice thickness is updated 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 are:
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 are:
FastIsostasy.OffsetBC — Type
A boundary condition that applies an offset to the values at the boundaries of a computational domain. Contains:
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 some AbstractBCRule.
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 are:
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
ReferenceBSL(z = 0; T = Float32, itp_kwargs = (extrapolation_bc = Flat()))A struct used in all subtypes of AbstractBSL to define a reference of barystatic sea level and ocean surface area. Contains:
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 are:
FastIsostasy.InternalBSLUpdate — Type
A struct to indicate that the BSL is updated internally by the model based on the change in ice volume.
FastIsostasy.ExternalBSLUpdate — Type
A struct to indicate that the BSL is updated 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
FastIsostasy.AbstractMantle — Type
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.MaxwellMantle — Type
Assume a viscous mantle that deforms according to a viscosity. This is the most realistic mantle model and generally offers the best performance. It is the default mantle model used in the solver.
FastIsostasy.update_dudt! — Function
update_dudt!(dudt, u, sim, t, earth::SolidEarth) -> Any
Update the time derivative of the viscous displacement dudt based on an AbstractMantle:
RigidMantle: no deformation,dudtis zero.RelaxedMantlewithLaterallyConstantLithosphere: uses ELRA (LeMeur & Huybrechts 1996) to compute the viscous response. This also works with laterally-variable relaxation time, as proposed in Van Calcar et al., in rev.RelaxedMantlewithLaterallyVariableLithosphere: not implemented. This corresponds to what is described in Coulon et al. (2021) but is not yet implemented.MaxwellMantlewithLaterallyConstantLithosphereorRigidLithosphere: not implemented. This corresponds to what is described in Bueler et al. (2007) but is not yet implemented.MaxwellMantlewithLaterallyVariableLithosphere: This corresponds to the approach of Swierczek-Jereczek et al. (2024).
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
) -> Matrix{T} where T<:AbstractFloat
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.).
Input/Output (I/O)
FastIsostasy.load_dataset — Function
load_dataset(
name::String;
kwargs...
) -> Union{Nothing, Tuple{Any, 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
A struct that contains all the necessary information to store the output in a NetCDF file.
Can be initilized as:
FastIsostasy.NativeOutput — Type
Return a mutable struct containing 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))