# Calculate GDD values from a climate dataset with daily temperature data,
# using a base temperature of 0 C and format it to be compatible with
# phenology_thermal_time
library(magrittr)
library(dplyr)
library(lubridate)
Tudela_GDD <- GDD_linear(Tudela_DW,0) %>% rename(GD=GDD)
# Create a dataframe with start dates and forcing requirements for
# bloom and veraison in the GFV model for 'Chardonnay' (Parker et al,
# 2013, Agric Forest Meteorol 180:249-264) in the format required for
# the function
Dreq <- c(60,60)
Freq <- c(1217,2547)
Chardonnay_reqs <- as.data.frame(cbind(Dreq,Freq))
# Obtain the predicted dates
Phenology_Chardonnay <- phenology_thermal_time(Tudela_GDD,Chardonnay_reqs)
Run the code above in your browser using DataLab