-
Notifications
You must be signed in to change notification settings - Fork 6
/
sir20165080_AppendixD.Rnw
3052 lines (2655 loc) · 157 KB
/
sir20165080_AppendixD.Rnw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
% \VignetteIndexEntry{Appendix D. Uncalibrated Groundwater-Flow Model}
% \VignetteEngine{knitr::knitr}
% \VignetteDepends{wrv}
\documentclass[twoside]{article}
\input{\Sexpr{shQuote(system.file("misc", "preamble.tex", package="inlmisc"))}}
\addbibresource{\Sexpr{system.file("misc", "references.bib", package="wrv")}}
\fancyhead[LE]{\normalfont\bfseries\sffamily \thepage \quad Groundwater-Flow Model for the Wood River Valley Aquifer System, South-Central Idaho}
\renewcommand{\thefigure}{D\arabic{figure}}
\renewcommand{\thetable}{D\arabic{table}}
\renewcommand{\thepage}{D\arabic{page}}
\setcounter{page}{1}
% =========================================================================
\begin{document}
<<setup, include=FALSE>>=
t0 <- Sys.time()
try(knitr::opts_chunk$set(tidy=FALSE, comment="#", fig.align="center"), silent=TRUE)
grDevices::pdf.options(useDingbats=FALSE)
options(preferRaster=TRUE, scipen=0, digits=2)
# Device dimension in inches (width, height)
fin.graph <- c(7.17, 7.17)
fin.graph.short <- c(7.17, 3.50)
fig.graph.small <- c(3.50, 3.50)
fin.map <- c(7.17, 9.31)
fin.map.0 <- c(7.17, 8.77)
fin.map.s <- c(7.17, 5.22)
fin.map.s.0 <- c(7.17, 4.68)
fin.map.n <- c(7.17, 6.97)
fin.map.n.small <- c(3.50, 3.60)
fin.map.n.small.0 <- c(3.50, 3.30)
fin.cs <- c(7.17, 5.26)
fin.cs.0 <- c(7.17, 4.68)
# Extreme coordinates of plotting region (x1, x2, y1, y2)
usr.map <- c(2451504, 2497815, 1342484, 1402354)
usr.map.s <- c(2472304, 2497015, 1343284, 1358838)
usr.map.n.1 <- c(2463000, 2475356, 1386500, 1398856)
usr.map.n.2 <- c(2467500, 2479856, 1376500, 1388856)
usr.map.n.3 <- c(2466696, 2479052, 1366501, 1378857)
usr.map.n.4 <- c(2471500, 2483856, 1356482, 1368838)
# Verticies of transect line from north-west to south-east (longitude, latitude)
transect.coords <- rbind(c(-114.280851, 43.483026),
c(-114.245614, 43.432551),
c(-114.228996, 43.350930),
c(-114.045926, 43.301372))
# Unit conversions
m.to.ft <- 3.280839895
km.to.mi <- 0.62137119224
m.to.yd <- 1.0936132983
m2.to.km2 <- 1e-06
m2.to.acre <- 0.00024710439202
km2.to.acre <- 247.10439202
m2.to.ft2 <- 10.763867316
km2.to.mi2 <- 0.38610215855
m3.to.af <- 0.00081070848625
m3.to.ft3 <- 35.314666721
m3.to.hm3 <- 1e-06
m3.per.d.to.af.per.yr <- 0.296106669
d.to.yr <- 0.00273791
cfs.to.m3.per.d <- 2446.57555
# Map credit
credit <- paste("Base derived from U.S. Geological Survey National Elevation Dataset 10-meter digital elevation model.",
"Idaho Transverse Mercator projection; North American Datum of 1983.", sep="\n")
# Functions for formatting inline numbers
FmtLength <- function(x, u=c("m", "ft"), conv=m.to.ft) {
FUN <- function(i) format(i, digits=2, nsmall=1L, big.mark=",")
if (length(x) == 1) {
s <- vapply(c(x[1], x[1] * conv), FUN, "")
s <- sprintf("%s~%s (%s~%s)", s[1], u[1], s[2], u[2])
} else {
s <- vapply(c(x[1], x[2], x[1] * conv, x[2] * conv), FUN, "")
s <- sprintf("%s to %s~%s (%s to %s~%s)", s[1], s[2], u[1], s[3], s[4], u[2])
}
return(s)
}
FmtFlow <- function(x, u=c("m\\textsuperscript{3}/d", "acre-ft/yr"), conv=m3.per.d.to.af.per.yr) {
FUN <- function(i) ToScientific(i, digits=1)
if (length(x) == 1) {
s <- vapply(c(x[1], x[1] * conv), FUN, "")
s <- sprintf("%s~%s (%s~%s)", s[1], u[1], s[2], u[2])
} else {
s <- vapply(c(x[1], x[2], x[1] * conv, x[2] * conv), FUN, "")
s <- sprintf("%s to %s~%s (%s to %s~%s)", s[1], s[2], u[1], s[3], s[4], u[2])
}
return(s)
}
@
\title{Appendix D.\enspace Uncalibrated Groundwater-Flow Model for the Wood River Valley Aquifer System, South-Central Idaho}
\author{}
\maketitle
\tableofcontents
\newpage
\renewcommand*\listfigurename{Figures}
\listoffigures
\renewcommand*\listtablename{Tables}
\listoftables
\clearpage
\RaggedRight
% =========================================================================
\section{Introduction}
This document is a vignette in the \textbf{wrv} package that explains the steps taken to process the uncalibrated groundwater-flow model of the Wood River Valley (WRV) aquifer system, south-central Idaho.
The vignette's `code chunks' comprise commands that are essential for processing the uncalibrated groundwater-flow model and describe approaches to model development and analysis decisions.
It is assumed that the reader of this vignette is familiar with the \href{https://www.r-project.org/}{\R{}}-programming language and has read help pages for functions and datasets in the \textbf{wrv} package (appendix B).
Flow in the WRV aquifer system is simulated using \href{https://water.usgs.gov/ogw/mfusg/}{MODFLOW-USG}, a numerical model that simulates three-dimensional, steady-state and transient groundwater flow using a control volume finite-difference formulation \citep{Panday2013}.
% =========================================================================
\section{R Environment}
Load the following user-contributed packages into the current \R{} session:
<<warning=FALSE, message=FALSE, results="hide">>=
library("wrv") # processor for groundwater-flow model
library("raster") # gridded spatial data toolkit
library("inlmisc") # miscellaneous functions for the USGS INL project office
@
\noindent The memory requirement for running \R{} code in this vignette is about 5 gigabytes.
All output from this vignette is placed in the current `working directory'.
The following command will print the path to the current working directory:
<<results="hide">>=
getwd()
@
% =========================================================================
\section{Hydrogeologic Framework}
The WRV aquifer system is composed of
(1) a single unconfined aquifer that underlies the entire valley,
(2) an underlying confined aquifer that is present only in the southern part of the valley, and
(3) a confining unit separating the two aquifers \citep[p.~3]{Bartolino2012}.
The land-surface topography and spatial extent of the aquifer system (study area) are shown in \hyperref[fig:map_alluvium_thickness]{figure~\ref{fig:map_alluvium_thickness}}.
The aquifer system primarily consists of Quaternary deposits that can be divided into three hydrogeologic units:
(1) a coarse-grained sand and gravel unit (alluvium unit),
(2) a fine-grained silt and clay unit (clay unit), and
(3) a basalt unit \citep[p.~3]{Bartolino2012}.
% =========================================================================
\section{Space-Time Model Grid}
% =========================================================================
\subsection{Model Grid Conceptualization}
The creation of the model grid is the first step in developing the groundwater-flow model, because all model inputs including hydraulic properties and boundary conditions are assigned to the model cells.
The three-dimensional model grid is rectilinear (square cells) horizontally, vertically discretized in layers of different thickness, and from the east-west and north-south axes.
The decision to use a structured grid, rather than exploit the unstructured grid capabilities of MODFLOW-USG,
was based on a desire to avoid the added complexities of designing processing algorithms for an unstructured grid.
A preliminary sensitivity analysis to changes in grid resolution indicated that a 100 m (330 feet [ft]) resolution provides
the optimal tradeoff between the inherent spatial variability of the measured data and adequate continuous grid converge in the narrow and steep tributary canyons of the WRV.
A solid-boundary representation of the land surface and an estimated thickness for the Quaternary sediments (\hyperref[fig:map_alluvium_thickness]{fig.~\ref{fig:map_alluvium_thickness}})
as defined by \citet[fig. 7]{Bartolino2012}, are used to generate the basic structure of the model grid.
<<>>=
rs.data <- stack(land.surface, alluvium.thickness) # stack raster layers
@
<<include=FALSE>>=
v <- "Extent and thickness of Quaternary sediments in the Wood River Valley aquifer system, south-central Idaho."
v <- c(paste("Map showing", paste0(tolower(substr(v, 1, 1)), substr(v, 2, nchar(v)))), v)
@
<<map_alluvium_thickness, echo=FALSE, fig.width=fin.map[1], fig.height=fin.map[2], fig.scap=sprintf("{%s}", v[1]), fig.cap=sprintf("{%s}", v[2])>>=
r <- rs.data[["alluvium.thickness"]]
Pal <- colorRampPalette(c("#F02311", "#FFFFEA", "#107FC9"))
PlotMap(r, breaks=pretty(range(r[], na.rm=TRUE), n=12), xlim=usr.map[1:2], ylim=usr.map[3:4],
bg.image=hill.shading, bg.image.alpha=0.6, dms.tick=TRUE,
pal=Pal, explanation="Thickness of the Quaternary sediments measured as depth below land surface, in meters.",
rivers=list(x=streams.rivers), lakes=list(x=lakes), credit=credit,
scale.loc="bottomleft")
plot(cities, pch=15, cex=0.8, col="#333333", add=TRUE)
text(cities, labels=cities@data$FEATURE_NA, col="#333333", cex=0.5, pos=1, offset=0.4)
AddInsetMap(idaho, width=1, main.label=list("IDAHO", adj=c(-0.4, -4.9)),
sub.label=list("Map area", adj=c(0.5, 2.5)), loc="topright")
@
\noindent The elevation of the pre-Quaternary bedrock surface and top of Quaternary basalt is calculated by subtracting the thickness of the Quaternary sediments from land-surface elevations.
<<>>=
r <- rs.data[["land.surface"]] - rs.data[["alluvium.thickness"]]
rs.data[["alluvium.bottom"]] <- r
@
\newpage
\noindent The estimated areal extent of the basalt unit in the WRV aquifer system, as defined by \citet[plate~1]{Bartolino2012},
is shown in \hyperref[fig:map_basalt_extent]{figure~\ref{fig:map_basalt_extent}}.
<<>>=
r <- raster(rs.data)
r[rasterize(basalt.extent, r, getCover = TRUE) > 0] <- 1L
r <- ratify(r) # add raster attribute table
levels(r) <- cbind(levels(r)[[1]], att = "basalt")
rs.data[["basalt.extent"]] <- r
@
<<include=FALSE>>=
v <- "Extent of basalt unit in the Wood River Valley aquifer system, south-central Idaho."
v <- c(paste("Map showing", paste0(tolower(substr(v, 1, 1)), substr(v, 2, nchar(v)))), v)
@
<<map_basalt_extent, echo=FALSE, fig.width=fin.map.s.0[1], fig.height=fin.map.s.0[2], fig.scap=sprintf("{%s}", v[1]), fig.cap=sprintf("{%s}", v[2])>>=
col <- "#BEAED4"
PlotMap(r, xlim=usr.map.s[1:2], ylim=usr.map.s[3:4], bg.image=hill.shading, bg.image.alpha=0.6,
dms.tick=TRUE, col=col, roads=list(x=major.roads), rivers=list(x=streams.rivers),
lakes=list(x=lakes), draw.key=FALSE, credit=credit, scale.loc="bottomleft")
plot(alluvium.extent, border="#FFFFFF7F", add=TRUE)
plot(cities, pch=15, cex=0.8, col="#333333", add=TRUE)
text(cities, labels=cities@data$FEATURE_NA, col="#333333", cex=0.5, pos=1, offset=0.3)
lab <- cbind(map.labels@coords, map.labels@data)
for (i in seq_len(nrow(lab))) {
text(lab$x[i], lab$y[i], labels=lab$label[i], cex=lab$cex[i], col=lab$col[i],
font=lab$font[i], srt=lab$srt[i])
}
plot(bypass.canal, col="#3399CC", lwd=0.5, add=TRUE)
text(getSpatialLinesMidPoints(rgeos::gLineMerge(bypass.canal)), labels="Bypass Canal",
cex=0.5, col="#3399CC", font=3, srt=80, pos=4)
plot(bellevue.wwtp.ponds, col="#CCFFFF", border="#3399CC", lwd=0.5, add=TRUE)
text(suppressWarnings(getSpatialPolygonsLabelPoints(bellevue.wwtp.ponds)),
labels="Bellevue WWTP Ponds", cex=0.5, col="#3399CC", font=3, pos=2)
plot(misc.locations, pch=21, cex=0.6, col="#333333", add=TRUE)
text(misc.locations, labels=misc.locations@data$label, pos=c(3, 2, 2),
cex=0.5, offset=0.3)
legend("topright", "Basalt unit", fill=col, border=NA, inset=c(0.02, 0.55),
cex=0.7, box.lty=1, box.lwd=0.5, xpd=NA, bg="#FFFFFFCD")
AddInsetMap(alluvium.extent, width=1, main.label=list("AQUIFER", adj=c(0.25, -9)),
sub.label=list("Map area", adj=c(1.65, 0.5)), loc="topright")
@
Basalt underlies the Quaternary sediments; however, very little data are available to describe the unit thickness of basalt.
The few wells that penetrate the basalt unit are located at the Hayspur Fish Hatchery (\hyperref[fig:map_basalt_extent]{fig.~\ref{fig:map_basalt_extent}})
and describe consistent unit thicknesses among wells of about 15 m (49 ft) for alluvium and 37 m (121 ft) for basalt.
Summing these unit thicknesses gives the estimated depth, measured as the distance below land surface, to the bottom of the basalt unit at 52 m (170 ft).
This depth is assumed constant throughout the extent of the basalt unit.
Transmissive materials that may be present beneath the basalt unit are neglected because of insufficient data to describe these materials.
The bedrock-surface elevation for the aquifer system is then calculated by integrating units.
<<>>=
depth.to.basalt.bottom <- 52 # in meters
r <- rs.data[["land.surface"]] - depth.to.basalt.bottom
r[r > rs.data[["alluvium.bottom"]] | is.na(rs.data[["basalt.extent"]])] <- NA
rs.data[["bedrock"]] <- cover(r, rs.data[["alluvium.bottom"]])
@
\noindent Subtracting bedrock-surface elevations from land-surface elevations gives the thickness of the WRV aquifer system (\hyperref[fig:map_aquifer_thickness]{fig.~\ref{fig:map_aquifer_thickness}}).
<<>>=
rs.data[["aquifer.thickness"]] <- rs.data[["land.surface"]] - rs.data[["bedrock"]]
@
<<include=FALSE>>=
v <- "Thickness of the aquifer system in the southern part of the Wood River Valley aquifer system, south-central Idaho."
v <- c(paste("Map showing", paste0(tolower(substr(v, 1, 1)), substr(v, 2, nchar(v)))), v)
@
<<map_aquifer_thickness, echo=FALSE, fig.width=fin.map.s[1], fig.height=fin.map.s[2], fig.scap=sprintf("{%s}", v[1]), fig.cap=sprintf("{%s}", v[2])>>=
r <- rs.data[["aquifer.thickness"]]
PlotMap(r, breaks=pretty(range(r[], na.rm=TRUE), n=12), xlim=usr.map.s[1:2], ylim=usr.map.s[3:4],
bg.image=hill.shading, bg.image.alpha=0.6, dms.tick=TRUE, pal=Pal,
explanation="Thickness of the aquifer system measured as depth below land surface, in meters.",
rivers=list(x=streams.rivers), lakes=list(x=lakes), credit=credit,
scale.loc="bottomleft")
plot(cities, pch=15, cex=0.8, col="#333333", add=TRUE)
text(cities, labels=cities@data$FEATURE_NA, col="#333333", cex=0.5, pos=1, offset=0.4)
@
\newpage
The clay unit represents an aquitard or confining unit separating the unconfined aquifer from the underlying confined aquifer.
The estimated extent of the clay confining unit in the WRV aquifer system, as defined by \citet{Moreland1977}, is shown in \hyperref[fig:map_clay_extent]{figure~\ref{fig:map_clay_extent}}.
<<>>=
r <- raster(rs.data)
r[rasterize(rgeos::gUnaryUnion(clay.extent), r, getCover = TRUE) > 0] <- 1L
r <- ratify(r)
levels(r) <- cbind(levels(r)[[1]], att = "clay")
rs.data[["clay.extent"]] <- r
@
<<include=FALSE>>=
v <- "Extent of clay confining unit in the Wood River Valley aquifer system, south-central Idaho."
v <- c(paste("Map showing", paste0(tolower(substr(v, 1, 1)), substr(v, 2, nchar(v)))), v)
@
<<map_clay_extent, echo=FALSE, fig.width=fin.map.s.0[1], fig.height=fin.map.s.0[2], fig.scap=sprintf("{%s}", v[1]), fig.cap=sprintf("{%s}", v[2])>>=
col <- "#FDC086"
PlotMap(r, xlim=usr.map.s[1:2], ylim=usr.map.s[3:4], bg.image=hill.shading, bg.image.alpha=0.6,
dms.tick=TRUE, col=col, rivers=list(x=streams.rivers), lakes=list(x=lakes),
draw.key=FALSE, credit=credit, scale.loc="bottomleft")
plot(alluvium.extent, border="#FFFFFF7F", add=TRUE)
plot(cities, pch=15, cex=0.8, col="#333333", add=TRUE)
text(cities, labels=cities@data$FEATURE_NA, col="#333333", cex=0.5, pos=1, offset=0.4)
legend("topright", "Clay confining unit", fill=col, border=NA, inset=0.02, cex=0.7, box.lty=1,
box.lwd=0.5, xpd=NA, bg="#FFFFFFCD")
@
\noindent Well-driller reports and geophysical surveys describe the clay confining unit as about 5 m (16 ft) thick, and generally lying at a depth of about 30 m (98 ft) below land surface.
<<>>=
aquitard.thickness <- 5 # in meters
depth.to.aquitard.top <- 30 # in meters
r <- rs.data[["land.surface"]] - depth.to.aquitard.top
r[r < rs.data[["alluvium.bottom"]] | is.na(rs.data[["clay.extent"]])] <- NA
rs.data[["aquitard.top"]] <- r
@
Vertical connectivity among cells is ensured by setting a minimum vertical overlap between adjacent cells.
Cells having less than 2 m (6.6 ft) of overlap are adjusted by incrementally lowering the cell's bottom elevation until the minimum vertical overlap is attained
(\hyperref[fig:map_bedrock_adjusted]{fig.~\ref{fig:map_bedrock_adjusted}}).
<<>>=
min.overlap <- 2 # minimum vertical overlap between adjacent cells, in meters
r <- BumpDisconnectCells(subset(rs.data, c("land.surface", "bedrock")), min.overlap)
rs.data[["bedrock"]] <- rs.data[["bedrock"]] + r
rs.data[["cell.adjustment"]] <- r
@
<<include=FALSE>>=
v <- "Adjustment of bedrock-bottom elevations to account for vertically disconnected cells."
v <- c(paste("Map showing", paste0(tolower(substr(v, 1, 1)), substr(v, 2, nchar(v)))), v)
@
<<map_bedrock_adjusted, eval=TRUE, echo=FALSE, fig.width=fin.map[1], fig.height=fin.map[2], fig.scap=sprintf("{%s}", v[1]), fig.cap=sprintf("{%s}", v[2])>>=
cells <- which(!is.na(r[]))
adj.cells <- cells[r[cells] < 0]
Pal <- function(n) {
cols <- colorRampPalette(c("#FFE500", "#F02311"))(n)
cols[n] <- "#FFFFFF9A"
return(cols)
}
PlotMap(r, xlim=usr.map[1:2], ylim=usr.map[3:4], zlim=range(pretty(r[])),
bg.image=hill.shading, bg.image.alpha=0.6, dms.tick=TRUE,
pal=Pal, explanation="Adjustment to bedrock-bottom elevations, in meters.",
rivers=list(x=streams.rivers), lakes=list(x=lakes), credit=credit,
scale.loc="bottomleft")
plot(cities, pch=15, cex=0.8, col="#333333", add=TRUE)
text(cities, labels=cities@data$FEATURE_NA, col="#333333", cex=0.5, pos=1, offset=0.4)
@
\noindent The total number of vertically adjusted cells is \Sexpr{format(length(adj.cells), big.mark=",")}, or \Sexpr{round(length(adj.cells) / length(cells) * 100)} percent of active cells,
with a mean and standard deviation of the adjusted distance of
\Sexpr{round(x <- mean(r[adj.cells]), digits=1)} m (\Sexpr{round(x * m.to.ft, digits=1)} ft) and
\Sexpr{round(x <- sd(r[adj.cells]), digits=1)} m (\Sexpr{round(x * m.to.ft, digits=1)} ft), respectively.
Groundwater enters the model domain through specified-flow boundary cells located in the major tributary canyons and
beneath the valley floor at the confluence of the Big Wood River and the North Fork Big Wood River (tributary No. \Sexpr{which(tributaries@data$Name == "BWR Upper")})
in \hyperref[fig:map_tribs]{figure~\ref{fig:map_tribs}}.
These boundary cells are hereafter refered to as `tributary cells'.
The tributary cells are identified using hand-drawn horizontal polygons with a single polygon allocated to each of the \Sexpr{nrow(tributaries)} boundaries
(\hyperref[fig:map_tribs]{fig.~\ref{fig:map_tribs}}).
Active cells intersecting a polygon line segment are defined as tributary cells, and cells located within the body of a polygon are made inactive.
<<>>=
l <- rgeos::gIntersection(as(tributaries, "SpatialLinesDataFrame"), alluvium.extent, TRUE)
trib.lines <- SpatialLinesDataFrame(l, data = tributaries@data, match.ID = FALSE)
r <- setValues(raster(rs.data), rep(1L, ncell(r)))
r <- mask(r, rs.data[["alluvium.bottom"]])
r <- mask(r, tributaries, inverse = TRUE, updatevalue = 0L)
r <- mask(r, trib.lines, inverse = TRUE, updatevalue = 2L)
cells <- which(r[] %in% 2L)
adj.cells <- adjacent(r, cells, directions = 4)
is.valid <- adj.cells[, 2] %in% which(r[] == 1L)
r[cells[!(cells %in% unique(adj.cells[is.valid, 1]))]] <- 0L
r <- ratify(r)
att <- paste(c("Inactive", "Active", "Tributary"), "cell")
levels(r) <- cbind(levels(r)[[1]], att = att)
rs.data[["ibound"]] <- r
@
<<include=FALSE>>=
v <- "Model boundaries in the major tributary canyons and upper part of the Wood River Valley, south-central Idaho. Tributary identifiers are used as a cross reference with data in \\hyperref[table_tribs]{table~\\ref{table_tribs}}."
v <- c(paste("Map showing", paste0(tolower(substr(v, 1, 1)), substr(v, 2, nchar(v)))), v)
@
<<map_tribs, echo=FALSE, fig.width=fin.map.0[1], fig.height=fin.map.0[2], fig.scap=sprintf("{%s}", v[1]), fig.cap=sprintf("{%s}", v[2])>>=
cols <- c("#FF404B", "#A6CEE3", "#000000")
PlotMap(r, xlim=usr.map[1:2], ylim=usr.map[3:4], bg.image=hill.shading, bg.image.alpha=0.6, dms.tick=TRUE,
col=cols, rivers=list(x=streams.rivers), lakes=list(x=lakes), draw.key=FALSE,
credit=credit, scale.loc="bottomleft")
plot(cities, pch=15, cex=0.8, col="#333333", add=TRUE)
text(cities, labels=cities@data$FEATURE_NA, col="#333333", cex=0.5, pos=1, offset=0.4)
pos <- c(2, 4, 2, 1, 2, 3, 3, 1, 4, 3,
3, 1, 1, 1, 2, 4, 2, 1, 1, 3,
2, 4, 1)
text(getSpatialLinesMidPoints(trib.lines), labels=rownames(trib.lines@data),
col="#333333", cex=0.6, pos=pos, offset=0.4)
leg <- as.character(levels(r)[[1]]$att)
legend("topright", leg, fill=cols, border=NA, inset=0.02, cex=0.7, box.lty=1,
box.lwd=0.5, xpd=NA, bg="#FFFFFFCD")
@
The presence of the clay confining unit significantly influences groundwater-level responses, necessitating a multi-layer model.
Model layering was designed to allow accurate representation of the confining unit (\hyperref[fig:map_clay_extent]{fig.~\ref{fig:map_clay_extent}}).
A schematic cross-section representation of the hydrogeologic units and the layered model grid is shown in \hyperref[fig:cs_schematic]{figure~\ref{fig:cs_schematic}}.
Embedded clay within the basalt unit is assumed to have a negligible effect on groundwater flow and is not represented by the model.
Model cells in layers 2 and 3 become inactive north of Hailey.
Model cells that are too thin can lead to numerical instability in the model; therefore, cells less than 1 m (3.3 ft) thick are made inactive.
\begin{figure}
\begin{subfigure}{\textwidth}
\caption{Hydrogeologic units \label{fig:cs_schematic_a}}
\includegraphics{cs_schematic_a.pdf}
\end{subfigure}
\vspace{0.5cm}%
\begin{subfigure}{\textwidth}
\caption{Layered model grid \label{fig:cs_schematic_b}}
\includegraphics{cs_schematic_b.pdf}
\end{subfigure}
<<include=FALSE>>=
v <- "Schematic cross-section representation of (\\textit{\\textbf{A}}) hydrogeologic units and (\\textit{\\textbf{B}}) the layered model grid. \\label{fig:cs_schematic}"
v <- c(paste("Diagrams showing", paste0(tolower(substr(v, 1, 1)), substr(v, 2, nchar(v)))), v)
@
\caption[{\Sexpr{v[1]}}]{{\Sexpr{v[2]}}}
\end{figure}
The bottom elevation of model layer 1 is calculated by subtracting the depth to the top of the aquitard (confining unit) (30 m [98 ft]) below land surface.
Cell values lying beneath the pre-Quaternary bedrock surface and top of Quaternary basalt are replaced with alluvium-bottom elevations.
<<>>=
r <- rs.data[["land.surface"]] - depth.to.aquitard.top
is.below <- rs.data[["alluvium.bottom"]] > r
r[is.below] <- rs.data[["alluvium.bottom"]][is.below]
min.thickness <- 1 # in meters
r[(rs.data[["land.surface"]] - r) < min.thickness] <- NA # enforce minimum layer thickness
r[rs.data[["ibound"]] == 0L] <- NA
r <- RmSmallCellChunks(r) # ensure horizontal connectivity among cells
names(r) <- "lay1.bot"
rs.model <- stack(r) # start new raster stack
@
\noindent Subtracting the aquitard (confining unit) thickness (5 m [16 ft]) from the bottom of model layer 1 gives the bottom elevation of model layer 2.
Cell values lying beneath the bedrock surface are replaced with bedrock elevations.
<<>>=
r <- rs.model[["lay1.bot"]] - aquitard.thickness
is.below <- rs.data[["bedrock"]] > r
r[is.below] <- rs.data[["bedrock"]][is.below]
r[(rs.model[["lay1.bot"]] - r) < min.thickness] <- NA # enforce minimum thickness
rs.model[["lay2.bot"]] <- RmSmallCellChunks(r)
@
\noindent The bottom elevation of model layer 3 represents the top of the bedrock (bedrock surface).
<<>>=
r <- rs.data[["bedrock"]]
r[is.na(rs.model[["lay2.bot"]])] <- NA
r[(rs.model[["lay2.bot"]] - r) < min.thickness] <- NA # enforce minimum thickness
rs.model[["lay3.bot"]] <- RmSmallCellChunks(r)
@
\newpage
\noindent Bottom elevations of model layer 1 are adjusted to the bedrock surface in cells where the layer 1 bottom elevation is above bedrock and the vertically adjacent layer 2 cell is classified as inactive.
<<>>=
r <- rs.model[["lay1.bot"]]
is.adjusted <- r > rs.data[["bedrock"]] & is.na(rs.model[["lay2.bot"]])
r[is.adjusted] <- rs.data[["bedrock"]][is.adjusted]
rs.model[["lay1.bot"]] <- RmSmallCellChunks(r)
@
\noindent The top elevation of model layer 1 is at land surface.
<<>>=
r <- rs.data[["land.surface"]]
r[is.na(rs.model[["lay1.bot"]])] <- NA
rs.model[["lay1.top"]] <- r
@
% =========================================================================
\subsection{Spatial Discretization}
<<echo=FALSE>>=
nactive <- c(sum(!is.na(rs.model[["lay1.bot"]][])),
sum(!is.na(rs.model[["lay2.bot"]][])),
sum(!is.na(rs.model[["lay3.bot"]][])))
active.lay1.area <- nactive[1] * (xres(rs.model) * yres(rs.model)) * m2.to.km2
study.area <- rgeos::gArea(alluvium.extent) * m2.to.km2
model.area <- rgeos::gArea(rgeos::gDifference(alluvium.extent, tributaries)) * m2.to.km2
percent.of.study.area <- round(model.area / study.area * 100)
dz1 <- as.numeric(na.omit(rs.model[["lay1.top"]][] - rs.model[["lay1.bot"]][]))
dz2 <- as.numeric(na.omit(rs.model[["lay1.bot"]][] - rs.model[["lay2.bot"]][]))
dz3 <- as.numeric(na.omit(rs.model[["lay2.bot"]][] - rs.model[["lay3.bot"]][]))
cell.area <- xres(rs.model) * yres(rs.model)
@
Removing outer rows and columns that are composed entirely of inactive model cells results in the active horizontal model grid.
A summary of the structured model grid attributes is shown in \hyperref[table_model_structure]{table~\ref{table_model_structure}}.
The model domain covers \Sexpr{round(active.lay1.area)} square kilometers (\Sexpr{round(active.lay1.area * km2.to.mi2)} square miles),
or \Sexpr{percent.of.study.area} percent of the WRV aquifer system area.
<<model_grid>>=
rs.model <- stack(crop(rs.model, extent(trim(rs.model[["lay1.top"]]))))
@
<<table_model_structure, echo=FALSE, results="asis">>=
att <- c("Number of rows", "Number of columns", "Number of layers",
"Number of active cells in model layer 1",
"Number of active cells in model layer 2",
"Number of active cells in model layer 3",
"Uniform spacing in the easting direction, in meters ($\\Delta x$)",
"Uniform spacing in the northing direction, in meters ($\\Delta y$)",
"Easting coordinate of model origin, in meters",
"Northing coordinate of model origin, in meters")
val <- c(nrow(rs.model), ncol(rs.model), 3, nactive,
res(rs.model), xmin(rs.model), ymax(rs.model))
d <- as.data.frame(list(att, val))
columns <- c("Attribute", "Value")
colnames(d) <- sprintf("\\textbf{\\shortstack{%s}}", columns)
cap1 <- "Summary description of the structured model grid attributes."
cap2 <- "Easting and northing coordinates are based on the Idaho Transverse Mercator projection."
tbl <- xtable::xtable(d, label="table_model_structure")
xtable::caption(tbl) <- c(sprintf("%s [%s]", cap1, paste(cap2, collapse=" ")), cap1)
xtable::digits(tbl)[3] <- 0
print(tbl, include.rownames=FALSE, caption.placement="top", booktabs=TRUE,
format.args=list(big.mark=","), sanitize.colnames.function=function(x){x},
sanitize.text.function=identity, size="\\small")
@
% =========================================================================
\subsection{Temporal Discretization}
Groundwater flow in the WRV aquifer is simulated for January 1995 through December 2010, a 16-year duration.
A 3-year `warm-up' period is included in the simulation to reduce uncertainties in model initialization.
Therefore, the first 3 years of the simulation (January 1995 through December 1997) should be considered less reliable than the remaining 13 years of simulation (January 1998 through December 2010).
The interval of discretization for time is the `time step'.
Time steps are grouped into `stress periods', where time-dependent input data can be changed every stress period \citep[p.~8]{Harbaugh2000}.
Individual stress periods in a simulation can either be steady-state or transient.
The first stress period in the WRV groundwater-flow model is specified as steady state and all subsequent stress periods as transient;
that is, the initial or starting conditions for the first transient stress period are the simulated values at the end of the steady-state simulation.
The simulated steady-state head distribution represents the assumed conditions at the beginning of the 1995 calendar year.
Steady-state flow was simulated using average recharge and discharge estimates from April 2004 through March 2005,
because hydrologic conditions during this period generally were similar to the period preceding the beginning of 1995.
All subsequent stress periods are transient and simulate groundwater flow conditions during 1995 through 2010.
The transient simulation period is subdivided into 192 stress periods of 1 month each.
The length of each stress period is dependent on the number of days in the corresponding month and date of year.
\newpage
<<>>=
ss.interval <- as.Date(c("2004-04-01", "2005-04-01"), tz = "MST") # steady state
tr.interval <- as.Date(c("1995-01-01", "2011-01-01"), tz = "MST") # transient
ss.stress.periods <- seq(ss.interval[1], ss.interval[2], "1 month")
tr.stress.periods <- seq(tr.interval[1], tr.interval[2], "1 month")
@
\noindent Stress period identifiers are specified using a concatenation of year and month.
<<>>=
ss.yr.mo <- format(head(ss.stress.periods, -1), "%Y%m") # steady state
tr.yr.mo <- format(head(tr.stress.periods, -1), "%Y%m") # transient
@
Each stress period was uniformly subdivided into four time steps.
A preliminary sensitivity analysis to changes in the number of time steps indicated that more than four time steps per stress period did not yield significant simulation differences or mass balance errors;
therefore, four time steps was used.
<<>>=
ntime.steps <- 4L
@
% =========================================================================
\section{Groundwater Flow Equation}
A groundwater flow equation is used to describe the flow of water through the WRV aquifer system.
The equation describes transient three-dimensional groundwater flow through a heterogeneous transversely isotropic geologic formation \citep[p.~2-1]{Harbaugh2005}.
It is a parabolic partial differential equation defined in Cartesian coordinates as:
\begin{equation} \label{eq:gw_flow}
\left[ \frac{\partial}{\partial x} \left( K b \, \frac{\partial h}{\partial x} \right) +
\frac{\partial}{\partial y} \left( K b \, \frac{\partial h}{\partial y} \right) +
\frac{\partial}{\partial z} \left( \frac{K b}{a} \, \frac{\partial h}{\partial z} \right)
\right] \Delta x \, \Delta y + Q = S \, \frac{\partial h}{\partial t} \, \Delta x \, \Delta y
\end{equation}
where
\begin{description}
\item[x \text{, } y] are easting and northing coordinate directions in meters, respectively;
\item[z] is the direction of elevation, in meters;
\item[t] is the time dimension, in days;
\item[K] is the horizontal hydraulic conductivity, in meters per day;
\item[a] is the vertical anisotropy defined as the ratio of horizontal to vertical hydraulic conductivity, a dimensionless quantity;
\item[h] is the hydraulic head (head), in meters;
\item[\Delta x \text{, } \Delta y] are the grid width in the $x$ and $y$ directions, respectively, in meters;
\item[Q] is a volumetric flow rate representing sources and (or) sinks of water, where negative values are flow out of the aquifer system, and positive values are flow into the system, in cubic meters per day;
\item[S] is the storage coefficient of the porous material, a dimensionless quantity; and
\item[b] is the saturated thickness in the $z$ direction, in meters.
\end{description}
The WRV groundwater-flow model may be formulated to solve three different versions of equation~(\ref{eq:gw_flow}).
These model formulations, arranged in order of increasing solution difficulty, simulate the following:
\begin{enumerate}
\item Steady-state flow conditions by setting the right-hand-side of equation~(\ref{eq:gw_flow}) equal to zero.
\item Transient flow conditions with saturated thickness ($b$ in equation~\ref{eq:gw_flow}) held constant over time at the model cell thickness.
\item Transient flow conditions with saturated thickness dependent on head.
\end{enumerate}
Model results analyzed in this vignette simulate transient flow conditions and implement the specified-thickness approximation; that is, model formulation 2.
Note, however, that both model formulation 1 and 2 are called during the model-calibration process (appendix A, fig. A4).
Model formulation 3 was not calibrated because of its very long run times, on the order of hours, and possible numerical instability.
% =========================================================================
\subsection{Specified-Thickness Approximation}
The specified-thickness approximation assumes that the saturated thickness is independent from head changes in the aquifer system.
In reality, the saturated thickness in the unconfined aquifer changes as the water table fluctuates in response to groundwater pumping and climatic conditions.
The specified-thickness approximation is implemented in the WRV groundwater-flow model by assuming all model cells are fully saturated.
During the simulation period (1995--2010), the water table primarily resides in the unconfined alluvium deposits of model layer 1---the exception being
a small area in the near vicinity of the southeastern model boundary where the water table resides in either layers 2 or 3.
Because the top of model layer 1 is specified at land surface,
the assumed saturated thickness is imprecisely represented in areas where the depth to groundwater can be large.
Areas of large simulated water depths (greater than 10 m [32 ft]) occur in some of the tributary canyons (as a result of increased topographic gradients),
downgradient from the city of Bellevue to about Baseline Road (\hyperref[fig:map_basalt_extent]{figure~\ref{fig:map_basalt_extent}}), and
in the near vicinity of the southeastern model boundary where steep water-table gradients form just prior to entering the larger Eastern Snake River Plain aquifer.
\citet{Sheets2015} note that errors in the assumed saturated thickness can directly affect calibrated estimates of hydraulic conductivity and storage properties.
They also indicate, that in practice, errors associated with the specified-thickness approximation are relatively small in comparison to the uncertainties in hydraulic property estimates.
The primary objective for the model is to simulate groundwater flow in the WRV aquifer system;
thus allowing for improved predictions of aquifer responses to changes in aquifer stresses (such as pumping or natural climatic variability).
Transmissivity, the horizontal hydraulic conductivity multiplied by the saturated thickness ($K b$ in equation~\ref{eq:gw_flow}),
is of great importance in these predictions because it is a measure of how much water can be transmitted horizontally, such as to a pumping well.
During model calibration horizontal hydraulic conductivity values were estimated by minimizing the difference between measured and simulated values;
any inaccuracies in the assumed saturated thickness are compensated for in these calibrated estimates.
Therefore, transmissivities, rather than horizontal hydraulic conductivities, are more accurately represented in the calibrated model.
% =========================================================================
\subsection{Hydraulic Properties}
Hydraulic properties (such as horizontal hydraulic conductivity) are specified for all cells using the MODFLOW Layer-Property Flow Package \citep{Harbaugh2000, Harbaugh2005}.
Prior to model calibration, the distribution of hydraulic properties is based on hydrogeologic zones, groups of model cells with uniform hydraulic properties that compose part or all of a hydrogeologic unit.
The model consists of four hydrogeologic zones described as follows:
\begin{enumerate}[label=Zone \arabic*, labelindent=5mm, leftmargin=*]
\item consists of the alluvium unit in the unconfined aquifer and is located in all three model layers;
\item comprises the basalt and clay units and is located in model layers 2 and 3;
\item consists of the clay confining unit and is located in model layer 2; and
\item consists of the alluvium unit in the confined aquifer and is located in model layer 3.
\end{enumerate}
\newpage
The delineation of hydrogeologic zones in model layers 1, 2, and 3 are shown in
\hyperref[fig:map_zones_a]{figures~\ref{fig:map_zones_a}}, \ref{fig:map_zones_b}, and \ref{fig:map_zones_c}, respectively.
And the hydrogeologic zones along a vertical cross-section are shown in \hyperref[fig:cs_zones]{figure~\ref{fig:cs_zones}}.
<<>>=
r <- raster(rs.model) # zones in model layer 1
r[!is.na(rs.model[["lay1.bot"]])] <- 1L
r <- ratify(r)
levels(r) <- dplyr::left_join(levels(r)[[1]], zone.properties, by = "ID")
rs.model[["lay1.zones"]] <- r
r <- raster(rs.model) # zones in model layer 2
r[!is.na(rs.model[["lay2.bot"]])] <- 1L
r[!is.na(r) & !is.na(crop(rs.data[["clay.extent"]], extent(r)))] <- 3L
r[rs.model[["lay2.bot"]] < crop(rs.data[["alluvium.bottom"]], extent(r))] <- 2L
r <- ratify(r)
levels(r) <- dplyr::left_join(levels(r)[[1]], zone.properties, by = "ID")
rs.model[["lay2.zones"]] <- r
r <- raster(rs.model) # zones in model layer 3
r[!is.na(rs.model[["lay3.bot"]])] <- 1L
r[!is.na(r) & rs.model[["lay2.zones"]] == 3L] <- 4L
r[rs.model[["lay3.bot"]] < crop(rs.data[["alluvium.bottom"]], extent(r))] <- 2L
r <- ratify(r)
levels(r) <- dplyr::left_join(levels(r)[[1]], zone.properties, by = "ID")
rs.model[["lay3.zones"]] <- r
@
<<echo=FALSE>>=
transect <- SpatialLines(list(Lines(list(Line(transect.coords)), ID="Transect")),
proj4string=CRS("+init=epsg:4326"))
transect <- spTransform(transect, crs(hill.shading))
verticies <- as(transect, "SpatialPoints")
transect.ends <- verticies[c(1, length(verticies)), ]
@
<<echo=FALSE>>=
FUN <- function(i) {
r <- rs.model[[i]]
cols <- c("#7FC97F", "#BEAED4", "#FDC086", "#ffff99")[levels(r)[[1]]$ID]
PlotMap(r, xlim=usr.map[1:2], ylim=usr.map[3:4], bg.image=hill.shading, bg.image.alpha=0.6,
dms.tick=TRUE, col=cols, rivers=list(x=streams.rivers), lakes=list(x=lakes),
draw.key=FALSE, credit=credit, scale.loc="bottomleft")
plot(alluvium.extent, border="#FFFFFF7F", add=TRUE)
lines(transect, col="#1F1F1F")
text(transect.ends, labels=c("A", "A'"), col="#1F1F1F", cex=0.7, pos=c(3, 4), offset=0.1, font=4)
plot(cities, pch=15, cex=0.8, col="#333333", add=TRUE)
text(cities, labels=cities@data$FEATURE_NA, col="#333333", cex=0.5, pos=1, offset=0.4)
lab <- as.character(levels(r)[[1]]$name)
legend("topright", lab, fill=cols, ncol=1, border=NA, inset=0.02, cex=0.7,
box.lty=1, box.lwd=0.5, xpd=NA, bg="#FFFFFFCD")
}
@
\begin{figure}
\begin{subfigure}{\textwidth}
\caption{Model layer 1 \label{fig:map_zones_a}}
<<map_zones_a, echo=FALSE, results="asis", fig.width=fin.map.0[1], fig.height=fin.map.0[2]>>=
FUN("lay1.zones")
@
\end{subfigure}
<<include=FALSE>>=
v <- "Spatial distribution of the hydrogeologic zones in (\\textit{\\textbf{A}}) model layer 1, (\\textit{\\textbf{B}}) model layer 2, and (\\textit{\\textbf{C}}) model layer 3. \\label{fig:map_zones}"
v <- c(paste("Maps showing", paste0(tolower(substr(v, 1, 1)), substr(v, 2, nchar(v)))), v)
@
\caption[{\Sexpr{v[1]}}]{{\Sexpr{v[2]}}}
\end{figure}
\captionsetup[figure]{list=no}
\begin{figure}
\ContinuedFloat
\begin{subfigure}{\textwidth}
\caption{Model layer 2 \label{fig:map_zones_b}}
<<map_zones_b, echo=FALSE, results="asis", fig.width=fin.map.0[1], fig.height=fin.map.0[2]>>=
FUN("lay2.zones")
@
\end{subfigure}
\caption{---Continued}
\end{figure}
\begin{figure}
\ContinuedFloat
\begin{subfigure}{\textwidth}
\caption{Model layer 3 \label{fig:map_zones_c}}
<<map_zones_c, echo=FALSE, results="asis", fig.width=fin.map.0[1], fig.height=fin.map.0[2]>>=
FUN("lay3.zones")
@
\end{subfigure}
\caption{---Continued}
\end{figure}
\captionsetup[figure]{list=yes}
<<cs_zones, echo=FALSE, fig.width=fin.cs.0[1], fig.height=fin.cs.0[2], fig.cap="{Vertical cross-section of hydrogeologic zones along transect line A--A' shown in \\hyperref[fig:map_zones]{figure~\\ref{fig:map_zones}}.}">>=
geo.lays <- c("lay1.top", paste0("lay", 1:3, ".bot"))
val.lays <- paste0("lay", 1:3, ".zones")
cols <- c("#7FC97F", "#BEAED4", "#FDC086", "#ffff99")
PlotCrossSection(transect, rs.model, geo.lays, val.lays, asp=80, col=cols,
ylab="Elevation, in meters above the North American Vertical Datum of 1988",
unit="METERS", features=cities[, "FEATURE_NA"], max.feature.dist=4000,
is.categorical=TRUE, draw.key=FALSE)
legend("topright", paste("Zone", 1:4), fill=cols, ncol=1, border=NA,
inset=c(0.02, 0), cex=0.7, box.lty=1, box.lwd=0.5, xpd=NA, bg="#FFFFFFCD")
@
Hydraulic properties assigned to each hydrogeologic zone (zone) are given in \hyperref[table_zones]{table~\ref{table_zones}}.
These values were allowed to vary during the model-calibration process---with the exception of specific storage and specific yield which were not included in the calibrated model (that is, model formulation~2).
The horizontal hydraulic conductivity values ($K$ in equation~\ref{eq:gw_flow}) in zones~1 and 4 were specified as the unconfined and confined aquifer values, respectively, from \citet[p.~23, table~2]{Bartolino2012}.
For zone~2 the horizontal hydraulic conductivity was estimated from a specific capacity test in a single well completed in basalt \citep[p.~26]{Bartolino2012},
and for zone~3 the low hydraulic conductivity value for clay in \citet[p.~346]{Spitz1996} was specified in the model.
Values of vertical anisotropy ($a$ in equation~\ref{eq:gw_flow}) can be 100 or more in the presence of clay layers (\citealp[p.~81]{Todd1959}; \citealp[p.~34]{Freeze1979});
that is, the vertical hydraulic conductivity can be more than 100 times smaller than the horizontal hydraulic conductivity.
A midrange value of 50 was specified for all zones (\hyperref[table_zones]{table~\ref{table_zones}}).
Specific storage was specified as the mean of reported ranges for similar material types in \citet[p.~353]{Spitz1996}.
For zones~1 and 4 the mean specific storage for gravel was used, for zone~2 the mean value for consolidated rock was used, and for zone~3 the mean value for clay was used (\hyperref[table_zones]{table~\ref{table_zones}}).
In the same manner values for specific yield were taken from \citet[p.~345]{Spitz1996}.
For zones~1 and 4 the mean specific yield for fine gravel was used, for zone~2 the mean value for limestone was used, and for zone~3 the mean value for clay was used (\hyperref[table_zones]{table~\ref{table_zones}}).
Because all model layers were simulated using saturated conditions (an assumed condition for model formulation~2),
the storage coefficient ($S$ in equation~\ref{eq:gw_flow}) in the partially-saturated (water-table) conditions of model layer~1 (or zone~1) is virtually equal to the specific yield.
The storage coefficient of zone~1 in model layer 1 was specified at 0.1, that is, the low end of the specific yield range for all zones (\hyperref[table_zones]{table~\ref{table_zones}}).
In the primarily saturated conditions of model layers 2 and 3 (zones~2--4) the storage coefficient is defined as the product of specific storage and saturated thickness.
Because the saturated thickness varies throughout the aquifer, a unit thickness is assumed in the calculation of storage coefficient.
<<table_zones, echo=FALSE, results="asis">>=
d <- zone.properties[, c("name", "hk", "vani", "ss", "sy", "sc")]
d$hk <- ToScientific(d$hk, digits=1)
d$ss <- ToScientific(d$ss, digits=1)
d$sc <- ToScientific(d$sc, digits=1)
columns <- c("Name",
"Horizontal hydraulic \\\\ conductivity \\\\ $K$ \\\\ (m/d)",
"Vertical \\\\ anisotropy \\\\ $a$ \\\\ (1)",
"Specific \\\\ storage \\\\ $S_{s}$ \\\\ (1/m)",
"Specific \\\\ yield \\\\ $S_{y}$ \\\\ (1)",
"Storage \\\\ coefficient \\\\ $S$ \\\\ (1)")
colnames(d) <- sprintf("\\textbf{\\shortstack{%s}}", columns)
cap1 <- "Hydraulic properties specified for each hydrogeologic zone in the model. Values were allowed to vary during the model-calibration process--with the exception of specific storage and specific yield which were not specified in the calibrated model."
cap2 <- c("\\textbf{Horizontal hydraulic conductivity}: is the ease with which water can move through pore spaces or fractures in the direction of the horizontal plane.",
"\\textbf{Vertical anisotropy}: is the ratio of horizontal to vertical hydraulic conductivity.",
"\\textbf{Specific storage}: is the amount of water that a portion of an aquifer releases from storage, per unit mass or volume of aquifer, per unit change in hydraulic head, while remaining fully saturated \\citep{Freeze1979}.",
"\\textbf{Specific yield}: is the volumetric fraction of the bulk aquifer volume that a given aquifer will yield when all the water is allowed to drain out of it under the forces of gravity.",
"\\textbf{Storage coefficient}: is the vertically integrated specific storage value for saturated conditions; and for partially-saturated conditions it is virtually equal to specific yield.",
"\\textbf{Abbreviations}: m/d, meters per day; 1/m, inverse meters")
tbl <- xtable::xtable(d, label="table_zones")
xtable::caption(tbl) <- c(sprintf("%s [%s]", cap1, paste(cap2, collapse=" ")), cap1)
xtable::digits(tbl)[3:7] <- c(1, 0, 1, 1, 1)
xtable::align(tbl) <- "lclclcl"
print(tbl, include.rownames=FALSE, caption.placement="top", booktabs=TRUE,
format.args=list(big.mark=","), sanitize.colnames.function=function(x){x},
sanitize.text.function=identity, size="\\small")
@
\newpage
% =========================================================================
\subsection{Hydrologic Boundaries}
% =========================================================================
\subsubsection{Tributary basin underflow}
Tributary basin underflow (underflow) is defined as groundwater flow into the model domain that originates as precipitation in the tributary basins.
Underflow ($Q$ in equation~\ref{eq:gw_flow}) enters the active model grid through specified-flow boundaries located in the major tributary canyons and the upper part of the WRV,
Underflow is simulated using the MODFLOW Well Package \citep{Harbaugh2000}.
\hyperref[fig:map_tribs]{Figure~\ref{fig:map_tribs}} shows the location of these boundaries in the model.
The average volumetric flow rate for each boundary is shown in \hyperref[table_tribs]{table~\ref{table_tribs}}.
A scaling index is used to represent the temporal variation in volumetric flow rates (\hyperref[fig:graph_tribs]{fig.~\ref{fig:graph_tribs}}).
The method used to estimate flows from the tributaries is discussed in detail in appendix E.
<<>>=
d <- gage.disch[, c("Date", "13139510")]
reduction <- 2 # amplitude reduction, a dimensionless quantity
d.in.mv.ave <- 273.932 # days in moving average (9 months)
mult <- GetSeasonalMult(d, reduction, d.in.mv.ave, tr.stress.periods)
mult <- data.frame(head(tr.stress.periods, -1), rep(mult$multiplier, each = 3))
names(mult) <- c("Date", "multiplier")
FUN <- function(i) mult$multiplier * i
flow <- t(vapply(tributaries$Flow, FUN, rep(0, nrow(mult))))
colnames(flow) <- format(mult$Date, format = "%Y%m")
rownames(flow) <- tributaries$Name
@
<<include=FALSE>>=
v <- "Tributary basin underflow in the Wood River Valley aquifer system, south-central Idaho."
v <- c(paste("Graph showing", paste0(tolower(substr(v, 1, 1)), substr(v, 2, nchar(v)))), v)
@
<<graph_tribs, echo=FALSE, fig.width=fin.graph[1], fig.height=fin.graph[2], fig.scap=sprintf("{%s}", v[1]), fig.cap=sprintf("{%s}", v[2])>>=
d <- data.frame(mult$Date, t(flow))
d <- d[, c(1, sort(apply(d[, -1], 2, mean), decreasing=TRUE, index.return=TRUE)$ix + 1L)]
ndays <- GetDaysInMonth(tail(rownames(d), 1))
d <- rbind(d, d[nrow(d), , drop=FALSE])
d[nrow(d), 1] <- d[nrow(d), 1] + ndays
ylab <- paste("Tributary basin underflow, in", c("cubic meters per day", "acre-feet per year"))
cols <- rainbow(ncol(d), start=0.0, end=0.8)
PlotGraph(d, ylab=ylab, conversion.factor=m3.per.d.to.af.per.yr, col=cols,
center.date.labels=TRUE, scientific=FALSE, seq.date.by="year")
leg <- format(match(colnames(d)[-1], make.names(tributaries@data$Name)))
legend("topright", leg, lwd=1, col=cols, ncol=2,
pt.cex=1, inset=0.02, cex=0.7, box.lty=1, box.lwd=0.5,
bg="#FFFFFFCD", title=expression(bold("Tributary")))
@
\noindent Steady-state volumetric flow rates are calculated for each boundary by averaging flows over time.
<<>>=
flow <- cbind(flow, ss = apply(flow[, ss.yr.mo], 1, mean))
@
\noindent The volumetric flow rate for each boundary is uniformly distributed among its tributary cells.
<<>>=
r <- rasterize(trib.lines, rs.model)
r[crop(rs.data[["ibound"]], extent(r)) != 2] <- NA
d <- levels(r)[[1]]
d$count <- freq(r)[seq_len(nrow(d)), "count"]
id <- match(row.names(flow), d$Name)
d <- dplyr::left_join(d, data.frame(flow, ID = id, check.names = FALSE), by = "ID")
d[, colnames(flow)] <- d[, colnames(flow)] / d$count
levels(r) <- d
rs.model[["tributaries"]] <- r
@
<<table_tribs, echo=FALSE, results="asis">>=
x <- with(d, data.frame(Name, ID, Flow, Flow * m3.per.d.to.af.per.yr))
columns <- c("Name",
"Tributary \\\\ No.",
"Flow rate \\\\ $Q$ \\\\ (m\\textsuperscript{3}/d)",
"Flow rate \\\\ (acre-ft/yr)")
colnames(x) <- sprintf("\\textbf{\\shortstack{%s}}", columns)
cap1 <- "Estimated long-term mean tributary basin underflow in the Wood River Valley aquifer system, south-central Idaho."
cap2 <- c("\\textbf{Tributary No.}: is an identifier used to locate the tributary boundaries on the map in \\hyperref[fig:map_tribs]{figure~\\ref{fig:map_tribs}}.",
"\\textbf{Flow rate}: is the estimated long-term mean tributary basin underflow during the 1995 through 2010 time period.",
"Values are preliminary and were adjusted during the model-calibration process.",
"\\textbf{Abbreviations}: m\\textsuperscript{3}/d, cubic meters per day; acre-ft/yr, acre-feet per year")
tbl <- xtable::xtable(x, label="table_tribs")
xtable::caption(tbl) <- c(sprintf("%s [%s]", cap1, paste(cap2, collapse=" ")), cap1)
xtable::digits(tbl)[3:5] <- 0
print(tbl, include.rownames=FALSE, align="rlrrr", caption.placement="top", booktabs=TRUE,
format.args=list(big.mark=","), sanitize.colnames.function=function(x){x},
size="\\small")
@
\newpage
\noindent The tributary boundary conditions are placed in a single data table.
<<>>=
cells <- which(!is.na(r[]))
rc <- rowColFromCell(r, cells)
trib <- data.frame(cell = cells, lay = 1L, rc, deratify(r)[cells], check.names = FALSE)
trib$Name <- as.factor(d$Name[trib$Name])
@
\newpage
% =========================================================================
\subsubsection{Groundwater flow at outlet boundaries}
Groundwater leaving the aquifer system beneath Silver Creek and Stanton Crossing outlet boundaries ($Q$ in equation~\ref{eq:gw_flow}; \hyperref[fig:map_drains]{fig.~\ref{fig:map_drains}})
is simulated using the MODFLOW Drain Package \citep{Harbaugh2000}, a head-dependent flux boundary condition.
If the head in a model cell that is an outlet-boundary cell falls below a certain threshold, the flux drops to zero;
therefore, these model cells will only allow groundwater to leave the aquifer system.
The boundary condition is mathematically expressed as:
\begin{equation} \label{eq:outlet_drains}
Q = \left\{\begin{array}{l l}
0 & \quad \text{if $h < d$,}\\
C_{d} \left( d - h \right) & \quad \text{if $h \geq d$;}
\end{array} \right.
\end{equation}
where
\begin{description}
\item[Q] is groundwater recharge, where negative values are flow out of the aquifer system, and positive values are flow into the system, in cubic meters per day;
\item[h] is the head in the outlet-boundary cell, in meters above the NAVD 88;
\item[d] is the elevation threshold, in meters above the NAVD 88; and
\item[C_{d}] is the drain conductance, in square meters per day.
\end{description}
The location of drain cells in model layer 1 are shown in \hyperref[fig:map_drains]{figure~\ref{fig:map_drains}}.
The Silver Creek drain cells also reside in model layers 2 and 3; mirroring the configuration of drain cells in layer 1.
Drain cells were identified using hand-drawn horizontal polygons with a single polygon allocated to each outlet boundary.
The resulting polylines from the intersection of these polygons with the aquifer boundary, were then used to identify the drain cells in each outlet boundary.
The drain conductance and elevation threshold at Silver Creek and Stanton Crossing outlet boundaries are shown in \hyperref[table_drains]{table~\ref{table_drains}}.
<<>>=
l <- rgeos::gIntersection(drains, as(alluvium.extent, "SpatialLinesDataFrame"), TRUE)
drain.lines <- SpatialLinesDataFrame(l, data = drains@data, match.ID = FALSE)
r <- rasterize(drain.lines, rs.model)
r[!is.na(r) & is.na(rs.model[["lay1.bot"]])] <- NA
r <- ratify(r)
levels(r) <- cbind(levels(r)[[1]], drains@data)
rs.model[["drains"]] <- r
@
<<table_drains, echo=FALSE, results="asis">>=
d <- drains@data
columns <- c("Name",
"Drain \\\\ conductance \\\\ $C_{d}$ \\\\ (m\\textsuperscript{2}/d)",
"Elevation \\\\ threshold \\\\ $d$ \\\\ (m above NAVD 88)")
colnames(d) <- sprintf("\\textbf{\\shortstack{%s}}", columns)
cap1 <- "Drain conductance and elevation threshold for subsurface outlet boundaries."
cap2 <- c("\\textbf{Drain conductance}: is the hydraulic conductance of the interface between the aquifer and the drain.",
"Conductance values are preliminary and were adjusted during the model-calibration process.",
"\\textbf{Elevation threshold}: is the elevation of the drain.",
"\\textbf{Abbreviations}: m\\textsuperscript{2}/d, square meters per day; m, meters; NAVD 88, North American Vertical Datum of 1988")
tbl <- xtable::xtable(d, label="table_drains")
xtable::caption(tbl) <- c(sprintf("%s [%s]", cap1, paste(cap2, collapse=" ")), cap1)
xtable::digits(tbl)[3:4] <- c(0, 0)
print(tbl, include.rownames=FALSE, caption.placement="top", booktabs=TRUE,
format.args=list(big.mark=","), sanitize.colnames.function=function(x){x},
size="\\small")
@
<<include=FALSE>>=
v <- "Location of drain cells composing the subsurface outlet boundaries in model layer 1."
v <- c(paste("Map showing", paste0(tolower(substr(v, 1, 1)), substr(v, 2, nchar(v)))), v)
@
<<map_drains, echo=FALSE, fig.width=fin.map.s.0[1], fig.height=fin.map.s.0[2], fig.scap=sprintf("{%s}", v[1]), fig.cap=sprintf("{%s}", v[2])>>=
cols <- c("#F02311", "#FBB829")
PlotMap(r, xlim=usr.map.s[1:2], ylim=usr.map.s[3:4], bg.image=hill.shading, bg.image.alpha=0.6,
dms.tick=TRUE, col=cols, rivers=list(x=streams.rivers), lakes=list(x=lakes), draw.key=FALSE,
draw.raster=FALSE, credit=credit, scale.loc="bottomleft")
plot(alluvium.extent, border="#FFFFFF7F", add=TRUE)
plot(r, col=cols, legend=FALSE, add=TRUE)