diff --git a/malanta_fix.R b/malanta_fix.R index 25902d2a92f2695da81b95fc512caa75f98310a2..0620c971abd858e99c43f217aa5d48cc44e4a6c6 100644 --- a/malanta_fix.R +++ b/malanta_fix.R @@ -1,9 +1,39 @@ # Malanta Fix + +# Update the package to the newest version! make sure you have the "remotes" +# package installed remotes::install_github(repo = "moritzshore/rswap", ref = remotes::github_release()) + +# load rswap library(rswap) -setwd("C:/Users/mosh/Documents/GIT/rswap_applications/") -run_swap("Malanta/recreation", verbose = T) +# tell rswap where your setup is located +malanta = "C:/Users/mosh/Documents/GIT/rswap_applications/Malanta/" + +# a test run of the model +run_swap(malanta, verbose = T, autoset_output = T) +rswap::rswap_plot_multi(malanta, vars = "WC", show = "WC") + +# and a sensitivity run. +result_df <- check_swap_sensitivity( + malanta, + variable = "ALFA", + values = seq(0.05, 0.3, by = 0.01), + row = 1, + verbose = T, + statistic = "NSE", + obs_variable = "WC", + autoset_output = T +) + +result_df + +# By the way, it was my fault, not yours! fixed 2 bugs that I should have fixed +# a lot earlier. My bad. -check_swap_sensitivity("Malanta/recreation", variable = "ALFA", values = seq(0.05, 0.3, by = 0.01), row = 1, verbose = T) +# Also, if you would like to see the effect of your parameter on a model +# variable (like Water content) instead of performance indicator (like NSE), +# I'll have to disapoint you because I haven't implemented that yet. If you +# would like to have it though, let me know because it should be pretty easy to +# add.