Skip to contents

Computes ecologically meaningful variables that standard bioclimatic variables lack, from the 12 monthly means of maximum, minimum and mean temperature and monthly precipitation, e.g. CHELSA or WorldClim climatologies (see download_chelsa_monthly()). They were chosen for plants with different photosynthetic pathways (C3/C4: water deficit, evaporative demand, heat, and whether rain falls in the warm season), but are useful for any water- or heat-limited species.

Usage

climate_indices(
  tmax,
  tmin,
  prec,
  tmean = NULL,
  indices = "all",
  heat_threshold = 30,
  gdd_base = 5,
  frost_threshold = 0,
  tdew_offset = 0,
  temp_units = c("auto", "C", "K", "K10"),
  path = NULL,
  prefix = "",
  overwrite = FALSE
)

Arguments

tmax, tmin, prec

Monthly maximum and minimum temperature and precipitation: 12-layer terra::SpatRasters (January to December) or 12 file paths (e.g. from monthly_files()).

tmean

Monthly mean temperature; default (tmax + tmin) / 2.

indices

Which indices to compute: names of indices or of groups of them (see climate_index_names()), or "all" (default: every unflagged index from monthly data; a group brings its unflagged members, flagged ones are computed only by name).

heat_threshold

Temperature (degC) above which heat_stress sums.

gdd_base

Base temperature (degC) of gdd, lgp, ra_gs and the day-length indices of the growing season: 5 suits temperate plants; use 0 for arctic-alpine plants or about 10 for thermophilous plants and many insects.

frost_threshold

Temperature (degC) below which cold_stress sums and frost_months counts.

tdew_offset

Dew point below Tmin (degC) for vpd.

temp_units

"auto", "C", "K" or "K10" (Kelvin x 10).

path

Optional folder: each index is written to <prefix><index>.tif (recommended for large areas).

prefix

File name prefix, e.g. "CHELSA_MPI-ESM1-2-HR_ssp370_".

overwrite

Overwrite existing files; otherwise existing files are kept and read (so interrupted runs continue).

Value

A terra::SpatRaster with one layer per index.

Details

