This function automates a simple sensitivity analysis for your SWAP project.
check_swap_sensitivity(
project_path,
variable,
values,
row = NULL,
statistic = NULL,
obs_variable = NULL,
depth = NULL,
cleanup = TRUE,
swap_file = "swap.swp",
n_cores = NULL,
autoset_output = FALSE,
force = TRUE,
verbose = FALSE,
timeout = Inf
)
path to the project directory (string)
SWAP parameter to alter (string)
Parameter set to vary your variable across (vector)
(optional, numeric) if your parameter is stored in a table you need to pass the row in which it is in
(optional, string) if you would like to evaluate the sensitivity of
model performance to the passed parameter set, please specify which
statistical indicator you would like to use (supported by hydroGOF
)
(optional, string) the observed variable you would like model perfomance to be evaluted with (required if statistic
is passed)
(optional, numeric) if your obs_variable
has a respective depth, pass it here (cm)
(optional, boolean) delete the model files (results) after function completion?
(optional, string) SWAP file to run, by default "swap.swp"
(optional, numeric) The number of CPU cores to run the sensitivity anaylysis on.
(optional, boolean) Match model output to observed data?
(optional, boolean) If an rswap directory already exists, no new one will be generated/reloaded unless force=TRUE. Defaults to TRUE
(optional, boolean) Print actions to console?
(optional, numeric) Maximum model runtime in seconds. Unlimited by default.
Prints interactive plot and returns dataframe of the results.
Currently supported output is statistical evalution only. This function is not yet fully finished!
if(FALSE){
check_swap_sensitivity(
project_path = "C:/Users/mosh/Documents/rswaptesting/tetves/",
variable = "OSAT",
values = seq(0.32, 0.48, by = 0.01),
row = 1,
statistic = "NSE",
obs_variable = "WC",
depth = 15,
cleanup = TRUE,
autoset_output = TRUE,
verbose = TRUE
)}