RUFAS.routines.field.field.tillage_application module#
- class RUFAS.routines.field.field.tillage_application.TillageApplication(field_data: FieldData | None = None, soil_data: SoilData | None = None, field_size: float | None = None)#
Bases:
object
This class contains all necessary methods for executing tillage operations on a field, based on SWAT Theoretical documentation section 6:1.6 and the SurPhos plow.f file.
Parameters#
- field_dataFieldData, default=None
FieldData object that tracks attributes on the soil surface as they are updated by tillage applications.
- soil_dataSoilData, default=None
SoilData object that tracks all attributes of the soil profile as they are updated by tillage applications.
- field_sizefloat, default=None
Size of the field (ha)
Attributes#
- field_dataFieldData
FieldData object that tracks attributes on the soil surface as they are updated by tillage applications
- soil_dataSoilData
SoilData object that tracks all attributes of the soil profile as they are updated by tillage applications.
Methods#
- till_soil(self, tillage_depth: float, incorporation_fraction: float, mixing_fraction: float, year: int,
day: int) -> None
Mixes nutrients, manure/fertilizer mass, and residue from the soil profile and soil surface together in the soil profile.
Notes#
This class was written to be as flexible as possible, because every attribute on the soil surface and in the soil profile gets incorporated and/or mixed with the same logic. If no SoilData object is provided, one is created with the default configuration based on the field size.
- __init__(field_data: FieldData | None = None, soil_data: SoilData | None = None, field_size: float | None = None)#
Creates a TillageApplication object based on a SoilData object.
Parameters#
- field_dataFieldData, optional
FieldData object that tracks attributes on the soil surface as they are updated by tillage applications.
- soil_dataSoilData, optional
SoilData object that tracks all attributes of the soil profile as they are updated by tillage applications.
- field_sizefloat, optional
Size of the field (ha)
Notes#
If no SoilData object is provided, one is created with the default configuration based on the field size.
- till_soil(tillage_depth: float, incorporation_fraction: float, mixing_fraction: float, implement: TillageImplement, year: int, day: int) None #
Mixes nutrients, manure/fertilizer mass, and residue from the soil profile and soil surface together in the soil profile.
Parameters#
- tillage_depthfloat
The lowest depth the tilling implement reaches (mm).
- incorporation_fractionfloat
Fraction of soil surface pool incorporated into the soil profile (unitless).
- mixing_fractionfloat
Fraction of pool in each layer mixed and redistributed back into the soil profile (unitless).
- implementTillageImplement
The tillage implement used to execute this application.
- yearint
Year of the time object.
- dayint
Day of the time object.
References#
SWAT Theoretical documentation section 6:1.6, SurPhos Fortran code plow.f
Notes#
The tillage process starts by removing matter from the soil surface pools and putting it into the top soil layer, then mixing everything in together from the different soil layers. The method also checks that tillage does not go deeper than the bottom of the soil profile.
- _mix_soil_layers(pool_name: str, tillage_depth: float, mixing_fraction: float, offset_top_layer: bool = False) None #
Redistributes matter from the specified pool throughout the soil profile.
Parameters#
- pool_namestr
Name of the soil attribute that should be mixed within the soil profile (unitless)
- tillage_depthfloat
The lowest depth the tilling implement reaches (mm)
- mixing_fractionfloat
Fraction taken from each layer that is mixed and redistributed back into the soil profile (unitless)
- offset_top_layerbool, optional, by default=False
A flag that determines whether to offset the top layer of soil in redistribution calculations
References#
SWAT Theoretical documentation, example on page 361.
Notes#
This method executes the actual mixing between the soil layers. Each layer in the soil profile can be either fully tilled, partially tilled, or not tilled at all. The method starts by determining how much matter will be mixed back into the profile based on the mixing fraction and the amount in the pool of each layer. Then it redistributes mixed matter back into the tilled layers of the profile. The amount mixed back in to a layer is determined by the ratio between the depth of tillage in the layer and the total overall tillage depth.
This method acts in accordance with research from Dr. Xuesong Zhang which says that passive carbon is not present in the top soil layer and is not mixed into the top soil layer during tillage operations.
- static _remove_amount_incorporated(data_container: object, attribute_name: str, incorporation_fraction: float) float #
Calculates amount incorporated from soil surface pools into the soil profile.
Parameters#
- data_containerobject
Instance of FieldData, SoilData, or a ManurePool containing the soil surface pool to be removed from.
- attribute_namestr
attribute of the manure pool instance from which to get the data.
- incorporation_fractionfloat
Fraction of stuff incorporated into the soil profile from the soil surface (unitless)
Returns#
- float
Amount removed from soil surface and added to the top soil layer (units vary)
Raises#
- TypeError
If the type of the data container is not SoilData or FieldData.
References#
SurPhos fortran code, plow.f lines 20 - 32.
Notes#
This method both calculates the amount that is removed from the soil surface and actually removes it from the soil surface, returning the removed amount. The units of the value returned are the same as the units of the pool being removed from.
- _record_tillage(tillage_depth: float, incorporation_fraction: float, mixing_fraction: float, implement: TillageImplement, year: int, day: int) None #
Records the mass and nutrients collected in an individual harvest and sends them to the OutputManager.
Parameters#
- tillage_depthfloat
The lowest depth the tilling implement reaches (mm)
- incorporation_fractionfloat
Fraction of soil surface pool incorporated into the soil profile (unitless)
- mixing_fractionfloat
Fraction of pool in each layer mixed and redistributed back into the soil profile (unitless)
- implementTillageImplement
The tillage implement used to execute this application.
- yearint
Year in which this harvest occurred.
- dayint
Julian day on which this harvest occurred.