Learn R Programming

climatrends (version 0.1.0)

GDD: Growing degree-days

Description

Compute number of days required to reach Growing degree-days. GDD is a heuristic tool in phenology that measures heat accumulation and is used to predict plant and animal development rates. Growing degree-days are calculated by taking the integral of warmth above a base temperature.

Usage

GDD(object, day.one = NULL, degree.days = NULL, base = 10, span = 150, ...)

Arguments

object

a numeric vector of geographic coordinates (lonlat) or an array with two dimensions containing the temperature data; 1st dimension contains the day temperature and 2nd dimension the night temperature. When lonlat is used, the function makes a call to nasapower::get_power() to fetch and concatenate environmental data from NASA POWER (https://power.larc.nasa.gov/) for the parameters T2M_MAX (Maximum Temperature at 2 m) and T2M_MIN (Minimum Temperature at 2 m)

day.one

a vector of class Date for the starting date to capture the environmental data (YYYY-MM-DD)

degree.days

an integer for the degree-days required by the organism (look for the physiology of the focal organism)

base

an integer for the base temperature

span

an integer or a vector with integers for the duration of the timespan to be captured

...

additional arguments passed to get_power methods

Value

The number of days required to reach the growing degree-days.

References

Prentice I. C., et al. (1992) Journal of Biogeography, 19(2), 117. https://doi.org/10.2307/2845499

See Also

Other climatology functions: ETo(), rainfall(), temperature()

Examples

Run this code
# NOT RUN {
# Using local sources
data("modis", package = "climatrends")

day <- as.Date("2013-10-28", format = "%Y-%m-%d")

GDD(modis, 
    day.one = day,
    degree.days = 100, 
    base = 5,
    span = 13)

# }
# NOT RUN {
# Using NASA POWER
library("nasapower")

set.seed(123)
# random geographic locations around bbox(11, 12, 55, 58)
lonlat <- data.frame(lon = runif(3, 11, 12),
                     lat = runif(3, 55, 58))

set.seed(321)
# random dates around 2018-05-15 and 2018-05-20
dates <- as.integer(runif(3, 17666, 17670))
dates <- as.Date(dates, origin = "1970-01-01")

# Calculate the days required for the plants in these plots to reach the
# maturity. Here the plant species requires ~1300 degree days for it.
GDD(lonlat, 
    day.one = dates,
    degree.days = 1300,
    base = 5)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab