calc_similarity: Calculate climatic similarity

Description Usage Arguments Value See Also Examples

View source: R/calc_similarity.R

Description

Uses the parameters specified by the function createParameters. Extracts climatic data from the reference site and compares with every pixel in the search range. Returns a map (RasterLayer) of the search range filled with the calculated climatic similarity.

Usage

1

Arguments

params

List of required input parameters, as specified to function createParameters

Value

RasterLayer with the calculated similarity.

See Also

ref_vals,rota_stack,similarity

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(climstack) #contains 2 RasterStack objects: prec and tavg

#create params, give equal weights to both variables
params <- createParameters(x=-75.5, y=3.2, vars=c("prec","tmean"),weights=c(0.5,0.5),
                        ndivisions=c(12,12),growing.season=c(1,12),rotation="tmean",threshold=1,
                        env.data.ref=list(prec,tavg), env.data.targ=list(prec,tavg),
                        outfile="~/.",fname='similarity',writefile=FALSE)

#calculate similarity
sim_out <- calc_similarity(params)

CIAT-DAPA/analogues documentation built on June 22, 2020, 10:08 p.m.