Retrieves subsetted data of climate future scenarios within National Parks or shapefiles in the Contiguous United States. This data is downscaled using the Multivariate Adaptive Constructed Analogs (MACA) technique.

cftdata(
  aoi,
  area_name,
  models = argument_reference$models,
  parameters = argument_reference$parameters,
  scenarios = argument_reference$scenarios,
  years = c(1950, 2099),
  local_dir = tempdir(),
  verbose = TRUE,
  ncores = 1
)

Arguments

aoi

A Spatial object representing an area of interest. Could be a SpatialPolygonsDataFrame, SpatialLinesDataFrame, or SpatialPointsDataFrame. (Spatial)

area_name

A name to use in file names, attributes, and directories. (character)

models

A list of global circulation models to download. If left empty all available models will be downloaded. A list of available of models is available under cft::argument_reference$models. (vector)

parameters

A list of climate parameters to download. If left empty all available parameters will be downloaded. A list of available of models is available under cft::argument_reference$parameters. (vector)

scenarios

A list of representative concentration pathways (rcps) to download. If left empty all available rcps will be downloaded. A list of available of rcps is available under cft::argument_reference$scenarios. (vector)

years

The first and last years of the desired period. (vector)

local_dir

The local directory in which to save files. By default, files are saved in a temporary directory (as per CRAN guidelines), and are lost after your R session ends. Specify a path to a local directory with this argument to retain files and avoid duplicate downloads in subsequent R sessions. (character)

verbose

Print verbose output. (logical)

ncores

The number of cpus to use, which defaults to 1. (numeric)

Value

A tibble containing information about climate data files.

Details

This package retrieves daily gridded data sets of General Circulation Model (GCM) runs clipped to areas of interest and returns a data frame of the file names and they're storage paths. Each of these data sets represent a single GCM, climate variable and Representative Concentration Pathway (RCP) from 1950 to 2099. The 1950 to 2005 portion of this time period represents historical data while the 2006 to 2099 portion represents modeled data. The original data sets may be found at http://thredds.northwestknowledge.net:8080/thredds/reacch_climate_CMIP5_aggregated_macav2_catalog.html

Examples

if (FALSE) { d <- cftdata(park = "Acadia National Park", parameters = "pr", years = c(2020, 2021), models = "CCSM4", scenarios = "rcp85", ncores = parallel::detectCores()) }