Chill models

In this chapter, various chill models will be explored using the chillR package in R, which simplifies the calculation of chilling hours and other dormancy-related metrics based on temperature data.

Chilling_Hours() Function

The Chilling_Hours() function calculates the time during which temperatures fall within a key range for chill accumulation. It takes hourly temperature data as input and, by default, provides the cumulative amount of chilling accumulated over time.

Chilling_Hours(Winters_hours_gaps$Temp)[1:100]
  [1]  0  0  0  0  0  0  0  0  0  0  0  0  0  0  1  2  2  2  3  4  5
 [22]  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6
 [43]  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  7  8
 [64]  9 10 11 12 13 14 15 16 16 16 16 16 16 16 16 16 16 16 16 16 16
 [85] 16 17 18 19 20 21 22 23 24 25 25 25 25 25 25 25

The result will show the first 100 values, where the cumulative chilling hours increase as the temperature falls within the specified range.

Utah Model

The Utah Model assigns different weights to various temperature ranges, reflecting their impact on chill accumulation. The Utah_Model() function in chillR calculates these weighted chilling contributions for each hour of temperature data. The output will show the Utah model values for the first 100 hours, where positive, zero, and negative weights are applied based on the temperature:

Utah_Model(Winters_hours_gaps$Temp)[1:100]
  [1]  0.0 -0.5 -1.5 -2.5 -3.5 -4.5 -5.5 -6.0 -6.0 -6.0 -5.5 -5.0 -4.0
 [14] -3.0 -2.0 -1.0  0.0  0.5  1.5  2.5  3.5  4.5  5.0  5.0  5.0  4.0
 [27]  3.0  2.0  1.0  0.0 -1.0 -2.0 -2.5 -2.5 -2.0 -1.5 -1.0 -0.5  0.5
 [40]  1.0  1.5  2.0  2.0  2.5  3.0  3.5  4.0  4.0  4.0  3.5  2.5  1.5
 [53]  0.5 -0.5 -1.5 -2.5 -3.0 -3.0 -2.5 -1.5 -0.5  0.5  1.5  2.5  3.5
 [66]  4.5  5.5  6.5  7.5  8.5  9.5 10.0 10.0  9.5  9.0  8.5  8.0  7.5
 [79]  7.0  6.5  6.5  7.0  7.5  8.5  9.5 10.5 11.5 12.5 13.5 14.5 15.5
 [92] 16.5 17.5 18.5 19.0 19.0 19.0 18.5 17.5 16.5

Creating Custom Chill Models with step_model()

The step_model() function, part of the chillR package, enables the creation of custom chill models based on temperature thresholds and weights. This process involves defining a data frame that specifies temperature ranges and their corresponding weights. Here’s an example of a data frame that defines temperature ranges and their corresponding weights:

df <- data.frame(
  lower = c(-1000, 1, 2, 3, 4, 5,    6),
  upper = c(    1, 2, 3, 4, 5, 6, 1000),
  weight = c(   0, 1, 2, 3, 2, 1,    0))
lower upper weight
-1000 1 0
1 2 1
2 3 2
3 4 3
4 5 2
5 6 1
6 1000 0

A function called custom() implements a chill model based on this data frame. This function is then applied to the Winters_hours_gaps dataset to calculate the chilling contributions:

custom <- function(x) step_model(x, df)
custom(Winters_hours_gaps$Temp)[1:100]
  [1]  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  1  4
 [22]  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7
 [43]  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7
 [64]  7  8 10 13 16 19 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22
 [85] 22 22 22 23 25 27 29 31 34 37 37 37 37 37 37 37

Dynamic model

The Dynamic Model provides a more complex and reliable approach to calculating chill, with the Dynamic_Model() function handling the intricate equations involved. This function can be easily applied to the Winters_hours_gaps dataset, producing output that displays dynamic chill values for the first 100 hours, reflecting the underlying physiological processes:

Dynamic_Model(Winters_hours_gaps$Temp)[1:100]
  [1] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
  [7] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
 [13] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
 [19] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
 [25] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
 [31] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
 [37] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
 [43] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
 [49] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
 [55] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
 [61] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
 [67] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.9698435
 [73] 0.9698435 0.9698435 0.9698435 0.9698435 0.9698435 0.9698435
 [79] 0.9698435 0.9698435 0.9698435 0.9698435 0.9698435 0.9698435
 [85] 0.9698435 0.9698435 0.9698435 0.9698435 0.9698435 0.9698435
 [91] 0.9698435 0.9698435 0.9698435 0.9698435 0.9698435 0.9698435
 [97] 0.9698435 0.9698435 0.9698435 0.9698435

Chilling and tempResponse functions

The chillR package offers several functions for analyzing hourly temperature data, including wrapper functions that enable the computation of chill between specific start and end dates. The chilling() function automatically calculates various basic metrics, including Chilling Hours, Utah Model, Dynamic Model, and Growing Degree Hours. It is important to use the make_JDay() function to add Julian dates (which count the days of the year) to the dataset, ensuring proper functionality.

chill_output <- chilling(make_JDay(Winters_hours_gaps), Start_JDay = 90, End_JDay = 100)
Season End_year Season_days Data_days Perc_complete Chilling_Hours Utah_Model Chill_portions GDH
2007/2008 2008 11 11 100 40 15.5 2.009147 2406.52

However, there may be instances where not all metrics are desired, or there is a need for different metrics altogether. In such cases, the tempResponse function can be employed. This function is similar to chilling() but offers the flexibility to take a list of specific temperature models to be computed as input.

chill_output <- tempResponse(make_JDay(Winters_hours_gaps), 
                       Start_JDay = 90, 
                       End_JDay = 100, 
                       models = list(Chill_Portions = Dynamic_Model, GDH = GDH))
Season End_year Season_days Data_days Perc_complete Chill_Portions GDH
2007/2008 2008 11 11 100 2.009147 2406.52

This will return only the Dynamic Model and Growing Degree Hours (GDH) values for the specified period.

Exercises on chill models

  1. Run the chilling() function on the Winters_hours_gap dataset.
august <- chilling(make_JDay(Winters_hours_gaps), Start_JDay = 214, End_JDay = 244)
Season End_year Season_days Data_days Perc_complete Chilling_Hours Utah_Model Chill_portions GDH
2007/2008 2008 31 31 100 0 -569.5 0 9933.327
  1. Create your own temperature-weighting chill model using the step_model() function.
df <- data.frame(
  lower = c(-1000, 0,  5, 10, 15, 20,   25),  
  upper = c(    0, 5, 10, 15, 20, 25, 1000), 
  weight = c(   0, 1,  2,  3,  2,  1,    0))

custom <- function(x) step_model(x, df)
lower upper weight
-1000 0 0
0 5 1
5 10 2
10 15 3
15 20 2
20 25 1
25 1000 0
  1. Run this model on the Winters_hours_gaps dataset using the tempResponse() function.
models <- list(
  Chilling_Hours = Chilling_Hours,
  Utah_Chill_Units = Utah_Model,
  Chill_Portions = Dynamic_Model,
  GDH = GDH,
  custom = custom)

result <- tempResponse(make_JDay(Winters_hours_gaps), 
                       Start_JDay = 214, 
                       End_JDay = 244, 
                       models)
Season End_year Season_days Data_days Perc_complete Chilling_Hours Utah_Chill_Units Chill_Portions GDH custom
2007/2008 2008 31 31 100 0 -569.5 0 9933.327 838