Updated climate change projections released

code
climate
maps
Author

Isaac Bain

Published

July 8, 2024

1 Climate change projections

NIWA have recently updated their national climate change projections for New Zealand, by downscaling six global models and three regional climate models through a series of machine learning approaches. This process was quite complex, with the model runs taking over a year to complete on a literal supercomputer, consuming a total of 12 million core hours. More details on the downscaling process can be found here.

This work was publically funded by the Ministry for Business, Innovation and Employment (MBIE) and Ministry for the Environment (MfE), making the model outputs freely available for everyone to use. The climate projections data can be downloaded in NetCDF format from the new Climate Data Initiative website: https://climatedata.environment.govt.nz/.

2 A quick primer on SSP and RCP

View this post on Instagram

A post shared by Carbon Brief (@carbonbrief)

2.1 SSP (Shared Socioeconomic Pathways)

The SSPs are narratives that describe different global socio-economic futures. They are used in climate research to understand how social, economic, and environmental factors might evolve over the 21st century. There are five SSPs, each representing a different socio-economic development pathway:

  1. SSP1 - Sustainability (Taking the Green Road): This pathway envisions a world making a shift towards sustainability, emphasizing inclusive development and respect for environmental limits.
  2. SSP2 - Middle of the Road: This pathway assumes moderate socio-economic development without major shifts in economic trends or technological advancements.
  3. SSP3 - Regional Rivalry (A Rocky Road): This pathway describes a fragmented world with increasing nationalism, reduced international cooperation, and slow economic growth. Regional conflicts and challenges to sustainable development are more prevalent.
  4. SSP4 - Inequality (A Road Divided): This pathway highlights a world with increasing inequalities, both within and between countries, leading to uneven socio-economic development.
  5. SSP5 - Fossil-fueled Development (Taking the Highway): This pathway depicts rapid economic growth driven by a reliance on fossil fuels and energy-intensive lifestyles.

2.2 RCP (Representative Concentration Pathways)

The RCPs are scenarios that include projections of future greenhouse gas (GHG) concentrations based on different trajectories of GHG emissions. Each RCP represents a different level of radiative forcing (the change in energy in the atmosphere due to GHGs) by the year 2100, for example:

  1. RCP2.6: A scenario with low GHG emissions leading to a peak radiative forcing of around 2.6 W/m² before 2100, followed by a decline.
  2. RCP4.5: A scenario with intermediate GHG emissions leading to a stabilization of radiative forcing at around 4.5 W/m² by 2100.
  3. RCP6.0: Another intermediate scenario with radiative forcing reaching 6.0 W/m² by 2100.
  4. RCP8.5: A high GHG emissions scenario leading to radiative forcing reaching 8.5 W/m² by 2100.

3 Climate variables

NIWA has modelled the projected changes for the periods 2021-2040, 2041-2060, and 2080-2099 under three RCP-SSP scenarios, using two baseline periods (1986-2005 and 1995-2014) for 24 climate variables. These variables include:

  • Temperature
  • Growing degree days
  • Rainfall
  • Potential Evapotranspiration Deficit
  • Wind
  • Humidity
  • Solar radiation

For the full list see here.

4 Data visualisation

This post was mainly to draw your attention to the myriad of new datasets that are becoming available. However, I’ve selected one dataset to visualise here to give you a little taste:

- How total rainfall is estimated to change under an SSP-3 RCP-7.0 scenario compared to a 1986-2005 baseline.

The data is in NetCDF format, which is a common format for storing multidimensional scientific data. We’ll use the tidync package to read the NetCDF files and the ggplot2 package to create the visualisations. tidync brings tidyverse concepts to NetCDF files.

Let’s start by mapping the baseline period, from which the projected change is compared.

Show the code
# Load necessary libraries
library(tidyverse)
library(tidync)
library(ggplot2)
library(gganimate)
library(viridis)
library(ggtext)

# Set path and filenames
ncpath <- "data/PR_epsg_4272/"
ncvar <- "PR_"
baseline_nc_file <- "historical_MMM_CCAM_base_bp1986-2005_ANN_NZ5km"

baseline_nc_fname <- paste(ncpath, ncvar, baseline_nc_file, ".nc", sep="")
  
baseline_data <- tidync(baseline_nc_fname) |>  
    hyper_tibble()

