Ingests data for site scale simulations with rsofun (or any other Dynamic Vegetation Model).
ingest(
siteinfo,
source,
getvars = c(),
dir = NULL,
settings = NULL,
timescale = "d",
parallel = FALSE,
ncores = NULL,
find_closest = FALSE,
verbose = FALSE
)
A data frame containing site meta info. Required columns are:
"sitename", "date_start", "date_end", "lon", "lat", "elv"
.
A character used as identifiyer for the type of data source
(e.g., "fluxnet"
). See vignette for a full description of available
options.
A named list of characters specifying the variable names in
the source dataset corresponding to standard names "temp"
for temperature, "prec"
for precipitation, "patm"
for
atmospheric pressure, "vpd"
for vapour pressure deficit,
"netrad"
for net radiation, "swin"
for shortwave incoming
radiation, "lwin"
for longwave incoming radiation, "wind"
for wind.
A character specifying the directory where data is located.
A list of additional settings used for reading original files.
A character or vector of characters, specifying the time scale of data used from the respective source (if multiple time scales are available, otherwise is disregarded).
A logical specifying whether ingest is run as parallel jobs
for each site. This option is only available for source = "modis"
and requires argument ncores
to be set.
An integer specifying the number of cores for parallel runs of
ingest per site. Required only if parallel = TRUE
A logical specifying whether to extract data from the
closest gridcell with data if no data is available for the specified
location. Defaults to FALSE
.
if TRUE
, additional messages are printed.
A named list of data frames (tibbles) containing input data for each site is returned.
if (FALSE) { # \dontrun{
inputdata <- prepare_input_sofun(
settings_input = settings_input,
settings_sims = settings_sims,
verwrite_climate = FALSE,
verbose = TRUE )
} # }