monthCountByTemp {envirem}R Documentation

Month count by temperature

Description

Number of months with mean temperature greater than some base temp.

Usage

monthCountByTemp(tempStack, minTemp = 10, tempScale = 1)

Arguments

tempStack

SpatRaster of monthly mean temperature in degrees C

minTemp

reference temperature in degrees C

tempScale

integer; scaling factor for the temperature data, see envirem for additional details.

Value

rasterLayer with values representing counts of months.

Author(s)

Pascal Title

References

Metzger, M.J., Bunce, R.G.H., Jongman, R.H.G., Sayre, R., Trabucco, A. & Zomer, R. (2013). A high-resolution bioclimate map of the world: a unifying framework for global biodiversity research and monitoring. Global Ecology and Biogeography, 22, 630-638.

Examples

# Find example rasters
rasterFiles <- list.files(system.file('extdata', package='envirem'), full.names=TRUE)
env <- rast(rasterFiles)

# identify the appropriate layers
meantemp <- grep('mean', names(env), value=TRUE)
meantemp <- env[[meantemp]]
monthCountByTemp(meantemp, 10, tempScale = 10)

[Package envirem version 3.0 Index]