API documentation for the microbial_groups module#

The models.soil.microbial_groups module contains the classes needed to define the different microbial functional groups used in the soil model.

Classes:

CarbonSupply(nitrogen_fixers, ...)

Rate of carbon supply to each of the plant symbiotic microbial groups.

MicrobialGroupConstants(name, ...)

Container for the set of constants associated with a microbial functional group.

Functions:

calculate_new_biomass_average_nutrient_ratios(...)

Calculate average carbon nutrient ratios of the newly synthesised biomass.

calculate_symbiotic_carbon_supply(...)

Calculate supply of carbon from plants to each microbial symbiotic partner.

make_full_set_of_microbial_groups(config, ...)

Make the full set of functional groups used in the soil model.

class virtual_ecosystem.models.soil.microbial_groups.CarbonSupply(nitrogen_fixers: ndarray[tuple[Any, ...], dtype[floating]], ectomycorrhiza: ndarray[tuple[Any, ...], dtype[floating]], arbuscular_mycorrhiza: ndarray[tuple[Any, ...], dtype[floating]])[source]#

Rate of carbon supply to each of the plant symbiotic microbial groups.

Attributes:

arbuscular_mycorrhiza

Carbon supply to arbuscular mycorrhizal fungi [kg{C} m^-3 day^-1].

ectomycorrhiza

Carbon supply to ectomycorrhizal fungi [kg{C} m^-3 day^-1].

nitrogen_fixers

Carbon supply to the nitrogen fixing bacteria [kg{C} m^-3 day^-1].

arbuscular_mycorrhiza: ndarray[tuple[Any, ...], dtype[floating]]#

Carbon supply to arbuscular mycorrhizal fungi [kg{C} m^-3 day^-1].

ectomycorrhiza: ndarray[tuple[Any, ...], dtype[floating]]#

Carbon supply to ectomycorrhizal fungi [kg{C} m^-3 day^-1].

nitrogen_fixers: ndarray[tuple[Any, ...], dtype[floating]]#

Carbon supply to the nitrogen fixing bacteria [kg{C} m^-3 day^-1].

class virtual_ecosystem.models.soil.microbial_groups.MicrobialGroupConstants(name: str, taxonomic_group: str, max_uptake_rate_labile_C: float, activation_energy_uptake_rate: float, half_sat_labile_C_uptake: float, activation_energy_uptake_saturation: float, max_uptake_rate_ammonium: float, half_sat_ammonium_uptake: float, max_uptake_rate_nitrate: float, half_sat_nitrate_uptake: float, max_uptake_rate_labile_p: float, half_sat_labile_p_uptake: float, turnover_rate: float, activation_energy_turnover: float, reference_temperature: float, c_n_ratio: float, c_p_ratio: float, enzyme_production: dict[str, float], reproductive_allocation: float, symbiote_nitrogen_uptake_fraction: float, symbiote_phosphorus_uptake_fraction: float, synthesis_nutrient_ratios: dict[str, float])[source]#

Container for the set of constants associated with a microbial functional group.

This sets out the constants which must be defined for each microbial functional group.

Attributes:

activation_energy_turnover

Activation energy for microbial maintenance turnover rate [J Kelvin^-1].

activation_energy_uptake_rate

Activation energy for nutrient uptake [J Kelvin^-1].

activation_energy_uptake_saturation

Activation energy for nutrient uptake saturation constants [J Kelvin^-1].

c_n_ratio

Ratio of carbon to nitrogen in biomass [unitless].

c_p_ratio

Ratio of carbon to phosphorus in biomass [unitless].

enzyme_production

Details of the enzymes produced by the microbial group.

half_sat_ammonium_uptake

Half saturation constant for uptake of ammonium [kg{N} m^-3].

half_sat_labile_C_uptake

Half saturation constant for uptake of labile carbon (LMWC) [kg{C} m^-3].

half_sat_labile_p_uptake

Half saturation constant for uptake of labile inorganic phosphorus [kg{P} m^-3].

half_sat_nitrate_uptake

Half saturation constant for uptake of nitrate [kg{N} m^-3].

max_uptake_rate_ammonium

