climaticMoistureIndex: Climatic Moisture Index

View source: R/climaticMoistureIndex.R

climaticMoistureIndexR Documentation

Climatic Moisture Index

Description

Generate climatic moisture index.

Usage

climaticMoistureIndex(annualPrecip, PET, precipScale = 1)

Arguments

annualPrecip

rasterLayer of annual precipitation (bioclim 12)

PET

rasterLayer of annual potential evapotranspiration

precipScale

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

Details

P/PET - 1 when P < PET
1 - PET/P when P >= PET

Value

SpatRaster ranging from -1 to +1.

Author(s)

Pascal Title

References

Willmott, C. & Feddema, J. (1992). A More Rational Climatic Moisture Index. The Professional Geographer, 44, 84-88.

Vörösmarty, C.J., Douglas, E.M., Green, P.A. & Revenga, C. (2005). Geospatial Indicators of Emerging Water Stress: An Application to Africa. AMBIO: A Journal of the Human Environment, 34, 230-236.

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)
solar <- grep('solrad', names(env), value=TRUE)
maxtemp <- grep('tmax', names(env), value=TRUE)
mintemp <- grep('tmin', names(env), value=TRUE)

# read them in as SpatRasters
meantemp <- env[[meantemp]]
solar <- env[[solar]]
maxtemp <- env[[maxtemp]]
mintemp <- env[[mintemp]]
tempRange <- abs(maxtemp - mintemp)

# get monthly PET
pet <- monthlyPET(meantemp, solar, tempRange)

# get mean annual PET
annualPET <- sum(pet)

climaticMoistureIndex(env[['bio_12']], annualPET)


envirem documentation built on Aug. 26, 2023, 1:07 a.m.