Background
Climate is the average weather condition for a particular location over a long period of time, typically at least thirty years (WMO, 2020). Climate change represents an alteration in the state of the climate as documented by changes in the mean and/or the variability of its properties (IPCC, 2018). Measuring changes in climate is by no means trivial because several dimensions are involved (e.g., measured through anomalies, difference from the baseline, velocity of change) and several variables can be used, in isolation or in combination, to quantify the changes (e.g., temperature, precipitation, wind speed). Adequately capturing the wealth of climate change manifestations as well as the ways in which they interact with living systems requires characterising multiple dimensions of change across multiple variables (Garcia et al., 2014).
Conceptually, the metrics of climate change can be quantified at a local (the pixel-level) or regional (involving multiple cells) scales (Garcia et al., 2014). The former has a temporal dimension, while the latter involves both spatial and temporal dimensions. For example, the local metrics, such as anomalies (e.g., Araújo et al., 2008), standardized anomalies (e.g., Williams & Jackson, 2007), probability of extreme events (e.g., Jiménez et al., 2011), and changes in seasonality (e.g., Lane et al., 2012), quantify how mean or extreme values in the time series of climate variables are altered in a given locality (a grid cell in a raster dataset) over time. In turn, the regional metrics, such as the emergence of novel climates (Williams et al., 2001), changes in areas of analogous climate (Ohlemüller et al., 2008), changes in distance to analogous climate (Nogués-Bravo et al., 2010), and climate change velocity (Loarie et al., 2009; VanDerWal et al., 2013), first characterize a climate dimension across a given region and then measure local changes in the availability of the climate dimension relative to the regional pattern.
Climate change metrics can be used as proxies for more detailed assessments of climate change impacts on biodiversity, such as those used in species distribution modelling (Garcia et al., 2016). They have also been related to quantities of past extinctions (Nogués-Bravo et al., 2010) and the occurrence of areas with high concentrations of species with restricted range sizes (Ohlemüller et al., 2008; Sandel et al., 2011).
Despite the abundance of climate change metrics and their potential links with biodiversity (Garcia et al., 2014), empirical studies linking climate change metrics to biodiversity dynamics are still limited. Most often, explorations of how climate change metrics relate to biodiversity patterns are based on a limited number of variables (e.g., anomalies), although evidence exists that multiple metrics can help capture a wider range of biodiversity patterns (e.g., González-Trujillo et al., 2023).
One practical reason that has limited more comprehensive explorations of the relationship of climate metrics with biodiversity patterns is that no convenient platform exists where all commonly used metrics are implemented on equal footing. Moreover, the existing tools to quantify the metrics are scattered, and substantially different in the way they handle spatiotemporal data, their input and output, and their user-friendliness. For example, the velocity of climate change is implemented by the “VoCC” R package (García Molinos et al., 2019), while the “analogues ” (Hooker et al. 2011)  and “extRemes” (Eric Gilleland, 2021) R packages can measure novel climates and extreme value analysis, respectively. It follows that each one of these packages uses a different interface and different input and output data formats and most of them do not support spatial data. To facilitate the exploration of climate change metrics and overcome existing barriers, we provide a unified interface in theclimetrics R package that enables straightforward quantification and comparison of six different climate change metrics: 1) Standardized local anomalies; 2) Changes in probabilities of local climate extremes; 3) Changes in areas of analogous climates; 4) Novel climates; 5) Change in distances to analogous climates; and 6) Climate change velocity.
We now provide three supporting functions (apply.month, kgc and temporalTrend ) to aggregate time series of climate data for each month (i.e., generate 12 outcomes corresponding to 12 months), enabling the classification of Köppen climate zones, and measuring temporal trend at the pixel-level for a given climate variable (slope of changes over time), respectively.
We also designed the functions in the climetrics R package, so that they are user-friendly, providing flexible handling of multiple data formats (e.g., raster or raster time series) while generating outputs as raster maps. In addition, the package is linked to the “rts” R package (Naimi, 2021) for handling raster time series data. The “rts” package uses the new R package “terra”(Hijmans, 2021b), for manipulating raster data in a very efficient way (i.e., it is substantially faster than many other R packages as its functionalities have been implemented using the C++ programming language). The “terra” package uses a well-known GDAL library for handling several common raster formats (e.g., GeoTiff, netCDF, etc.). Therefore, climetrics can quantify climate change metrics with high computational performance.