An Rcpp module class exposing the C++ ClimateBlock implementation of
the xbioclim library. Accepts four n_pixels x 12 matrices of monthly
climate data and computes all 19 bioclimatic variables for each pixel via a
compiled C++ back-end.
Value
new(ClimateBlock, tas, tasmax, tasmin, pr) returns an Rcpp
module object of class ClimateBlock. Its $n_pixels() method
returns a single integer and its $compute() method returns an
n_pixels x 19 numeric matrix with columns named bio01
through bio19.
Details
ClimateBlock is loaded into the package namespace when the package
is attached (via loadModule in .onLoad).
Constructor
new(ClimateBlock, tas, tasmax, tasmin, pr)
tasNumeric matrix of dimensions
n_pixels x 12: monthly mean temperature for each pixel.tasmaxNumeric matrix of dimensions
n_pixels x 12: monthly maximum temperature for each pixel.tasminNumeric matrix of dimensions
n_pixels x 12: monthly minimum temperature for each pixel.prNumeric matrix of dimensions
n_pixels x 12: monthly precipitation for each pixel.
All four matrices must have exactly 12 columns and the same number of rows.