tt_apsim_met: Calculates Thermal Time taking a 'met' object

View source: R/apsim_met.R

tt_apsim_metR Documentation

Calculates Thermal Time taking a ‘met’ object

Description

Calculates Thermal Time using the ‘Classic’ formula, Heat Stress, Crop Heat Unit and other methods

Usage

tt_apsim_met(
  met,
  dates,
  method = c("Classic_TT", "HeatStress_TT", "CropHeatUnit_TT", "APSIM_TT", "CERES_TT",
    "all"),
  x_temp = c(0, 26, 34),
  y_tt = c(0, 26, 0),
  base_temp = 0,
  max_temp = 30,
  dates.format = c("%d-%m")
)

Arguments

met

object of class ‘met’

dates

when the calculation starts and when it ends. At the moment it needs to be a character vector (e.g. c(‘01-05’, ‘10-10’)). It will use the same dates every year for multiple years.

method

one of ‘Classic_TT’, ‘HeatStress_TT’, ‘ASPIM_TT’, ‘CERES_TT’ and ‘all’

x_temp

cardinal temperatures (base, optimal and maximum)

y_tt

thermal time accumulation for cardinal temperatures

base_temp

base temperature for Classic TT calculation

max_temp

maximum temperature for Classic TT calculation

dates.format

default is ‘%d-%m’ which means day and month

Details

Calculating Thermal Time using a variety of methods. The function will fail if the method is not selected. Also, it does not work if each year does not have at least 365 days.

Value

it returns an object of class ‘met’ with additional columns ‘Date’ and the corresponding TT calculation

References

Abendroth, L.J., Miguez, F.E., Castellano, M.J. and Hatfield, J.L. (2019), Climate Warming Trends in the U.S. Midwest Using Four Thermal Models. Agron. J., 111: 3230-3243. (doi:10.2134/agronj2019.02.0118)

Examples

## Not run: 
require(nasapower)
require(ggplot2)

pwr <- get_power_apsim_met(lonlat = c(-93,42), dates = c("2012-01-01","2015-12-31"))
check_apsim_met(pwr)
pwr <- impute_apsim_met(pwr)

pwr2 <- tt_apsim_met(pwr, dates = c("01-05", "30-10"), method = c("Classic", "Heat"))

ggplot(data = pwr2, aes(x = Date, y = Classic_TT)) + geom_point()

ggplot(data = pwr2, aes(x = Date, y = HeatStress_TT)) + geom_point()


## End(Not run)

apsimx documentation built on Sept. 11, 2024, 5:42 p.m.