Explore climatic data

Author

Juliette Archambeau

Published

June 4, 2024

1 The CHESS-SCAPE climatic data

CHESS-SCAPE: High resolution future projections of multiple climate scenarios for the United Kingdom derived from downscaled UKCP18 regional climate model output

Dataset available in the CEDA archive: https://catalogue.ceda.ac.uk/uuid/8194b416cbee482b89e0dfbe17c5786c

Associated paper: Robinson et al. (2023).

Important features :

  • 1 km resolution

  • 11 near-surface meteorological variables

  • 4 ensemble members (EMs), which were chosen to span the range of temperature and precipitation change in the UKCP18 ensemble, representing the ensemble climate model uncertainty.

  • 4 Representative Concentration Pathways (RCPs): RCP2.6, 4.5, 6.0 and 8.5.

  • bias-correction based on the CHESS-met historical gridded dataset.

1.1 Bias-correction

I’ve asked Emma Robinson whether we should use bias-corrected data or not. Here is her answer: “The bias-correction is applied to the whole time series, so the transient change between the historical and future periods is preserved in the bias-corrected data. If you are only interested in that change, you could use either bias-corrected or not. However, since the bias-corrected data is consistent with historical observations, it allows you to evaluate model performance in the historical period against either the model driven with historical observation-based data (eg CHESS-met or HadUK-Grid) or observational datasets. As you are interested in looking at current relationships between allele frequencies and climate data, then that would suggest that the bias-corrected may be more appropriate for your purposes.”

Quote from Robinson et al. (2023) about bias correction: “Finally, although the free parameters of climate models are usually calibrated against historical observations, because the models are free-running, internal variability means that each realisation of the future climate will not necessarily replicate the historical period exactly — the models may be ‘biased’ with respect to observations. Bias correction is often applied to remove or reduce these biases (Teutschbein and Seibert, 2012). A variety of bias correction methods of varying complexity exist, from simple methods that adjust the mean (eg. linear scaling (Widmann et al., 2003)), to more complex methods that also adjust the distribution of variables (eg. quantile mapping (Leander and Buishand, 2007)). These are carried out by comparing the climate model output run for a historical period with observations in that period, calculating a correction based on this, then applying that correction to the whole of the climate model output. There must therefore be a sufficient overlap between the climate model output and observations and the observations must be of sufficient quality. Bias correction involves the strong assumption that the same biases will be preserved in the future, which has led to some criticism of the use of bias correction (Maraun, 2016; Ehret et al., 2012). However, for many instances of impacts modelling, raw climate model output is not sufficient if it is biased.”

In the following analyses, we will therefore use bias-corrected data.

1.2 How to calculate timeslices for other time periods

In the CHESS-SCAPE dataset, the available time slices are 1980-2000, 2030-2050 and 2060-2080. If we wish to use different time periods, how should we calculate the averaged climatic variables for that period?

Emma Robinson’answer: “To create similar mean-monthly timeslices for other periods, you would take the mean of the monthly means for the years of interest. Eg if you are interested in the period 2045-2054, you would average over all January mean values for 2045-2054 to get the January timeslice value, then all February mean values for 2045-2054 for February, etc. This would then give you the equivalent of our timeslice calculations. One thing to note is that our data start on 1st December 1980. So our timeslice for eg 1980-2000 runs from 01-12-1980 to 30-11-2000. You may wish to follow this convention, but it’s not necessary if you prefer to start your years on 1st Jan as normal.”

1.3 Variability in climatic data

Our question: “We are also interested in examining the effects of changes in the variability of climatic variables in the future. For instance, it would be interesting to compare the variation of climatic variables during the reference period (using monthly or daily data) with their variation over the future time periods. However, as far as I understand, it is not possible to estimate future climate variability with the CHESS-SCAPE dataset. Could you suggest a way to approach this?”

Emma Robinson’answer: “Yes, you can calculate climate variability from the daily CHESS-SCAPE data. It really depends what you’re interested in as to exactly what you might calculate. For example, in our data paper, we calculated 90th percentiles of daily mean and maximum temperatures, and 10 year return levels of annual maximum precipitation. This allowed us to investigate changes in these extremes between the historical and future periods.”

1.4 Uncertainty

Our question: ” We are committed to accurately representing the uncertainty in our predictions. I understand that using predictions for the four ensemble members and the four RCP scenarios already covers a significant range of possible outcomes. As a comparison, I noticed that the UK Climate Projections 2018 (UKCP18) provides probabilistic projections to capture the range of uncertainties. Is there a similar approach available with the CHESS-SCAPE data, or do you think using the four ensemble members and four RCP scenarios sufficiently represents prediction uncertainties?”

