Skip to main content

Crate rscm_components

Crate rscm_components 

Source
Expand description

Shared climate model components for RSCM

This crate provides a collection of reusable climate model components that implement the Component trait from rscm-core. These components can be combined using the Model orchestrator to build reduced-complexity climate models.

§Available Components

§Carbon Cycle

  • CarbonCycle - A one-box carbon cycle model that tracks atmospheric CO2 concentrations and land uptake based on emissions and temperature

§Radiative Forcing

  • CO2ERF - Calculates effective radiative forcing from CO2 concentrations using the standard logarithmic relationship

§Ocean Heat Uptake

  • FourBoxOceanHeatUptake - Distributes scalar ERF to regional ocean heat uptake using a four-box grid structure (Northern/Southern Ocean/Land)

§Ocean Carbon Cycle

§Usage

Components are designed to be composed into a Model using the ModelBuilder. Each component declares its input and output requirements, and the model orchestrator automatically resolves dependencies and executes components in the correct order.

ⓘ
use rscm_core::model::ModelBuilder;
use rscm_components::{CarbonCycle, CarbonCycleParameters, CO2ERF, CO2ERFParameters};

let carbon_cycle = CarbonCycle::from_parameters(CarbonCycleParameters {
    tau: 30.0,
    conc_pi: 278.0,
    alpha_temperature: 0.0,
});

let co2_erf = CO2ERF::from_parameters(CO2ERFParameters {
    erf_2xco2: 3.7,
    conc_pi: 278.0,
});

let model = ModelBuilder::new()
    .with_component(Box::new(carbon_cycle))
    .with_component(Box::new(co2_erf))
    .build();

§Constants

The constants module provides physical constants used across components, such as the conversion factor between GtC and ppm of atmospheric CO2.

Modules§

constants
Physical constants for climate model components
four_box_ocean_heat_uptake
Four-box ocean heat uptake component
ocean_carbon_cycle
Ocean carbon cycle components
python

Structs§

CO2ERF
CO2 effective radiative forcing (ERF) calculations
CO2ERFParameters
Parameters for the CO2 ERF component
CarbonCycle
One-box carbon cycle component
CarbonCycleParameters
Parameters for the one-box carbon cycle component
FourBoxOceanHeatUptake
Four-box ocean heat uptake component
FourBoxOceanHeatUptakeParameters
Parameters for the four-box ocean heat uptake component
SolverOptions
Solver options for the ODE integration