get.climdex.variable.list: Returns a list of Climdex variables given constraints

View source: R/get.variable.list.R

get.climdex.variable.listR Documentation

Returns a list of Climdex variables given constraints

Description

Returns a list of Climdex variables given constraints.

Usage

get.climdex.variable.list(
  source.data.present,
  metadata.config,
  time.resolution = c("all", "annual", "monthly", "seasonal", "halfyear"),
  climdex.vars.subset = NULL
)

Arguments

source.data.present

A vector of strings naming the data that's present; at least one of (tmin, tmax, prec, tavg).

metadata.config

config object read using read_json_metadata_config_file. This contains all the metadata such as the output long names of the indices in the output NCDF files.

time.resolution

The time resolutions to compute indices at. See create.indices.from.files.

climdex.vars.subset

A character vector of lower-case names of Climdex indices to calculate (eg: tr, fd, rx5day). See create.indices.from.files.

Details

This function takes a character vector which specifies what source data is present and a time resolution, and generates a list of names consisting of the variable and the time resolution, separated by an underscore.

Value

A character vector containing variable names with time resolutions appended.

See Also

create.indices.from.files

Examples

## Get all variables which require tmin and/or tmax, for all time resolutions.
var.list1 <- get.climdex.variable.list(c("tmax", "tmin"))

## Get all variables which require prec with an annual time resolution.
var.list2 <- get.climdex.variable.list("prec", time.resolution="annual")

## Get the intersection of a set list of vars and available data.
sub.vars <- c("su", "id", "tr", "fd", "gsl", "csdi", "wsdi", "r10mm")
var.list3 <- get.climdex.variable.list("tmax", climdex.vars.subset=sub.vars)


ECA-D/ecad_indices_grid documentation built on Nov. 23, 2022, 6:04 a.m.