calc_extentwise_ensemble: Assign to cells the inverse-ecdf quantiles from extent-wide...

Description Usage Arguments Value References

View source: R/calculate_ensemble.R

Description

This ensemble approach, unlike cell-wise ensembles, accounts for physical interdependence among grid-points within a GCM projection (Madsen et al. 2017).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
calc_extentwise_ensemble(
  SFSW2_prj_meta,
  data,
  subset = NULL,
  area = NULL,
  fcentral = c("median", "mean"),
  funs = c("min", "median", "max"),
  probs = c(0, 0.5, 1),
  ...,
  ties.method = "first",
  variables = NULL,
  add_historic = TRUE,
  reqCSs = NULL,
  reqMs = NULL,
  verbose = FALSE
)

Arguments

data

A data.frame with three dimensions – as generated by extract_dbOut_to_array.

subset

A logical vector used to subset gridcells from data for calculation of ensemble.

area

A numeric vector. Its length corresponds to the first dimension of data and represents the cell areas (e.g., that may vary by latitude). If not NULL or not all equal, then a fcentral value "mean" uses weighted.mean instead of mean and a value of "median" uses wtd.quantile instead of median where area are used as non-random "reliability" weights.

fcentral

A character string naming the function to calculate a central tendency across the spatial extent for each GCMs; one of "mean" or "median". The function is used to calculate the region-wide (weighted) statistic on which the GCMs are ranked. See area.

funs

A vector of character strings or of functions. The functions of the form f(x, ...) which will be used to calculate the ensemble values across GCMs. Note: "min", "median", "max" will be replaced by their quantile equivalents, i.e., probs = 0, 0.5, or 1 respectively.

probs

A numeric vector of probabilities with values in [0,1] to determine which quantiles from among the fcentral values across GCMs are returned for each cell.

...

Optional arguments passed to quantile, e.g., na.rm = TRUE.

ties.method

A character string. Specifies how ties are treated. See link[base]{rank}. The method must produce unique ranks if funs or probs are not empty.

variables

A vector of character strings. A subset of names of the second dimension of data or NULL which indicates to use the full set of the second dimension of data.

reqCSs

A vector of character strings. A subset of (climate) scenarios from SFSW2_prj_meta[["sim_scens"]][["reqCSs"]] for which ensembles are calculated.

reqMs

A vector of character strings. A subset of (climate) models from SFSW2_prj_meta[["sim_scens"]][["reqMs"]] across which ensembles are calculated.

verbose

A logical value.

Value

A 4-dimensional, numeric array where the first dimension represents probs, the second the cells/sites (first dimension of data), the third the variables, and the fourth the scenarios (ambient plus reqCSs).

References

Madsen, M. S., P. L. Langen, F. Boberg, and J. H. Christensen. 2017. Inflated Uncertainty in Multimodel-Based Regional Climate Projections. Geophysical Research Letters 44:11606-11613.


DrylandEcology/rSW2analysis documentation built on Nov. 8, 2021, 4:20 p.m.