IndexGroupMeaningUnitUseful forSource
vpdwatermean vapour pressure deficit (dew point from Tmin)kPadryness of the air: stomatal closure and transpiration of plants, desiccation of amphibians, snails and insectsAllen et al. 1998; Grossiord et al. 2020
petwaterpotential evapotranspiration (Hargreaves-Samani)mm/yearevaporative demand and available energy; plant productivity and species richnessHargreaves & Samani 1985; Allen et al. 1998
cmdwaterclimatic moisture deficit: sum of monthly PET - P where positivemm/yeardrought not met by rain: forest-steppe limits, drought-sensitive trees, C3 versus C4 grassesStephenson 1990; Wang et al. 2012
ariditywateraridity index P / PET (< 0.05 hyper-arid, > 0.65 humid)-the humid-arid gradient: biome limits, dryland and desert taxaUNEP 1992
heat_stressheatsum over months of Tmax above heat_thresholddegC x monthsexposure to hot months: upper thermal limits of alpine and boreal taxa and of ectotherms; C4 advantagethis package; Ehleringer et al. 1997
sriseasonsummer rain index: precipitation of the warmest quarter / annual (bio18 / bio12)0-1rain in the warm season: C4 versus C3 grasses, monsoon versus Mediterranean taxaTeeri & Stowe 1976; Paruelo & Lauenroth 1996
synchronicityseasonheat-rain synchrony: 1 = the warmest and the wettest month coincide, 0 = six months apart0-1whether water arrives when it is warm: summer-rain versus winter-rain floras, C3/C4 balancethis package; Paruelo & Lauenroth 1996
gddheatgrowing degree days: monthly Tmean above gdd_base x daysdegC x daysheat sum for growth and development: cold range limits of plants, number of insect generationsWoodward 1987; Prentice et al. 1992
cold_stresscoldsum over months of Tmin below frost_thresholddegC x monthswinter severity: frost-sensitive plants, survival of overwintering stagesWoodward 1987; Sakai & Larcher 1987
frost_monthscoldnumber of months with Tmin below frost_thresholdmonthsduration of frost: evergreen versus deciduous plants, length of dormancy or hibernationWoodward 1987; Sakai & Larcher 1987
continentalityheatTmean of the warmest month - that of the coldestdegCannual temperature amplitude: oceanic versus continental speciesRivas-Martinez et al. 2011
dry_monthswatermonths with P < 2 x Tmean (the dry season of Walter-Lieth diagrams)monthslength of the dry season: Mediterranean and savanna taxa, drought-deciduous plantsBagnouls & Gaussen 1953; Walter & Lieth 1960
lgpseasonlength of the growing period: months with Tmean >= gdd_base and P >= PET / 2monthstime when both warmth and water allow growth: crops and their wild relatives, annual plantsFAO 1978
embergerwaterEmberger's pluviothermic quotient 2000 P / (M^2 - m^2), M and m in Kelvin-Mediterranean bioclimatic stages (arid to humid); lower = drierEmberger 1955; Daget 1977
ellenbergwaterEllenberg's quotient: Tmean of the warmest month / annual P x 1000degC/mm x 1000humidity gradient of temperate forests: beech dominates below about 30, oaks aboveEllenberg 1963; Fang & Lechowicz 2006
kira_warmthheatKira's warmth index WI = sum of (Tmean - 5) over months with Tmean > 5 degCdegC x monthsvegetation zones of East Asia (evergreen broad-leaved forest between 85 and 180)Kira 1945; Kira 1991
kira_coldnesscoldKira's coldness index CI = -(sum of (5 - Tmean)) over months with Tmean < 5 degC: zero or negative, as defined by KiradegC x monthscold limit of evergreen broad-leaved trees in East Asia (about -10)Kira 1945; Kira 1991
ralightmean extraterrestrial radiation over the year (latitude only)MJ m-2 day-1light at the top of the atmosphere; in a model a smooth stand-in for latitudeAllen et al. 1998
ra_gslightextraterrestrial radiation received in the months with Tmean >= gdd_baseMJ m-2light available while it is warm enough to grow: productivity at high latitudes and elevationsthis package; Allen et al. 1998
daylength_startlightday length in the middle of the month in which the growing season startshoursphotoperiod at the onset of growth: bud burst, flowering of long-day plants, end of diapauseKoerner & Basler 2010; Way & Montgomery 2015
daylength_endlightday length in the middle of the month in which the growing season endshoursphotoperiod at the end of the season: growth cessation and bud set of trees, start of diapauseBradshaw & Holzapfel 2007; Way & Montgomery 2015
daylength_gslightmean day length of the months with Tmean >= gdd_basehoursphotoperiod during growth: long-day versus short-day plants, daily activity time of diurnal animalsSaikkonen et al. 2012
daylight_gslighthours of daylight in the months with Tmean >= gdd_basehourstime for photosynthesis or foraging in the season: a short northern summer with long days against a long southern onethis package; Saikkonen et al. 2012
daylength_maxlightday length on the summer solstice (latitude only; 24 = midnight sun)hoursthe longest day: species that need a critical day length to flower or to breed; like ra a stand-in for latitudeAllen et al. 1998; Bradshaw & Holzapfel 2007
days_to_solsticelightdays from the start of the growing season to the summer solstice (negative = it starts later)daysshare of the season on lengthening days: phenological timing, species whose flowering is triggered before the solsticethis package; Koerner & Basler 2010

All are computed by default; choose some by name or by group with climate_index_names(), e.g. indices = climate_index_names("water") or indices = c("cold", "gdd"). "Useful for" gives examples of the questions an index was made for or is commonly used in, not a limit on its use; "Source" gives the origin of the index or of its ecological use (see the references), and "this package" marks definitions that are ours. Kira's indices always use 5 degC, whereas gdd uses gdd_base and counts days; continentality uses mean, not extreme, temperatures, unlike bio7. ra and daylength_max depend on latitude alone: in a model they act as a smooth stand-in for latitude, so use them only with that in mind. The other light indices combine latitude with the temperature season, so they differ between a mountain and its foreland and change with the climate of another period.

Formulas. Saturation vapour pressure \(e_s(T) = 0.6108 \exp(17.27 T / (T + 237.3))\) (kPa); monthly VPD \(= (e_s(T_{max}) + e_s(T_{min}))/2 - e_s(T_{min} - d)\) with tdew_offset \(d\) (FAO-56 suggests 2-3 degC in arid climates), and the annual mean of the 12 months. PET per month \(= 0.0023 \times 0.408 R_a (T_{mean} + 17.8) \sqrt{T_{max} - T_{min}}\) (mm/day, with extraterrestrial radiation \(R_a\) in MJ m-2 day-1 from latitude and the mid-month day, FAO-56 eq. 21; 0.408 converts it to mm of evaporation) times the days of the month, never below 0. The quarters for sri are any three consecutive months, also across the year's end (e.g. December-February), the warmest by mean temperature, as for bioclim variables: sri equals bio18 / bio12, so do not use it together with both. Ties in synchronicity take the first month. In emberger, M is the mean maximum temperature of the warmest month and m the mean minimum of the coldest, P the annual precipitation. gdd, lgp, frost_months, cold_stress and dry_months are computed from monthly means, so they are approximations of the daily quantities: days above the base within a month whose mean is below it (or frosts in a month whose mean minimum is above the threshold) are not counted. The growing season of daylength_start starts in the first month with Tmean at or above gdd_base, counting from the coldest month (which is itself the start where every month is warm enough); cells without such a month get NA. Day length is \(24 \omega_s / \pi\) with the sunset hour angle \(\omega_s\) of FAO-56 (eq. 25 and 34). The season ends in the last month at or above gdd_base before the coldest month (daylength_end). daylength_gs is the mean of the mid-month day lengths of the months at or above gdd_base, weighted by their days (NA without such a month), and daylight_gs their sum over those days (0 without such a month). For days_to_solstice the start of the season is placed between two mid-month days by linear interpolation of the monthly mean temperatures (where every month is warm enough it is the middle of the coldest month); the solstice is day 172 north and day 355 south of the equator, and the result lies between -182 and 182. With monthly means it is accurate to about one or two weeks. Several indices are strongly correlated with each other and with bioclim variables (e.g. gdd with bio1, ellenberg and emberger with aridity); let select_variables() choose among them.

