View source: R/crop_sensitive.R
crop_sensitive | R Documentation |
Compute crop sensitive indices. These indices are designed to capture the changes in temperature extremes during key phenological stages (e.g. anthesis), but can also be applied to other phenological stages.
crop_sensitive(object, ...) ## Default S3 method: crop_sensitive(object, tmin, ...) ## S3 method for class 'data.frame' crop_sensitive(object, day.one, ...) ## S3 method for class 'array' crop_sensitive(object, day.one, ...) ## S3 method for class 'sf' crop_sensitive(object, day.one, ..., as.sf = TRUE)
object |
a numeric vector with the maximum temperature,
or a data.frame with geographical coordinates (lonlat),
or an object of class |
... |
additional arguments passed to methods. See details |
tmin |
a numeric vector with the minimum temperature |
day.one |
a vector of class |
as.sf |
logical, to return an object of class 'sf' |
The function uses pre-defined threshold to compute the indices. For hts_mean (32, 35, 38 Celsius), for hts_max (36, 39, 42 Celsius), for hse (31 Celsius), for cdi_mean (22, 23, 24 Celsius), for cdi_max (27, 28, 29 Celsius) and for lethal (43, 46, 49 Celsius).
Additional arguments:
The thresholds can be adjusted using the arguments hts_mean.threshold
,
hts_max.threshold
, hse.threshold
, cdi_mean.threshold
,
cdi_max.threshold
and lethal.threshold
which are a numeric (or
vector of numeric)
last.day
: an object (optional to span) of class Date
or
any other object that can be coerced to Date
(e.g. integer, character
YYYY-MM-DD) for the last day of the time series. For data.frame
, array
and sf
methods
span
: an integer (optional to last.day) or a vector with
integers (optional if last.day is given) for the length of
the time series to be captured. For data.frame
, array
and sf
methods
A dataframe with crop sensitive indices with n colunms depending on the number of thresholds passed to each index:
hts_mean |
high temperature stress using daily MEAN temperature, and given as percentage number of days a certain threshold is exceeded |
hts_max |
high temperature stress using daily MAX temperature, and given as percentage number of days a certain threshold is exceeded |
hse |
heat stress event, and given as percentage number of days a a certain threshold is exceeded for at least two consecutive days |
hse_ms |
heat stress event, and given the maximum number of days a certain threshold is exceeded for at least two consecutive days |
cdi_mean |
crop duration index using daily MEAN temperature, and given as max(Tmean - threshold, 0) |
cdi_max |
crop duration index using daily MAX temperature, and given as max(Tmax - threshold, 0) |
lethal |
lethal temperatures, defined as percentage of days during the timeseries where daily MEAN temperature exceeds a given threshold |
Challinor et al. (2016). Nature Climate Change 6(10):6954-958 doi: 10.1038/nclimate3061
Trnka et al. (2014). Nature Climate Change 4(7):637–43. doi: 10.1038/nclimate2242
Other temperature functions:
ETo()
,
GDD()
,
temperature()
# the default method set.seed(78) tmax <- runif(50, 37, 47) set.seed(79) tmin <- runif(50, 31, 34) crop_sensitive(tmax, tmin) ############################################### # the array method data("temp_dat", package = "climatrends") # use the default thresholds crop_sensitive(temp_dat, day.one = "2013-10-27", last.day = "2013-11-04") # or change the thresholds based on the crop physiology crop_sensitive(temp_dat, day.one = "2013-10-27", last.day = "2013-11-04", hts_mean.threshold = c(24), hts_max.threshold = c(31, 33))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.