This function determines when freezes occur during the year given the daily low temperature data, freeze threshold, and the day of year.
freezedates(tasmin, frzval, DOY)
Vector - daily low temperature data (degrees Fahrenheit). The vector should have a length of 366.
Scalar - freeze threshold (degrees Fahrenheit). Typically this is 28F.
Vector - day of year (1:366)
The output from this function is a list with the following:
Scalar - day of year matching the first freeze that occurs in the fall.
Scalar - day of year matching the last freeze that occurs in the spring.
Scalar - range of days between the first and last freeze.
Data Frame - Table containing the values for low temperature (tasmin), Day of year (DOY), and adjusted Day of Year (DOYadj) for those days of the year where a freeze occurs.