API documentation for the pools module#

The models.soil.pools module simulates all soil pools for the Virtual Ecosystem. At the moment five carbon pools are modelled (low molecular weight carbon (LMWC), mineral associated organic matter (MAOM), microbial biomass, particulate organic matter (POM), microbial necromass), as well as two enzyme pools (POM and MAOM) degrading enzymes. Pools that track the nitrogen and phosphorus pools associated with each of the carbon pools are also included, as well as inorganic nitrogen and phosphorus pools.

Classes:

BiomassLosses(bacteria, saprotrophic_fungi, ...)

Losses of biomass from each microbial functional group due to turnover.

EnzymeMediatedRates(pom_to_lmwc, maom_to_lmwc)

Rates of each enzyme mediated transfer between pools.

EnzymePoolChanges(net_change_pom_bacteria, ...)

Changes to the different enzyme pools due to production and denaturation.

LitterMineralisationFluxes(lmwc, pom, don, ...)

Fluxes into each soil pool due to mineralisation from litter model.

MicrobialChanges(lmwc_uptake, don_uptake, ...)

Changes due to microbial uptake, biomass production and losses.

PoolData(soil_cnp_pool_maom_carbon, ...)

Data class collecting the full set of soil pools updated by the soil model.

SoilPools(data, pools, model_constants, ...)

This class collects all the various soil pools so that they can be updated.

WaterRemovalRates(lmwc, don, dop, ammonium, ...)

Rate at which each soluble nutrient pool is removed due to soil water flows.

Functions:

calculate_biomass_losses(pools, ...)

Calculate the rate of biomass loss for each microbial group.

calculate_enzyme_changes(pools, ...)

Calculate the change in each of the soil enzyme pools.

calculate_enzyme_mediated_decomposition(...)

Calculate rate of a enzyme mediated decomposition process.

calculate_enzyme_mediated_rates(pools, ...)

Calculate the rates of each enzyme mediated reaction.

calculate_enzyme_production(...)

Calculate the total production of each enzyme class.

calculate_enzyme_turnover(enzyme_pool, ...)

Calculate the turnover rate of a specific enzyme class.

calculate_free_living_nitrogen_fixation(...)

Calculate rate of nitrogen fixation by free living microbes.

calculate_fruiting_body_production(...)

Calculate the total production of fungal fruiting bodies by all microbial groups.

calculate_fungal_fruiting_body_decay(...)

Calculate contribution to different soil pools from fungal fruiting body decay.

calculate_litter_mineralisation_fluxes(...)

Calculate the split of the litter mineralisation fluxes between soil pools.

calculate_litter_mineralisation_split(...)

Determine how nutrients from litter mineralisation get split between soil pools.

calculate_maintenance_biomass_synthesis(...)

Calculate biomass synthesis rate required to offset losses for a microbial pool.

calculate_maom_desorption(soil_c_pool_maom, ...)

Calculate the rate of mineral associated organic matter (MAOM) desorption.

calculate_microbial_changes(pools, ...)

Calculate the changes for the microbial biomass and enzyme pools.

calculate_necromass_breakdown(...)

Calculate breakdown rate of necromass into low molecular weight carbon (LMWC).

calculate_net_enzyme_change(...)

Calculate the change in concentration for a specific enzyme pool.

calculate_net_formation_of_secondary_P(...)

Calculate net rate of secondary mineral phosphorus formation.

calculate_net_nutrient_transfers_from_maom_to_lmwc(...)

Calculate the net rate of transfer of nutrients between MAOM and LMWC.

calculate_nutrient_flows_to_necromass(...)

Calculate the rate at which nutrients flow into the necromass pool.

calculate_nutrient_removal_by_water(...)

Calculate the rate a which each soluble nutrient pool is removed by water.

calculate_rate_of_denitrification(soil_temp, ...)

Calculate the rate at which nitrate denitrifies (and leaves the soil).

calculate_rate_of_nitrification(soil_temp, ...)

Calculate the rate at which ammonium nitrifies to form nitrate.

calculate_soil_nutrient_mineralisation(...)

Calculate mineralisation rate from soil organic matter for a specific nutrient.

calculate_sorption_to_maom(soil_c_pool, ...)

Calculate that a carbon pool sorbs to become mineral associated organic matter.

calculate_symbiotic_nitrogen_fixation(...)

Calculate rate of nitrogen fixation by plant symbionts.

find_necromass_nutrient_outflows(...)

Find the amount of each nutrient flowing out of the necromass pool.

class virtual_ecosystem.models.soil.pools.BiomassLosses(bacteria: ndarray[tuple[Any, ...], dtype[floating]], saprotrophic_fungi: ndarray[tuple[Any, ...], dtype[floating]], ectomycorrhiza: ndarray[tuple[Any, ...], dtype[floating]], arbuscular_mycorrhiza: ndarray[tuple[Any, ...], dtype[floating]])[source]#

Losses of biomass from each microbial functional group due to turnover.

Attributes:

arbuscular_mycorrhiza

Rate of loss of arbuscular mycorrhizal fungal biomass [kg{C} m^-3 day^-1].

bacteria

Rate of loss of bacterial biomass [kg{C} m^-3 day^-1].

ectomycorrhiza

Rate of loss of ectomycorrhizal fungal biomass [kg{C} m^-3 day^-1].

saprotrophic_fungi

Rate of loss of saprotrophic fungal biomass [kg{C} m^-3 day^-1].

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

Rate of loss of arbuscular mycorrhizal fungal biomass [kg{C} m^-3 day^-1].

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

Rate of loss of bacterial biomass [kg{C} m^-3 day^-1].

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

Rate of loss of ectomycorrhizal fungal biomass [kg{C} m^-3 day^-1].

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

Rate of loss of saprotrophic fungal biomass [kg{C} m^-3 day^-1].

class virtual_ecosystem.models.soil.pools.EnzymeMediatedRates(pom_to_lmwc: ndarray[tuple[Any, ...], dtype[floating]], maom_to_lmwc: ndarray[tuple[Any, ...], dtype[floating]])[source]#

Rates of each enzyme mediated transfer between pools.

Attributes:

maom_to_lmwc

Rate of mineral associated organic matter decomposition to LMWC.

pom_to_lmwc

Rate of particulate organic matter decomposition to low molecular weight carbon.

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

Rate of mineral associated organic matter decomposition to LMWC.

Units of [kg{C} m^-3 day^-1].

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

Rate of particulate organic matter decomposition to low molecular weight carbon.

Units of [kg{C} m^-3 day^-1].

class virtual_ecosystem.models.soil.pools.EnzymePoolChanges(net_change_pom_bacteria: ndarray[tuple[Any, ...], dtype[floating]], net_change_maom_bacteria: ndarray[tuple[Any, ...], dtype[floating]], net_change_pom_fungi: ndarray[tuple[Any, ...], dtype[floating]], net_change_maom_fungi: ndarray[tuple[Any, ...], dtype[floating]], denaturation_pom_bacteria: ndarray[tuple[Any, ...], dtype[floating]], denaturation_maom_bacteria: ndarray[tuple[Any, ...], dtype[floating]], denaturation_pom_fungi: ndarray[tuple[Any, ...], dtype[floating]], denaturation_maom_fungi: ndarray[tuple[Any, ...], dtype[floating]])[source]#

Changes to the different enzyme pools due to production and denaturation.

Attributes:

denaturation_maom_bacteria

Denaturation rate for the MAOM degrading enzyme produced by bacteria.

denaturation_maom_fungi

Denaturation rate for the MAOM degrading enzyme produced by fungi.

denaturation_pom_bacteria

Denaturation rate for the POM degrading enzyme produced by bacteria.

denaturation_pom_fungi

Denaturation rate for the POM degrading enzyme produced by fungi.

net_change_maom_bacteria

Net change in the bacterially produced enzyme pool that breaks down MAOM.

net_change_maom_fungi

Net change in the fungally produced enzyme pool that breaks down MAOM.

net_change_pom_bacteria

Net change in the bacterially produced enzyme pool that breaks down POM.

net_change_pom_fungi

Net change in the fungally produced enzyme pool that breaks down POM.

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

Denaturation rate for the MAOM degrading enzyme produced by bacteria.

Units of [kg{C} m^-3 day^-1]

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

Denaturation rate for the MAOM degrading enzyme produced by fungi.

Units of [kg{C} m^-3 day^-1]

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

Denaturation rate for the POM degrading enzyme produced by bacteria.

Units of [kg{C} m^-3 day^-1]

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

Denaturation rate for the POM degrading enzyme produced by fungi.

Units of [kg{C} m^-3 day^-1]

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

Net change in the bacterially produced enzyme pool that breaks down MAOM.

Units of [kg{C} m^-3 day^-1]

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

Net change in the fungally produced enzyme pool that breaks down MAOM.

Units of [kg{C} m^-3 day^-1]

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

Net change in the bacterially produced enzyme pool that breaks down POM.

Units of [kg{C} m^-3 day^-1]

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

Net change in the fungally produced enzyme pool that breaks down POM.

Units of [kg{C} m^-3 day^-1]

class virtual_ecosystem.models.soil.pools.LitterMineralisationFluxes(lmwc: ndarray[tuple[Any, ...], dtype[floating]], pom: ndarray[tuple[Any, ...], dtype[floating]], don: ndarray[tuple[Any, ...], dtype[floating]], ammonium: ndarray[tuple[Any, ...], dtype[floating]], particulate_n: ndarray[tuple[Any, ...], dtype[floating]], dop: ndarray[tuple[Any, ...], dtype[floating]], labile_p: ndarray[tuple[Any, ...], dtype[floating]], particulate_p: ndarray[tuple[Any, ...], dtype[floating]])[source]#

Fluxes into each soil pool due to mineralisation from litter model.

Attributes:

ammonium

Mineralisation into the ammonium pool [kg{N} m^-3 day^-1].

don

Mineralisation into the dissolved organic nitrogen pool [kg{N} m^-3 day^-1].

dop

Mineralisation into the dissolved organic phosphorus pool [kg{P} m^-3 day^-1].

labile_p

Mineralisation into the labile inorganic phosphorus pool [kg{P} m^-3 day^-1].

lmwc

Mineralisation into the low molecular weight carbon pool [kg{C} m^-3 day^-1].

particulate_n

Mineralisation into the particulate organic nitrogen pool [kg{N} m^-3 day^-1].

particulate_p

Mineralisation into the particulate organic phosphorus pool.

pom

Mineralisation into the particulate organic matter pool [kg{C} m^-3 day^-1].

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

Mineralisation into the ammonium pool [kg{N} m^-3 day^-1].

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

Mineralisation into the dissolved organic nitrogen pool [kg{N} m^-3 day^-1].

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

Mineralisation into the dissolved organic phosphorus pool [kg{P} m^-3 day^-1].

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

Mineralisation into the labile inorganic phosphorus pool [kg{P} m^-3 day^-1].

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

Mineralisation into the low molecular weight carbon pool [kg{C} m^-3 day^-1].

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

Mineralisation into the particulate organic nitrogen pool [kg{N} m^-3 day^-1].

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

Mineralisation into the particulate organic phosphorus pool.

Units of [kg{P} m^-3 day^-1].

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

Mineralisation into the particulate organic matter pool [kg{C} m^-3 day^-1].

class virtual_ecosystem.models.soil.pools.MicrobialChanges(lmwc_uptake: ndarray[tuple[Any, ...], dtype[floating]], don_uptake: ndarray[tuple[Any, ...], dtype[floating]], ammonium_change: ndarray[tuple[Any, ...], dtype[floating]], nitrate_change: ndarray[tuple[Any, ...], dtype[floating]], dop_uptake: ndarray[tuple[Any, ...], dtype[floating]], labile_p_change: ndarray[tuple[Any, ...], dtype[floating]], bacteria_change: ndarray[tuple[Any, ...], dtype[floating]], saprotrophic_fungi_change: ndarray[tuple[Any, ...], dtype[floating]], arbuscular_mycorrhiza_change: ndarray[tuple[Any, ...], dtype[floating]], ectomycorrhiza_change: ndarray[tuple[Any, ...], dtype[floating]], pom_enzyme_bacteria_change: ndarray[tuple[Any, ...], dtype[floating]], maom_enzyme_bacteria_change: ndarray[tuple[Any, ...], dtype[floating]], pom_enzyme_fungi_change: ndarray[tuple[Any, ...], dtype[floating]], maom_enzyme_fungi_change: ndarray[tuple[Any, ...], dtype[floating]], necromass_generation: ndarray[tuple[Any, ...], dtype[floating]], necromass_n_flow: ndarray[tuple[Any, ...], dtype[floating]], necromass_p_flow: ndarray[tuple[Any, ...], dtype[floating]], fruiting_body_production: ndarray[tuple[Any, ...], dtype[floating]], arbuscular_mycorrhiza_n_supply: ndarray[tuple[Any, ...], dtype[floating]], arbuscular_mycorrhiza_p_supply: ndarray[tuple[Any, ...], dtype[floating]], ectomycorrhiza_n_supply: ndarray[tuple[Any, ...], dtype[floating]], ectomycorrhiza_p_supply: ndarray[tuple[Any, ...], dtype[floating]])[source]#

Changes due to microbial uptake, biomass production and losses.

Attributes:

ammonium_change

Total change in the ammonium pool due to microbial activity [kg{N} m^-3 day^-1].

arbuscular_mycorrhiza_change

Rate of change of arbuscular mycorrhizal fungi biomass pool [kg{C} m^-3 day^-1].

arbuscular_mycorrhiza_n_supply

Supply rate of nitrogen to plants by arbuscular mycorrhiza [kg{N} m^-3 day^-1].

arbuscular_mycorrhiza_p_supply

Supply rate of phosphorus to plants by arbuscular mycorrhiza [kg{P} m^-3 day^-1].

bacteria_change

Rate of change of bacterial biomass pool [kg{C} m^-3 day^-1].

don_uptake

Total rate of microbial uptake of dissolved organic nitrogen.

dop_uptake

Total rate of microbial uptake of dissolved organic phosphorus.

ectomycorrhiza_change

Rate of change of ectomycorrhizal fungi biomass pool [kg{C} m^-3 day^-1].

ectomycorrhiza_n_supply

Supply rate of nitrogen to plants by ectomycorrhiza [kg{N} m^-3 day^-1].

ectomycorrhiza_p_supply

Supply rate of phosphorus to plants by ectomycorrhiza [kg{P} m^-3 day^-1].

fruiting_body_production

Rate at which fungal fruiting bodies are being produced [kg{C} m^-3 day^-1].

labile_p_change

Total change in the labile inorganic phosphorus pool due to microbial activity.

lmwc_uptake

Total rate of microbial uptake of low molecular weight carbon.

maom_enzyme_bacteria_change

Rate of change for the bacterially produced MAOM degrading enzymes.

maom_enzyme_fungi_change

Rate of change for the fungally produced MAOM degrading enzymes.

necromass_generation

Rate at which necromass is being produced [kg{C} m^-3 day^-1].

necromass_n_flow

Nitrogen flow associated with necromass generation [kg{N} m^-3 day^-1].

necromass_p_flow

Phosphorus flow associated with necromass generation [kg{P} m^-3 day^-1].

nitrate_change

Total change in the nitrate pool due to microbial activity [kg{N} m^-3 day^-1].

pom_enzyme_bacteria_change

Rate of change for the bacterially produced POM degrading enzymes.

pom_enzyme_fungi_change

Rate of change for the fungally produced POM degrading enzymes.

saprotrophic_fungi_change

Rate of change of saprotrophic fungal biomass pool [kg{C} m^-3 day^-1].

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

Total change in the ammonium pool due to microbial activity [kg{N} m^-3 day^-1].

This change arises from the balance of immobilisation and mineralisation of ammonium. A positive value indicates a net immobilisation (uptake) of ammonium.

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

Rate of change of arbuscular mycorrhizal fungi biomass pool [kg{C} m^-3 day^-1].

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

Supply rate of nitrogen to plants by arbuscular mycorrhiza [kg{N} m^-3 day^-1].

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

Supply rate of phosphorus to plants by arbuscular mycorrhiza [kg{P} m^-3 day^-1].

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

Rate of change of bacterial biomass pool [kg{C} m^-3 day^-1].

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

Total rate of microbial uptake of dissolved organic nitrogen.

Units of [kg{N} m^-3 day^-1].

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

Total rate of microbial uptake of dissolved organic phosphorus.

Units of [kg{P} m^-3 day^-1].

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

Rate of change of ectomycorrhizal fungi biomass pool [kg{C} m^-3 day^-1].

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

Supply rate of nitrogen to plants by ectomycorrhiza [kg{N} m^-3 day^-1].

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

Supply rate of phosphorus to plants by ectomycorrhiza [kg{P} m^-3 day^-1].

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

Rate at which fungal fruiting bodies are being produced [kg{C} m^-3 day^-1].

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

Total change in the labile inorganic phosphorus pool due to microbial activity.

Units of [kg{P} m^-3 day^-1]. This change arises from the balance of immobilisation and mineralisation of labile P. A positive value indicates a net immobilisation (uptake) of P.

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

Total rate of microbial uptake of low molecular weight carbon.

Units of [kg{C} m^-3 day^-1].

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

Rate of change for the bacterially produced MAOM degrading enzymes.

Units of [kg{C} m^-3 day^-1].

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

Rate of change for the fungally produced MAOM degrading enzymes.

Units of [kg{C} m^-3 day^-1].

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

Rate at which necromass is being produced [kg{C} m^-3 day^-1].

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

Nitrogen flow associated with necromass generation [kg{N} m^-3 day^-1].

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

Phosphorus flow associated with necromass generation [kg{P} m^-3 day^-1].

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

Total change in the nitrate pool due to microbial activity [kg{N} m^-3 day^-1].

This change arises from the balance of immobilisation and mineralisation of nitrate. A positive value indicates a net immobilisation (uptake) of nitrate.

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

Rate of change for the bacterially produced POM degrading enzymes.

Units of [kg{C} m^-3 day^-1].

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

Rate of change for the fungally produced POM degrading enzymes.

Units of [kg{C} m^-3 day^-1].

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

Rate of change of saprotrophic fungal biomass pool [kg{C} m^-3 day^-1].

class virtual_ecosystem.models.soil.pools.PoolData(soil_cnp_pool_maom_carbon: ndarray[tuple[Any, ...], dtype[floating]], soil_cnp_pool_maom_nitrogen: ndarray[tuple[Any, ...], dtype[floating]], soil_cnp_pool_maom_phosphorus: ndarray[tuple[Any, ...], dtype[floating]], soil_cnp_pool_lmwc_carbon: ndarray[tuple[Any, ...], dtype[floating]], soil_cnp_pool_lmwc_nitrogen: ndarray[tuple[Any, ...], dtype[floating]], soil_cnp_pool_lmwc_phosphorus: ndarray[tuple[Any, ...], dtype[floating]], soil_c_pool_bacteria: ndarray[tuple[Any, ...], dtype[floating]], soil_c_pool_saprotrophic_fungi: ndarray[tuple[Any, ...], dtype[floating]], soil_c_pool_arbuscular_mycorrhiza: ndarray[tuple[Any, ...], dtype[floating]], soil_c_pool_ectomycorrhiza: ndarray[tuple[Any, ...], dtype[floating]], soil_cnp_pool_pom_carbon: ndarray[tuple[Any, ...], dtype[floating]], soil_cnp_pool_pom_nitrogen: ndarray[tuple[Any, ...], dtype[floating]], soil_cnp_pool_pom_phosphorus: ndarray[tuple[Any, ...], dtype[floating]], soil_cnp_pool_necromass_carbon: ndarray[tuple[Any, ...], dtype[floating]], soil_cnp_pool_necromass_nitrogen: ndarray[tuple[Any, ...], dtype[floating]], soil_cnp_pool_necromass_phosphorus: ndarray[tuple[Any, ...], dtype[floating]], soil_enzyme_pom_bacteria: ndarray[tuple[Any, ...], dtype[floating]], soil_enzyme_maom_bacteria: ndarray[tuple[Any, ...], dtype[floating]], soil_enzyme_pom_fungi: ndarray[tuple[Any, ...], dtype[floating]], soil_enzyme_maom_fungi: ndarray[tuple[Any, ...], dtype[floating]], soil_n_pool_ammonium: ndarray[tuple[Any, ...], dtype[floating]], soil_n_pool_nitrate: ndarray[tuple[Any, ...], dtype[floating]], soil_p_pool_primary: ndarray[tuple[Any, ...], dtype[floating]], soil_p_pool_secondary: ndarray[tuple[Any, ...], dtype[floating]], soil_p_pool_labile: ndarray[tuple[Any, ...], dtype[floating]], new_fungal_fruiting_body_production: ndarray[tuple[Any, ...], dtype[floating]], new_amf_n_supply: ndarray[tuple[Any, ...], dtype[floating]], new_amf_p_supply: ndarray[tuple[Any, ...], dtype[floating]], new_emf_n_supply: ndarray[tuple[Any, ...], dtype[floating]], new_emf_p_supply: ndarray[tuple[Any, ...], dtype[floating]])[source]#

Data class collecting the full set of soil pools updated by the soil model.

Attributes:

new_amf_n_supply

Nitrogen supplied to plants by arbuscular mycorrhiza over integration time.

new_amf_p_supply

Phosphorus supplied to plants by arbuscular mycorrhiza over integration time.

new_emf_n_supply

Nitrogen supplied to plants by ectomycorrhiza over integration time.

new_emf_p_supply

Phosphorus supplied to plants by ectomycorrhiza over integration time.

new_fungal_fruiting_body_production

Fungal fruiting biomass produced during simulation time step [kg{C} m^-3].

soil_c_pool_arbuscular_mycorrhiza

Arbuscular mycorrhizal fungi biomass pool [kg{C} m^-3].

soil_c_pool_bacteria

Bacterial biomass pool [kg{C} m^-3].

soil_c_pool_ectomycorrhiza

Ectomycorrhizal fungi biomass pool [kg{C} m^-3].

soil_c_pool_saprotrophic_fungi

Saprotrophic fungi biomass pool [kg{C} m^-3].

soil_cnp_pool_lmwc_carbon

Carbon content of the low molecular weight carbon pool [kg{C} m^-3].

soil_cnp_pool_lmwc_nitrogen

Nitrogen content of the LMWC pool [kg{N} m^-3].

soil_cnp_pool_lmwc_phosphorus

Phosphorus content of the LMWC pool [kg{P} m^-3].

soil_cnp_pool_maom_carbon

Carbon content of the mineral associated organic matter pool [kg{C} m^-3].

soil_cnp_pool_maom_nitrogen

Nitrogen content of the MAOM pool [kg{N} m^-3].

soil_cnp_pool_maom_phosphorus

Phosphorus content of the MAOM pool [kg{P} m^-3].

soil_cnp_pool_necromass_carbon

Carbon content of the microbial necromass pool [kg{C} m^-3].

soil_cnp_pool_necromass_nitrogen

Nitrogen content of the microbial necromass pool [kg{N} m^-3].

soil_cnp_pool_necromass_phosphorus

Phosphorus content of the microbial necromass pool [kg{P} m^-3].

soil_cnp_pool_pom_carbon

Carbon content of the particulate organic matter pool [kg{C} m^-3].

soil_cnp_pool_pom_nitrogen

Nitrogen content of the POM pool [kg{N} m^-3].

soil_cnp_pool_pom_phosphorus

Phosphorus content of the POM pool [kg{P} m^-3].

soil_enzyme_maom_bacteria

Bacteria produced enzyme class which breaks down MAOM [kg{C} m^-3].

soil_enzyme_maom_fungi

Fungi produced enzyme class which breaks down MAOM [kg{C} m^-3].

soil_enzyme_pom_bacteria

Bacteria produced enzyme class which breaks down POM [kg{C} m^-3].

soil_enzyme_pom_fungi

Fungi produced enzyme class which breaks down POM [kg{C} m^-3].

soil_n_pool_ammonium

Soil ammonium (\(\ce{NH4+}\)) pool [kg{N} m^-3].

soil_n_pool_nitrate

Soil nitrate (\(\ce{NO3-}\)) pool [kg{N} m^-3].

soil_p_pool_labile

Inorganic labile phosphorus pool [kg{P} m^-3].

soil_p_pool_primary

Primary mineral phosphorus pool [kg{P} m^-3].

soil_p_pool_secondary

Secondary (inorganic) mineral phosphorus pool [kg{P} m^-3].

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

Nitrogen supplied to plants by arbuscular mycorrhiza over integration time.

Units of [kg{N} m^-3].

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

Phosphorus supplied to plants by arbuscular mycorrhiza over integration time.

Units of [kg{P} m^-3].

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

Nitrogen supplied to plants by ectomycorrhiza over integration time.

Units of [kg{N} m^-3].

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

Phosphorus supplied to plants by ectomycorrhiza over integration time.

Units of [kg{P} m^-3].

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

Fungal fruiting biomass produced during simulation time step [kg{C} m^-3].

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

Arbuscular mycorrhizal fungi biomass pool [kg{C} m^-3].

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

Bacterial biomass pool [kg{C} m^-3].

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

Ectomycorrhizal fungi biomass pool [kg{C} m^-3].

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

Saprotrophic fungi biomass pool [kg{C} m^-3].

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

Carbon content of the low molecular weight carbon pool [kg{C} m^-3].

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

Nitrogen content of the LMWC pool [kg{N} m^-3].

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

Phosphorus content of the LMWC pool [kg{P} m^-3].

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

Carbon content of the mineral associated organic matter pool [kg{C} m^-3].

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

Nitrogen content of the MAOM pool [kg{N} m^-3].

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

Phosphorus content of the MAOM pool [kg{P} m^-3].

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

Carbon content of the microbial necromass pool [kg{C} m^-3].

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

Nitrogen content of the microbial necromass pool [kg{N} m^-3].

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

Phosphorus content of the microbial necromass pool [kg{P} m^-3].

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

Carbon content of the particulate organic matter pool [kg{C} m^-3].

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

Nitrogen content of the POM pool [kg{N} m^-3].

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

Phosphorus content of the POM pool [kg{P} m^-3].

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

Bacteria produced enzyme class which breaks down MAOM [kg{C} m^-3].

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

Fungi produced enzyme class which breaks down MAOM [kg{C} m^-3].

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

Bacteria produced enzyme class which breaks down POM [kg{C} m^-3].

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

Fungi produced enzyme class which breaks down POM [kg{C} m^-3].

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

Soil ammonium (\(\ce{NH4+}\)) pool [kg{N} m^-3].

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

Soil nitrate (\(\ce{NO3-}\)) pool [kg{N} m^-3].

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

Inorganic labile phosphorus pool [kg{P} m^-3].

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

Primary mineral phosphorus pool [kg{P} m^-3].

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

Secondary (inorganic) mineral phosphorus pool [kg{P} m^-3].

class virtual_ecosystem.models.soil.pools.SoilPools(data: Data, pools: dict[str, ndarray[tuple[Any, ...], dtype[floating]]], model_constants: SoilConstants, functional_groups: dict[str, MicrobialGroupConstants], enzyme_classes: dict[str, SoilEnzymeClass], core_constants: CoreConstants)[source]#

This class collects all the various soil pools so that they can be updated.

This class contains a method to update all soil pools. As well as taking in the data object it also has to take in another dataclass containing the pools. This dictionary is modifiable by the integration algorithm whereas the data object will only be modified when the entire soil model simulation has finished.

Methods:

calculate_all_pool_updates(...)

Calculate net change for all soil pools.

to_per_volume(input_rate)

Method to convert an external input rate from per area to per volume units.

Attributes:

core_constants

Set of constants shared across all models in the Virtual Ecosystem.

data

The data object for the Virtual Ecosystem simulation.

enzyme_classes

Details of the enzyme classes used by the soil model.

functional_groups

Set of microbial functional groups used by the soil model.

model_constants

Set of constants for the soil model.

pools

Pools which can change during the soil model update.

calculate_all_pool_updates(delta_pools_ordered: dict[str, ndarray[tuple[Any, ...], dtype[floating]]], layer_structure: LayerStructure, soil_moisture_saturation: float, soil_moisture_residual: float, top_soil_layer_thickness: float) ndarray[tuple[Any, ...], dtype[floating]][source]#

Calculate net change for all soil pools.

This function calls lower level functions which calculate the transfers between pools. When all transfers have been calculated the net transfer is used to calculate the net change for each pool.

The data that this function uses (which comes from the data object) is stored in a dictionary form. This becomes an issue as the scipy integrator used to integrate this function expects a numpy array, and if the order of variables changes in this array the integrator will generate nonsensical results. To prevent this from happening a dictionary (delta_pools_ordered) is supplied that contains all the variables that get integrated, this dictionary sets the order of variables in the output numpy array. As this dictionary is passed from integrate() this ensures that the order is the same for the entire integration.

Parameters:
  • delta_pools_ordered – Dictionary to store pool changes in the order that pools are stored in the initial condition vector.

  • layer_structure – The details of the layer structure used across the Virtual Ecosystem.

  • soil_moisture_saturation – The soil moisture saturation [unitless].

  • soil_moisture_residual – The soil moisture residual [unitless].

  • top_soil_layer_thickness – Thickness of the topsoil layer [m].

Returns:

A vector containing net changes to each pool. Order [lmwc, maom].

core_constants#

Set of constants shared across all models in the Virtual Ecosystem.

data#

The data object for the Virtual Ecosystem simulation.

enzyme_classes#

Details of the enzyme classes used by the soil model.

functional_groups#

Set of microbial functional groups used by the soil model.

model_constants#

Set of constants for the soil model.

pools#

Pools which can change during the soil model update.

These pools need to be added outside the data object otherwise the integrator cannot update them and the integration will fail.

to_per_volume(input_rate: float | ndarray[tuple[Any, ...], dtype[floating]]) ndarray[tuple[Any, ...], dtype[floating]][source]#

Method to convert an external input rate from per area to per volume units.

Parameters:

input_rate – Rate of input to convert [kg m^-2 day^-1].

Returns:

Input rate converted to per volume (of the microbial active layer) units [kg m^-3 day^-1].

class virtual_ecosystem.models.soil.pools.WaterRemovalRates(lmwc: ndarray[tuple[Any, ...], dtype[floating]], don: ndarray[tuple[Any, ...], dtype[floating]], dop: ndarray[tuple[Any, ...], dtype[floating]], ammonium: ndarray[tuple[Any, ...], dtype[floating]], nitrate: ndarray[tuple[Any, ...], dtype[floating]], labile_P: ndarray[tuple[Any, ...], dtype[floating]])[source]#

Rate at which each soluble nutrient pool is removed due to soil water flows.

Attributes:

ammonium

Removal rate for the soil ammonium pool [kg{N} m^-3 day^-1].

don

Loss of dissolved organic nitrogen due to LMWC removal [kg{N} m^-3 day^-1].

dop

Loss of dissolved organic phosphorus due to LMWC removal [kg{P} m^-3 day^-1].

labile_P

Removal rate for the labile inorganic phosphorus pool [kg{P} m^-3 day^-1].

lmwc

Removal rate for the low molecular weight carbon pool [kg{C} m^-3 day^-1].

nitrate

Removal rate for the soil nitrate pool [kg{N} m^-3 day^-1].

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

Removal rate for the soil ammonium pool [kg{N} m^-3 day^-1].

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

Loss of dissolved organic nitrogen due to LMWC removal [kg{N} m^-3 day^-1].

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

Loss of dissolved organic phosphorus due to LMWC removal [kg{P} m^-3 day^-1].

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

Removal rate for the labile inorganic phosphorus pool [kg{P} m^-3 day^-1].

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

Removal rate for the low molecular weight carbon pool [kg{C} m^-3 day^-1].

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

Removal rate for the soil nitrate pool [kg{N} m^-3 day^-1].

virtual_ecosystem.models.soil.pools.calculate_biomass_losses(pools: PoolData, microbial_groups: dict[str, MicrobialGroupConstants], soil_temp: ndarray[tuple[Any, ...], dtype[floating]]) BiomassLosses[source]#

Calculate the rate of biomass loss for each microbial group.

Parameters:
  • pools – Data class containing the various soil pools.

  • microbial_groups – Set of microbial functional groups defined in the soil model.

  • soil_temp – temperature of the microbially active soil [Celsius]

Returns:

The rate of biomass loss of each microbial functional group [kg{C} m^-3 day^-1]

virtual_ecosystem.models.soil.pools.calculate_enzyme_changes(pools: PoolData, enzyme_production: dict[str, ndarray[tuple[Any, ...], dtype[floating]]], enzyme_classes: dict[str, SoilEnzymeClass]) EnzymePoolChanges[source]#

Calculate the change in each of the soil enzyme pools.

Parameters:
  • pools – Data class containing the various soil pools.

  • enzyme_production – Production rates for each class of enzyme [kg{C} m^-3 day^-1]

  • constants – Set of constants for the soil model.

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

Returns:

A dataclass containing the net changes in each enzyme class, as well as the combined denaturation rates of the bacterial and fungal enzyme classes.

virtual_ecosystem.models.soil.pools.calculate_enzyme_mediated_decomposition(soil_c_pool: ndarray[tuple[Any, ...], dtype[floating]], soil_enzyme: ndarray[tuple[Any, ...], dtype[floating]], soil_temp: ndarray[tuple[Any, ...], dtype[floating]], env_factors: EnvironmentalEffectFactors, enzyme_class: SoilEnzymeClass) ndarray[tuple[Any, ...], dtype[floating]][source]#

Calculate rate of a enzyme mediated decomposition process.

This function calculates various environmental factors that effect enzyme activity, then uses these to find environmental adjusted rate and saturation constants. These are then used to find the decomposition rate of the pool in question.

Parameters:
  • soil_c_pool – Size of organic matter pool [kg{C} m^-3]

  • soil_enzyme – Amount of enzyme class which breaks down the organic matter pool in question [kg{C} m^-3]

  • soil_temp – soil temperature for each soil grid cell [Celsius]

  • env_factors – Data class containing the various factors through which the environment effects soil cycling rates.

  • enzyme_class – Constants associated with the enzyme class in question.

Returns:

The rate of decomposition of the organic matter pool in question [kg{C} m^-3 day^-1]

virtual_ecosystem.models.soil.pools.calculate_enzyme_mediated_rates(pools: PoolData, soil_temp: ndarray[tuple[Any, ...], dtype[floating]], env_factors: EnvironmentalEffectFactors, enzyme_classes: dict[str, SoilEnzymeClass]) EnzymeMediatedRates[source]#

Calculate the rates of each enzyme mediated reaction.

Parameters:
  • pools – Data class containing the various soil pools.

  • soil_temp – soil temperature for each soil grid cell [Celsius]

  • env_factors – Data class containing the various factors through which the environment effects soil cycling rates.

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

Returns:

A dataclass containing the enzyme mediated decomposition rates of both the POM and MAOM pool.

virtual_ecosystem.models.soil.pools.calculate_enzyme_production(microbial_groups: dict[str, MicrobialGroupConstants], growth_rates: dict[str, ndarray[tuple[Any, ...], dtype[floating]]]) dict[str, ndarray[tuple[Any, ...], dtype[floating]]][source]#

Calculate the total production of each enzyme class.

This function checks which substrates each functional group produces enzymes for, and then calculates the enzyme productions based on the growth rates and the proportional enzyme production.

Parameters:
  • microbial_groups – Set of microbial functional groups defined in the soil model

  • growth_rates – The (gross) growth rates of each microbial group [kg{C} m^-3 day^-1]

Returns:

A dictionary containing the total production rate of each enzyme class [kg{C} m^-3 day^-1]

virtual_ecosystem.models.soil.pools.calculate_enzyme_turnover(enzyme_pool: ndarray[tuple[Any, ...], dtype[floating]], turnover_rate: float) ndarray[tuple[Any, ...], dtype[floating]][source]#

Calculate the turnover rate of a specific enzyme class.

Parameters:
  • enzyme_pool – The pool size for the enzyme class in question [kg{C} m^-3]

  • turnover_rate – The rate at which enzymes in the pool turnover [day^-1]

Returns:

The rate at which enzymes are lost from the pool [kg{C} m^-3 day^-1]

virtual_ecosystem.models.soil.pools.calculate_free_living_nitrogen_fixation(soil_temp: ndarray[tuple[Any, ...], dtype[floating]], fixation_at_reference: float, reference_temperature: float, q10_nitrogen_fixation: float, active_depth: float) ndarray[tuple[Any, ...], dtype[floating]][source]#

Calculate rate of nitrogen fixation by free living microbes.

These are microbes not in a symbiotic association with plants. They are considered to fix nitrogen solely in the form of ammonium. The functional form used is taken from Lin et al. (2000).

TODO: At the moment this function takes in soil temperatures in Celsius and converts them to Kelvin, this should be reviewed as part of the soil-abiotic links review.

Parameters:
  • soil_temp – Temperature of the relevant soil zone [Celsius]

  • fixation_at_reference – Rate of nitrogen fixation at the reference temperature [kg{N} m^-2 day^-1]

  • reference_temperature – Reference temperature [Kelvin]

  • q10_nitrogen_fixation – Q10 temperature coefficient for free-living nitrogen fixation [unitless]

  • active_depth – The depth to which the soil is considered to be biologically active [m]

Returns:

The rate at which nitrogen is fixed by free living (i.e. non-symbiotic) microbes [kg{N} m^-3 day^-1]

virtual_ecosystem.models.soil.pools.calculate_fruiting_body_production(microbial_groups: dict[str, MicrobialGroupConstants], growth_rates: dict[str, ndarray[tuple[Any, ...], dtype[floating]]]) ndarray[tuple[Any, ...], dtype[floating]][source]#

Calculate the total production of fungal fruiting bodies by all microbial groups.

Parameters:
  • microbial_groups – Set of microbial functional groups defined in the soil model

  • growth_rates – The (gross) growth rates of each microbial group [kg{C} m^-3 day^-1]

Returns:

The total production rate of fungal fruiting bodies by the soil microbes [kg{C} m^-3 day^-1]

virtual_ecosystem.models.soil.pools.calculate_fungal_fruiting_body_decay(decay_rate: ndarray[tuple[Any, ...], dtype[floating]], fungal_fruiting_body_c_n_ratio: float, fungal_fruiting_body_c_p_ratio: float) dict[str, ndarray[tuple[Any, ...], dtype[floating]]][source]#

Calculate contribution to different soil pools from fungal fruiting body decay.

Fungal fruiting bodies are organic matter so they decay into the LMWC pool. The decay rate is already known in carbon terms and the decay into the organic nitrogen and phosphorus pools is found based on this and the fixed stoichiometric ratios of the fungal fruiting bodies pool.

Parameters:
  • decay_rate – The rate at which fungal fruiting bodies decay in carbon terms [kg{C} m^-3 day^-1]

  • fungal_fruiting_body_c_n_ratio – The carbon to nitrogen ratio of fungal fruiting bodies pool [unitless]

  • fungal_fruiting_body_c_p_ratio – The carbon to phosphorus ratio of fungal fruiting bodies pool [unitless]

Returns:

The input rate to each soil organic matter pool (carbon, nitrogen, phosphorus) due to the decay of fungal fruiting bodies [kg m^-3 day^-1].

virtual_ecosystem.models.soil.pools.calculate_litter_mineralisation_fluxes(litter_mineralisation_rates: DataArray, constants: SoilConstants) LitterMineralisationFluxes[source]#

Calculate the split of the litter mineralisation fluxes between soil pools.

Each mineralisation flux from litter to soil has to be split between the particulate and dissolved pools for the nutrient in question. The leached nitrogen and phosphorus fluxes are further split between organic and inorganic forms, with the inorganic leached nitrogen assumed to be entirely in the form of ammonium.

Parameters:
  • litter_mineralisation_rates – The rate at which carbon, nitrogen and phosphorus are mineralised from the litter [kg m^-3 day^-1]

  • constants – Set of constants for the soil model.

Returns:

A dataclass containing the flux into each pool due to litter mineralisation [kg nutrient m^-3 day^-1].

virtual_ecosystem.models.soil.pools.calculate_litter_mineralisation_split(mineralisation_rate: ndarray[tuple[Any, ...], dtype[floating]], litter_leaching_coefficient: float) tuple[ndarray[tuple[Any, ...], dtype[floating]], ndarray[tuple[Any, ...], dtype[floating]]][source]#

Determine how nutrients from litter mineralisation get split between soil pools.

All nutrients that we track (carbon, nitrogen and phosphorus) get divided between the particulate organic matter pool and the dissolved pool for their respective nutrient (for the carbon case this pool is termed low molecular weight carbon). This split is calculated based on empirically derived litter leaching constants.

Parameters:
  • mineralisation_rate – The rate at which the nutrient is being mineralised from the litter [kg{C} m^-3 day^-1]

  • litter_leaching_coefficient – Fraction of the litter mineralisation of the nutrient that occurs via leaching rather than as particulates [unitless]

Returns:

The rate at which the nutrient is added to the soil as particulates (first part of tuple) and as dissolved matter (second part of tuple) [kg{nutrient} m^-3 day^-1].

virtual_ecosystem.models.soil.pools.calculate_maintenance_biomass_synthesis(microbe_pool_size: ndarray[tuple[Any, ...], dtype[floating]], soil_temp: ndarray[tuple[Any, ...], dtype[floating]], microbial_group: MicrobialGroupConstants) ndarray[tuple[Any, ...], dtype[floating]][source]#

Calculate biomass synthesis rate required to offset losses for a microbial pool.

In order for a microbial population to not decline it must synthesise enough new biomass to offset losses. These losses mostly come from cell death and protein decay, but also include loses due to extracellular enzyme excretion.

Parameters:
  • microbe_pool_size – Size of the microbial pool of interest [kg{C} m^-3]

  • soil_temp – soil temperature for each soil grid cell [Celsius]

  • microbial_group – Constants associated with the microbial group of interest

Returns:

The rate of microbial biomass loss that must be matched to maintain a steady population [kg{C} m^-3 day^-1]

virtual_ecosystem.models.soil.pools.calculate_maom_desorption(soil_c_pool_maom: ndarray[tuple[Any, ...], dtype[floating]], desorption_rate_constant: float)[source]#

Calculate the rate of mineral associated organic matter (MAOM) desorption.

This function is independent of soil temperature, moisture, pH, clay fraction and bulk density. All of these things are known to effect real world desorption rates. However, to simplify the parameterisation we only include these effects on microbial rates. This may be something we want to alter in future.

Parameters:
  • soil_c_pool_maom – Size of the mineral associated organic matter pool [kg{C} m^-3]

  • desorption_rate_constant – Rate constant for MAOM desorption [day^-1]

Returns:

The rate of MAOM desorption to LMWC [kg{C} m^-3 day^-1]

virtual_ecosystem.models.soil.pools.calculate_microbial_changes(pools: PoolData, soil_temp: ndarray[tuple[Any, ...], dtype[floating]], env_factors: EnvironmentalEffectFactors, constants: SoilConstants, microbial_groups: dict[str, MicrobialGroupConstants], enzyme_classes: dict[str, SoilEnzymeClass], carbon_supply: CarbonSupply) MicrobialChanges[source]#

Calculate the changes for the microbial biomass and enzyme pools.

This function calculates the uptake of LMWC and inorganic nutrients by the microbial biomass pool and uses this to calculate the net change in the pool. The net change in each enzyme pool is found, as well as the total rate at which necromass is created is found. Finally, production of fungal fruiting bodies and the supply of nutrients to plants by mycorrhiza are found.

Parameters:
  • pools – Data class containing the various soil pools.

  • soil_temp – soil temperature for each soil grid cell [Celsius]

  • env_factors – Data class containing the various factors through which the environment effects soil cycling rates.

  • constants – Set of constants for the soil model.

  • microbial_groups – Set of microbial functional groups used by the soil model.

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

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

Returns:

A dataclass containing the rate at which microbes uptake LMWC, DON and DOP, and the rate of change in the microbial biomass pool and the enzyme pools.

