frostDays: Number of frost days

Description Usage Arguments Details Value Examples

View source: R/frostDays.R

Description

Calculates the number of frost days within a predefined period.

Usage

1
frostDays(mn, dates, iniday = "07-01", endday = "06-30", thres = 0)

Arguments

mn

vector of daily minimum temperature series.

dates

vector of dates corresponding with daily temprature series

iniday

first day of the year ("dd-mm") when frost occurrence will be considered.

endday

last day of the year ("dd-mm") when frost occurrence will be considered.

thres

temperature threshold considered to trigger frost occurrence (0 by default).

Details

Despite the logical threshold of temperature is 0 ÂșC to determine frost occurrence, the argument "thres" is open to change in case of different units of temperature.

Value

A numeric vector with the annual number of frost days is returned.

Examples

1
2
3
4
5
frostDays(mn = daily_tmin,
           dates = seq.Date(as.Date('1981-01-01'),
                             as.Date('2010-12-31'), by ='day'),
           iniday = '07-01',
           endday = '06-30')

rsnotivoli/agroclim documentation built on March 21, 2020, 12:22 a.m.