RUFAS.routines.field.soil.nitrogen_cycling.denitrification module#
- class RUFAS.routines.field.soil.nitrogen_cycling.denitrification.Denitrification(soil_data: SoilData | None = None, field_size: float | None = None)#
Bases:
object
A class to handle the denitrification process of nitrogen in the nitrates pool, as outlined in SWAT section 3:1.4.
Parameters#
- soil_dataSoilData, optional
The SoilData object used by this module to track the denitrification of nitrates in the soil profile. If not provided, a new SoilData object will be created.
- field_sizefloat, optional
The size of the field in hectares (ha). This is used to initialize a SoilData object if one is not provided.
Attributes#
- dataSoilData
The SoilData object used for tracking denitrification.
Notes#
The field size is used to initialize a SoilData object for this module to work with, if a pre-configured SoilData object is not provided.
- denitrify(field_size: float) None #
Conducts the daily denitrification operations.
Parameters#
- field_sizefloat
Size of the field (ha).
References#
SWAT Theoretical documentation section 3:1.4, eqn. 3:1.4.1, 2
Notes#
The SWAT Theoretical documentation defines denitrification as “the bacterial reduction of nitrate, NO3-, to N2 or N2O gases” (page 194). This method conducts denitrification by calculating the amount of nitrate that is denitrified, then removing that amount from the nitrate pool and adding it to denitrification emissions tracker.
- static _calculate_denitrification_amount(nitrate_content: float, denitrification_rate_coefficient: float, temp_factor: float, organic_carbon_fraction: float) float #
Calculates the amount of nitrate lost to denitrification.
Parameters#
- nitrate_contentfloat
The nitrate content of this soil layer (kg / ha).
- denitrification_rate_coefficientfloat
Rate coefficient that regulates denitrification in this layer of soil (unitless).
- temp_factorfloat
The nutrient cycling temperature factor of this soil layer (unitless).
- organic_carbon_fractionfloat
The fraction of this soil layer that is made up of organic carbon, in the range [0, 1.0] (unitless).
Returns#
- float
The amount of nitrate that is denitrified in this soil layer (kg / ha)
References#
SWAT Theoretical documentation eqn. 3:1.4.1
Notes#
This calculates the fraction of nitrates lost to nitrification as nitrification factor, and bounds it to be in the range [0.0, 1.0]. 0 is the minimum because a negative denitrification factor would indicate nitrous gases turning back into nitrate, which is not an operation that is handled by this module. 1 is the maximum because it is physically impossible to remove more nitrate than there is in the soil.
- _calculate_nitrate_effect(nitrate_content: float) float #
Calculates the effect that the soil nitrate level has on the ratio of nitrous oxide to dinitrogen in denitrified nitrates.
Parameters#
- nitrate_contentfloat
Amount of nitrates (ug N / g soil).
Returns#
- float
Effect of the soil nitrate level on the ratio of nitrous oxide to dinitrogen (unitless).
Notes#
The equation here differs from what was published in Parton et al, [1]. During implementation it was discovered that the equation they published was producing invalid results due to a missing pair of parentheses.
References#
- _calculate_carbon_effect(carbon_respiration: float) float #
Calculates the effect that the soil carbon respiration has on the ratio of nitrous oxide to dinitrogen in denitrified nitrates.
Parameters#
- carbon_respirationfloat
Carbon respiration from the soil layer (kg / ha).
Returns#
- float
Effect of the soil carbon level on the ratio of nitrous oxide to dinitrogen (unitless).
References#
- _calculate_moisture_effect(water_filled_pore_space: float) float #
Calculates the effect that the moisture level has on the ratio of nitrous oxide to dinitrogen in denitrified nitrates.
Parameters#
- water_filled_pore_spacefloat
Fraction of pore space that is occupied by water in the soil layer (unitless).
Returns#
- float
Effect of the soil carbon level on the ratio of nitrous oxide to dinitrogen (unitless).
Notes#
If the water-filled pore space is 0, then the moisture effect is 0.0.
References#
- _calculate_pH_effect(pH: float) float #
Calculates the effect that the soil pH has on the ratio of nitrous oxide to dinitrogen in denitrified nitrates.
Parameters#
- pHfloat
pH of the soil layer.
Returns#
- float
Effect of the soil carbon level on the ratio of nitrous oxide to dinitrogen (unitless).
References#
- _calculate_partitioning_factor(nitrate_effect: float, carbon_effect: float, moisture_effect: float, pH_effect: float) float #
Calculates the factor used to determine the ratio of nitrous oxide to dinitrogen.
Parameters#
- nitrate_effectfloat
Effect of the nitrate level (unitless).
- carbon_effectfloat
Effect of the carbon level (unitless).
- moisture_effectfloat
Effect of the moisture level (unitless).
- pH_effectfloat
Effect of the pH (unitless).
Returns#
- float
Factor used to partition nitrified nitrates into nitrous oxide and dinitrogen.
References#
- _calculate_nitrous_oxide_emissions(denitrified_nitrates: float, partitioning_factor: float) float #
Calculates the quantity of denitrified nitrates that are nitrous oxide.
Parameters#
- denitrified_nitratesfloat
Amount of nitrates that have been denitrified (kg / ha).
- partitioning_factorfloat
Factor used to determine how much of the denitrified nitrates are nitrous oxide (unitless).
Returns#
- float
Amount of nitrous oxide emissions (kg / ha).
References#