Skip to contents

Compute all 19 bioclimatic variables for a raster block

Usage

bioclim_cpp(tas, tasmax, tasmin, pr, ncores = 1L, na_rm = FALSE)

Arguments

tas

Numeric matrix (pixels x 12): monthly mean temperature.

tasmax

Numeric matrix (pixels x 12): monthly max temperature.

tasmin

Numeric matrix (pixels x 12): monthly min temperature.

pr

Numeric matrix (pixels x 12): monthly precipitation.

ncores

Integer: number of OpenMP threads (default 1).

na_rm

Logical: if TRUE, treat NA as missing and compute each BIO from the available months (quarters need >=1 valid month). If FALSE, a single NA in any input for a pixel gives an all-NA row (default).

Value

Numeric matrix (pixels x 19) with one column per variable (bio01..bio19), named accordingly.