Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
rSWAP_Applications
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Csilla Farkas
rSWAP_Applications
Commits
36d0ff27
Commit
36d0ff27
authored
7 months ago
by
Moritz Shore
Browse files
Options
Downloads
Patches
Plain Diff
Update malanta_fix.R
Now working with variable output
parent
f23d2f3b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
malanta_fix.R
+18
-8
18 additions, 8 deletions
malanta_fix.R
with
18 additions
and
8 deletions
malanta_fix.R
+
18
−
8
View file @
36d0ff27
...
...
@@ -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
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment