RUFAS.biophysical.field.soil.carbon_cycling.carbon_cycle module#
- class RUFAS.biophysical.field.soil.carbon_cycling.carbon_cycle.CarbonCycling(soil_data: SoilData | None = None)#
Bases:
objectManages the carbon cycling processes within a field, including the decomposition of organic matter, partitioning between different pools and gases, and handling of crop residues.
Parameters#
- soil_dataOptional[SoilData], default None
An instance of SoilData containing initial soil properties and state. If not provided, a default instance with initialized values is used.
Attributes#
- dataSoilData
The data structure containing soil properties, carbon pools, and other relevant information for carbon cycling.
- decompositionDecomposition
Handles the decomposition effect for each layer and temperature effect.
- pool_gas_partitionPoolGasPartition
Manages the partitioning of carbon between different soil pools and the process of transfer to CO2.
- residue_partitionResiduePartition
Processes residues partition, including both plant and soil and also considers the case of tillage for plants.
References#
pseudocode_soil S.6.D.1 to S.6.D.7
Notes#
This class encapsulates the mechanisms for updating all forms of aggregated carbon in the soil, invoking various routines related to carbon flux and storage.
- cycle_carbon(rainfall: float, temp_average: float, field_size: float) None#
Main routine for carbon cycle.
Parameters#
- rainfallfloat
Amount of rainfall on the current day (mm)
- temp_averagefloat
Average temperature on the current day (mm)
- field_sizefloat
Size of the field (ha)
- _soil_carbon_aggregation(field_size: float) None#
This method updates aggregated attributes throughout the module.
Parameters#
- field_size: float
Size of the field (ha)
- static _determine_soil_volume(layer_thickness: float, field_size: float) float#
This method calculates the soil volume.
Parameters#
- layer_thickness: float
thickness of soil layer (mm)
- field_size: float
Size of the field (ha)
Returns#
- float
soil volume (cubic meters)
- static _determine_soil_mass(bulk_density: float, soil_volume: float) float#
This method calculates the mass of soil.
Parameters#
- bulk_density: float
bulk density of the soil layer (Megagrams per cubic meter)
- soil_volume: float
soil volume (cubic meters)
Returns#
- float
mass of soil (Megagrams)
- static _determine_soil_active_carbon_fraction(active_carbon_amount: float, soil_mass: float, field_size: float) float#
This method calculates the fraction of active carbon in the soil.
Parameters#
- active_carbon_amount: float
active carbon stored in the soil (kg/ha)
- soil_mass: float
mass of soil (kg)
- field_size: float
size of the field (ha)
Returns#
- float
fraction of active carbon in the soil (unitless)
References#
pseudoode_soil S.6.D.2
- static _determine_soil_slow_carbon_fraction(slow_carbon_amount: float, soil_mass: float, field_size: float) float#
This method calculates the fraction of slow carbon in the soil.
Parameters#
- slow_carbon_amount: float
slow carbon stored in the soil (kg/ha)
- soil_mass: float
mass of soil (kg)
- field_size: float
size of the field (ha)
Returns#
- float
fraction of slow carbon in the soil (unitless)
References#
pseudoode_soil S.6.D.2
- static _determine_soil_passive_carbon_fraction(passive_carbon_amount: float, soil_mass: float, field_size: float) float#
This method calculates the fraction of passive carbon in the soil.
Parameters#
- passive_carbon_amount: float
passive carbon stored in the soil (kg/ha)
- soil_mass: float
mass of soil (kg)
- field_size: float
size of the field (ha)
Returns#
- float
fraction of passive carbon in the soil (unitless)
References#
pseudoode_soil S.6.D.2
- static _determine_soil_overall_carbon_fraction(soil_active_carbon_fraction: float, soil_slow_carbon_fraction: float, soil_passive_carbon_fraction: float) float#
This method calculates the total fraction of carbon in the soil.
Parameters#
- soil_active_carbon_fraction: float
fraction of active carbon in the soil (unitless)
- soil_slow_carbon_fraction: float
fraction of slow carbon in the soil (unitless)
- soil_passive_carbon_fraction: float
fraction of passive carbon in the soil (unitless)
Returns#
- float
the total fraction of carbon in the soil by mass(unitless)
References#
pseudoode_soil S.6.D.3
- static _determine_total_soil_carbon_amount(active_carbon_amount: float, slow_carbon_amount: float, passive_carbon_amount: float) float#
This method calculates the total amount of soil carbon.
Parameters#
- active_carbon_amount: float
active carbon stored in the soil (kg/ha)
- slow_carbon_amount: float
slow carbon stored in the soil (kg/ha)
- passive_carbon_amount: float
passive carbon stored in the soil (kg/ha)
Returns#
- float
the total amount of soil carbon (kg/ha)
References#
pseudoode_soil S.6.D.4
- static _determine_total_plant_carbon_CO2_loss(plant_metabolic_active_carbon_loss: float, plant_structural_active_carbon_loss: float, plant_structural_slow_carbon_loss: float) float#
This method calculates the total amount plant carbon lost as CO2.
Parameters#
- plant_metabolic_active_carbon_loss: float
plant metabolic carbon being lost as carbon dioxide during decomposition into active carbon (kg/ha)
- plant_structural_active_carbon_loss: float
plant structural carbon being lost as carbon dioxide during decomposition into active carbon (kg/ha)
- plant_structural_slow_carbon_loss: float
plant structural carbon being lost as carbon dioxide during decomposition into slow carbon (kg/ha)
Returns#
- float
total amount plant carbon lost as CO2 (kg/ha)
References#
pseudoode_soil S.6.D.5
- static _determine_total_soil_carbon_CO2_loss(soil_metabolic_active_carbon_loss: float, soil_structural_active_carbon_loss: float, soil_structural_slow_carbon_loss: float) float#
This method calculates the total amount soil carbon lost as CO2.
Parameters#
- soil_metabolic_active_carbon_loss: float
soil metabolic carbon being lost as carbon dioxide during decomposition into active carbon (kg/ha)
- soil_structural_active_carbon_loss: float
soil structural carbon being lost as carbon dioxide during decomposition into active carbon (kg/ha)
- soil_structural_slow_carbon_loss: float
soil structural carbon being lost as carbon dioxide during decomposition into slow carbon (kg/ha)
Returns#
- float
total amount soil carbon lost as CO2 (kg/ha)
References#
pseudoode_soil S.6.D.5
- static _determine_total_decomposition_carbon_CO2_lost(active_carbon_to_slow_loss: float, slow_carbon_co2_lost_amount: float, passive_carbon_co2_lost_amount: float) float#
This method calculates the total amount of carbon lost as CO2 during decomposition.
Parameters#
- active_carbon_to_slow_loss: float
active carbon lost as CO2 during decomposition into slow carbon (kg/ha)
- slow_carbon_co2_lost_amount: float
slow carbon lost as CO2 during decomposition (kg/ha)
- passive_carbon_co2_lost_amount: float
passive carbon lost as CO2 during decomposition (kg/ha)
Returns#
- float
amount of total carbon lost as CO2 during decomposition(kg/ha)
References#
pseudoode_soil S.6.D.6
- static _determine_total_carbon_CO2_lost(total_plant_carbon_CO2_loss: float, total_soil_carbon_CO2_loss: float, total_decomposition_carbon_CO2_lost: float) float#
This method calculates the total amount of carbon lost as CO2.
Parameters#
- total_plant_carbon_CO2_loss: float
total amount plant carbon lost as CO2 (kg/ha)
- total_soil_carbon_CO2_loss: float
total amount soil carbon lost as CO2 (kg/ha)
- total_decomposition_carbon_CO2_lost: float
amount of total carbon lost as CO2 during decomposition(kg/ha)
Returns#
- float
total amount of carbon lost as CO2 (kg/ha)
References#
pseudocode_soil S.6.D.7