Input data for the Walter-Lieth climate diagram
plot_WalterLieth_input.RdInput data for the plot_WalterLieth() function. Since these inputs are time-consuming to
generate, the purpose of conducting the generation of the input table in a separate function is
to allow users to make multiple calls to plot_WalterLieth() (e.g., for comparing different
time periods) without needing to generate the inputs each time.
Usage
plot_WalterLieth_input(
  xyz,
  obs_period = NULL,
  gcms = NULL,
  ssps = NULL,
  gcm_periods = NULL,
  db_option = "auto"
)Arguments
- xyz
 a
terra::SpatRasterwith a single layer containing elevation values in metres, or adata.framewith the following columns "long", "lat", "elev", and a unique "id". Any extra columns will be ignored and not output.- gcms
 character. Vector of global climate model names. Options are
list_gcms().- ssps
 character. Vector of SSP-RCP scenarios (representative concentration pathways paired with shared socioeconomic pathways). Options are
list_ssps(). Defaults to all scenarios available.- gcm_periods
 character. 20-year reference periods for GCM simulations. Options are
list_gcm_periods().- db_option
 character. One of
auto,database, orlocal. Defaultauto.- vars
 character. A vector of climate variables to compute. Supported variables can be obtained with
list_vars(). Definitions can be found in this packagevariablesdataset. Default to monthly PPT, Tmax, Tmin.
Details
This function generates standardized inputs for one or multiple locations at any spatial scale.
Examples
if (FALSE) {
  # data frame of arbitrary points
  my_points <- data.frame(
    lon = c(-127.7300, -127.7500),
    lat = c(55.34114, 55.25),
    elev = c(711, 500),
    id = 1:2
  )
  # generate the input data
  my_data <- plot_WalterLieth_input(my_points, db_option = "local")
  # use the input to create a plot
  plot_WalterLieth(my_data)
}
#'