Calculate thermal time using cardinal temperatures
Examples
met_file <- system.file("extdata/WeatherRecordsDemo1.met", package = "weaana")
records <- readWeatherRecords(met_file)
x_temp <- c(0, 26, 34)
y_temp <- c(0, 26, 0)
res <- thermalTime(records, x_temp, y_temp)
head(res)
#> year day thermalTime
#> 1 1995 1 23.1000
#> 2 1995 2 25.1875
#> 3 1995 3 25.3500
#> 4 1995 4 25.0250
#> 5 1995 5 19.5000
#> 6 1995 6 25.4500
res <- thermalTime(records, x_temp, y_temp, method = "3hr")
head(res)
#> year day thermalTime
#> 1 1995 1 22.06585
#> 2 1995 2 18.77287
#> 3 1995 3 16.11692
#> 4 1995 4 18.51816
#> 5 1995 5 15.89706
#> 6 1995 6 17.02682