tpt-sci-climate
Reduced-order climate modelling for the tpt-science pillar, built from
scratch (EnergyBalanceModel/ChemistryBox use a hand-rolled explicit-Euler
stepper, not tpt-sci-ode/tpt-math-linalg).
Features
EnergyBalanceModel— 0-D global energy balance with CO₂ forcingΔF = 5.35·ln(C/C0)(W/m²). Integrate withstep(dt)(explicit Euler) or jump straight to the steady state withequilibrium_temperature()(Newton fixpoint).grey_radiative_transfer— single-layer grey-atmosphere surface temperatureTs = (S·(1−α)/(4·σ·(1−ε/2)))^(1/4). ReturnsResult<f64, ClimateError>.radiative_transfer— multi-band longwave schemes replacing the single grey band: [MultiBandRadiativeTransfer] (a stack of grey slabs, band OLRF_b = w_b·(τ_b·σ·Ts⁴ + ε_b·σ·Ta⁴)) and ak-distribution [CorrelatedKRt].ChemistryBox— constant-production / first-order-loss tracer (dC/dt = P − k·C) withsteady_state()(C* = P/k).Tracer3D— the 3-D advection–diffusion–reaction analogue ofChemistryBoxon atpt-sci-grid::UniformGrid3D(upwind advection + sparse Laplacian + a per-cellP − k·csource/sink).AtmosphereGcm— a genuine primitive-equation atmospheric GCM dynamical core (hydrostatic, with an optional non-hydrostatic pressure correction), coupled to theEnergyBalanceModelviacouple_to_ebm.- Constants:
SIGMA(Stefan–Boltzmann),CO2_PREINDUSTRIAL(280 ppm).
Example
use EnergyBalanceModel;
// Heat capacity, albedo, emissivity, CO2 (ppm).
let mut ebm = new.unwrap;
let t0 = ebm.equilibrium_temperature;
ebm.co2 = 560.0; // doubled
let t2 = ebm.equilibrium_temperature;
println!;
// Time-march toward the new equilibrium.
for _ in 0..100
assert!;
The warming example (cargo run --example warming -p tpt-sci-climate) runs the
full CO₂-doubling relaxation.
Scope (v1)
0-D EBM, multi-band/correlated-k longwave radiative transfer, single- and 3-D tracer atmospheric chemistry, and a hydrostatic (optionally non-hydrostatic) primitive-equation GCM dynamical core coupled to the EBM.
Clouds, moist convection, and spectral-dynamics (spherical-harmonic) GCM cores remain out of scope — the GCM here is a reduced-order Cartesian primitive-equation core, not a fully-coupled global climate model.
License
Licensed under either of MIT or Apache-2.0 at your option.