Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
swatdoctr
Manage
Activity
Members
Labels
Plan
Issues
5
Issue boards
Milestones
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christoph Schürz
swatdoctr
Commits
b10618e1
Commit
b10618e1
authored
2 years ago
by
Christoph Schürz
Browse files
Options
Downloads
Patches
Plain Diff
Fix error case for model run
parent
af568466
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
DESCRIPTION
+1
-1
1 addition, 1 deletion
DESCRIPTION
R/run_swat_verify.R
+3
-3
3 additions, 3 deletions
R/run_swat_verify.R
with
4 additions
and
4 deletions
DESCRIPTION
+
1
−
1
View file @
b10618e1
Package: SWATdoctR
Package: SWATdoctR
Type: Package
Type: Package
Title: Finding the right diagnoses and treatments for SWAT+ models
Title: Finding the right diagnoses and treatments for SWAT+ models
Version: 0.1.
5
Version: 0.1.
6
Author: c(person("Svajunas", "Plunge",
Author: c(person("Svajunas", "Plunge",
email = "svajunas_plunge@sggw.edu.pl",
email = "svajunas_plunge@sggw.edu.pl",
role = c("aut")),
role = c("aut")),
...
...
This diff is collapsed.
Click to expand it.
R/run_swat_verify.R
+
3
−
3
View file @
b10618e1
...
@@ -61,11 +61,11 @@ run_swat_verification <- function(project_path, outputs = c('wb', 'mgt', 'plt'),
...
@@ -61,11 +61,11 @@ run_swat_verification <- function(project_path, outputs = c('wb', 'mgt', 'plt'),
msg
<-
run
(
run_os
(
swat_exe
,
os
),
wd
=
run_path
,
msg
<-
run
(
run_os
(
swat_exe
,
os
),
wd
=
run_path
,
error_on_status
=
FALSE
)
error_on_status
=
FALSE
)
if
(
msg
$
timeout
)
{
if
(
nchar
(
msg
$
stderr
)
>
0
)
{
out_msg
<-
str_split
(
msg
$
stdout
,
'\r\n|\r|\n'
,
simplify
=
TRUE
)
%>%
out_msg
<-
str_split
(
msg
$
stdout
,
'\r\n|\r|\n'
,
simplify
=
TRUE
)
%>%
.
[
max
(
1
,
length
(
.
)
-
10
)
:
length
(
.
)]
.
[
max
(
1
,
length
(
.
)
-
10
)
:
length
(
.
)]
err_msg
<-
c
(
paste0
(
'Simulation timed out after
'
,
t
im
e_out
,
' sec'
),
err_msg
<-
str_split
(
msg
$
stderr
,
'\r\n|\r|\n
'
,
s
im
plify
=
TRUE
)
'Simulation run:'
,
out
_msg
)
err_msg
<-
c
(
'Last output:'
,
out_msg
,
'Error:'
,
err
_msg
)
model_output
<-
err_msg
model_output
<-
err_msg
}
else
if
(
nchar
(
msg
$
stderr
)
==
0
)
{
}
else
if
(
nchar
(
msg
$
stderr
)
==
0
)
{
model_output
<-
list
()
model_output
<-
list
()
...
...
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