API documentation for the losses module#
The models.litter.losses module handles the calculation of the total loss of each
nutrient (carbon, nitrogen and phosphorus) from each litter pool, as well as the total
mineralisation rate to soil of each nutrient.
Classes:
|
The full set losses for the litter pools, as well as the mineralisation rates. |
Functions:
|
Calculate the total loss of carbon from a specific litter pool. |
Calculate the total lignin loss from a specific litter pool. |
|
|
Calculate the loss of carbon, nitrogen and phosphorus from each litter pool. |
Calculate the total nutrient loss from a specific litter pool. |
- class virtual_ecosystem.models.litter.losses.LitterLosses(above_metabolic_carbon: ndarray[tuple[Any, ...], dtype[floating]], above_structural_carbon: ndarray[tuple[Any, ...], dtype[floating]], woody_carbon: ndarray[tuple[Any, ...], dtype[floating]], below_metabolic_carbon: ndarray[tuple[Any, ...], dtype[floating]], below_structural_carbon: ndarray[tuple[Any, ...], dtype[floating]], above_metabolic_nitrogen: ndarray[tuple[Any, ...], dtype[floating]], above_structural_nitrogen: ndarray[tuple[Any, ...], dtype[floating]], woody_nitrogen: ndarray[tuple[Any, ...], dtype[floating]], below_metabolic_nitrogen: ndarray[tuple[Any, ...], dtype[floating]], below_structural_nitrogen: ndarray[tuple[Any, ...], dtype[floating]], above_metabolic_phosphorus: ndarray[tuple[Any, ...], dtype[floating]], above_structural_phosphorus: ndarray[tuple[Any, ...], dtype[floating]], woody_phosphorus: ndarray[tuple[Any, ...], dtype[floating]], below_metabolic_phosphorus: ndarray[tuple[Any, ...], dtype[floating]], below_structural_phosphorus: ndarray[tuple[Any, ...], dtype[floating]], above_structural_lignin: ndarray[tuple[Any, ...], dtype[floating]], woody_lignin: ndarray[tuple[Any, ...], dtype[floating]], below_structural_lignin: ndarray[tuple[Any, ...], dtype[floating]], N_mineralisation_rate: ndarray[tuple[Any, ...], dtype[floating]], P_mineralisation_rate: ndarray[tuple[Any, ...], dtype[floating]])[source]#
The full set losses for the litter pools, as well as the mineralisation rates.
Attributes:
Total nitrogen mineralisation rate from all litter pools [kg{N} m^-3 day^-1]
Total phosphorus mineralisation rate from all litter pools [kg{P} m^-3 day^-1]
Carbon loss from the aboveground metabolic pool [kg{C} m^-2]
Nitrogen loss from the aboveground metabolic pool [kg{N} m^-2]
Phosphorus loss from the aboveground metabolic pool [kg{P} m^-2]
Carbon loss from the aboveground structural pool [kg{C} m^-2]
Lignin loss from the aboveground structural pool [kg{lignin C} m^-2]
Nitrogen loss from the aboveground structural pool [kg{N} m^-2]
Phosphorus loss from the aboveground structural pool [kg{P} m^-2]
Carbon loss from the belowground metabolic pool [kg{C} m^-2]
Nitrogen loss from the belowground metabolic pool [kg{N} m^-2]
Phosphorus loss from the belowground metabolic pool [kg{P} m^-2]
Carbon loss from the belowground structural pool [kg{C} m^-2]
Lignin loss from the belowground structural pool [kg{lignin C} m^-2]
Nitrogen loss from the belowground structural pool [kg{N} m^-2]
Phosphorus loss from the belowground structural pool [kg{P} m^-2]
Carbon loss from the woody pool [kg{C} m^-2]
Lignin loss from the woody pool [kg{lignin C} m^-2]
Nitrogen loss from the woody pool [kg{N} m^-2]
Phosphorus loss from the woody pool [kg{P} m^-2]
- N_mineralisation_rate: ndarray[tuple[Any, ...], dtype[floating]]#
Total nitrogen mineralisation rate from all litter pools [kg{N} m^-3 day^-1]
- P_mineralisation_rate: ndarray[tuple[Any, ...], dtype[floating]]#
Total phosphorus mineralisation rate from all litter pools [kg{P} m^-3 day^-1]
- above_metabolic_carbon: ndarray[tuple[Any, ...], dtype[floating]]#
Carbon loss from the aboveground metabolic pool [kg{C} m^-2]
- above_metabolic_nitrogen: ndarray[tuple[Any, ...], dtype[floating]]#
Nitrogen loss from the aboveground metabolic pool [kg{N} m^-2]
- above_metabolic_phosphorus: ndarray[tuple[Any, ...], dtype[floating]]#
Phosphorus loss from the aboveground metabolic pool [kg{P} m^-2]
- above_structural_carbon: ndarray[tuple[Any, ...], dtype[floating]]#
Carbon loss from the aboveground structural pool [kg{C} m^-2]
- above_structural_lignin: ndarray[tuple[Any, ...], dtype[floating]]#
Lignin loss from the aboveground structural pool [kg{lignin C} m^-2]
- above_structural_nitrogen: ndarray[tuple[Any, ...], dtype[floating]]#
Nitrogen loss from the aboveground structural pool [kg{N} m^-2]
- above_structural_phosphorus: ndarray[tuple[Any, ...], dtype[floating]]#
Phosphorus loss from the aboveground structural pool [kg{P} m^-2]
- below_metabolic_carbon: ndarray[tuple[Any, ...], dtype[floating]]#
Carbon loss from the belowground metabolic pool [kg{C} m^-2]
- below_metabolic_nitrogen: ndarray[tuple[Any, ...], dtype[floating]]#
Nitrogen loss from the belowground metabolic pool [kg{N} m^-2]
- below_metabolic_phosphorus: ndarray[tuple[Any, ...], dtype[floating]]#
Phosphorus loss from the belowground metabolic pool [kg{P} m^-2]
- below_structural_carbon: ndarray[tuple[Any, ...], dtype[floating]]#
Carbon loss from the belowground structural pool [kg{C} m^-2]
- below_structural_lignin: ndarray[tuple[Any, ...], dtype[floating]]#
Lignin loss from the belowground structural pool [kg{lignin C} m^-2]
- below_structural_nitrogen: ndarray[tuple[Any, ...], dtype[floating]]#
Nitrogen loss from the belowground structural pool [kg{N} m^-2]
- below_structural_phosphorus: ndarray[tuple[Any, ...], dtype[floating]]#
Phosphorus loss from the belowground structural pool [kg{P} m^-2]
- woody_carbon: ndarray[tuple[Any, ...], dtype[floating]]#
Carbon loss from the woody pool [kg{C} m^-2]
- woody_lignin: ndarray[tuple[Any, ...], dtype[floating]]#
Lignin loss from the woody pool [kg{lignin C} m^-2]
- virtual_ecosystem.models.litter.losses.calculate_carbon_pool_loss(old_pool_size: ndarray[tuple[Any, ...], dtype[floating]], final_pool_size: ndarray[tuple[Any, ...], dtype[floating]], input_rate: ndarray[tuple[Any, ...], dtype[floating]], update_interval: float) ndarray[tuple[Any, ...], dtype[floating]][source]#
Calculate the total loss of carbon from a specific litter pool.
New carbon is added over the update interval so this has to be accounted for in the calculation of the loss.
- Parameters:
old_pool_size – The size of the litter pool before the update [kg{C} m^-2].
final_pool_size – The size of the litter pool after the update [kg{C} m^-2].
input_rate – The rate of carbon input to the litter pool [kg{C} m^-2 day^-1].
update_interval – The time period over which the litter pools are updated [days].
- Returns:
The total loss of carbon from the pool due to decay [kg{C} m^-2]
- virtual_ecosystem.models.litter.losses.calculate_lignin_pool_loss(initial_pool_size: ndarray[tuple[Any, ...], dtype[floating]], carbon_loss: ndarray[tuple[Any, ...], dtype[floating]], input_rate: ndarray[tuple[Any, ...], dtype[floating]], initial_lignin_proportion: ndarray[tuple[Any, ...], dtype[floating]], input_lignin_proportion: ndarray[tuple[Any, ...], dtype[floating]], update_interval: float) ndarray[tuple[Any, ...], dtype[floating]][source]#
Calculate the total lignin loss from a specific litter pool.
The change in the litter pool carbon content is found using an analytic solution, but we don’t have a comparable solution for the litter chemistries. Instead we make the assumption that older material will preferentially break down, so the initial pool lignin proportion can be used to calculate the approximate rate of lignin loss. However, applying this assumption in the case where the total loss of carbon is larger than the initial pool size would lead to spontaneous loss or creation of lignin. In this case, we assume that the entire initial pool has decayed and the additional carbon loss comes from the input. The lignin losses are then calculated based on this assumed split.
- Parameters:
initial_pool_size – The size of the litter pool before the update [kg{C} m^-2].
carbon_loss – The total loss of carbon from the pool over the decay period [kg{C} m^-2].
input_rate – The rate of carbon input to the litter pool [kg{C} m^-2 day^-1].
initial_lignin_proportion – The lignin proportion of the litter pool before the update [kg{lignin C} kg{C}^-1]
input_lignin_proportion – The lignin proportion of the input to the litter pool [kg{lignin C} kg{C}^-1]
update_interval – The time period over which the litter pools are updated [days].
- Returns:
The total loss of lignin from the pool due to decay [kg{lignin C} m^-2]
- virtual_ecosystem.models.litter.losses.calculate_litter_losses(data: Data, original_pools: dict[str, DataArray], final_pools: dict[str, ndarray[tuple[Any, ...], dtype[floating]]], litter_inputs: LitterInputs, input_chemistries: InputChemistries, update_interval: float, active_microbe_depth: float) LitterLosses[source]#
Calculate the loss of carbon, nitrogen and phosphorus from each litter pool.
Total mineralisation rates to soil for nitrogen and phosphorus are also calculated.
- Parameters:
data – A
Datainstance.original_pools – Pool sizes before any litter input and decay [kg{C} m^-2].
final_pools – Pool sizes after litter input and decay [kg{C} m^-2].
litter_inputs – The inputs to each litter pool [kg{C} m^-2 day^-1].
input_chemistries – The chemical compositions of the inputs to each litter pool.
update_interval – The time period over which the litter pools are updated [days].
active_microbe_depth – The depth at which microbial activity is assumed to cease [m].
- Returns:
A dataclass containing the total losses of each nutrient from each litter pool, as well as the total mineralisation rates to the soil for each nutrient.
- virtual_ecosystem.models.litter.losses.calculate_nutrient_pool_loss(initial_pool_carbon: ndarray[tuple[Any, ...], dtype[floating]], initial_pool_nutrient: ndarray[tuple[Any, ...], dtype[floating]], carbon_loss: ndarray[tuple[Any, ...], dtype[floating]], input_rate_carbon: ndarray[tuple[Any, ...], dtype[floating]], input_rate_nutrient: ndarray[tuple[Any, ...], dtype[floating]], update_interval: float) ndarray[tuple[Any, ...], dtype[floating]][source]#
Calculate the total nutrient loss from a specific litter pool.
The change in the litter pool carbon content is found using an analytic solution, but we don’t have a comparable solution for the litter chemistries. Instead we make the assumption that older material will preferentially break down, so the initial pool stoichiometry can be used to calculate the approximate rate of nutrient loss. However, applying this assumption in the case where the total loss of carbon is larger than the initial pool size would break stoichiometric balance. In this case, we assume that the entire initial pool has decayed and the additional carbon loss comes from the input. The nutrient losses are then calculated based on this assumed split.
- Parameters:
initial_pool_carbon – Amount of carbon in the litter pool before the update [kg{C} m^-2]
initial_pool_nutrient – Amount of nutrient in the litter pool before the update [kg{nutrient} m^-2]
carbon_loss – The total loss of carbon from the pool over the decay period [kg{C} m^-2]
input_rate_carbon – The rate of carbon input to the litter pool [kg{C} m^-2 day^-1]
input_rate_nutrient – The rate of nutrient input to the litter pool [kg{nutrient} m^-2 day^-1]
update_interval – The time period over which the litter pools are updated [days].
- Returns:
The total loss of nutrient from the pool due to decay [kg{nutrient} m^-2]