Writes config files for use in meta-analysis and returns a list of run ids. Given a pft.xml object, a list of lists as supplied by get.sa.samples, a name to distinguish the output files, and the directory to place the files.
Usage
write.ensemble.configs(
input_design,
ensemble.size,
defaults,
ensemble.samples,
settings,
model,
clean = FALSE,
write.to.db = TRUE,
restart = NULL,
samples = NULL,
rename = FALSE
)Arguments
- input_design
the input indices for samples
- ensemble.size
size of ensemble
- defaults
pft
- ensemble.samples
list of lists supplied by get.ensemble.samples
- settings
list of PEcAn settings
- model
name of model to be run, e.g. "ED2" or "SIPNET"
- clean
remove old output first?
- write.to.db
logical: Record this run in BETY?
- restart
In case this is a continuation of an old simulation. restart needs to be a list with name tags of runid, inputs, new.params (parameters), new.state (initial condition), ensemble.id (ensemble id), start.time and stop.time.See Details.
- samples
Sampled inputs such as met and parameter files
- rename
Decide if we want to rename previous output files, for example convert from sipnet.out to sipnet.2020-07-16.out.
Value
list, containing $runs = data frame of runids, $ensemble.id = the ensemble ID for these runs and $samples with ids and samples used for each tag. Also writes sensitivity analysis configuration files as a side effect
Details
The restart functionality is developed using model specific functions by calling write_restart.modelname function. First, you need to make sure that this function is already exist for your desired model.See here https://pecanproject.github.io/pecan-documentation/latest/pecan-models.html new state is a dataframe with a different column for each state variable. The number of the rows in this dataframe needs to be the same as the ensemble size. The state variables that you can use for setting up initial conditions are model specific. Check the documentation of the write_restart.<modelname> function for the model you are using. The units for the state variables need to be in the PEcAn standard units which can be found in standard_vars. new.params also has similar structure to ensemble.samples which is sent as an argument.