RUFAS.routines.field.manager.manure_schedule module#
- class RUFAS.routines.field.manager.manure_schedule.ManureSchedule(name: str, years: list[int], days: list[int], nitrogen_masses: list[float], phosphorus_masses: list[float], manure_types: list[ManureType], manure_supplement_methods: list[ManureSupplementMethod], field_coverages: List[float], application_depths: List[float] | None = None, surface_remainder_fractions: List[float] | None = None, pattern_skip: int = 0, pattern_repeat: int = 0)#
Bases:
Schedule
A Schedule child class that defines when and how much manure will be applied to a field.
Parameters#
- namestr
The name of the manure application schedule.
- yearsList[int]
The years in which the manure will be applied.
- daysList[int]
The Julian days on which the manure will be applied within the specified years.
- nitrogen_massesList[float]
The minimum masses of nitrogen to be applied in each manure application (kg).
- phosphorus_massesList[float]
The minimum masses of phosphorus to be applied in each manure application (kg).
- manure_typesList[ManureType]
The types of manure to be applied.
- field_coveragesList[float]
The fractions of the field covered by manure applications (unitless).
- application_depthsList[float], optional
The depths at which the manure is to be injected into the soil for each application (mm).
- surface_remainder_fractionsList[float], optional
The fractions of each manure application that remain on the soil surface (unitless).
- pattern_skipint, optional
The number of years to skip between repetitions of the manure application pattern.
- pattern_repeatint, optional
The number of times the specified manure application pattern should be repeated.
- manure_supplement_methods: list[ManureSupplementMethod]
The methods that each event will use to supplement nutrient deficiencies.
Attributes#
- nitrogen_massesList[float]
Elongated list of nitrogen masses to ensure a mass value for each application year.
- phosphorus_masseslist[float]
Elongated list of phosphorus masses to ensure a mass value for each application year.
- manure_typeslist[ManureType]
Elongated list of manure types to ensure a type for each application year.
- field_coverageslist[float]
Elongated list of field coverages to ensure a coverage value for each application year.
- application_depthslist[float]
Elongated list or default value for application depths to ensure a depth for each application year.
- surface_remainder_fractionslist[float]
Elongated list or default value for surface remainder fractions to ensure a fraction for each application year.
- manure_supplement_methods: list[ManureSupplementMethod]
The methods that each event will use to supplement nutrient deficiencies.
Notes#
Inherits from the Schedule class to manage and validate a schedule for applying specific manure types to a field, including the timing (years and days) and amounts (masses of nitrogen and phosphorus) of each application.
- __init__(name: str, years: list[int], days: list[int], nitrogen_masses: list[float], phosphorus_masses: list[float], manure_types: list[ManureType], manure_supplement_methods: list[ManureSupplementMethod], field_coverages: List[float], application_depths: List[float] | None = None, surface_remainder_fractions: List[float] | None = None, pattern_skip: int = 0, pattern_repeat: int = 0)#
- _validate_manure_parameters() None #
Checks that all parameters defining manure application schedule are valid, otherwise raises error.
Raises#
- ValueError
If not all manure application years are valid. If not all manure application days are valid. If not all manure nitrogen masses are valid. If not all manure phosphorus masses are valid. If not all manure types are valid. If not all field coverage fractions are valid. If not all manure application depths are valid. If not all manure surface retention fractions are valid. If not all manure application parameters have the same length.
- generate_manure_events() list[ManureEvent] #
Creates a list of all manure applications that will be applied as dictated by this manure schedule.
Returns#
- list[ManureEvent]
List of ManureEvents representing all manure applications that will occur over the simulation run.