ggplot(baseline_data, aes(x = longitude, y = latitude, fill = log(PR))) +
  geom_tile(width = 0.07, height = 0.07) +
  coord_map() +
  scale_fill_distiller(
    palette = "Blues",
    direction = 1,
    labels = function(x) paste0(round(exp(x), 0), " mm")) +
    # breaks = log(c(300, 1000, 3000, 5000, 10000, 14500)),
    # labels = c("300 mm", "1000 mm", "3000 mm", "5000 mm", "10000 mm", "14500 mm")) +
  theme_minimal(base_size = 8) +
  theme(plot.title = element_markdown(
    family = "sans", size = rel(1.5), face = "bold", color = "#4b015b"
  )) +
  labs(
    title = "Baseline total rainfall, 1986-2005",
    fill = "Annual rainfall",
    x = "Longitude", 
    y = "Latitude"
  )

This code snippet provides a starting point for visualising the baseline period rainfall. You can adjust the path to the NetCDF file and further customise the plot as needed.

Now let’s map the projected change in rainfall for the same region under the SSP-3 RCP-7.0 scenario.

Show the code
ssp <- "ssp370_"
ncfiles <- c(
  "MMM_CCAM_change_fp2021-2040_bp1986-2005_ANN_NZ5km",
  "MMM_CCAM_change_fp2041-2060_bp1986-2005_ANN_NZ5km",
  "MMM_CCAM_change_fp2080-2099_bp1986-2005_ANN_NZ5km"
)

# Initialize an empty data frame to store the combined data
all_data <- tibble()

# Function to extract year range from file name
extract_years <- function(ncname) {
  str_extract(ncname, "fp\\d{4}-\\d{4}") %>% 
    str_replace("fp", "")
}

# Iterate over the file names and extract data
for (ncname in ncfiles) {
  ncfname <- paste(ncpath, ncvar, ssp, ncname, ".nc", sep="")
  
  tdata <- tidync(ncfname) %>% 
    hyper_tibble() %>%
    mutate(period = extract_years(ncname))
  
  all_data <- bind_rows(all_data, tdata)
}

# Ensure longitude and latitude are numeric
all_data <- all_data %>%
  mutate(longitude = as.numeric(longitude),
         latitude = as.numeric(latitude))

# Determine the overall range for the PR variable
pr_range <- range(all_data$PR, na.rm = TRUE)

# Plot and animate the data
p <- ggplot(all_data, aes(x = longitude, y = latitude, fill = PR)) +
  geom_tile(width = 0.07, height = 0.07) +
  coord_map() +
  scale_fill_distiller(
    palette = "RdBu",
    limits = pr_range,
    direction = 1,
    labels = function(x) paste0(x, "%")) +
  labs(
    title = "Projected change in total rainfall under SSP-3 RCP-7.0",
    subtitle = 'Baseline of 1986–2005 compared to: {closest_state}',
    fill = "Change from \nbaseline",
    x = "Longitude", 
    y = "Latitude"
  ) +
  annotate(
    "text", x = 168.546875, y = -42.836828, label = "The west gets \n", hjust = 0.5, color = "black", size = rel(3)
  ) +
  annotate(
    "text", x = 168.546875, y = -43.036828, label = "wetter", hjust = 0.5, color = "#2257a0", size = rel(3.5), face = "bold"
  ) +
  annotate(
    "text", x = 177.873145, y = -40.89288, label = "The east gets \n", hjust = 0.5, color = "black", size = rel(3)
  ) +
  annotate(
    "text", x = 177.873145, y = -41.09288, label = "drier", hjust = 0.5, color = "#a61729", size = rel(3.5), face = "bold"
  ) +
  theme_minimal(base_size = 8) +
  theme(legend.position = "right") + 
  theme(plot.title = element_markdown(
    family = "sans", size = rel(1.5), face = "bold", color = "#4b015b")) +
  theme(plot.subtitle = element_text(color = "#222222")) +
  transition_states(period, transition_length = 2, state_length = 1)

animate(p,
        nframes = 100,
        fps = 20,
        res = 400,
        renderer = gifski_renderer())

5 Conclusion

Understanding future climate change impacts is crucial for planning and adaptation. By leveraging advanced climate models and high-performance computing, NIWA’s projections offer valuable insights into how New Zealand’s climate might change under different scenarios.

As these datasets become increasingly accessible, they empower stakeholders to develop more resilient strategies to cope with the changing climate. Other users will undoubtedly find even more valuable applications for these data, enhancing their utility and impact across various sectors.