Generates a vector of filenames to be used for PEcAn ensemble output files. All paths start from directory `settings$outdir`, which will be created if it does not exist.

ensemble.filename(
  settings,
  prefix = "ensemble.samples",
  suffix = "Rdata",
  all.var.yr = TRUE,
  ensemble.id = settings$ensemble$ensemble.id,
  variable = settings$ensemble$variable,
  start.year = settings$ensemble$start.year,
  end.year = settings$ensemble$end.year
)

Arguments

settings

list of PEcAn settings.

prefix

string to appear at the beginning of the filename

suffix

file extension: string to appear at the end of the filename

all.var.yr

logical: does ensemble include all vars and years? If FALSE, filename will include years and vars

ensemble.id

ensemble ID(s)

variable

variable(s) included in the ensemble.

start.year, end.year

first and last year simulated.

Value

a vector of filenames, each in the form `[settings$outdir]/[prefix].[ensemble.ID].[variable].[start.year].[end.year][suffix]`.

Details

Typically used by passing only a settings object, but all values can be overridden for manual use.

If only a single variable or a subset of years are needed, the generated filename will identify these in the form If all vars and years are included, set `all.yr.var` to TRUE to get a filename of the form `prefix.ensemble_id.suffix`. All elements are recycled vectorwise.

Author

Ryan Kelly