data(Tudela_DW)
data(Bigtop_reqs)
library(magrittr)
library(dplyr)
library(lubridate)
# Select the first two seasons in Tudela_DW example dataset
Tudela_Sel <- Tudela_DW %>%
filter (Tudela_DW$Year<=2002)
# Generate hourly temperatures from the example dataset
Tudela_HT <- hourly_temps(Tudela_Sel,42.13132)
# Calculate chill as chill portions, starting on DOY 305
Chill <- chill_portions(Tudela_HT,305)
# Calculate forcing heat as growing degree hours (GDH) with the linear model,
# using base temperature 4.7 C and no upper thresholds
GDH <- GDH_linear(Tudela_HT,4.7,999,999)
# Combine Chill and GDH values in a dataframe with a format compatible with
# the function phenology_sequential
Tudela_CH <- merge(Chill,GDH) %>%
select(Date, Year, Month, Day, DOY, Chill,GDH) %>%
rename(GD=GDH)
# Obtain the predicted dates using the example dataset with requirements
Phenology_BT <- phenology_sequential(Tudela_CH, Bigtop_reqs, 305)
Run the code above in your browser using DataLab