Emma robinson’s answer: “We don’t have an equivalent of the UKCP18 probabilistic projections. However, the CHESS-SCAPE ensemble members were downscaled from four UKCP18 ensemble members. Since we were using a subset of the full UKCP18 ensemble, we chose these four members to span the range of UKCP18, to represent the model uncertainty that we inherited from UKCP18. You can see in the data paper how the four ensemble members compare to the rest of the UKCP18 ensemble, as well as how the model spread of CHESS-SCAPE compares with the range of the UKCP18 probabilistic projections.”

1.5 Understanding netCDF files

The CHESS-SCAPE climatic data are in netCDF files.

See for instance here the content of the netCDF file for the pr variable, EM 01, RCP scenario 2.6 with bias-corrected data and time slice 1980-2000:

Code
nc_file <- "data/ScotsPine/Climate/ftp.ceda.ac.uk/badc/deposited2021/chess-scape/data/rcp26_bias-corrected/01/timeslice/pr/chess-scape_rcp26_bias-corrected_01_pr_uk_1km_timeslice_19801201-20001130.nc"
nc_open(here(nc_file))
File /home/juliette/Documents/Projects/2PinesClimateChangeVulnerability/data/ScotsPine/Climate/ftp.ceda.ac.uk/badc/deposited2021/chess-scape/data/rcp26_bias-corrected/01/timeslice/pr/chess-scape_rcp26_bias-corrected_01_pr_uk_1km_timeslice_19801201-20001130.nc (NC_FORMAT_NETCDF4):

     7 variables (excluding dimension variables):
        float lat[x,y]   (Contiguous storage)  
            long_name: latitude
            standard_name: latitude
            units: degrees_north
        float lon[x,y]   (Contiguous storage)  
            long_name: longitude
            standard_name: longitude
            units: degrees_east
        float climatology_bnds[bnds,time]   (Contiguous storage)  
        float x_bnds[bnds,x]   (Contiguous storage)  
        float y_bnds[bnds,y]   (Contiguous storage)  
        int crsOSGB[]   (Contiguous storage)  
            grid_mapping_name: transverse_mercator
            longitude_of_central_meridian: -2
            false_easting: 4e+05
            false_northing: -1e+05
            latitude_of_projection_origin: 49
            scale_factor_at_projection_origin: 0.9996012717
            longitude_of_prime_meridian: 0
            semi_major_axis: 6377563.396
            inverse_flattening: 299.3249646
            projected_crs_name: OSGB 1936 / British National Grid
            geographic_crs_name: OSGB 1936
            horizontal_datum_name: OSGB_1936
            reference_ellipsoid_name: Airy 1830
            prime_meridian_name: Greenwich
            EPSG_code: EPSG:27700
            unit: m
            towgs84: 375
             towgs84: -111
             towgs84: 431
             towgs84: 0
             towgs84: 0
             towgs84: 0
             towgs84: 0
        float pr[x,y,time]   (Chunking: [25,40,1])  (Compression: level 1)
            _FillValue: -1.00000002004088e+20
            standard_name: precipitation_flux
            standard_name_url: http://vocab.nerc.ac.uk/standard_name/precipitation_flux/
            long_name: Precipitation flux
            units: kg m-2 s-1
            coordinates: time lon lat
            grid_mapping: crsOSGB
            actual_range: 1.01899549918016e-05
             actual_range: 0.000307154899928719
            cell_methods: time: mean within years time: mean over years

     4 dimensions:
        x  Size:656 
            units: m
            axis: X
            long_name: easting of British National Grid (BNG) coordinate system
            standard_name: projection_x_coordinate
            bounds: x_bnds
        y  Size:1057 
            units: m
            axis: Y
            long_name: northing of British National Grid (BNG) coordinate system
            standard_name: projection_y_coordinate
            bounds: y_bnds
        time  Size:12 
            units: hours since 1970-01-01T00:00:00Z
            axis: T
            calendar: 360_day
            standard_name: time
            long_name: time in hours since 1970-01-01T00:00:00Z
            climatology: climatology_bnds
        bnds  Size:2 (no dimvar)

    35 global attributes:
        title: CHESS-SCAPE: Future projections of meteorological variables at 1 km resolution for the United Kingdom 1980-2080 derived from UK Climate Projections 2018
        summary: Gridded daily meteorological variables over the United Kingdom at 1 km resolution for the years 1980-2080. This dataset is an ensemble of four different realisations of future climate for each of four different representative concentration pathway scenarios (RCP2.6, RCP4.5, RCP6.0 and RCP8.5), provided both with and without bias correction. This dataset contains time series of daily mean values of air temperature (K), specific humidity (kg kg-1), relative humidity (%), wind speed (m s-1), downward longwave radiation (W m-2), downward shortwave radiation (W m-2), precipitation (kg m-2 s-2) and surface air pressure (Pa). It also contains time series of daily minimum air temperature (K), daily maximum air temperature (K) and daily temperature range (K). The data are provided in gridded netCDF files at 1 km resolution aligned to the Ordnance Survey / British National Grid. There is one file for each variable for each month of the daily data. Also provided are monthly, seasonal and annual means, for which there is one file for each variable for each time resolution. Additionally twenty year mean-monthly (Jan-Dec) climatologies at ten year intervals are provided, for which there is one file for each variable for each twenty year time slice. The projections use a 360-day calendar, where each month consists of 30 days.
        source: This dataset was derived from four ensemble members of the United Kingdom Climate Projections 2018 (UKCP18) Regional Projections on a 12km grid over the United Kingdom for 1980-2080 (https://catalogue.ceda.ac.uk/uuid/589211abeb844070a95d061c8cc7f604, v20190731), which is a twelve member perturbed parameter ensemble of climate model projections for representative concentration pathway (RCP) scenario RCP8.5. Selected daily UKCP18 RCM variables were downscaled to 1 km using adapted Climate, Hydrology and Ecology research Support System (CHESS) downscaling methodology, taking into account topographic information. Ancillary datasets were obtained from the surface elevation of the climate model (https://data.ceda.ac.uk/badc/ukcp18/data/land-rcm/ancil/orog), the Integrated Hydrological Digital Terrain Model (IHDTM; https://www.ceh.ac.uk/services/integrated-hydrological-digital-terrain-model), the Ordnance Survey of Northern Ireland (OSNI) Open Data 50m Digital Terrain Model (https://www.nidirect.gov.uk/articles/50m-digital-terrain-model-height-data), Standardised Annual Average Rainfall 1961-90 (SAAR 61-90; https://catalogue.ceh.ac.uk/documents/51861941-c38d-46e6-9a31-6e9a293fc3d5), the European Space Agency (ESA) GlobAlbedo project albedo (http://globalbedo.org) and UK Energy Technology Support Unit (ETSU) mean wind speeds. Where applied, bias-correction was calculated seasonally using the Climate Hydrology and Ecology research Support System meteorology dataset for Great Britain (CHESS-met; https://doi.org/10.5285/2ab15bf0-ad08-415c-ba64-831168be7293) observation-based dataset. Variables for RCP2.6, RCP4.5 and RCP6.0 were calculated using time-shifting and pattern-scaling of the RCP8.5 scenarios, using selected members of the 5th Coupled Model Intercomparison Project (CMIP5; https://pcmdi.llnl.gov/mips/cmip5) and UKCP18 Global Climate Model Projections for the entire globe (https://catalogue.ceda.ac.uk/uuid/f1a2fc3c120f400396a92f5de84d596a) to determine future warming trajectories.
        cdm_data_type: grid
        standard_name_vocabulary: CF Standard Name Table v77, https://cfconventions.org/standard-names.html
        standard_name_url_vocabulary: NERC Vocabulary Server, https://vocab.nerc.ac.uk/standard_name/
        geospatial_lat_min: 49.766185760498
        geospatial_lat_max: 59.3996810913086
        geospatial_lon_min: -9.01413059234619
        geospatial_lon_max: 2.50058960914612
        spatial_resolution_distance: 1000
        spatial_resolution_unit: urn:ogc:def:uom:EPSG::9001
        time_coverage_start: 1980-12-01T00:00:00Z
        time_coverage_end: 2080-12-01T00:00:00Z
        time_coverage_resolution: P1M
        time_coverage_duration: P100Y
        bias_correction: true
        bias_correction_method: Bias corrected to CHESS-met 1980-2015
        ensemble_member: 01 (corresponds to ensemble member 01 of UKCP18)
        ensemble_member_id: 1
        scenario: RCP2.6 (derived from RCP8.5 using time-shifting and pattern-scaling)
        scenario_id: rcp26
        history: File created on ISO2021-10-11.
        keywords: Climate and climate change, Hydrology, Modelling, Meteorological geographical features
        references: https://catalogue.ceda.ac.uk/uuid/589211abeb844070a95d061c8cc7f604, https://data.ceda.ac.uk/badc/ukcp18/data/land-rcm/ancil/orog, https://www.ceh.ac.uk/services/integrated-hydrological-digital-terrain-model, https://www.nidirect.gov.uk/articles/50m-digital-terrain-model-height-data, https://catalogue.ceh.ac.uk/documents/51861941-c38d-46e6-9a31-6e9a293fc3d5, http://globalbedo.org, https://doi.org/10.5285/2ab15bf0-ad08-415c-ba64-831168be7293, https://pcmdi.llnl.gov/mips/cmip5, https://catalogue.ceda.ac.uk/uuid/f1a2fc3c120f400396a92f5de84d596a
        acknowledgement: This research has been carried out under national capability funding as part of the Natural Environment Research Council UK-SCAPE programme (NE/R016429/1). Additional support provided by the Natural Environment Research Council award number NE/S017380/1 as part of the Hydro-JULES programme.
        project: UK Status, Change And Projections of the Environment (UK-SCAPE): Spatially Explicit Projections of Environmental Drivers and Impacts (SPEED; https://ukscape.ceh.ac.uk/our-science/projects/SPEED)
        date_created: ISO2021-10-11
        creator_name: Robinson, E. L.
        creator_email: enquiries@ceh.ac.uk
        creator_institution: UK Centre for Ecology & Hydrology (UKCEH)
        contributor_name: Huntingford, C., Semeena, V. S., Bullock, J. M.
        licence: This dataset is available under the terms of the Open Government Licence (https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/)
        institution: UK Centre for Ecology & Hydrology (UKCEH)
        Conventions: CF-1.8, ACDD-1.3

Warning

When R loads the netCDF file with the brick function of the rasterpackage, it assumes a normal Gregorian calendar whereas the CHESS-SCAPE dataset is based on a 360-day calendar – each year contains 360 days, split into 12 months of 30 days each.

We show below the content of the R object obtained from the netCDF file with the brickfunction. The names and Date/time are wrong.

Code
brick(here(nc_file))
Warning in .getCRSfromGridMap4(atts): cannot process these parts of the crs:
projected_crs_name=OSGB 1936 / British National Grid
geographic_crs_name=OSGB 1936
horizontal_datum_name=OSGB_1936
reference_ellipsoid_name=Airy 1830
prime_meridian_name=Greenwich
EPSG_code=EPSG:27700
unit=m
towgs84=375
class      : RasterBrick 
dimensions : 1057, 656, 693392, 12  (nrow, ncol, ncell, nlayers)
resolution : 1000, 1000  (x, y)
extent     : 0, 656000, 0, 1057000  (xmin, xmax, ymin, ymax)
crs        : +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +units=m +no_defs 
source     : chess-scape_rcp26_bias-corrected_01_pr_uk_1km_timeslice_19801201-20001130.nc 
names      : X1989.09.18, X1989.10.18, X1989.11.17, X1989.12.17, X1990.01.16, X1990.02.15, X1990.03.17, X1990.04.16, X1990.05.16, X1990.06.15, X1990.07.15, X1990.08.14 
Date/time  : 1989-09-18, 1989-10-18, 1989-11-17, 1989-12-17, 1990-01-16, 1990-02-15, 1990-03-17, 1990-04-16, 1990-05-16, 1990-06-15, 1990-07-15, 1990-08-14 
varname    : pr 

To access the correct dates, we can use the nc.get.time.series function of the ncdf4.helpers package:

Code
nc.get.time.series(f = nc_open(here(nc_file)), time.dim.name = "time")
 [1] "1990-01-01" "1990-02-01" "1990-03-01" "1990-04-01" "1990-05-01" "1990-06-01" "1990-07-01" "1990-08-01" "1990-09-01" "1990-10-01" "1990-11-01" "1990-12-01"

So the different layers of the netCDF files correspond to the different months: from January to December.

2 Extracting the climatic data

Code
# Path to chess Scape climatic data
ceda_clim_path <- "data/ScotsPine/Climate/ftp.ceda.ac.uk/badc/deposited2021/chess-scape/data/"

# We extract climatic data:
  # for two RCPs (with or without bias correction)
vec_rcp_scenario <- list.files(here(ceda_clim_path))

  # for four ensemble members
vec_ensemble_member <- list.files(here(paste0(ceda_clim_path,vec_rcp_scenario[[1]])))

  # for three time periods
vec_timeslice <- list(c("1980","2000"),c("2030","2050"),c("2060","2080"))
  

# Function to extract the data
extract_netCDF_data <- function(ceda_clim_path, rcp_scenario, ensemble_member, clim_var, timeslice){
  
# Read netCDF file
nc_file <- paste0(ceda_clim_path,rcp_scenario,"/",ensemble_member,"/timeslice/",clim_var,
                  "/chess-scape_",rcp_scenario,"_",ensemble_member,"_",clim_var,"_uk_1km_timeslice_",timeslice[[1]],"1201-",timeslice[[2]],"1130.nc")

# Download the netCDF file in R with the raster package
nc_data <- brick(here(nc_file))

# attribute names (month_01 to month_12) to the 12 layers
names(nc_data) <- sprintf("month_%02d", 1:12)

# Read spatial points
points_file <- "data/ScotsPine/population_coordinates.csv"
points_data <- read_csv(here(points_file))

# Define function to transform coordinates from WGS84 to OSGB
transform_coordinates <- function(lon, lat) {
  # Create spatial points object
  points <- st_as_sf(data.frame(lon = lon, lat = lat), coords = c("lon", "lat"), crs = 4326)
  
 # Transform to OSGB projection (EPSG:27700)
  points_transformed <- st_transform(points, crs = 27700)
  
  return(points_transformed)
}

# Transform spatial points to OSGB projection
points_sf <- transform_coordinates(points_data$Longitude, points_data$Latitude)

# Extract climatic data at spatial points
extracted_data <- raster::extract(nc_data, as.matrix(st_coordinates(points_sf))) %>%
  as_tibble() %>% 
  mutate(seas_djf = rowMeans(dplyr::select(.,month_12,month_01,month_02)),
         seas_mam = rowMeans(dplyr::select(.,month_03,month_04,month_05)),
         seas_jja = rowMeans(dplyr::select(.,month_06,month_07,month_08)),
         seas_son = rowMeans(dplyr::select(.,month_09,month_10,month_11)),
         annual = rowMeans(.))
  

# Combine extracted data with original points data
points_data <- points_data %>%
  bind_cols(extracted_data) %>% 
  mutate(clim_var=clim_var,
         ensemble_member = ensemble_member,
         rcp_scenario = rcp_scenario,
         timeslice = paste0(timeslice[[1]],"_",timeslice[[2]]))

return(points_data)
}


climdf <- lapply(vec_rcp_scenario, function(rcp_scenario){
  
  lapply(vec_ensemble_member, function(ensemble_member){
    
    vec_clim_var <- list.files(here(paste0(ceda_clim_path,rcp_scenario,"/",ensemble_member,"/timeslice")))
    
    lapply(vec_clim_var, function(clim_var){
      
      lapply(vec_timeslice, function(timeslice){
        
        extract_netCDF_data(ceda_clim_path, rcp_scenario,ensemble_member,clim_var,timeslice)
        
      }) %>% bind_rows()
    }) %>% bind_rows()
  }) %>% bind_rows()
}) %>% bind_rows()

saveRDS(climdf, file=here("data/ScotsPine/Climate/climdf.rds"))
saveRDS(climdf, file=here("shinny/VizClimateDifferencesScotsPine/climdf.rds"))
Code
climdf <- readRDS(here("data/ScotsPine/Climate/climdf.rds"))

3 Viz climatic differences bwt current and future climates

The differences between current and future climates at the location of the populations can be visualized with the following shinny app : https://juliettearchambeau.shinyapps.io/VizClimateDifferencesScotsPine/.

Correlations among climatic variables

Wind speed (sfcWind), surface downwelling shortwave radiation (rsds), and to a lesser extent the precipitation flux (pr) show low correlations with the other climatic variables.

Correlations among time averages

For most climatic variables, seasonal and annual averages are highly correlated.

Some exceptions:

  • daily near-surface air temperature range (dtr) in summer vs winter.

  • near-surface relative humidity (hurs) in summer vs the other seasons and the annual value.

  • surface downwelling shortwave radiation (rsds) across the different seasons.

Climate differences across time slices

  • Daily near-surface air temperature range (dtr):

    • is expected to increase in summer (agreement between the four ensemble members and the two RCP scenarios).

    • is expected to decrease in winter (and March) according to EM 01, 04 and 06 + RCP2.6 and RCP8.5, and EM 15 + RCP8.5, but expected to remain stable according to the EM 15 + RCP2.6.

    • is expected to either increase or decrease annually depending on the populations, the EM and RCP scenarios.

    • is expected to either increase or decrease in fall depending on the EM, the RCP scenario and even the time slice (e.g., EM01 and RCP8.5).

    • take-home message: Do not select the annual average of dtr as opposite future trends are expected for summer vs winter months.

  • Near-surface relative humidity (hurs)

    • is globally expected to decrease (some exceptions for some populations, e.g., with EM06 + RCP8.5 and summer average).

    • sharper decrease in summer vs winter. And higher variation in the climate differences between time slices in summer vs winter.

    • take-home message: using near-surface relative humidity (hurs) in summer may allow us to capture more variation in climatic differences among populations.

  • Near-surface specific humidity (huss)

    • is expected to increase. Large agreement across EM, RCP scenarios and time averages.

    • low variation among populations regarding the extent to which huss is going to increase (but variation among EM).

    • take-home message: the annual average can be used and it is well representative of monthly and seasonal time averages.

  • Precipitation flux (pr)

    • No agreement among EM and RCP scenarios.

    • Climatic differences across time slices are expected to be different across seasons.

    • take home: important not to include the annual average.

  • Surface air pressure (psurf)

    • small differences across time slices.

    • take-home message: may not be relevant to include.

  • Surface downwelling longwave radiation (rlds)

    • expected to increase. Large agreement across EM, RCP scenarios and time averages.

    • Low (almost not) variation among populations.

  • Surface downwelling shortwave radiation (rsds)

    • Expected to increase, mostly during summer (higher absolute difference in summer than in winter, but similar relative difference).
  • Wind speed (sfcWind)

    • No agreement among EM and time slices in winter.

    • generally expected to decrease in summer.

  • Near-surface air temperature (tas), near-surface daily maximum air temperature (tasmax) and near-surface daily minimum air temperature (tasmin).

    • Strong agreement among EM, RCP scenario and time averages.

    • take-home message: choosing only one of these variables is sufficient. Annual time average could be ok as well representative of the other time averages.

4 Selected variables

Code
# Selected variables
selected_clim_var_avg <- c("pr_seas_jja", # Precipitation fluxes in summer and winter 
                           "sfcWind_seas_djf", # Winter winds
                           "tas_annual", # Mean annual temperature
                           "rsds_seas_jja", # Surface downwelling shortwave radiation in summer
                           "hurs_seas_jja" # Near-surface relative humidity in summer
                           #"dtr_seas_djf","dtr_seas_jja" # Daily near-surface air temperature range in summer and winter
                           )


subdf <- climdf %>% 
  pivot_longer(names_to = "time_averages", values_to = "value",cols=contains(c("month","seas","annual"))) %>% 
  mutate(clim_var_avg = paste0(clim_var,"_",time_averages)) %>% 
  dplyr::filter(clim_var_avg %in% selected_clim_var_avg & rcp_scenario %in% c("rcp26_bias-corrected","rcp85_bias-corrected")) %>% 
  # dplyr::filter((clim_var_avg %in% selected_clim_var_avg[!grepl("dtr", selected_clim_var_avg)] & rcp_scenario %in% c("rcp26_bias-corrected","rcp85_bias-corrected")) | clim_var_avg %in% selected_clim_var_avg[grepl("dtr", selected_clim_var_avg)] ) %>% 
  dplyr::mutate(rcp_scenario = str_sub(rcp_scenario, 1,5) %>% toupper %>% str_replace("RCP(\\d)(\\d)", "RCP\\1.\\2"),
                timeslice = str_replace(timeslice, "_","-"))

saveRDS(subdf, file=here("data/ScotsPine/subdf.rds"))
saveRDS(subdf, file=here("shinny/VizClimateDifferencesScotsPine_SelectedVariables/subdf.rds"))

Correlations among the selected climatic variables can be visualized with the following shinny app: https://juliettearchambeau.shinyapps.io/VizClimateDifferencesScotsPine_SelectedVariables/.

References

Robinson, Emma L., Chris Huntingford, Valyaveetil Shamsudheen Semeena, and James M. Bullock. 2023. CHESS-SCAPE: High Resolution Future Projections of Multiple Climate Scenarios for the United Kingdom Derived from Downscaled UKCP18 Regional Climate Model Output.” https://doi.org/10.5194/essd-2022-430.