Skip to content

rothc_py.containers

rothc_py.containers

Data containers for the RothC soil carbon model.

This module contains the core data structures used by the RothC model, including input data types and the carbon state representation.

CarbonState dataclass

CarbonState(dpm: float, rpm: float, bio: float, hum: float, iom: float, soc: float, dpm_rc_age: float, rpm_rc_age: float, bio_rc_age: float, hum_rc_age: float, iom_age: float, total_rc_age: float, swc: float)

Soil carbon pool state for the RothC model.

Represents the state of all carbon pools and their radiocarbon ages at a given timestep.

Attributes:

  • dpm (float) –

    Decomposable Plant Material (t C/ha).

  • rpm (float) –

    Resistant Plant Material (t C/ha).

  • bio (float) –

    Microbial Biomass (t C/ha).

  • hum (float) –

    Humified Organic Matter (t C/ha).

  • iom (float) –

    Inert Organic Matter (t C/ha).

  • soc (float) –

    Total Soil Organic Carbon (t C/ha).

  • dpm_rc_age (float) –

    Radiocarbon age of DPM pool (years).

  • rpm_rc_age (float) –

    Radiocarbon age of RPM pool (years).

  • bio_rc_age (float) –

    Radiocarbon age of BIO pool (years).

  • hum_rc_age (float) –

    Radiocarbon age of HUM pool (years).

  • iom_age (float) –

    Radiocarbon age of IOM pool (years).

  • total_rc_age (float) –

    Radiocarbon age of total SOC (years).

  • swc (float) –

    Soil water content/deficit (mm).

zero classmethod

zero() -> Self

Create a CarbonState with all pools initialized to zero.

The IOM age is set to the default value (50000 years).

InputData

Bases: TypedDict

Input data dictionary for the RothC model.

All values are lists of monthly data, one entry per month. The lists should all have the same length.

Attributes:

  • t_tmp (list[float]) –

    Monthly mean air temperature (°C).

  • t_rain (list[float]) –

    Monthly rainfall (mm).

  • t_evap (list[float]) –

    Monthly open pan evaporation (mm).

  • t_PC (list[int]) –

    Plant cover (0 = bare, 1 = covered).

  • t_DPM_RPM (list[float]) –

    Ratio of DPM to RPM in plant inputs.

  • t_C_Inp (list[float]) –

    Monthly plant carbon input (t C/ha).

  • t_FYM_Inp (list[float]) –

    Monthly farmyard manure input (t C/ha).

  • t_mod (list[float]) –

    Radiocarbon content as percentage modern carbon (%).

  • t_year (NotRequired[list[int]]) –

    Calendar year for each month.

  • t_month (NotRequired[list[int]]) –

    Month number (1-12) for each month.