RUFAS.routines.field.crop.nitrogen_uptake module#
- class RUFAS.routines.field.crop.nitrogen_uptake.NitrogenUptake(crop_data: CropData | None = None, nutrient_distro_param: float = 10.0, nutrient_shapes: list[float] | None = None, previous_nutrient: float | None = None, potential_nutrient_uptake: float | None = None, layer_nutrient_potentials: float | None = None, unmet_nutrient_demands: float | None = None, nutrient_requests: float | None = None, actual_nutrient_uptakes: list[float] | None = None, total_nutrient_uptake: float | None = None, fixed_nitrogen: float | None = None, nitrate_factor: float | None = None, fixation_stage_factor: float | None = None)#
Bases:
NonWaterUptake
Manages nitrogen incorporation in crops.
Parameters#
- crop_dataOptional[CropData], optional
An instance of CropData containing crop specifications and attributes. Defaults to a new instance of CropData if not provided.
- nutrient_distro_paramfloat, default 10.0
Nitrogen uptake distribution parameter (unitless).
- nutrient_shapesOptional[List[float]], default None
Shape coefficients for nitrogen uptake equations (unitless).
- previous_nutrient: Optional[float], default None
Nitrogen in biomass on the previous day (kg/ha).
- potential_nutrient_uptakeOptional[float], default None
Potential nitrogen uptake under ideal conditions (kg/ha).
- layer_nutrient_potentialsOptional[float], default None
Potential nitrogen uptake from each soil layer (kg/ha).
- unmet_nutrient_demandsOptional[float], default None
Unmet nitrogen demands by overlaying soil layers (kg/ha).
- nutrient_requestsOptional[float], default None
Nitrogen requested from each soil layer (kg/ha).
- actual_nutrient_uptakesOptional[List[float]], default None
Actual nitrogen uptake from each soil layer (kg/ha).
- total_nutrient_uptakeOptional[float], default None
Total nitrogen uptake by the plant (kg/ha).
- fixed_nitrogenOptional[float], default None
Total nitrogen fixed by the plant (kg/ha).
- nitrate_factorOptional[float], default None
Soil nitrate factor (unitless).
- fixation_stage_factorOptional[float], default None
Growth stage factor for nitrogen-fixing symbiotes (unitless).
Attributes#
- nutrient_distro_paramfloat
Nitrogen uptake distribution parameter (unitless).
- nutrient_shapesOptional[List[float]]
Shape coefficients for nitrogen uptake equations (unitless).
- previous_nutrientOptional[float]
Nitrogen in biomass on the previous day (kg/ha).
- potential_nutrient_uptakeOptional[float]
Potential nitrogen uptake under ideal conditions (kg/ha).
- layer_nutrient_potentialsOptional[float]
Potential nitrogen uptake from each soil layer (kg/ha).
- unmet_nutrient_demandsOptional[float]
Unmet nitrogen demands by overlaying soil layers (kg/ha).
- nutrient_requestsOptional[float]
Nitrogen requested from each soil layer (kg/ha).
- actual_nutrient_uptakesOptional[List[float]]
Actual nitrogen uptake from each soil layer (kg/ha).
- total_nutrient_uptakeOptional[float]
Total nitrogen uptake by the plant (kg/ha).
- fixed_nitrogenOptional[float]
Total nitrogen fixed by the plant (kg/ha).
- nitrate_factorOptional[float]
Soil nitrate factor (unitless).
- fixation_stage_factorOptional[float]
Growth stage factor for nitrogen-fixing symbiotes (unitless).
References#
‘Nitrogen Uptake’ section (5:2.3.1) of the SWAT model.
- __init__(crop_data: CropData | None = None, nutrient_distro_param: float = 10.0, nutrient_shapes: list[float] | None = None, previous_nutrient: float | None = None, potential_nutrient_uptake: float | None = None, layer_nutrient_potentials: float | None = None, unmet_nutrient_demands: float | None = None, nutrient_requests: float | None = None, actual_nutrient_uptakes: list[float] | None = None, total_nutrient_uptake: float | None = None, fixed_nitrogen: float | None = None, nitrate_factor: float | None = None, fixation_stage_factor: float | None = None)#
- uptake(soil_data: SoilData) None #
Main nitrogen incorporation function that runs all nitrogen processes and stores nitrogen as biomass.
Parameters#
- soil_dataSoilData
The SoilData object that tracks soil properties and nitrogen content.
Notes#
Calling this function executes all nitrogen incorporation routines. It calculates the amount of nitrogen the plant desires based on its current growth stage and the available nitrogen in the soil. The function then extracts nitrogen from the accessible soil profile. If there’s any unmet nitrogen demand, the plant may attempt to fix atmospheric nitrogen. The nitrogen from both extraction and fixation is then added to the plant’s biomass, contributing to its growth.
- try_fixation(total_accessible_nitrates: float, soil_water_factor: float) None #
Attempts to fix nitrogen if the plant is capable of nitrogen fixation.
Parameters#
- total_accessible_nitratesfloat
The total amount of nitrates accessible to the plant’s roots (kg/ha).
- soil_water_factorfloat
A factor representing the availability of water in the soil, affecting the plant’s ability to fix nitrogen (unitless).
Notes#
If the plant species is a nitrogen fixer, this method simulates the fixation of atmospheric nitrogen, enhancing the nitrogen content available to the plant. If the plant is not a nitrogen fixer, no action is taken, and the method does not affect the plant or soil properties. The humorous note implies that non-nitrogen fixing plants do not adversely affect themselves when this method is called.
- update_fixation_attributes(total_accessible_nitrates: float) None #
Updates attributes necessary for nitrogen fixation.
Parameters#
- total_accessible_nitratesfloat
The total nitrates accessible to the plant’s roots.
- fix_nitrogen(water_factor: float) None #
Fixes nitrogen, based on any remaining demand not met by actual uptake.
Parameters#
- water_factorfloat
A factor representing the availability of water in the soil, affecting the efficiency of nitrogen fixation (unitless).
- static _determine_nitrate_factor(total_accessible_nitrates: float) float #
Calculates soil nitrate factor.
Parameters#
- total_accessible_nitratesfloat
Total nitrates available in the soil layers accessible to roots (kg nitrate / ha).
Returns#
- float
The soil nitrate factor, in the range [0.0, 1.0].
References#
SWAT Theoretical documentation equations 5:2.3.15, 5:2.3.16, 5:2.3.17
Notes#
Equation 5:2.3.16 in the SWAT Theoretical documentation (and associated SWAT code in the file nfix.f) is seemingly wrong. This equation originates from the EPIC model (see line 31 of NFIX.f90). Also note that in EPIC, the total accessible nitrates in the soil profile are divided by the amount of residue (RD(JKK)), which RuFaS does not do.
- static _determine_fixation_stage_factor(heat_fraction: float) float #
Calculates the fixation symbiotic growth stage factor.
Parameters#
- heat_fractionfloat
The accumulated fraction of potential heat units (PHU).
Returns#
- float
The growth stage factor for symbiotic organisms involved in nitrogen fixation (unitless).
Notes#
The symbiotic organisms that fix nitrogen exist at different densities depending upon the age of the plant. This growth stage factor reflects the density and activity level of these symbiotic organisms relative to the plant’s growth stage.
References#
SWAT 2:2.3.10 - 2:2.3.14
- static _determine_fixed_nitrogen(demand: float, stage_factor: float, water_factor: float, nitrate_factor: float) float #
Calculates the amount of nitrogen fixed by a plant.
Parameters#
- demandfloat
Nitrogen demand not met by uptake from soil (kg/ha).
- stage_factorfloat
Growth stage factor, ranging from 0 to 1 (unitless).
- water_factorfloat
Soil water factor, ranging from 0 to 1 (unitless).
- nitrate_factorfloat
Soil nitrate factor, ranging from 0 to 1 (unitless).
Returns#
- float
The amount of nitrogen added to plant biomass through fixation, capped at the demand (kg/ha).
References#
SWAT 5:2.3.9
- _abc_impl = <_abc._abc_data object>#