Learn R Programming

chillR (version 0.75)

extract_cmip6_data: Unpacks and formats downloaded CMIP6 data

Description

Opens the downloaded .zip files and returns the CMIP6 climate projections for specified locations .

Usage

extract_cmip6_data(
  stations,
  variable = c("Tmin", "Tmax"),
  download_path = "cmip6_downloaded",
  keep_downloaded = TRUE
)

Value

named list of data.frames. Element names follow the syntax 'SSP'_'GCM', where SSP is the shared socioeconomic pathway and GCM is the global climate model that generated the weather data. The data.frames contain the extracted values for the requested locations.

Arguments

stations

data.frame with the locations of interest, for which the CMIP6 data should be extracted. Needs to contain the columns 'longitude', 'latitude' and 'station_name'.

variable

character, decides which variables from the downloaded files get read. Currently, valid options are "Tmin", "Tmax" and "Prec". The value is usually the same as in download_cmip6_ecmwfr function.

download_path

character, sets the path for the download of the CMIP6 file. If not already present, then a new folder will be created. The path is relative to working directory.

keep_downloaded

Boolean, by default set to TRUE. If TRUE, the function will not delete the downloaded .nc files. This makes sense when the user may want to use the climate change data for other locations.

Author

Lars Caspersen