tempTrend: Long-term local climatic trends

View source: R/tempTrend.R

tempTrendR Documentation

Long-term local climatic trends

Description

Function to calculate temporal trend from a raster series of a climatic variable. This trend is to be used for the calculation of the gradient-based climate velocity using gVoCC.

Usage

tempTrend(r, th)

Arguments

r

RasterStack containing a time series of (annual, seasonal, monthly...) values of the climatic variable for the period of interest.

th

Integer minimum number of observations in the series needed to calculate the trend at each cell.

Value

A RasterStack containing the cell-specific temporal trends extracted from simple linear regressions of the climatic variable against time ("slpTrends" in degree Celsius per year), together with their standard errors ("seTrends") and statistical significance ("sigTrends").

Author(s)

Jorge Garcia Molinos and Christopher J. Brown

See Also

spatGrad, gVoCC

Examples


yrSST <- sumSeries(HSST, p = "1969-01/2009-12", yr0 = "1955-01-01", l = nlayers(HSST),
fun = function(x) colMeans(x, na.rm = TRUE), freqin = "months", freqout = "years")

# Mean annual SST trend (minimum threshold of 10 years of data), with SE and p-values.

tr <- tempTrend(yrSST, th = 10)

plot(tr)


JorGarMol/VoCC documentation built on Aug. 17, 2022, 11:07 p.m.