8  Climate Change Metrics

8.1 Introduction

The aim of this tutorial is to provide a worked example of how to calculate climate change metrics using CMIP6 models. The climate-change metrics used in this example are Climate Velocity (Burrows et al. 2011) and a Relative Climate Exposure index (Brito-Morales et al. 2022).

This dataset contains a raster-stack file in format .tif of monthly sea surface temperature (tos) for the GFDL-CM4 model under a SSP5-5.8 emission scenario. The model goes from 2015 until 2100.

8.2 Data import

Load the required packages and the data.

# load packages
  library(raster)
  library(VoCC)
  library(stringr)
  library(dplyr)

8.3 Climate Velocity (VoCC)

Climate velocity is a vector that describes the speed and direction that a point on a gridded map would need to move to remain static in climate space (e.g., to maintain an isoline of a given variable in a univariate environment) under climate change. From an ecological perspective, climate velocity can be conceptualized as the speed and direction in which a species would need to move to maintain its current climate conditions under climate change. For this reason, climate velocity can be considered to represent the potential exposure to climate change faced by a species if the climate moves beyond the physiological tolerance of a local population. See(Brito-Morales et al. 2018).

Install the R package: GitHub Repo

To calculate climate velocity the R package VoCC provides a comprehensive collection of functions that calculate climate velocity and related metrics from their initial formulation to the latest developments. See Garcia Molinos et al. 2019.

# Load the monthly raster object
  rs <- terra::rast("data/tos_Omon_GFDL-ESM4_ssp585_r1i1p1f1_gr_201501-203412.tif")
# Establish the time period of interest (if applicable)
  from = 2015
  to = 2034
# If Raster is monthly, get annual mean
  index <- rep(1:nlyr(rs), each = 12, length.out = nlyr(rs))
  rs <- raster::stackApply(x = raster::stack(rs), indices = index, fun = mean)

# Calculate VoCC
  # Temporal trend (slope)
    slp <- tempTrend(rs, th = 10)
  # Spatial gradient (gradient)
    grad <- spatGrad(rs, th = 0.0001, projected = FALSE)
# VoCC local gradient
  vocc <- gVoCC(slp, grad)
  vocc$voccMag[] <- ifelse(is.infinite(vocc$voccMag[]), NA, vocc$voccMag[]) # replace inf with NAs