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, ...)

# S3 method for default
crop_sensitive(object, tmin, ...)

# S3 method for data.frame
crop_sensitive(object, day.one, ...)

# S3 method for array
crop_sensitive(object, day.one, ...)

# S3 method for sf
crop_sensitive(object, day.one, ..., as.sf = TRUE)

Arguments

object

a numeric vector with the maximum temperature, or a data.frame with geographical coordinates (lonlat), or an object of class sf with geometry 'POINT' or 'POLYGON', or an array with two dimensions containing the maximum and minimum temperature, in that order. See details

...

additional arguments passed to methods. See details

tmin

a numeric vector with the minimum temperature

day.one

a vector of class Date or any other object that can be coerced to Date (e.g. integer, character YYYY-MM-DD) for the starting day to capture the climate data

as.sf

logical, to return an object of class 'sf'

Value

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

Details

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

References

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

See also

Other temperature functions: ETo(), GDD(), temperature()

Examples

# the default method
set.seed(78)
tmax <- runif(50, 37, 47)
set.seed(79)
tmin <- runif(50, 31, 34)

crop_sensitive(tmax, tmin)
#>    hts_mean_32 hts_mean_35 hts_mean_38 hts_max_36 hts_max_39 hts_max_42 hse_31
#>          <dbl>       <dbl>       <dbl>      <dbl>      <dbl>      <dbl>  <dbl>
#> 1:        1.00        0.94        0.30       1.00       0.82       0.44   1.00
#>    hse_ms_31 cdi_mean_22 cdi_mean_23 cdi_mean_24 cdi_max_27 cdi_max_28
#>        <dbl>       <dbl>       <dbl>       <dbl>      <dbl>      <dbl>
#> 1:     50.00       19.74       18.74       17.74      10.10       9.10
#>    cdi_max_29 lethal_43 lethal_46 lethal_49
#>         <dbl>     <dbl>     <dbl>     <dbl>
#> 1:       8.10      0.00      0.00      0.00

###############################################

# 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")
#>     hts_mean_32 hts_mean_35 hts_mean_38 hts_max_36 hts_max_39 hts_max_42 hse_31
#>           <dbl>       <dbl>       <dbl>      <dbl>      <dbl>      <dbl>  <dbl>
#> 1:         0.00        0.00        0.00       0.00       0.00       0.00   1.00
#> 2:         0.00        0.00        0.00       0.00       0.00       0.00   1.00
#> 3:         0.00        0.00        0.00       0.00       0.00       0.00   1.00
#> 4:         0.00        0.00        0.00       0.00       0.00       0.00   0.00
#> 5:         0.00        0.00        0.00       0.00       0.00       0.00   1.00
#> 6:         0.00        0.00        0.00       0.00       0.00       0.00   0.00
#> 7:         0.00        0.00        0.00       0.00       0.00       0.00   1.00
#> 8:         0.00        0.00        0.00       0.00       0.00       0.00   1.00
#> 9:         0.00        0.00        0.00       0.00       0.00       0.00   1.00
#> 10:        0.00        0.00        0.00       0.00       0.00       0.00   0.00
#>     hse_ms_31 cdi_mean_22 cdi_mean_23 cdi_mean_24 cdi_max_27 cdi_max_28
#>         <dbl>       <dbl>       <dbl>       <dbl>      <dbl>      <dbl>
#> 1:       9.00       11.40       10.40        9.40       0.00       0.00
#> 2:       9.00       12.81       11.81       10.81       0.00       0.00
#> 3:       9.00        9.88        8.88        7.88       0.00       0.00
#> 4:       0.00        5.23        4.23        3.23       0.00       0.00
#> 5:       9.00       10.47        9.47        8.47       0.00       0.00
#> 6:       0.00        5.29        4.29        3.29       0.00       0.00
#> 7:       9.00       10.47        9.47        8.47       0.00       0.00
#> 8:       9.00        9.41        8.41        7.41       0.00       0.00
#> 9:       9.00       10.04        9.04        8.04       0.00       0.00
#> 10:      0.00        6.36        5.36        4.36       0.00       0.00
#>     cdi_max_29 lethal_43 lethal_46 lethal_49
#>          <dbl>     <dbl>     <dbl>     <dbl>
#> 1:        0.00      0.00      0.00      0.00
#> 2:        0.00      0.00      0.00      0.00
#> 3:        0.00      0.00      0.00      0.00
#> 4:        0.00      0.00      0.00      0.00
#> 5:        0.00      0.00      0.00      0.00
#> 6:        0.00      0.00      0.00      0.00
#> 7:        0.00      0.00      0.00      0.00
#> 8:        0.00      0.00      0.00      0.00
#> 9:        0.00      0.00      0.00      0.00
#> 10:       0.00      0.00      0.00      0.00

# 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))
#>     hts_mean_24 hts_max_31 hts_max_33 hse_31 hse_ms_31 cdi_mean_22 cdi_mean_23
#>           <dbl>      <dbl>      <dbl>  <dbl>     <dbl>       <dbl>       <dbl>
#> 1:         0.00       1.00       1.00   1.00      9.00       11.40       10.40
#> 2:         0.00       1.00       1.00   1.00      9.00       12.81       11.81
#> 3:         0.00       1.00       0.00   1.00      9.00        9.88        8.88
#> 4:         0.00       0.00       0.00   0.00      0.00        5.23        4.23
#> 5:         0.00       1.00       0.00   1.00      9.00       10.47        9.47
#> 6:         0.00       0.00       0.00   0.00      0.00        5.29        4.29
#> 7:         0.00       1.00       0.00   1.00      9.00       10.47        9.47
#> 8:         0.00       1.00       0.00   1.00      9.00        9.41        8.41
#> 9:         0.00       1.00       0.00   1.00      9.00       10.04        9.04
#> 10:        0.00       0.00       0.00   0.00      0.00        6.36        5.36
#>     cdi_mean_24 cdi_max_27 cdi_max_28 cdi_max_29 lethal_43 lethal_46 lethal_49
#>           <dbl>      <dbl>      <dbl>      <dbl>     <dbl>     <dbl>     <dbl>
#> 1:         9.40       0.00       0.00       0.00      0.00      0.00      0.00
#> 2:        10.81       0.00       0.00       0.00      0.00      0.00      0.00
#> 3:         7.88       0.00       0.00       0.00      0.00      0.00      0.00
#> 4:         3.23       0.00       0.00       0.00      0.00      0.00      0.00
#> 5:         8.47       0.00       0.00       0.00      0.00      0.00      0.00
#> 6:         3.29       0.00       0.00       0.00      0.00      0.00      0.00
#> 7:         8.47       0.00       0.00       0.00      0.00      0.00      0.00
#> 8:         7.41       0.00       0.00       0.00      0.00      0.00      0.00
#> 9:         8.04       0.00       0.00       0.00      0.00      0.00      0.00
#> 10:        4.36       0.00       0.00       0.00      0.00      0.00      0.00