Bioclimatic variables and smooth substitutes. bio1 to bio19 follow the WorldClim definitions (quarters are any three consecutive months; bio4 is 100 x the SD of the monthly means, bio15 is 100 x SD(P) / (1 + mean P), eq. 16 of O'Donnell & Ignizio 2012, which equals the CV of P + 1), so they match the other indices in grid and period. bio8, bio9, bio18, bio19, sri and synchronicity are flagged (see climate_index_names(); Booth 2022) and computed only when asked by name. t_wet and t_dry are the mean temperature weighted by monthly precipitation and by dryness (max(P) - P); p_warm and p_cold are 3 x the mean precipitation weighted by warmth (T - min(T)) and coldness (max(T) - T), in mm per quarter. Without a season (equal weights of 0) they fall back to the plain mean.

Approximations. vpd uses monthly mean Tmax and Tmin with Tmin (minus tdew_offset) as the dew point: a climatological approximation, not the monthly mean of daily VPD, and no humidity data enter it. pet (Hargreaves & Samani 1985) is an empirical, temperature-based estimate without humidity, wind or measured radiation; it, cmd and aridity are not equivalent to FAO Penman-Monteith values.

Units. Temperatures must be in degC and precipitation in mm per month. CHELSA V2.1 stores temperature as K x 10 with a scale (0.1) and offset (-273.15) in the files, which terra applies when reading, so the values are already in degC: do not divide them by 10. temp_units = "auto" checks the values and converts Kelvin (or K x 10 read without the scale) and stops if they look divided by 10 by mistake.

Run it on files already cut to your region (e.g. with crop_rasters(), which keeps CHELSA's values exact), in their own longitude/latitude grid, and project the results afterwards if needed: projecting 7 results is faster than projecting 48 monthly layers, and the indices are computed on unsmoothed values. Any CRS works; latitude is computed for each cell.

References

Allen, R.G., Pereira, L.S., Raes, D., Smith, M. (1998) Crop evapotranspiration. FAO Irrigation and Drainage Paper 56.

Bagnouls, F., Gaussen, H. (1953) Saison seche et indice xerothermique. Bulletin de la Societe d'Histoire Naturelle de Toulouse 88, 193-239.

Booth, T.H. (2022) Checking bioclimatic variables that combine temperature and precipitation data before their use in species distribution models. Austral Ecology 47, 1506-1514. doi:10.1111/aec.13234

Bradshaw, W.E., Holzapfel, C.M. (2007) Evolution of animal photoperiodism. Annual Review of Ecology, Evolution, and Systematics 38, 1-25.

Busby, J.R. (1991) BIOCLIM - a bioclimate analysis and prediction system. Plant Protection Quarterly 6, 8-9.

Daget, P. (1977) Le bioclimat mediterraneen: analyse des formes climatiques par le systeme d'Emberger. Vegetatio 34, 87-103.

Ehleringer, J.R., Cerling, T.E., Helliker, B.R. (1997) C4 photosynthesis, atmospheric CO2, and climate. Oecologia 112, 285-299.

Ellenberg, H. (1963) Vegetation Mitteleuropas mit den Alpen. Ulmer, Stuttgart.

Emberger, L. (1955) A biogeographic classification of climates. Recueil des Travaux des Laboratoires de Botanique, Geologie et Zoologie de la Faculte des Sciences de l'Universite de Montpellier, Serie Botanique 7, 3-43.

Fang, J., Lechowicz, M.J. (2006) Climatic limits for the present distribution of beech (Fagus L.) species in the world. Journal of Biogeography 33, 1804-1819.

FAO (1978) Report on the agro-ecological zones project. World Soil Resources Report 48.

Grossiord, C. et al. (2020) Plant responses to rising vapor pressure deficit. New Phytologist 226, 1550-1566.

Hargreaves, G.H., Samani, Z.A. (1985) Reference crop evapotranspiration from temperature. Applied Engineering in Agriculture 1, 96-99.

Hijmans, R.J., Cameron, S.E., Parra, J.L., Jones, P.G., Jarvis, A. (2005) Very high resolution interpolated climate surfaces for global land areas. International Journal of Climatology 25, 1965-1978. doi:10.1002/joc.1276

Karger, D.N. et al. (2017) Climatologies at high resolution for the earth's land surface areas. Scientific Data 4, 170122.

Kira, T. (1945) A new classification of climate in eastern Asia as the basis for agricultural geography. Horticultural Institute, Kyoto University.

Kira, T. (1991) Forest ecosystems of East and Southeast Asia in a global perspective. Ecological Research 6, 185-200.

Koerner, C., Basler, D. (2010) Phenology under global warming. Science 327, 1461-1462.

O'Donnell, M.S., Ignizio, D.A. (2012) Bioclimatic predictors for supporting ecological applications in the conterminous United States. U.S. Geological Survey Data Series 691. doi:10.3133/ds691

Paruelo, J.M., Lauenroth, W.K. (1996) Relative abundance of plant functional types in grasslands and shrublands of North America. Ecological Applications 6, 1212-1224.

Prentice, I.C. et al. (1992) A global biome model based on plant physiology and dominance, soil properties and climate. Journal of Biogeography 19, 117-134.

Rivas-Martinez, S., Rivas Saenz, S., Penas, A. (2011) Worldwide bioclimatic classification system. Global Geobotany 1, 1-634.

Saikkonen, K. et al. (2012) Climate change-driven species' range shifts filtered by photoperiodism. Nature Climate Change 2, 239-242.

Sakai, A., Larcher, W. (1987) Frost survival of plants. Springer, Berlin.

Stephenson, N.L. (1990) Climatic control of vegetation distribution: the role of the water balance. American Naturalist 135, 649-670.

Teeri, J.A., Stowe, L.G. (1976) Climatic patterns and the distribution of C4 grasses in North America. Oecologia 23, 1-12.

UNEP (1992) World atlas of desertification. Edward Arnold, London.

Walter, H., Lieth, H. (1960) Klimadiagramm-Weltatlas. Fischer, Jena.

Wang, T., Hamann, A., Spittlehouse, D.L., Murdock, T.Q. (2012) ClimateWNA: high-resolution spatial climate data for western North America. Journal of Applied Meteorology and Climatology 51, 16-29.

Way, D.A., Montgomery, R.A. (2015) Photoperiod constraints on tree phenology, performance and migration in a warming world. Plant, Cell and Environment 38, 1725-1736.

Woodward, F.I. (1987) Climate and plant distribution. Cambridge University Press.

Examples

# a small synthetic grid: warm wet summers in the south, dry in the north
r <- terra::rast(nrows = 10, ncols = 10, xmin = 0, xmax = 10, ymin = 30,
                 ymax = 40, nlyrs = 12)
season <- sin((1:12 - 4) / 12 * 2 * pi)       # warmest in July
lat <- terra::init(r[[1]], "y")
tmax <- terra::rast(lapply(1:12, function(m) 45 - lat + 10 * season[m]))
tmin <- tmax - 12
prec <- terra::rast(lapply(1:12, function(m) 40 + (40 - lat) * 8 *
                               pmax(season[m], 0)))
ci <- climate_indices(tmax, tmin, prec)
ci
#> class       : SpatRaster
#> size        : 10, 10, 43  (nrow, ncol, nlyr)
#> resolution  : 1, 1  (x, y)
#> extent      : 0, 10, 30, 40  (xmin, xmax, ymin, ymax)
#> coord. ref. : lon/lat WGS 84 (CRS84) (OGC:CRS84)
#> source(s)   : memory
#> names       :      vpd,         pet,        cmd,  aridity, heat_stress,         gdd, ...
#> min values  :  0.28751,  661.111396, 268.620607, 0.734771,           0,  332.275496, ...
#> max values  : 0.494875, 1039.284618,  286.96291, 0.748892,           0, 1892.275496, ...
terra::plot(ci)

# only some: by group and by name, with another base temperature
names(climate_indices(tmax, tmin, prec, indices = c("cold", "gdd"),
                      gdd_base = 10))
#> [1] "gdd"           "cold_stress"   "frost_months"  "kira_coldness"