RUFAS.current_day_conditions module#
- class RUFAS.current_day_conditions.CurrentDayConditions(incoming_light: float, min_air_temperature: float, mean_air_temperature: float, max_air_temperature: float, daylength: float | None = None, annual_mean_air_temperature: float | None = None, snowfall: float = 0.0, rainfall: float = 0.0, irrigation: float = 0.0, precipitation: float = 0.0)#
Bases:
object
The purpose of this class is to combine and covert infos from weather data and field data and creates a current weather class that have all the needed attributes to allow field and field manager to work properly.
Attributes#
- incoming_light: float
Incoming light radiation energy (MJ/m^2).
- min_air_temperature: float
Minimum air temperature for the day (C).
- mean_air_temperature: float
Average air temperature for the day (C).
- max_air_temperature: float
Maximum air temperature for the day (C).
- daylength: float, optional, default=None
Length of time from sunup to sundown on the day (hours).
- annual_mean_air_temperature: float, optional, default=None
Average annual air temperature for the year (C).
- snowfall: float, default=0.0
Amount of snow that falls on the day (mm).
- rainfall: float, default=0.0
Amount of rainfall that occurs on the day (mm).
- irrigation: float, default=0.0
Amount of irrigation that is applied to the field on that day (mm).
- precipitation: float, default=0.0
Amount of precipitation that occurs on the day (mm).
Notes#
_deg_trig and _determine_daylength are more of temporary methods that approximately estimates the day length, this will be revisited for a more accurate implementation post v1
- incoming_light: float#
- min_air_temperature: float#
- mean_air_temperature: float#
- max_air_temperature: float#
- daylength: float | None = None#
- annual_mean_air_temperature: float | None = None#
- snowfall: float = 0.0#
- rainfall: float = 0.0#
- irrigation: float = 0.0#
- precipitation: float = 0.0#
- static determine_daylength(day_number: int, geographic_latitude: float, year: int) float #
Calculates the day length for the field based on its day and latitude.
Parameters#
- day_numberint
Calendar day number of the year.
- geographic_latitudefloat
Geographic latitude (degrees).
- yearint
Calendar year of the current simulation.
Returns#
- float
The length of the current day (hours).
References#
SWAT 1:1.1.6
- static calculate_solar_declination_radians(day_number: int) float #
Helper method to determine the solar declination in radians.
Parameters#
- day_numberint
Calendar day number of the year.
Returns#
- float
Solar declination (radians).
References#
SWAT 1:1.1.2
- __init__(incoming_light: float, min_air_temperature: float, mean_air_temperature: float, max_air_temperature: float, daylength: float | None = None, annual_mean_air_temperature: float | None = None, snowfall: float = 0.0, rainfall: float = 0.0, irrigation: float = 0.0, precipitation: float = 0.0) None #