Compute the environmental covariates based on the daily weather table of an environment (Year x Location), and over a fixed number of time windows, which is common across all environments. The length of day-windows in days in each environment is determined by dividing the total length of the growing season of this environment by the number of windows to use. Each EC is then computed over a fixed number of days within each environment, but the length of the windows can vary across environments.

compute_EC_fixed_number_windows(
  table_daily_W = x,
  base_temperature = 10,
  method_GDD_calculation = c("method_b"),
  nb_windows_intervals = 10,
  capped_max_temperature = F,
  max_temperature = 35,
  ...
)

Arguments

table_daily_W

data.frame Object returned by the function get_daily_tables_per_env()

base_temperature

numeric Base temperature (crop growth assumed to be null below this value.). Default is 10.

method_GDD_calculation

character Method used to compute the GDD value, with one out of method_a or method_b.
method_a: No change of the value of \(T_{min}\). GDD = \(max (\frac{T_{min}+T_{max}}{2} - T_{base},0)\).
method_b: If \(T_{min}\) < \(T_{base}\), change \(T_{min}\) to \(T_{min}\) = \(T_{base}\).
Default = method_b.

nb_windows_intervals

numeric Number of day-windows covering the growing season length (common number of day-windows across all environments).

Value

An object of class data.frame with 10 x number_total_fixed_windows + 1 last column (IDenv):

  1. mean_TMIN: number_total_fixed_windows columns, indicating the average minimal temperature over the respective day-window.

  2. mean_TMAX: number_total_fixed_windows columns, indicating the average maximal temperature over the respective day-window.

  3. mean_TMEAN: number_total_fixed_windows columns, indicating the average mean temperature over the respective day-window.

  4. freq_TMAX_sup30: number_total_fixed_windows columns, indicating the frequency of days with maximum temperature over 30°C over the respective day-window.

  5. freq_TMAX_sup35: number_total_fixed_windows columns, indicating the frequency of days with maximum temperature over 35°C over the respective day-window.

  6. sum_GDD: number_total_fixed_windows columns, indicating the growing degree days over the respective day-window.

  7. sum_PTT: number_total_fixed_windows columns, indicating the accumulated photothermal time over the respective day-window.

  8. sum_P: number_total_fixed_windows columns, indicating the accumulated precipitation over the respective day-window.

  9. sum_et0: number_total_fixed_windows columns, indicating the cumulative reference evapotranspiration over the respective day-window.

  10. freq_P_sup10: number_total_fixed_windows columns, indicating the frequency of days with total precipitation superior to 10 mm over the respective day-window.

  11. sum_solar_radiation: number_total_fixed_windows columns, indicating the accumulated incoming solar radiation over the respective day-window.

  12. mean_vapr_deficit: number_total_fixed_windows columns, indicating the mean vapour pressure deficit over the respective day-window.

  13. IDenv character ID of the environment (Location_Year)

@author Cathy C. Westhues cathy.jubin@uni-goettingen.de @export