Skip to content
Snippets Groups Projects
Commit 36d0ff27 authored by Moritz Shore's avatar Moritz Shore
Browse files

Update malanta_fix.R

Now working with variable output
parent f23d2f3b
No related branches found
No related tags found
No related merge requests found
......@@ -7,8 +7,8 @@ remotes::install_github(repo = "moritzshore/rswap", ref = remotes::github_releas
# load rswap
library(rswap)
# The package version should be 0.5.1
packageVersion("rswap") == "0.5.1"
# The package version should be 0.5.2
packageVersion("rswap") == "0.5.2"
# tell rswap where your setup is located
malanta = "C:/Users/mosh/Documents/GIT/rswap_applications/Malanta/"
......@@ -16,14 +16,13 @@ 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 = F,
verbose = T,
statistic = "NSE",
obs_variable = "WC",
autoset_output = T
......@@ -38,7 +37,18 @@ result_df
# a lot earlier. My bad.
# 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 disappoint 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.
# variable (like Water content) instead of performance indicator (like NSE), all
# you need to do is remove the `statistic = "NSE"` and add the depth of your
# observed variable, then you will get just that:
get_swap_depths(load_swap_observed(malanta))
result_df <- check_swap_sensitivity(
malanta,
variable = "ALFA",
values = seq(0.05, 0.3, by = 0.01),
row = 1,depth = 10,
verbose = T,
obs_variable = "WC",
autoset_output = T, force = T
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment