API documentation for the env_factors module

The models.soil.env_factors module contains functions that are used to capture the impact that environmental factors have on microbial rates. These include temperature, soil water potential, pH and soil texture.

Classes:

EnvironmentalEffectFactors(water, pH, ...)

The various factors through which the environment effects soil cycling rates.

Functions:

calculate_clay_impact_on_enzyme_saturation(...)

Calculate the impact that the soil clay fraction has on enzyme saturation.

calculate_clay_impact_on_necromass_decay(...)

Calculate the impact that soil clay has on necromass decay to LMWC.

calculate_environmental_effect_factors(...)

Calculate the effects that the environment has on relevant biogeochemical rates.

calculate_leaching_rate(solute_density, ...)

Calculate leaching rate for a given solute based on flow rate.

calculate_pH_suitability(soil_pH, ...)

Calculate the suitability of the soil pH for microbial activity.

calculate_temperature_effect_on_microbes(...)

Calculate the effect that temperature has on microbial metabolic rates.

calculate_water_potential_impact_on_microbes(...)

Calculate the effect that soil water potential has on microbial rates.

class virtual_ecosystem.models.soil.env_factors.EnvironmentalEffectFactors(water: ndarray[Any, dtype[float32]], pH: ndarray[Any, dtype[float32]], clay_saturation: ndarray[Any, dtype[float32]], clay_decay: ndarray[Any, dtype[float32]])

The various factors through which the environment effects soil cycling rates.

Attributes:

clay_decay

Impact of soil clay fraction on necromass decay destination [unitless].

clay_saturation

Impact of soil clay fraction on enzyme saturation constants [unitless].

pH

Impact of soil pH on enzymatic rates [unitless].

water

Impact of soil water potential on enzymatic rates [unitless].

clay_decay: ndarray[Any, dtype[float32]]

Impact of soil clay fraction on necromass decay destination [unitless].

clay_saturation: ndarray[Any, dtype[float32]]

Impact of soil clay fraction on enzyme saturation constants [unitless].

pH: ndarray[Any, dtype[float32]]

Impact of soil pH on enzymatic rates [unitless].

water: ndarray[Any, dtype[float32]]

Impact of soil water potential on enzymatic rates [unitless].

virtual_ecosystem.models.soil.env_factors.calculate_clay_impact_on_enzyme_saturation(clay_fraction: ndarray[Any, dtype[float32]], base_protection: float, protection_with_clay: float) ndarray[Any, dtype[float32]]

Calculate the impact that the soil clay fraction has on enzyme saturation.

This factor impacts enzyme saturation constants, based on the assumption that finely textured soils will restrict enzyme access to available C substrates (which protects them). Its form is taken from Fatichi et al. (2019).

Parameters:
  • clay_fraction – The fraction of the soil which is clay [unitless]

  • base_protection – The protection that a soil with no clay provides [unitless]

  • protection_with_clay – The rate at which protection increases with increasing clay [unitless]

Returns:

A multiplicative factor capturing how much the protection due to soil structure changes the effective saturation constant by [unitless]

virtual_ecosystem.models.soil.env_factors.calculate_clay_impact_on_necromass_decay(clay_fraction: ndarray[Any, dtype[float32]], decay_exponent: float) ndarray[Any, dtype[float32]]

Calculate the impact that soil clay has on necromass decay to LMWC.

Necromass which doesn’t breakdown fully gets added to the POM pool instead.

Parameters:
  • clay_fraction – The fraction of the soil which is clay [unitless]

  • sorption_exponent – Controls the impact that differences in soil clay content have on the proportion of necromass that decays to LMWC [unitless]

Returns:

A multiplicative factor capturing the impact that soil clay has on the proportion of necromass decay which sorbs to form POM [unitless]

virtual_ecosystem.models.soil.env_factors.calculate_environmental_effect_factors(soil_water_potential: ndarray[Any, dtype[float32]], pH: ndarray[Any, dtype[float32]], clay_fraction: ndarray[Any, dtype[float32]], constants: SoilConsts) EnvironmentalEffectFactors

Calculate the effects that the environment has on relevant biogeochemical rates.

For each environmental effect a multiplicative factor is calculated, and all of them are returned in a single object for use elsewhere in the soil model.

Parameters:
  • soil_water_potential – Soil water potential for each grid cell [kPa]

  • pH – pH values for each soil grid cell [unitless]

  • clay_fraction – The clay fraction for each soil grid cell [unitless]

  • constants – Set of constants for the soil model

Returns:

An object containing four environmental factors, one for the effect of water potential on enzyme rates, one for the effect of pH on enzyme rates, one for the effect of clay fraction on enzyme saturation, and one for the effect of clay on necromass decay destination.

virtual_ecosystem.models.soil.env_factors.calculate_leaching_rate(solute_density: ndarray[Any, dtype[float32]], vertical_flow_rate: ndarray[Any, dtype[float32]], soil_moisture: ndarray[Any, dtype[float32]], solubility_coefficient: float) ndarray[Any, dtype[float32]]

Calculate leaching rate for a given solute based on flow rate.

This functional form is adapted from Porporato et al. (2003). The amount of solute that is expected to be found in dissolved form is calculated by multiplying the solute density by its solubility coefficient. This is then multiplied by the frequency with which the water column is completely replaced, i.e. the ratio of vertical flow rate to soil moisture in mm.

Parameters:
  • solute_density – The density of the solute in the soil [kg solute m^-3]

  • vertical_flow_rate – Rate of flow downwards through the soil [mm day^-1]

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

  • solubility_coefficient – The solubility coefficient of the solute in question [unitless]

Returns:

The rate at which the solute in question is leached [kg solute m^-3 day^-1]

virtual_ecosystem.models.soil.env_factors.calculate_pH_suitability(soil_pH: ndarray[Any, dtype[float32]], maximum_pH: float, minimum_pH: float, upper_optimum_pH: float, lower_optimum_pH: float) ndarray[Any, dtype[float32]]

Calculate the suitability of the soil pH for microbial activity.

This function is taken from Orwin et al. (2011). pH values within the optimal range are assumed to cause no microbial inhibition, and pH values above a certain value or below a certain value are assumed to cause total inhibition. Linear declines then occur between the edges of the optimal range and the zone of total inhibition.

Parameters:
  • soil_pH – The pH of the soil [unitless]

  • maximum_pH – pH above which microbial rates are completely inhibited [unitless]

  • minimum_pH – pH below which microbial rates are completely inhibited [unitless]

  • upper_optimum_pH – pH above which suitability declines [unitless]

  • lower_optimum_pH – pH below which suitability declines [unitless]

Returns:

A multiplicative factor capturing the effect of pH on microbial rates

virtual_ecosystem.models.soil.env_factors.calculate_temperature_effect_on_microbes(soil_temperature: ndarray[Any, dtype[float32]], activation_energy: float, reference_temperature: float) ndarray[Any, dtype[float32]]

Calculate the effect that temperature has on microbial metabolic rates.

This uses a standard Arrhenius equation to calculate the impact of temperature.

This function takes temperatures in Celsius as inputs and converts them into Kelvin for use in the Arrhenius equation. TODO - review this after we have decided how to handle these conversions in general.

Parameters:
  • soil_temperature – The temperature of the soil [C]

  • activation_energy – Energy of activation [J mol^-1]

  • soil_temperature – The reference temperature of the Arrhenius equation [C]

Returns:

A multiplicative factor capturing the effect of temperature on microbial rates

virtual_ecosystem.models.soil.env_factors.calculate_water_potential_impact_on_microbes(water_potential: ndarray[Any, dtype[float32]], water_potential_halt: float, water_potential_opt: float, response_curvature: float) ndarray[Any, dtype[float32]]

Calculate the effect that soil water potential has on microbial rates.

This function only returns valid output for soil water potentials that are less than the optimal water potential.

Parameters:
  • water_potential – Soil water potential [kPa]

  • water_potential_halt – Water potential at which all microbial activity stops [kPa]

  • water_potential_opt – Optimal water potential for microbial activity [kPa]

  • response_curvature – Parameter controlling the curvature of function that captures the response of microbial rates to water potential [unitless]

Returns:

A multiplicative factor capturing the impact of moisture on soil microbe rates decomposition [unitless]