virtual_ecosystem.models.soil.pools.calculate_necromass_breakdown(soil_c_pool_necromass: ndarray[tuple[Any, ...], dtype[floating]], necromass_decay_rate: float) ndarray[tuple[Any, ...], dtype[floating]][source]#

Calculate breakdown rate of necromass into low molecular weight carbon (LMWC).

This function calculate necromass breakdown to LMWC as a simple exponential decay. This decay is not effected by temperature or any other environmental factor. The idea is to keep this function as simple as possible, because it will be hard to parametrise even without additional complications. However, this is a simplification to bear in mind when planning future model improvements.

Parameters:
  • soil_c_pool_necromass – Size of the microbial necromass pool [kg{C} m^-3]

  • necromass_decay_rate – Rate at which necromass decays into LMWC [day^-1]

Returns:

The amount of necromass that breakdown to LMWC [kg{C} m^-3 day^-1]

virtual_ecosystem.models.soil.pools.calculate_net_enzyme_change(enzyme_pool_size: ndarray[tuple[Any, ...], dtype[floating]], enzyme_production: ndarray[tuple[Any, ...], dtype[floating]], enzyme_turnover_rate: float) tuple[ndarray[tuple[Any, ...], dtype[floating]], ndarray[tuple[Any, ...], dtype[floating]]][source]#

Calculate the change in concentration for a specific enzyme pool.

Enzyme production rates are assumed to scale linearly with the total biomass loss rate of the microbes. These are combined with turnover rates to find the net change in the enzyme pool of interest.

Parameters:
  • enzyme_pool_size – Amount of enzyme class of interest [kg{C} m^-3]

  • enzyme_production – Production rate for the enzyme in question [kg{C} m^-3 day^-1]

  • enzyme_turnover_rate – Rate at which the enzyme denatures [day^-1]

Returns:

A tuple containing the net rate of change in the enzyme pool, and the denaturation rate of the enzyme of interest.

virtual_ecosystem.models.soil.pools.calculate_net_formation_of_secondary_P(soil_p_pool_labile: ndarray[tuple[Any, ...], dtype[floating]], soil_p_pool_secondary: ndarray[tuple[Any, ...], dtype[floating]], secondary_p_breakdown_rate: float, labile_p_sorption_rate: float) ndarray[tuple[Any, ...], dtype[floating]][source]#

Calculate net rate of secondary mineral phosphorus formation.

This is the combination of labile inorganic phosphorus associating with minerals and secondary mineral phosphorus breaking down.

Parameters:
  • soil_p_pool_labile – Labile inorganic phosphorus pool [kg{P} m^-3]

  • soil_p_pool_secondary – Secondary mineral phosphorus pool [kg{P} m^-3]

  • secondary_p_breakdown_rate – Rate constant for breakdown of secondary mineral phosphorus to labile phosphorus [day^-1]

  • labile_p_sorption_rate – Rate constant for sorption of labile inorganic phosphorus to soil minerals to form secondary mineral phosphorus [day^-1]

Returns:

The net rate of labile inorganic phosphorus that has become secondary mineral phosphorus (this can be negative) [kg{P} m^-3 day^-1]

virtual_ecosystem.models.soil.pools.calculate_net_nutrient_transfers_from_maom_to_lmwc(lmwc_carbon: ndarray[tuple[Any, ...], dtype[floating]], lmwc_nitrogen: ndarray[tuple[Any, ...], dtype[floating]], lmwc_phosphorus: ndarray[tuple[Any, ...], dtype[floating]], maom_carbon: ndarray[tuple[Any, ...], dtype[floating]], maom_nitrogen: ndarray[tuple[Any, ...], dtype[floating]], maom_phosphorus: ndarray[tuple[Any, ...], dtype[floating]], maom_breakdown: ndarray[tuple[Any, ...], dtype[floating]], maom_desorption: ndarray[tuple[Any, ...], dtype[floating]], lmwc_sorption: ndarray[tuple[Any, ...], dtype[floating]]) dict[str, ndarray[tuple[Any, ...], dtype[floating]]][source]#

Calculate the net rate of transfer of nutrients between MAOM and LMWC.

Parameters:
  • lmwc_carbon – The amount of carbon stored as low molecular weight carbon [kg{C} m^-3]

  • lmwc_nitrogen – The amount of nitrogen stored as low molecular weight carbon/dissolved organic nitrogen [kg{N} m^-3]

  • lmwc_phosphorus – The amount of phosphorus stored as low molecular weight carbon/dissolved organic phosphorus [kg{P} m^-3]

  • maom_carbon – The amount of carbon stored as mineral associated organic matter [kg{C} m^-3]

  • maom_nitrogen – The amount of nitrogen stored as mineral associated organic matter [kg{N} m^-3]

  • maom_phosphorus – The amount of phosphorus stored as mineral associated organic matter [kg{P} m^-3]

  • maom_breakdown – The rate at which the mineral associated organic matter pool is being broken down by enzymes (expressed in carbon terms) [kg{C} m^-3 day^-1]

  • maom_desorption – The rate at which the mineral associated organic matter pool is spontaneously desorbing [kg{C} m^-3 day^-1]

  • lmwc_sorption – The rate at which the low molecular weight carbon pool is sorbing to minerals to form mineral associated organic matter [kg{C} m^-3 day^-1]

Returns:

The net nutrient transfer rates of transfer from mineral associated organic matter into dissolved organic forms. This is currently includes nitrogen and phosphorus [kg{nutrient} m^-3 day^-1]

virtual_ecosystem.models.soil.pools.calculate_nutrient_flows_to_necromass(biomass_losses: BiomassLosses, enzyme_changes: EnzymePoolChanges, microbial_groups: dict[str, MicrobialGroupConstants], enzyme_classes: dict[str, SoilEnzymeClass]) tuple[ndarray[tuple[Any, ...], dtype[floating]], ndarray[tuple[Any, ...], dtype[floating]]][source]#

Calculate the rate at which nutrients flow into the necromass pool.

These flows comprise of the nitrogen and phosphorus content of the dead cells and denatured enzymes that flow into the necromass pool.

Parameters:
  • biomass_losses – Rate at which biomass of each microbial functional group becomes necromass [kg{C} m^-3 day^-1]

  • enzyme_changes – Details of the rate change for the soil enzyme pools.

  • microbial_groups – Set of microbial functional groups defined in the soil model

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

Returns:

A tuple containing the rates at which nitrogen [kg{N} m^-3 day^-1] and phosphorus [kg{P} m^-3 day^-1] are added to the soil necromass pool

virtual_ecosystem.models.soil.pools.calculate_nutrient_removal_by_water(soil_c_pool_lmwc: ndarray[tuple[Any, ...], dtype[floating]], soil_n_pool_don: ndarray[tuple[Any, ...], dtype[floating]], soil_p_pool_dop: ndarray[tuple[Any, ...], dtype[floating]], soil_n_pool_ammonium: ndarray[tuple[Any, ...], dtype[floating]], soil_n_pool_nitrate: ndarray[tuple[Any, ...], dtype[floating]], soil_p_pool_labile: ndarray[tuple[Any, ...], dtype[floating]], vertical_flow_rates: ndarray[tuple[Any, ...], dtype[floating]], soil_moisture: ndarray[tuple[Any, ...], dtype[floating]], layer_structure: LayerStructure, constants: SoilConstants) WaterRemovalRates[source]#

Calculate the rate a which each soluble nutrient pool is removed by water.

Removal rates are calculated for the low molecular weight carbon pool and the inorganic nitrogen and phosphorus pools based on their solubility and the rate at which water exits the microbially active part of the soil. The removal rates for organic nitrogen and phosphorus are then calculated based on the stoichiometry and removal rate of the LMWC pool.

