Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Groundwater-level informatics
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mississippi Alluvial Plain
gw
Groundwater-level informatics
Commits
c0a02971
Commit
c0a02971
authored
Dec 04, 2019
by
Asquith, William H.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enhancement to ylim computations during testing against the needs for the paper
parent
4c8e0ec7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
include/visGWDB_Mloop.R
include/visGWDB_Mloop.R
+17
-3
No files found.
include/visGWDB_Mloop.R
View file @
c0a02971
...
...
@@ -106,9 +106,15 @@ for(i in 1:num.sites) { # MASTER LOOP START: Mloop
}
}
if
(
TOGGLE.restrict.ylim.to.lev
)
{
yf
<-
ifelse
(
length
(
lev
)
<=
2
,
3
,
1
)
ylim
<-
c
(
-
ylim.dn.buffer
*
yf
,
ylim.up.buffer
*
yf
)
ylim
<-
range
(
c
(
ylim
,
range
(
lev
)),
na.rm
=
TRUE
)
ybar
<-
as.integer
(
mean
(
lev
,
na.rm
=
TRUE
))
# this start up for robustness
if
(
!
is.finite
(
ybar
))
ybar
<-
0
# if NAs were only present
if
(
length
(
lev
)
<=
2
)
{
# make a special allowance for just a couple of
ylim
<-
c
(
ybar
-
ylim.dn.buffer
,
# measurements but perhaps 1 should be
ybar
+
ylim.up.buffer
)
# the setting, but here we get something useful
}
else
{
ylim
<-
range
(
lev
,
na.rm
=
TRUE
)
# otherwise
}
ylim
<-
range
(
c
(
ylim
,
range
(
lev
)),
na.rm
=
TRUE
)
# yes, range called twice
if
(
TOGGLE.force.ylim.to.alt
)
ylim
<-
range
(
c
(
ylim
,
alt
,
refalt
),
na.rm
=
TRUE
)
if
(
TOGGLE.show.aquifer.bottom
)
ylim
<-
range
(
c
(
ylim
,
aqfrBttm
),
na.rm
=
TRUE
)
if
(
TOGGLE.show.aquifer.top
)
ylim
<-
range
(
c
(
ylim
,
aqfrTop
),
na.rm
=
TRUE
)
...
...
@@ -119,7 +125,15 @@ for(i in 1:num.sites) { # MASTER LOOP START: Mloop
if
(
TOGGLE.show.aquifer.bottom
)
ylim
<-
range
(
c
(
ylim
,
aqfrBttm
),
na.rm
=
TRUE
)
if
(
TOGGLE.show.aquifer.top
)
ylim
<-
range
(
c
(
ylim
,
aqfrTop
),
na.rm
=
TRUE
)
}
if
(
length
(
lev
)
>
2
)
{
# we make opposite test to that some lines above to
ylim
<-
c
(
ylim
[
1
]
-
ylim.dn.buffer
,
# avoid some double counting and
ylim
[
2
]
+
ylim.up.buffer
)
# double application of the buffers
}
if
(
length
(
ylim.lock.to.this.interval
)
==
2
)
ylim
<-
ylim.lock.to.this.interval
if
(
diff
(
ylim
)
==
0
|
is.na
(
ylim
))
{
message
(
" found a zero range ylim for "
,
site
,
" resetting to the buffers"
)
ylim
<-
c
(
-
ylim.dn.buffer
,
ylim.up.buffer
)
# emergency backup setting
}
options
(
opts
)
# resetting the warnings to on again
dupWL
<-
dupWarnWLvar
(
TMP
$
LEV_DT
,
lev
)
# days of nonzero std dev of LEV_VA
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment