spatGrad | R Documentation |
Function to calculate the magnitude and direction of the spatial gradient associated to a climatic variable after Burrows et al. (2011). This trend is to be used for the calculation of the gradient-based climate velocity using gVoCC.
spatGrad(r, th = -Inf, projected = FALSE)
r |
|
th |
|
projected |
|
A RasterStack
with the magnitude of the spatial gradient
(Grad in C per km for unprojected rasters and C per spatial unit for projected rasters),
and the associated angle (Ang in degrees).
Jorge Garcia Molinos, David S. Schoeman, and Michael T. Burrows
Burrows et al. 2011. The pace of shifting climate in marine and terrestrial ecosystems. Science, 334, 652-655.
tempTrend
, gVoCC
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")
# Spatial gradient (magnitude and angle) for the average mean annual SST.
sg <- spatGrad(yrSST, th = 0.0001, projected = FALSE)
plot(sg)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.