run_parameter_scan {growR} | R Documentation |
Parameter Scan
Description
Run ModVege for a different sets of parameters.
Usage
run_parameter_scan(environment, param_values, force = FALSE, outfilename = "")
Arguments
environment |
Either a ModvegeEnvironment instance with all the site,
management and weather inputs expected by ModvegeSite |
param_values |
A named list where each key stands for a ModVege
parameter, i.e. a member of ModvegeParameters |
force |
Boolean. By default ( |
outfilename |
String. If nonempty, the results are stored as an |
Value
results A list containing an entry for each supplied parameter set in param_values. Each entry is itself a list containing the following keys:
- params
The parameter set that was used to run ModVege for this entry.
- data
A list containing for each simulated year a ModvegeSite object which was run for the respective year and therefore carries the respective results.
Note
Special care has to be taken in the creation of the param_values argument.
It's possible to choose values that do not allow for any valid combination.
Confer create_combinations()
.
See Also
ModvegeParameters, saveRDS()
, create_combinations()
Examples
env = create_example_environment()
# We're creating a trivial list of parameters to explore here in order to
# prevent the example from requiring a long time to execute. See
# [create_combinations()] for more realistic uses of param_values.
param_values = list(w_FGA = c(0, 1), w_FGB = c(0, 1))
run_parameter_scan(env, param_values, force = TRUE)