late_frost: Late spring frost

View source: R/late_frost.R

late_frostR Documentation

Late spring frost

Description

Compute late spring frost, which is a freezing event occurring after a substantial accumulation of warmth

Usage

late_frost(object, ..., tbase = 4, tfrost = -2)

## Default S3 method:
late_frost(object, tmin, ..., tbase = 4, tfrost = -2)

## S3 method for class 'data.frame'
late_frost(object, day.one, ..., tbase = 4, tfrost = -2)

## S3 method for class 'array'
late_frost(object, day.one, ..., tbase = 4, tfrost = -2)

## S3 method for class 'sf'
late_frost(object, day.one, ..., tbase = 4, tfrost = -2)

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

tbase

an integer for the minimum temperature for growth

tfrost

an integer for the freezing threshold

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

Details

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

Value

A data.frame with the late frost events

id

the id generated using the indices for the rows in object

date

the first day of the event

gdd

the growing degree-days accumulated during the event

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)

duration

the number of days the event spanned

References

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

See Also

Other GDD functions: GDD()

Examples

# 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)

# slightly different series if equation a is used
late_frost(innlandet$tmax, 
           innlandet$tmin, 
           dates = innlandet$date, 
           tbase = 2,
           tfrost = -2,
           equation = "a")

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

# 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")


climatrends documentation built on Jan. 6, 2023, 5:18 p.m.