Compute late spring frost, which is a freezing event occurring after a substantial accumulation of warmth
late_frost(object, ..., tbase = 4, tfrost = -2)
# S3 method for default
late_frost(object, tmin, ..., tbase = 4, tfrost = -2)
# S3 method for data.frame
late_frost(object, day.one, ..., tbase = 4, tfrost = -2)
# S3 method for array
late_frost(object, day.one, ..., tbase = 4, tfrost = -2)
# S3 method for sf
late_frost(object, day.one, ..., tbase = 4, tfrost = -2)
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
an integer for the minimum temperature for growth
an integer for the freezing threshold
a numeric vector with the minimum temperature
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
A data.frame with the late frost events
the id generated using the indices for the rows in object
the first day of the event
the growing degree-days accumulated during the event
a factor for the observed event, frost, latent (where there is no frost event, but also there is no GDD), and warming (where GDD is accumulated)
the number of days the event spanned
Additional arguments:
equation
: character to specify the equation to be used, "b"
is set by default. See GDD()
dates
: a character (or Date or numeric) vector for the dates of tmax and tmin
in the default
method
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
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
Trnka et al. (2014). Nature Climate Change 4(7):637–43. doi:10.1038/nclimate2242
Zohner et al. (2020). PNAS. doi:10.1073/pnas.1920816117
Other GDD functions:
GDD()
# default method
data("innlandet", package = "climatrends")
# equation b is set by default
# where tmin and tmax are adjusted if below tbase
late_frost(innlandet$tmax,
innlandet$tmin,
dates = innlandet$date,
tbase = 2,
tfrost = -2)
#> date gdd event duration
#> <date> <dbl> <fct> <int>
#> 1: 2019-01-01 0.00 frost 108
#> 2: 2019-04-19 0.66 warming 1
#> 3: 2019-04-20 0.00 frost 1
#> 4: 2019-04-21 5.23 warming 10
#> 5: 2019-05-01 0.00 frost 14
#> 6: 2019-05-15 34.71 warming 13
#> 7: 2019-05-28 0.00 frost 4
#> 8: 2019-06-01 124.29 warming 31
# slightly different series if equation a is used
late_frost(innlandet$tmax,
innlandet$tmin,
dates = innlandet$date,
tbase = 2,
tfrost = -2,
equation = "a")
#> date gdd event duration
#> <date> <dbl> <fct> <int>
#> 1: 2019-01-01 0.00 frost 108
#> 2: 2019-04-19 0.00 latent 1
#> 3: 2019-04-20 0.00 frost 1
#> 4: 2019-04-21 0.00 latent 2
#> 5: 2019-04-23 0.00 frost 2
#> 6: 2019-04-25 2.80 warming 6
#> 7: 2019-05-01 0.00 frost 14
#> 8: 2019-05-15 31.38 warming 11
#> 9: 2019-05-26 0.00 frost 6
#> 10: 2019-06-01 118.12 warming 31
#####################################################
# demo of the array method but no frost event is returned
# because the data comes from the tropics
data("temp_dat", package = "climatrends")
late_frost(temp_dat, day.one = "2013-10-27")
#> id date gdd event duration
#> <int> <date> <dbl> <fct> <int>
#> 1: 1 2013-10-27 236.15 warming 14
#> 2: 2 2013-10-27 251.90 warming 14
#> 3: 3 2013-10-27 225.75 warming 14
#> 4: 4 2013-10-27 162.70 warming 14
#> 5: 5 2013-10-27 212.25 warming 14
#> 6: 6 2013-10-27 178.60 warming 14
#> 7: 7 2013-10-27 212.25 warming 14
#> 8: 8 2013-10-27 196.15 warming 14
#> 9: 9 2013-10-27 198.90 warming 14
#> 10: 10 2013-10-27 171.15 warming 14