RUFAS.routines.field.soil.phosphorus_cycling.fertilizer module#
- class RUFAS.routines.field.soil.phosphorus_cycling.fertilizer.Fertilizer(soil_data: SoilData | None, field_size: float | None = None)#
Bases:
object
Incorporates equations from the SurPhos model to simulate the leaching of Phosphorus from fertilizer applied to the soil surface, tracking its absorption into the soil and/or removal from the field by runoff.
Parameters#
- soil_dataSoilData, optional
The SoilData object used by this module to track all activity within the soil profile, creates new one if one is not provided.
- field_sizefloat, optional
Used to initialize a SoilData object for this module to work with, if a pre-configured SoilData object is not provided (ha).
Attributes#
- dataSoilData
Holds the SoilData object for tracking Phosphorus leaching and other related processes.
- do_fertilizer_phosphorus_operations(rainfall: float, runoff: float, field_size: float) None #
Update phosphorus in surface-applied fertilizer on a daily basis.
Parameters#
- rainfallfloat
Amount of rainfall on this day (mm).
- runofffloat
Amount of runoff on this day (mm).
- field_sizefloat
Size of the field (ha).
- _update_before_and_at_first_rain(rainfall: float, runoff: float, field_size: float) None #
Decide which operations to perform on fertilizer phosphorus.
Parameters#
- rainfallfloat
Amount of rainfall on this day (mm).
- runofffloat
Amount of runoff on this day (mm).
- field_sizefloat
Size of the field (ha).
- _update_after_first_rain(rainfall: float, runoff: float, field_size: float) None #
Decide which operations to perform on fertilizer phosphorus after the first rainfall event.
Parameters#
- rainfallfloat
Amount of rainfall on this day (mm).
- runofffloat
Amount of runoff on this day (mm).
- field_sizefloat
Size of the field (ha).
- add_fertilizer_phosphorus(fertilizer_phosphorus_applied: float) None #
Resets counters and adds to phosphorus pools when new fertilizer phosphorus is applied to the fields.
Parameters#
- fertilizer_phosphorus_appliedfloat
Amount of phosphorus applied to soil surface via fertilizer (kg).
Notes#
When fertilizer phosphorus is applied to the field, this method resets both the days_since_application and rain_events_after_fertilizer_application to 0, and adds the new phosphorus to the available and recalcitrant pools. It also updates the starting available phosphorus value to the new available phosphorus pool value. If the amount of fertilizer to be added is zero, no pool or counters will be modified.
- _absorb_phosphorus_from_available_pool(field_size) None #
Calculate the amount of phosphorus to be absorbed from the available pool to the labile pool.
Parameters#
- field_sizefloat
Size of the field (ha).
Notes#
This function calculates the amount of phosphorus to be absorbed from the available phosphorus pool to the labile pool in the soil. It determines the fraction of the available phosphorus pool that should remain after phosphorus is absorbed into the soil and then calls another method to add the determined amount of phosphorus to the labile pool of the top layer of soil.
- _determine_leached_phosphorus(rainfall: float, runoff: float, field_size: float, phosphorus_pool: float) Dict[str, float] #
Determine the amount of phosphorus removed from the specified pool and partition the loss between soil absorption and runoff.
Parameters#
- rainfallfloat
Amount of rainfall on this day (mm).
- runofffloat
Amount of runoff on this day (mm).
- field_sizefloat
Size of the field (ha).
- phosphorus_poolfloat
Either the available or recalcitrant pool of fertilizer phosphorus (kg).
Returns#
- dict
Dictionary with amounts of phosphorus lost to runoff and soil absorption (both in kg).
- _add_phosphorus_to_soil(added_phosphorus: float, field_size: float) None #
Partitions and adds phosphorus to the top two soil layers.
Parameters#
- added_phosphorusfloat
Phosphorus to be added to the soil profile (kg).
- field_sizefloat
Size of the field (ha).
Notes#
80% of added phosphorus goes into the surface soil layer, and 20% of it goes into the soil layer immediately below the surface soil layer. This distribution of phosphorus into the top two layers of soil is not explicitly stated to occur for phosphorus from chemical fertilizer, but is specified to happen for phosphorus from manure in the top paragraph of page 9 in the SurPhos Theoretical documentation. Pete Vadas instructed the use of this distribution of phosphorus for chemical fertilizer.
- static _determine_fraction_phosphorus_remaining(cover_factor: float, days_since_application: int) float #
Determine the fraction of phosphorus remaining in the available phosphorus pool.
Parameters#
- cover_factorfloat
Factor for calculating the fraction of phosphorus remaining, based on the cover type (unitless).
- days_since_applicationint
Number of days since the last fertilizer application was made.
Returns#
- float
The fraction of phosphorus that remains in the available phosphorus pool (unitless).
References#
- pseudocode_soil [S.5.C.I.1], SurPhos [14]
(Note: constants differ between the documents, prefer the ones from pseudocode_soil)
Notes#
The minimum fraction that can be returned is 0.
- static _determine_phosphorus_distribution_factor(rainfall: float, runoff: float) float #
Determine the phosphorus distribution factor for use in determining how leached fertilizer phosphorus is distributed between infiltration and runoff.
Parameters#
- rainfallfloat
Amount of rainfall on this day (mm).
- runofffloat
Amount of runoff on this day (mm).
Returns#
- float
The phosphorus distribution factor (unitless).
References#
pseudocode_soil [S.5.C.II.2], SurPhos [15]
- static _determine_dissolved_phosphorus_concentration(fertilizer_phosphorus: float, fraction_phosphorus_released: float, distribution_factor: float, total_rainfall: float) float #
Determine the concentration of phosphorus in the runoff.
Parameters#
- fertilizer_phosphorusfloat
Amount of fertilizer phosphorus in the pool that is going to be leached from (mg).
- fraction_phosphorus_releasedfloat
Fraction of phosphorus solubilized during the current rain event (unitless).
- distribution_factorfloat
Value that determines the distribution of phosphorus between runoff and infiltration (unitless).
- total_rainfallfloat
Rainfall on this day (L).
Returns#
- float
Dissolved phosphorus concentration in runoff (mg per L).
References#
pseudocode_soil [S.5.C.II.3], SurPhos [16]