Maximum possible rate for ammonium uptake [day^-1].

max_uptake_rate_labile_C

Maximum rate at the reference temperature of labile carbon uptake [day^-1].

max_uptake_rate_labile_p

Maximum possible rate for labile inorganic phosphorus uptake [day^-1].

max_uptake_rate_nitrate

Maximum possible rate for nitrate uptake [day^-1].

name

The name of the microbial group functional type.

reference_temperature

The reference temperature that turnover and uptake rates were measured at [Celsius].

reproductive_allocation

Reproductive allocation as fraction of (gross) cellular biomass growth [unitless]

symbiote_nitrogen_uptake_fraction

Fraction of nitrogen uptake that is supplied to symbiotic (plant) partners.

symbiote_phosphorus_uptake_fraction

Fraction of phosphorus uptake that is supplied to symbiotic (plant) partners.

synthesis_nutrient_ratios

Average carbon to nutrient ratios for the total synthesised biomass [unitless].

taxonomic_group

The high level taxonomic group that the microbial group belongs to.

turnover_rate

Microbial maintenance turnover rate at reference temperature [day^-1].

Methods:

build_microbial_group(group_config, ...)

Class method to build the microbial group including enzyme information.

find_enzyme_substrates()

Substrates that the microbial group produces enzymes for.

activation_energy_turnover: float#

Activation energy for microbial maintenance turnover rate [J Kelvin^-1].

activation_energy_uptake_rate: float#

Activation energy for nutrient uptake [J Kelvin^-1].

activation_energy_uptake_saturation: float#

Activation energy for nutrient uptake saturation constants [J Kelvin^-1].

classmethod build_microbial_group(group_config: SoilMicrobialGroup, enzyme_classes: dict[str, SoilEnzymeClass], core_constants: CoreConstants)[source]#

Class method to build the microbial group including enzyme information.

Parameters:
  • group_config – A SoilMicrobialGroup instance.

  • enzyme_classes – Details of the enzyme classes used by the soil model.

  • core_constants – Set of constants shared across the Virtual Ecosystem models.

c_n_ratio: float#

Ratio of carbon to nitrogen in biomass [unitless].

c_p_ratio: float#

Ratio of carbon to phosphorus in biomass [unitless].

enzyme_production: dict[str, float]#

Details of the enzymes produced by the microbial group.

The keys are the substrates for which enzymes are produced, and the values are the allocation to enzyme production. This allocation is expressed as a fraction of the (gross) cellular biomass growth [unitless].

find_enzyme_substrates() list[str][source]#

Substrates that the microbial group produces enzymes for.

half_sat_ammonium_uptake: float#

Half saturation constant for uptake of ammonium [kg{N} m^-3].

half_sat_labile_C_uptake: float#

Half saturation constant for uptake of labile carbon (LMWC) [kg{C} m^-3].

half_sat_labile_p_uptake: float#

Half saturation constant for uptake of labile inorganic phosphorus [kg{P} m^-3].

half_sat_nitrate_uptake: float#

Half saturation constant for uptake of nitrate [kg{N} m^-3].

max_uptake_rate_ammonium: float#

Maximum possible rate for ammonium uptake [day^-1].

max_uptake_rate_labile_C: float#

Maximum rate at the reference temperature of labile carbon uptake [day^-1].

max_uptake_rate_labile_p: float#

Maximum possible rate for labile inorganic phosphorus uptake [day^-1].

max_uptake_rate_nitrate: float#

Maximum possible rate for nitrate uptake [day^-1].

name: str#

The name of the microbial group functional type.

reference_temperature: float#

The reference temperature that turnover and uptake rates were measured at [Celsius].

reproductive_allocation: float#

Reproductive allocation as fraction of (gross) cellular biomass growth [unitless]

Only fungi generate separate reproductive bodies, so this value must be set to zero for bacterial functional groups. Providing a non-zero value for a bacterial functional group will prevent the soil model from configuring.

symbiote_nitrogen_uptake_fraction: float#

Fraction of nitrogen uptake that is supplied to symbiotic (plant) partners. [unitless].

This should only have a non-zero value for mycorrhizal fungi.