Parameters:
  • soil_c_pool_lmwc – Low molecular weight carbon pool [kg{C} m^-3]

  • soil_n_pool_don – Dissolved organic nitrogen pool [kg{N} m^-3]

  • soil_p_pool_dop – Dissolved organic phosphorus pool [kg{P} m^-3]

  • soil_n_pool_ammonium – Soil ammonium pool [kg{N} m^-3]

  • soil_n_pool_nitrate – Soil nitrate pool [kg{N} m^-3]

  • soil_p_pool_labile – Labile inorganic phosphorus pool [kg{P} m^-3]

  • vertical_flow_rates – Rates of flow downwards between the different soil layers [mm day^-1]

  • soil_moisture – Volume of water contained in topsoil layer [mm]

  • layer_structure – The details of the layer structure used across the Virtual Ecosystem.

  • constants – Set of constants for the soil model.

Returns:

A dataclass containing the rate a which each soluble nutrient pool is removed by flows of water through the soil.

virtual_ecosystem.models.soil.pools.calculate_rate_of_denitrification(soil_temp: ndarray[tuple[Any, ...], dtype[floating]], effective_saturation: ndarray[tuple[Any, ...], dtype[floating]], soil_n_pool_nitrate: ndarray[tuple[Any, ...], dtype[floating]], constants: SoilConstants) ndarray[tuple[Any, ...], dtype[floating]][source]#

Calculate the rate at which nitrate denitrifies (and leaves the soil).

This is an empirical relationship that we have taken from Fatichi et al. (2019).

Parameters:
  • soil_temp – Temperature of the relevant segment of soil [Celsius]

  • effective_saturation – Effective saturation of the soil with water [unitless]

  • soil_n_pool_nitrate – Soil nitrate pool [kg{N} m^-3]

  • constants – Set of constants for the soil model.

Returns:

The rate at which ammonium nitrifies to form nitrate [kg{N} m^-3 day^-1].

virtual_ecosystem.models.soil.pools.calculate_rate_of_nitrification(soil_temp: ndarray[tuple[Any, ...], dtype[floating]], effective_saturation: ndarray[tuple[Any, ...], dtype[floating]], soil_n_pool_ammonium: ndarray[tuple[Any, ...], dtype[floating]], constants: SoilConstants) ndarray[tuple[Any, ...], dtype[floating]][source]#

Calculate the rate at which ammonium nitrifies to form nitrate.

This is an empirical relationship that we have taken from Fatichi et al. (2019).

Parameters:
  • soil_temp – Temperature of the relevant segment of soil [Celsius]

  • effective_saturation – Effective saturation of the soil with water [unitless]

  • soil_n_pool_ammonium – Soil ammonium pool [kg{N} m^-3]

  • constants – Set of constants for the soil model.

Returns:

The rate at which ammonium nitrifies to form nitrate [kg{N} m^-3 day^-1].

virtual_ecosystem.models.soil.pools.calculate_soil_nutrient_mineralisation(pool_carbon: ndarray[tuple[Any, ...], dtype[floating]], pool_nutrient: ndarray[tuple[Any, ...], dtype[floating]], breakdown_rate: ndarray[tuple[Any, ...], dtype[floating]]) ndarray[tuple[Any, ...], dtype[floating]][source]#

Calculate mineralisation rate from soil organic matter for a specific nutrient.

This function assumes that nutrients are mineralised in direct proportion to their ratio to carbon in the decaying organic matter. This function is therefore does not capture mechanisms that exist to actively release nutrients from organic matter (e.g. phosphatase enzymes).

Parameters:
  • pool_carbon – The carbon content of the organic matter pool [kg{C} m^-3]

  • pool_nutrient – The nutrient content of the organic matter pool [kg{nutrient} m^-3]

  • breakdown_rate – The rate at which the pool is being broken down (expressed in carbon terms) [kg{C} m^-3 day^-1]

Returns:

The rate at which the nutrient in question is mineralised due to organic matter breakdown [kg{nutrient} m^-3 day^-1]

virtual_ecosystem.models.soil.pools.calculate_sorption_to_maom(soil_c_pool: ndarray[tuple[Any, ...], dtype[floating]], sorption_rate_constant: float)[source]#

Calculate that a carbon pool sorbs to become mineral associated organic matter.

Carbon from both the low molecular weight carbon pool and the necromass pool can sorb to minerals to form MAOM, so this function can be used for either pool.

This function is independent of soil temperature, moisture, pH, clay fraction and bulk density. All of these things are known to effect real world desorption rates. However, to simplify the parameterisation we only include these effects on microbial rates. This may be something we want to alter in future.

Parameters:
  • soil_c_pool – Size of carbon pool [kg{C} m^-3]

  • sorption_rate_constant – Rate constant for sorption to MAOM [day^-1]

Returns:

The rate of sorption to MAOM [kg{C} m^-3 day^-1]

virtual_ecosystem.models.soil.pools.calculate_symbiotic_nitrogen_fixation(carbon_supply: ndarray[tuple[Any, ...], dtype[floating]], soil_temp: ndarray[tuple[Any, ...], dtype[floating]], constants: SoilConstants) ndarray[tuple[Any, ...], dtype[floating]][source]#

Calculate rate of nitrogen fixation by plant symbionts.

The nitrogen is considered to be fixed solely in the form of ammonium.

Parameters:
  • carbon_supply – The rate at which carbon is supplied to symbiotic partners by plants for the purpose of nitrogen fixation [kg{C} m^-3 day^-1]

  • soil_temp – Temperature of the relevant soil zone [Celsius]

  • constants – Set of constants for the soil model.

Returns:

The rate at which nitrogen is fixed by plant associated microbial symbionts [kg N m^-3 day^-1]

virtual_ecosystem.models.soil.pools.find_necromass_nutrient_outflows(necromass_carbon: ndarray[tuple[Any, ...], dtype[floating]], necromass_nitrogen: ndarray[tuple[Any, ...], dtype[floating]], necromass_phosphorus: ndarray[tuple[Any, ...], dtype[floating]], necromass_decay: ndarray[tuple[Any, ...], dtype[floating]], necromass_sorption: ndarray[tuple[Any, ...], dtype[floating]]) dict[str, ndarray[tuple[Any, ...], dtype[floating]]][source]#

Find the amount of each nutrient flowing out of the necromass pool.

There are two sources for this outflow. Firstly, the decay of necromass to dissolved organic nitrogen/phosphorus. Secondly, the sorption of necromass to soil minerals to form mineral associated organic matter. A key assumption here is that the nitrogen and phosphorus flows directly follows the carbon flow, i.e. it follows the same split between pathways as the carbon does.

Parameters:
  • necromass_carbon – The amount of carbon stored as microbial necromass [kg{C} m^-3]

  • necromass_nitrogen – The amount of nitrogen stored as microbial necromass [kg{N} m^-3]

  • necromass_phosphorus – The amount of phosphorus stored as microbial necromass [kg{P} m^-3]

  • necromass_decay – The rate at which necromass decays to form lmwc [kg{C} m^-3 day^-1]

  • necromass_sorption – The rate at which necromass gets sorbed to soil minerals to form mineral associated organic matter [kg{C} m^-3 day^-1]

Returns:

A dictionary containing the rates at which nitrogen and phosphorus contained in necromass is released as dissolved organic nitrogen, and the rates at which they gets sorbed to soil minerals to form soil associated organic matter [kg{nutrient} m^-3 day^-1].