symbiote_phosphorus_uptake_fraction: float#

Fraction of phosphorus uptake that is supplied to symbiotic (plant) partners. [unitless].

This should only have a non-zero value for mycorrhizal fungi.

synthesis_nutrient_ratios: dict[str, float]#

Average carbon to nutrient ratios for the total synthesised biomass [unitless].

Microbes have to synthesis both cellular biomass and extracellular enzymes. We assume that this occurs in fixed unvarying proportion. This attribute stores the carbon nutrient (nitrogen, phosphorus) ratios for the total synthesised biomass.

taxonomic_group: str#

The high level taxonomic group that the microbial group belongs to.

turnover_rate: float#

Microbial maintenance turnover rate at reference temperature [day^-1].

virtual_ecosystem.models.soil.microbial_groups.calculate_new_biomass_average_nutrient_ratios(taxonomic_group: str, c_n_ratio: float, c_p_ratio: float, enzyme_production: dict[str, float], reproductive_allocation: float, c_n_ratio_fruiting_bodies: float, c_p_ratio_fruiting_bodies: float, enzyme_classes: dict[str, SoilEnzymeClass]) dict[str, float][source]#

Calculate average carbon nutrient ratios of the newly synthesised biomass.

Microbes have to synthesise cellular biomass as well as extracellular enzymes, and fungi also allocate to reproductive fruiting bodies. This method calculates average nutrient ratios of this total biomass synthesis using the relative production allocation to each enzyme class, cellular growth and (for fungi) reproductive allocation. Carbon nutrient ratios have units of carbon per nutrient and so cannot be simply averaged across the different biomass allocations, which are all expressed in carbon terms. Instead, they must first be inversed to convert to nutrient per carbon units, and then the average of these inverses can be found.

Parameters:
  • taxonomic_group – Taxonomic group that the microbe belongs to.

  • c_n_ratio – Ratio of carbon to nitrogen for the microbial group’s cellular biomass.

  • c_p_ratio – Ratio of carbon to nitrogen for the microbial group’s cellular biomass.

  • enzyme_production – Details of the enzymes produced by the microbial group, i.e. which substrates are enzymes produced for, and how much (relative to cellular synthesis)

  • reproductive_allocation – Allocation of new biomass synthesis to reproductive structures (relative to cellular synthesis).

  • c_n_ratio_fruiting_bodies – Carbon to nitrogen ratio of fungal fruiting bodies.

  • c_p_ratio_fruiting_bodies – Carbon to phosphorus ratio of fungal fruiting bodies.

  • enzyme_classes – Details of the enzyme classes used by the soil model.

virtual_ecosystem.models.soil.microbial_groups.calculate_symbiotic_carbon_supply(total_plant_supply: ndarray[tuple[Any, ...], dtype[floating]], nitrogen_fixer_fraction: float, ectomycorrhiza_fraction: float) CarbonSupply[source]#

Calculate supply of carbon from plants to each microbial symbiotic partner.

This function splits the total carbon supply from the plants between the different symbiotic microbial groups based on (configurable) constant fractions.

Parameters:
  • total_plant_supply – Total supply of carbon from the plant to symbiotic microbial partners [kg{C} m^-3 day^-1]

  • nitrogen_fixer_fraction – Fraction of carbon supplied by plants to symbiotes that goes to nitrogen fixers [unitless]

  • ectomycorrhiza_fraction – Fraction of plant carbon supply to mycorrhizal fungi that goes to ectomycorrhiza [unitless]

Returns:

The carbon supply to each symbiotic microbial partner [kg{C} m^-3 day^-1]

virtual_ecosystem.models.soil.microbial_groups.make_full_set_of_microbial_groups(config: SoilConfiguration, enzyme_classes: dict[str, SoilEnzymeClass], core_constants: CoreConstants) dict[str, MicrobialGroupConstants][source]#

Make the full set of functional groups used in the soil model.

Parameters:
  • config – A soil model configuration instance.

  • enzyme_classes – Details of the enzyme classes used by the soil model.

  • core_constants – Set of constants shared across the Virtual Ecosystem models.

Returns:

A dictionary containing each required functional group used in the soil model.