Spatial analysis of dissolved oxygen levels using Ordinary Kriging methods near the confluence of Bozeman Creek and the East Gallatin River in Bozeman, Montana
7 Tipps damit Dich Dein Gegenüber nicht beisst -Bedienungsanleitung in Wertsc...
Similaire à Spatial analysis of dissolved oxygen levels using Ordinary Kriging methods near the confluence of Bozeman Creek and the East Gallatin River in Bozeman, Montana
Similaire à Spatial analysis of dissolved oxygen levels using Ordinary Kriging methods near the confluence of Bozeman Creek and the East Gallatin River in Bozeman, Montana (20)
Spatial analysis of dissolved oxygen levels using Ordinary Kriging methods near the confluence of Bozeman Creek and the East Gallatin River in Bozeman, Montana
1. SPATIAL ANALYSIS OF DISSOLVED OXYGEN LEVELS USING ORDINARY
KRIGING METHODS NEAR THE CONFLUENCE OF BOZEMAN CREEK AND THE EAST
GALLATIN RIVER IN BOZEMAN, MT.
by
Jacqueline Lorene Frank
A professional paper submitted in partial fulfillment
of the requirements for the degree
of
Master of Science
in
Environmental Engineering
MONTANA STATE UNIVERSITY
Bozeman, Montana
April, 2015
3. iii
TABLE OF CONTENTS
ABSTRACT......................................................................................................................VI
INTRODUCTION .............................................................................................................. 1
PROJECT BACKGROUND .............................................................................................. 2
DISSOLVED OXYGEN .................................................................................................... 4
DATA COLLECTION METHODS................................................................................... 5
KRIGING METHODS ....................................................................................................... 8
RESULTS ......................................................................................................................... 11
CONCLUSIONS AND RECOMMENDATIONS ........................................................... 21
REFERENCES CITED..................................................................................................... 24
APPENDICES .................................................................................................................. 28
APPENDIX A: SCHEDULE OF WELL OWNERSHIP ................................................. 29
APPENDIX B: ORIGINAL MATLAB CODE FROM DR. KATHRYN PLYMESSER 31
APPENDIX C: MATLAB CODE .................................................................................... 35
APPENDIX D: EXCEL MATLAB DATA...................................................................... 46
4. iv
LIST OF TABLES
Table Page
1. A table showing measured Dissolved Oxygen data for the three dates analyzed... 6
2. A subset of predicted DO concentrations and the associated variance, calculated
using data measured on 8.27.2014……………………………................………14
5. v
LIST OF FIGURES
Figure Page
1. A map of the site showing 10 of the 12 water sampling wells. .............................. 7
2. A plot of the semivariogram for DO data collected on 08.27.2014...................... 12
3. A plot of the semivariogram for DO data collected on 09.02.2014...................... 13
4. A plot of the semivariogram for DO data collected on 09.11.2014...................... 13
5. A 3-D concentration map showing predicted DO concentrations over the site area
calculated using data measured on 08.27.2014…………………………………..16
6. A 3-D concentration map showing predicted DO concentrations over the site area
calculated using data measured on 09.02.2014…………………………………..17
7. A 3-D concentration map showing predicted DO concentrations over the site area
calculated using data measured on 09.11.2014…………………………………..18
8. A map showing the plan view of the site with predicted, scaled DO concentrations
calculated using data measured on 08.27.2014…………………………………..19
9. A map showing the plan view of the site with predicted, scaled DO concentrations
calculated using data measured on 09.02..2014……………………………….....20
10. A map showing the plan view of the site with predicted, scaled DO concentrations
calculated using data measured on 09.11.2014…………………………………..21
6. vi
ABSTRACT
Spatial prediction methods, including ordinary kriging methods, are used to estimate the
value of a parameter at a location where it is not measured, based on data collected at nearby
locations. For this project dissolved oxygen data are analyzed from 3 different dates, collected at
12 well locations near the confluence of Bozeman Creek and the East Gallatin River in
Bozeman, MT with the goal of gaining a broader understanding of the wetland environment in
that area. Ordinary kriging methods are used to interpolate intermediate dissolved oxygen
concentrations, as well as the variance (error) of the predictions on a fine scale over the site for
each date on which data were collected. The process uses semivariograms to establish the
relationship between distance and spatial weight, but in this case semivariograms presented no
trend. The lack of trend indicates that either there is not enough measured data to accurately
predict unknown concentrations, or that there is indeed no spatial relationship. However, the
measured data gives evidence that the site exhibits characteristics typically described of wetlands
and has the potential to remove nitrogen and organic pollutants from the water, thereby
improving water quality.
7. 1
INTRODUCTION
The confluence of Bozeman Creek and the East Gallatin River in Bozeman Montana
shows signs of a history as a typically classified wetland area. Over time, the land in this area has
been cultivated and filled in by various land owners, and business ventures (Deford, 2014). The
City of Bozeman and the Trust for Public Lands have partnered together to create a public park
at this site, while at the same time aiming to reconstruct and restore the wetland function of the
area, and improve water quality in both the East Gallatin River and Bozeman Creek (Deford,
2014).
Montana State University was brought on as a partner to this project to help understand,
and further study the hydraulics, hydrology, and effects of the project on water quality (Deford,
Stein, Cahoon, Hartshorn, & Ewing, 2014). Project leader Lilly Deford describes the project as
looking specifically at “how, or even if, the restoration efforts will affect surface water quality in
the East Gallatin River” (Deford, 2014). Deford’s project focuses on nitrogen and phosphorous
as water chemistry parameters, but includes other water chemistry parameters including pH and
dissolved oxygen. This paper analyzes a small subset of dissolved oxygen data, providing
additional insight to the overall project. Dissolved oxygen concentrations from three separate
dates over a 15 day period were observed at 12 well locations. The concentrations were
analyzed using ordinary kriging methods with the goal of predicting an interpolated dissolved
oxygen concentration map of the wetland site. Creating and analyzing a predicted dissolved
oxygen surface map is beneficial because dissolved oxygen concentrations can indicate the type
8. 2
of nutrient processes that are expected in the area, specifically denitrification, as well as help
determine if the site is behaving overall as a typical wetland after initial construction efforts.
Ordinary kriging was used as a method of interpolation of unknown points because it has
the advantage of also giving error estimates, or variances, in addition to the predicted values
(Bohling, 2005). Ordinary kriging methods have also been proven to effectively predict
dissolved oxygen concentrations in other settings (Murphy, Curriero, & Ball, 2010).
Semivariograms were first developed, and used to predict dissolved oxygen concentrations and
associated variance values. The predicted concentrations were then used as the basis of
dissolved oxygen surface maps for each date over the area being analyzed.
PROJECT BACKGROUND
The area surrounding the confluence of Bozeman Creek and the East Gallatin
River was historically a wetland setting, but has been significantly altered by different
landowners, mostly as a result of agricultural practices; water has been routed through the area
without interacting with the land long enough to create saturated conditions (Deford, 2014). The
city of Bozeman and the Trust for Public Land are working to create a city park near the
confluence, while restoring the wetland environment at the same time, a project titled The Story
Mill Ecological Restoration Project (City of Bozeman; Trust for Public Land, 2014). “The
restoration will close off the drainage ditches in an attempt to back up the groundwater and
create a more saturated, reducing, wetland like landscape. They will also be removing fill from
some of the floodplain. This is in the hopes of increasing surface water interaction with the
wetland during high flow events, when there will be significant amounts of urban and
9. 3
agricultural runoff” (Deford, Project Goals, 2014). In addition to restoring the historic wetland,
the project will increase public green space and offer “opportunities to connect with nature, our
neighbors, and community”, while also providing educational opportunities for all ages to learn
about this history and science of the site (City of Bozeman; Trust for Public Land, 2014).
Montana State University is assisting with technical and scientific expertise, tasked with
monitoring conditions at the site and helping understand the effects of the restoration project on
surface water quality (Deford, Progress Report, 2014). The multiple objectives of the MSU
component of the study are to:
1. Develop metrics for defining success of wetland restoration efforts,
2. Monitor short- and long-term wetland function,
3. Document progress toward achieving the project restoration objectives,
4. Contribute to public awareness of the importance of wetlands,
5. And help better understand how wetlands influence surface water quality and quantity
(Deford, Progress Report, 2014).
Deford is looking at “how, or even if, the restoration efforts will affect surface water
quality in the East Gallatin River… [and is] tracking surface and groundwater levels and
chemical properties, focusing on the nutrients Nitrogen and Phosphorous” (Deford, Project
Goals, 2014). Due to expected increased interaction of surface water with the wetland, “it is
anticipated that the restoration efforts will improve the watershed’s ability to treat nitrogen and
phosphorous” and therefore decrease nutrient levels in East Gallatin River (Deford, Progress
Report, 2014). Deford developed testing methods including a wetland monitoring matrix
tracking water levels, total nitrogen, total phosphorus, nitrate, nitrite, phosphate, sulfate,
chloride, pH, electrical conductivity and dissolved oxygen (Deford, Progress Report, 2014).
10. 4
Deford installed monitoring equipment and is continuing to collect data, aiming to better
understand and quantify wetland function and nutrient cycling (Deford, Progress Report, 2014).
This paper focuses on analyzing a subset of dissolved oxygen (DO) data collected at the
site, and provides additional insight to the overall project with the goal of gaining a broader
understanding of the wetland function. Dissolved oxygen is a parameter of interest because
“Dissolved oxygen (DO) in water is essential for the biochemical processes which determine the
fate of nitrogen and organic pollutants…in constructed wetlands” (Sewwandi, Weragoda, &
Tanaka, 2010). In addition, dissolved oxygen levels are significantly different in wetlands versus
surface water, therefore DO data can help quantify the extent to which the site is functioning as a
wetland.
DISSOLVED OXYGEN
Dissolved Oxygen (DO) levels differ in wetlands compared to surface waters, because
“DO concentrations in …fresh water will range from 7.56 mg/L at 30 degrees Celsius to 14.62
mg/L at zero degrees Celsius” (Minnesota Pollution Control Agency, 2009) and wetland areas
that can be described as bogs, for example, have DO concentrations ranging from 0-6 ppm or 0-
6mg/l (Mullin, 2011). Therefore dissolved oxygen levels can help provide insight into whether or
not the restoration efforts are promoting a wetland environment.
Dissolved oxygen (DO) levels can be used “to assess the stability of various trace
metals…and organic contaminants in ground water” (Rose & Long, 1988) and can also help
predict the expected microbial processes occurring in a wetland area. Denitrification, for
example, is a process that occurs in anaerobic or anoxic conditions (Faulwetter, et al., 2009), and
11. 5
anoxic groundwater conditions are defined as having “no dissolved oxygen or a very low
concentration of dissolved oxygen (that is, less than 0.5 milligrams per liter)” (USGS, n.d.).
“Respiration and fermentation are the major mechanisms by which microorganisms break down
organically-derived pollutants into assumed harmless substances such as carbon dioxide (CO2),
nitrogen gas (N2) and water (H2O)” (Faulwetter, et al., 2009) and dissolved oxygen
concentrations can help determine which processes are expected to be occurring in the area
(Faulwetter, et al., 2009). It’s also been shown that “lower redox potentials are linked to reduced
conditions” (Faulwetter, et al., 2009), and one of the larger project goals as earlier discussed is
creating a more reducing landscape (Deford, Project Goals, 2014). Dissolved oxygen has a high
redox potential, and is in fact the most biologically reactive oxidant out of naturally occurring
constituents in water (Stumm & Morgan, 1981), and because we expect reducing conditions and
low redox potential (Deford, Project Goals, 2014) we therefore expect DO concentrations to be
low. This can be beneficial because when microbes are starved for oxygen, they select the next
most energetic compound, which is typically nitrate (Ponnamperuma, 1972); therefore when DO
concentrations are low in the anoxic range, it gives evidence that nitrates can be removed from
the water through denitrification (Woltermade, 2000) and contribute to the larger project goal of
improving “the watershed’s ability to treat nitrogen and phosphorous” (Deford, Progress Report,
2014).
DATA COLLECTION METHODS
The dissolved oxygen data shown in Table 1 was analyzed from three different dates,
taken at 12 different groundwater well locations across the site. The location of wells is shown
12. 6
in Figure 1. Figure 1 shows only 10 of the 12 locations, with two well locations not pictured
because they are slightly out of view from the aerial photograph, but are just off the image
on the South side. Data was analyzed from samples collected on August 27th, September 2nd,
and September 11th, 2014. Dissolved oxygen concentrations from these dates were selected for
analyses as the observations were from the time of year which is expected to be representative of
baseline conditions.
Table 1- A table showing measured Dissolved Oxygen data for the three dates analyzed.
Well ID Sample ID DO (mg/l) DO% DO (mg/l) DO% DO (mg/l) DO%
TPL3 1 -- -- 0.81 9.10 1.02 10.80
TPL6 2 1.00 11.40 1.96 23.00 1.38 14.70
TPL8 3 1.83 21.10 2.95 34.00 -- --
TPL10 4 4.58 52.50 0.03 0.30 4.18 45.60
TPL14 5 0.36 3.90 0.84 9.40 4.17 44.80
MSU1 6 0.15 1.70 0.25 2.90 2.98 31.10
MSU2 7 0.09 1.00 0.23 2.60 0.25 2.70
MSU3 8 0.05 0.05 0.27 2.90 0.31 3.20
MSU4 9 0.17 0.17 0.28 3.20 0.56 5.80
MSU6 10 0.31 0.31 1.68 18.30 5.29 55.60
MSU7 11 0.12 1.12 0.30 3.40 0.61 6.30
F5 12 0.42 4.60 0.62 6.90 0.64 6.70
Dissolved Oxygen Concentration Data
8/27/2014 9/2/2014 9/11/2014
13. 7
Figure 1- A map of the site showing 10 of the 12 water sampling wells.
The wells used to collect data were installed by three different entities at different times,
including the Trust for Public Land (listed as TPL wells in Table 1), Hyalite Engineers (well F5
in Table 1), and Montana State University (listed as MSU wells in Table 1). A schedule of well
owners is provided in Appendix A. Montana State University installed “2-inch diameter PVC
wells to a maximum depth of 7 ft. with a 3-inch diameter hand auger. [MSU] wells are slotted for
the deepest two feet, and solid for the remaining length up to, and above the ground surface.
Silica sand was used as a well casing around the slotted portion, and clay removed from the well
hole was used around the solid portion. This allows for groundwater to freely flow into the well,
14. 8
while keeping the well from clogging and surface water from entering” (Deford, Stein, Cahoon,
Hartshorn, & Ewing, 2014). The geo-position of well locations are referenced using the North
American Datum of 1983, and were surveyed using Trimble GPS equipment (Deford, Stein,
Cahoon, Hartshorn, & Ewing, 2014).
Water chemistry data, including the dissolved oxygen observations in Table 1, were
collected by Lilly Deford and research assistants working under her direction, using a Hach LDO
Probe (IntelliCALTM LDO101) (Deford, Stein, Cahoon, Hartshorn, & Ewing, 2014).
Measurements were taken after first pumping wells dry, then reading DO concentrations
immediately after recharge, holding the probe in the center of the water column (Deford, Stein,
Cahoon, Hartshorn, & Ewing, 2014). This method is considered to be “representative of the
surrounding groundwater because the water has had little time to equilibrate with the
atmosphere” (Deford, Stein, Cahoon, Hartshorn, & Ewing, 2014). DO measurements were
recorded after consecutive readings stabilized in time to within 0.2mg/L of each other. (Deford,
Stein, Cahoon, Hartshorn, & Ewing, 2014).
KRIGING METHODS
Ordinary kriging is a method of spatial prediction used to estimate the value of a
parameter in question at a location where it is not measured, based on data collected at nearby
locations (Murphy, Curriero, & Ball, 2010). Data analysis using spatial prediction methods are
used because dissolved oxygen concentration in shallow groundwater have the potential to be
spatially correlated, i.e. the concentration of dissolved oxygen at one location is related to the
concentration at nearby locations.
15. 9
Ordinary kriging has advantages over other spatial prediction methods (Bohling, 2005)
and is a proven method of analyzing and predicting groundwater surface elevations (Varouchakis
& Hristopulos, 2013) (Nikroo, Kompani-Zare, Sepaskhah, & Fallah Shamsi, 2010), as well as
water chemistry properties including dissolved oxygen (Murphy, Curriero, & Ball, 2010). All
interpolation algorithms assume a decreasing weight function with increased separation distance,
but kriging is advantageous because the methods incorporate a data driven weighting function,
rather than an arbitrary function (Bohling, 2005). Kriging has further advantages over other
spatial prediction methods including compensating for data clusters, and giving an error estimate,
i.e. variance, in addition to predicting values at unknown locations (Bohling, 2005).
Ordinary kriging involves two steps; first the degree of similarity between measured data
points is plotted as a function against their separation distance to determine if and how the data is
spatially correlated, and second that relationship is used to interpolate among measured points to
estimate values at unknown locations (Reams, Huso, Vong, & McCollum, 1997). The first step
utilizes the semi-variance statistic (h) defined as “half the expected squared difference between
values a given distance, h, apart:
(ℎ) =
1
2
𝐸[𝑧(𝑥𝑖) − 𝑧(𝑥𝑖 + ℎ)]2
=
1
2𝑁(ℎ)
∑ [𝑧(𝑥𝑖) − 𝑧(𝑥𝑖 + ℎ)]2
𝑁(ℎ)
𝑖−1
where
z(𝑥𝑖) = measured sample value at point 𝑥𝑖 (𝑥𝑖 can be multidimensional),
z(𝑥𝑖 + ℎ) = sample value at a point a distance of h from 𝑥𝑖, and
N(h) = total number of pairs of points within an h of each other” (Reams, Huso, Vong, &
McCollum, 1997). The semi-variance statistic (h) is plotted against the separation distance h;
this plot is called the semivariogram (Reams, Huso, Vong, & McCollum, 1997). If a trend can be
16. 10
determined from the semivariogram and a representative curve can be fit to the data, the
relationship between semi-variance and separation distance is then used to determine weighting
factors utilized in the second step (Reams, Huso, Vong, & McCollum, 1997). Once that
relationship is known, weighting factors are calculated based on the separation distance between
points, giving higher weights to points closer to the point being estimated, and used to “estimate
the value of Z at some unmeasured point 𝑥 𝑜, [as] a linear combination or weighted average of all
the observed variables:
𝑧̂( 𝑥0) = 1
𝑧(𝑥1) + 2
𝑧(𝑥2) + ⋯ + 𝑛
𝑧(𝑥 𝑛),
where
1
= coefficients or weights associated with each of the observed values” (Reams, Huso,
Vong, & McCollum, 1997).
Dissolved oxygen concentrations were analyzed using ordinary kriging methods using a
MATLAB (MATLAB, 2014) program written by Kathryn Plymesser, (Plymesser, 2014). The
code is presented in Appendix B, and uses a linear semi-variance model. This base code was
augmented slightly to use data found in different spreadsheets, and the new code is archived in
Appendix C. The spreadsheet based presentation of the data referenced by the code can be found
in Appendix D.
With the semivariograms established, dissolved oxygen concentrations and the
associated variance were estimated using a range of 1000 meters, and a slope of 1 to ensure over
half of all measured points were used to predict unknown concentrations. DO concentrations
were estimated across the site on a grid pattern with a spacing of 50 meters, starting at
(1579782.07 Easting, 532197.33 Northing) and ending at (1578368.61 Easting, 530821.50
Northing) which is an area roughly 1,413 meters East to West, and 1,375 meters North to South,
17. 11
referenced using the North American Datum of 1983. The code for ordinary Kriging can be
found in Appendix C, and the data referenced in the code can be found in Appendix D. Finally,
predicted DO concentrations were then plotted on a 3-D graph (see figures 5-7 in the results
section) using code found in Appendix C, and data found in Appendix D. The function trisurf
was used (MATLAB, 2014) to plot DO concentrations over the area of interest, and therefore the
automatic color scale for each day analyzed was based on that day’s minimum and maximum
predicted DO value, resulting in color scales that could not be compared across different dates.
This was compensated for by manipulating the kriged DO data output before using that data to
plot the concentration maps, by changing the value at the first point (1578450, 530800) to be
6mg/L DO; this forced the automatic color scale in MATLAB to be a 0-6mg/L DO scale. After
3D DO concentration maps were generated for each date using MATLAB, they were changed to
2D graphs with color representing DO concentration, and overlaid on the map of water wells to
give a plan-view picture of DO concentrations across the site for each date.
RESULTS
The semivariograms for each date analyzed can be seen in Figures 2-4. The
semivariograms do not display any detectable trend in the data, showing there is not enough
measured data, or that the spatial interval is too coarse, or that there is simply no spatial trend.
The outcome is that a spatial trend could not be deduced from the semivariograms using ordinary
kriging methods. Without a spatial trend, a correlation cannot be made between separation
distance and weighting factors, to accurately predict the dissolved oxygen concentration in
18. 12
unknown locations. Therefore, if ordinary kriging methods are used, the variance is expected to
be high, showing that predicted values cannot be trusted as accurate calculations.
Figure 2 – A plot of the semivariogram for DO data collected on 08.27.2014.
19. 13
Figure 3 – A plot of the semivariogram for DO data collected on 09.02.2014.
Figure 4 – A plot of the semivariogram for DO data collected on 09.11.2014.
20. 14
In light of the inconclusiveness of the semivariograms, the measured data were used with
ordinary kriging to predict DO values at unknown locations for each data analyzed; a small
sample of the predicted DO values and the associated variance at each point for one date on
08.27.2014 are shown in Table 2, and full results are provided in Appendix D. The variance
values are very high as expected, and are often 2 orders of magnitude higher than the predicted
DO concentration, showing that the error in the predicted value is far greater than the value itself
and that predictions are tenuous at best.
Table 2- A subset of predicted DO concentrations and the associated variance, calculated using
data measured on 08.27.2014.
21. 15
Although predicted DO values at unknown locations have high variances, 3-dimensional
DO concentration maps were generated for each date, which were then compared to see if
general trends could be determined, such as areas of persistent low or high DO concentrations.
The unscaled DO concentration maps for each date are shown in Figures 5-7. As before, the
automatic color scale for each day analyzed was based on that day’s minimum and maximum
predicted DO value, resulting in color scales that could not be compared over different
dates. To compensate for this, the kriged DO data output by MATLAB was manipulated before
using that data to plot the 2-D concentration maps, by changing the value at the first point
(1578450, 530800) to be 6mg/L DO; this forced the automatic color scale to be a 0-6mg/L DO
scale. The concentration maps for each day were then displayed as 2-D contour interval graphs
with color representing DO concentration, and overlaid on the water well map to give a plan-
view picture of DO concentrations across the site for each date. These plan view, scaled DO
concentration maps are shown in Figures 8-10, and are all shown on a scale of 0-6mg/L DO, and
can be compared across dates for general trends. As seen in Figures 8-10, there are no major
trends that carry across all dates, and therefore the predicted DO values combined with their
associated variance values are not accurate enough to contribute additional knowledge about DO
concentrations beyond the measured data. However, the measured data do allow us to draw some
general conclusions, which are discussed in the next section.
22. 16
Figure 5- A 3-D concentration map showing predicted DO concentrations over the site area
calculated using data measured on 08.27.2014.
23. 17
Figure 6 – A 3-D concentration map showing predicted DO concentrations over the site area
calculated using data measured on 09.02.2014
24. 18
Figure 7 – A 3-D concentration map showing predicted DO concentrations over the site area
calculated using data measured on 09.02.2014
25. 19
Figure 8 – A map showing the plan view of the site with predicted, scaled DO concentrations
calculated using data measured on 08.27.2014.
26. 20
Figure 9 – A map showing the plan view of the site with predicted, scaled DO concentrations
calculated using data measured on 09.02.2014.
27. 21
Figure 10 – A map showing the plan view of the site with predicted, scaled DO concentrations
calculated using data measured on 09.11.2014.
CONCLUSIONS AND RECOMMENDATIONS
The semivariograms showed no correlation between measured DO concentrations and the
separation distance between points, which in this case likely indicates that the well locations
analyzed were too far apart to correlate DO concentrations with their spatial location. Therefore
no spatial trend could be deduced from the semivariograms using ordinary kriging methods.
Without a spatial trend, accurate weighting factors needed to calculate unknown DO
28. 22
concentrations cannot be predicted based on relative distances, and therefore the variance or
error calculated is often orders of magnitude higher than the predicted DO concentration value.
This shows there is not enough data to accurately predict DO concentrations at unknown
locations across the site using ordinary kriging methods.
However, while accurate concentrations of DO were not able to be predicted using
ordinary kriging methods, other project goals were met. Overall, the maximum measured DO
levels of 5.29 mg/L show that the area is acting as a wetland environment which falls within the
DO concentration range of bogs from 0-6mg/L (Mullin, 2011). In addition, over 50% of
measured DO data is within the anoxic range of 0-0.5mg/L (USGS, n.d.), showing anoxic
microbial processes can be expected. Anoxic environments have potential to reduce nitrates,
thereby removing nutrients from the water through denitrification (Woltermade, 2000). Removal
of nutrients leads to improved surface water quality downstream from the wetland area, which is
one of the overall project goals; therefore there is evidence that the restoration efforts have
potential to increase water quality.
When considering the measured data, shown in Table 1, questions were raised as to why
some DO values on a given day are considerably higher than the other wells measured in the
same day; no definitive conclusions can be made, but potential explanations that have been
speculated include hypothesis that outlier measurements were the result of human error,
subsurface hydrology factors, or other unknown ecological factors. Questions were also raised as
to why average DO concentrations were noticeably higher on September 11, 2014 compared to
the other two dates; again no definitive conclusions can be made as many different factors
influence DO concentrations simultaneously, however it is hypothesized that these
measurements were higher because they were taken later in the day compared to the other days,
29. 23
which would result in higher DO concentrations as plants have access to more sunlight and are
photosynthesizing, giving off dissolved oxygen from respiration at higher rates during the middle
of the day, as demonstrated in the Jackson Bottom Wetlands Preserve, in Hillsboro Oregon
(Hillsboro Parks and Recreation, 2015).
Overall, it was concluded that further analyses of dissolved oxygen data is not warranted
at this time; installing more wells would be required to accurately predict DO concentrations,
and given time, labor, and cost constraints it would not be a reasonable investment of resources
to do so. Additional data analyses of other water chemistry parameters by creating
semivariograms would help determine if well placement and density is adequate to predict other
factors relating to water quality, and is recommended as part of the overall Story Mill Ecological
Restoration Project.
31. 25
Bohling, G. (2005, October). Kriging. Kansas Geological Survey.
City of Bozeman; Trust for Public Land. (2014, September 11). Story Mill Community Project
Conceptual Park Plan. Bozeman, MT.
City of Bozeman; Trust for Public Land. (2014, May). Story Mill Ecological Restoration.
Bozeman, MT.
Deford, L. (2014, Fall). GPHY 504 – Modeling Concepts Assignment.
Deford, L. (2014). Progress Report for the Story Mill Wetland Monitoring Project.
Deford, L., Stein, O., Cahoon, J., Hartshorn, A., & Ewing, S. (2014). Montana State University’s
Involvement with the Story Mill Wetland Annual Report. Montana State University,
Bozeman, MT.
Faulwetter, J., Gagnon, V., Sundberg, C., Chazarenc, F., Burr, M., Brisson, J., . . . Stein, O.
(2009). Microbial processes influencing performance of treatment wetlands: A review.
Ecological Engineering, 35(6), 987-1004.
Hatch. (n.d.). Hatch LDO Probe. IntelliCALTM LDO101.
Hillsboro Parks and Recreation. (2015). Aquatic Chemistry Overview. Retrieved March 2, 2015,
from Jackson Bottom Wetlands Preserve: http://www.jacksonbottom.org/monitoring-
restoration/aquatic-chemistry-overview/
MATLAB. (2014). Vers. R2014a. South Natick, MA: MathWorks.
Minnesota Pollution Control Agency. (2009, February). Low Dissolved Oxygen in Water:
Causes, Impact on Aquatic Life - An Overview. Water Quality/Impaired Waters.
Mullin, K. (2011, August 25). Types of wetlands . Retrieved March 2, 2015, from
http://www.ngwa.org/fundamentals/teachers/pages/types-of-wetlands.aspx
33. 27
Woltermade, C. (2000). Ability of restored wetlands to Reduce Nitrogen and Phosphorus
Concentrations in Agricultural Drainage Water. Journal of Soil and Water Conservation,
55, 303–309.
38. 32
Appendix B - Original MATLAB Code from Dr. Kathryn Plymesser – Ordinary Kriging
%ordkrig.m
%uses ordinary kriging and a linear semivariance model to predict the
%elevation z0 and its associated variance at a specified location x0,
y0.
data=xlsread('WellsMatlab.xls','MatlabData','B2:D16');
X=data(:,1:3); %select x, y, and ground-surface elevation data
[dtX,b]=detrendsurf(X); %detrend surface
svrange=input('enter the range for the linear semivariance model n fit
to the control data: ');
alpha=input('enter the slope of the linear semivariance model n fit to
the control data: ');
for x0=540300:50:540750
for y0=4851650:50:4852100
mz0=b(1)+b(2)*x0+b(3)*y0;
x=[dtX(:,1);x0];
y=[dtX(:,2);y0];
z=dtX(:,3);
n=length(x);
xx=repmat(x,1,n);
yy=repmat(y,1,n);
dx=xx-xx'; dy=yy-yy';
h=sqrt(dx.^2+dy.^2); %calculating the distances between points
h0=h(end,:); dx0=dx(end,:); dy0=dy(end,:); %distances from the
estimation point
hn=find(h0<svrange); %select points within range to use in
estimate
dxn=dx0(hn); dyn=dy0(hn);
hh=sqrt(dxn.^2+dyn.^2); %distances of selected points from the
estimation point
xi=x(hn); yi=y(hn); m=length(xi);
xxi=repmat(xi,1,m);
yyi=repmat(yi,1,m);
dxxi=xxi-xxi'; dyyi=yyi-yyi';
hhi=sqrt(dxxi.^2+dyyi.^2);
gamh=alpha*hhi; %calculate semivariance
S_top=[gamh(1:m-1,1:m-1) ones(m-1,1)];
S_last=[ones(1,m-1) 0];
S=[S_top;S_last]; %semivariance matrix S
B=[gamh(1:m-1,end);1]; %semivariance vector B
lamv=SB; %lamv are the weights
zi=lamv(1:m-1)'*(z(hn(1:m-1))); %calculate estimated z
z0=zi+mz0;
var0=lamv'*B; %calculate the variance in estimate of z
k=[x0,y0,z0,var0];
dlmwrite('elevation.txt',k,'-append','precision','%.6f')
end
end
39. 33
Appendix B - Original MATLAB Code from Dr. Kathryn Plymesser – Semi-variogram
%semivar.m
data=xlsread('WellsMatlab.xls','MatlabData','B143:D153');
%select x, y, and ground-surface elevation data
dtX=detrendsurf(data); %detrend surface
x=dtX(:,1); y=dtX(:,2); z=dtX(:,3); %read x,y,z values
n=length(x); nn=n*n;
%calculate distance between each pair of points
xx=repmat(x,1,n);
yy=repmat(y,1,n);
zz=repmat(z,1,n);
dx=xx-xx'; dy=yy-yy';
h=sqrt(dx.^2+dy.^2);
%eliminate duplicate values in the lower triangular part of the matrix
% and sort values by distance
hv=reshape(triu(h),nn,1);
[nr,nc,nhv]=find(hv); %nhv are the nonzero values of hv
[sh,ih]=sort(nhv);
%calculate the squared differences in z values for each pair of points
zvar=(zz-zz').^2; vz=reshape(zvar,nn,1); nvz=vz(nr); sv=nvz(ih);
%only compare distances that are half or less of the largest distance
hmax=max(sh)./2; nm=length(find(sh<=hmax));
nbin=200; hinc=hmax/nbin; %set the number of distance bins to 20
% adjust bin width to be round number
% The values for the magnitude of hinc (10, 100, 1000) may need to be
% adjusted depending on domain size and distance units
if hinc<=10, hinc=floor(hinc);
elseif hinc<=100, hinc=floor(hinc/10)*10;
elseif hinc<=1000, hinc=floor(hinc/100)*100;
end;
hvec=0:hinc:nbin*hinc; %vector of bin endpoints
for i=1:nbin-1;
ib=[]; ib=find(sh>hvec(i)&sh<=hvec(i+1)); %find distances falling in
bins
if ~isempty(ib),
ni(i)=length(ib);
gamh(i)=sum(sv(ib))./(2*ni(i)); %calculate semivariance for each
distance bin
else gamh(i)=0; ni(i)=0; %set semivariance to 0 if no data fall in a
bin
end;
end;
hvmn=(hvec(1:nbin-1)+hvec(2:nbin))./2; %find the mid-point of each bin
plot(hvmn,gamh,'bo') %plot the results
xlabel('Distance (ft)')
ylabel('Semivariance')
xlswrite('WellsMatlab.xls',gamh,'MatlabSemi2','A1')
xlswrite('WellsMatlab.xls',hvmn,'MatlabSemi2','A2')
40. 34
Appendix B - Original MATLAB Code from Dr. Kathryn Plymesser – detrendsurf function
function [dtX,b] = detrendsurf(X)
% remove the 1st order trend surface from a data matrix X
% with N rows and 3 columns: values of x, y, and z
[nr,nc] = size(X); % determine no of data (rows)
xew=X(:,1); xns=X(:,2); z=X(:,3);
A=[nr sum(xew) sum(xns);...
sum(xew) sum(xew.^2) sum(xew.*xns);...
sum(xns) sum(xew.*xns) sum(xns.^2)];
rhs=[sum(z);sum(xew.*z);sum(xns.*z)];
b=Arhs; % solution of matrix equation
zhat=b(1)+b(2).*xew+b(3).*xns;
zres=z-zhat; %residuals
dtX=[xew xns zres];
42. 36
Appendix C - MATLAB Code – Ordinary Kriging 08.27.2014
%ordkrig.m
%uses ordinary kriging and a linear semivariance model to predict the
%elevation z0 and its associated variance at a specified location x0,
y0.
data=xlsread('DO_MatLab_Data.xlsx','MatLabData08.27.2014','B3:D12');
X=data(:,1:3); %select x, y, and ground-surface elevation data
[dtX,b]=detrendsurf(X); %detrend surface
svrange=input('enter the range for the linear semivariance model n fit
to the control data: ');
alpha=input('enter the slope of the linear semivariance model n fit to
the control data: ');
for x0=530800:50:532200
for y0=1578450:50:1579800
mz0=b(1)+b(2)*x0+b(3)*y0;
x=[dtX(:,1);x0];
y=[dtX(:,2);y0];
z=dtX(:,3);
n=length(x);
xx=repmat(x,1,n);
yy=repmat(y,1,n);
dx=xx-xx'; dy=yy-yy';
h=sqrt(dx.^2+dy.^2); %calculating the distances between points
h0=h(end,:); dx0=dx(end,:); dy0=dy(end,:); %distances from the
estimation point
hn=find(h0<svrange); %select points within range to use in
estimate
dxn=dx0(hn); dyn=dy0(hn);
hh=sqrt(dxn.^2+dyn.^2); %distances of selected points from the
estimation point
xi=x(hn); yi=y(hn); m=length(xi);
xxi=repmat(xi,1,m);
yyi=repmat(yi,1,m);
dxxi=xxi-xxi'; dyyi=yyi-yyi';
hhi=sqrt(dxxi.^2+dyyi.^2);
gamh=alpha*hhi; %calculate semivariance
S_top=[gamh(1:m-1,1:m-1) ones(m-1,1)];
S_last=[ones(1,m-1) 0];
S=[S_top;S_last]; %semivariance matrix S
B=[gamh(1:m-1,end);1]; %semivariance vector B
lamv=SB; %lamv are the weights
zi=lamv(1:m-1)'*(z(hn(1:m-1))); %calculate estimated z
z0=zi+mz0;
var0=lamv'*B; %calculate the variance in estimate of z
k=[x0,y0,z0,var0];
dlmwrite('elevation_08_27_2014.txt',k,'-
append','precision','%.6f')
end
end
43. 37
Appendix C - MATLAB Code – Ordinary Kriging 09.02.2014
%ordkrig.m
%uses ordinary kriging and a linear semivariance model to predict the
%elevation z0 and its associated variance at a specified location x0,
y0.
data=xlsread('DO_MatLab_Data.xlsx','MatLabData09.02.2014','B3:D13');
X=data(:,1:3); %select x, y, and ground-surface elevation data
[dtX,b]=detrendsurf(X); %detrend surface
svrange=input('enter the range for the linear semivariance model n fit
to the control data: ');
alpha=input('enter the slope of the linear semivariance model n fit to
the control data: ');
for x0=530800:50:532200
for y0=1578450:50:1579800
mz0=b(1)+b(2)*x0+b(3)*y0;
x=[dtX(:,1);x0];
y=[dtX(:,2);y0];
z=dtX(:,3);
n=length(x);
xx=repmat(x,1,n);
yy=repmat(y,1,n);
dx=xx-xx'; dy=yy-yy';
h=sqrt(dx.^2+dy.^2); %calculating the distances between points
h0=h(end,:); dx0=dx(end,:); dy0=dy(end,:); %distances from the
estimation point
hn=find(h0<svrange); %select points within range to use in
estimate
dxn=dx0(hn); dyn=dy0(hn);
hh=sqrt(dxn.^2+dyn.^2); %distances of selected points from the
estimation point
xi=x(hn); yi=y(hn); m=length(xi);
xxi=repmat(xi,1,m);
yyi=repmat(yi,1,m);
dxxi=xxi-xxi'; dyyi=yyi-yyi';
hhi=sqrt(dxxi.^2+dyyi.^2);
gamh=alpha*hhi; %calculate semivariance
S_top=[gamh(1:m-1,1:m-1) ones(m-1,1)];
S_last=[ones(1,m-1) 0];
S=[S_top;S_last]; %semivariance matrix S
B=[gamh(1:m-1,end);1]; %semivariance vector B
lamv=SB; %lamv are the weights
zi=lamv(1:m-1)'*(z(hn(1:m-1))); %calculate estimated z
z0=zi+mz0;
var0=lamv'*B; %calculate the variance in estimate of z
k=[x0,y0,z0,var0];
dlmwrite('elevation_09_02_2014.txt',k,'-
append','precision','%.6f')
end
end
44. 38
Appendix C - MATLAB Code – Ordinary Kriging 09.11.2014
%ordkrig.m
%uses ordinary kriging and a linear semivariance model to predict the
%elevation z0 and its associated variance at a specified location x0,
y0.
data=xlsread('DO_MatLab_Data.xlsx','MatLabData09.11.2014','B3:D12');
X=data(:,1:3); %select x, y, and ground-surface elevation data
[dtX,b]=detrendsurf(X); %detrend surface
svrange=input('enter the range for the linear semivariance model n fit
to the control data: ');
alpha=input('enter the slope of the linear semivariance model n fit to
the control data: ');
for x0=530800:50:532200
for y0=1578450:50:1579800
mz0=b(1)+b(2)*x0+b(3)*y0;
x=[dtX(:,1);x0];
y=[dtX(:,2);y0];
z=dtX(:,3);
n=length(x);
xx=repmat(x,1,n);
yy=repmat(y,1,n);
dx=xx-xx'; dy=yy-yy';
h=sqrt(dx.^2+dy.^2); %calculating the distances between points
h0=h(end,:); dx0=dx(end,:); dy0=dy(end,:); %distances from the
estimation point
hn=find(h0<svrange); %select points within range to use in
estimate
dxn=dx0(hn); dyn=dy0(hn);
hh=sqrt(dxn.^2+dyn.^2); %distances of selected points from the
estimation point
xi=x(hn); yi=y(hn); m=length(xi);
xxi=repmat(xi,1,m);
yyi=repmat(yi,1,m);
dxxi=xxi-xxi'; dyyi=yyi-yyi';
hhi=sqrt(dxxi.^2+dyyi.^2);
gamh=alpha*hhi; %calculate semivariance
S_top=[gamh(1:m-1,1:m-1) ones(m-1,1)];
S_last=[ones(1,m-1) 0];
S=[S_top;S_last]; %semivariance matrix S
B=[gamh(1:m-1,end);1]; %semivariance vector B
lamv=SB; %lamv are the weights
zi=lamv(1:m-1)'*(z(hn(1:m-1))); %calculate estimated z
z0=zi+mz0;
var0=lamv'*B; %calculate the variance in estimate of z
k=[x0,y0,z0,var0];
dlmwrite('elevation_09_11_2014.txt',k,'-
append','precision','%.6f')
end
end
45. 39
Appendix C - MATLAB Code – Semi-variogram 08.27.2014
%semivar.m
data=xlsread('DO_MatLab_Data.xlsx','MatLabData08.27.2014','B3:D13');
%select x, y, and ground-surface elevation data
dtX=detrendsurf(data); %detrend surface
x=dtX(:,1); y=dtX(:,2); z=dtX(:,3); %read x,y,z values
n=length(x); nn=n*n;
%calculate distance between each pair of points
xx=repmat(x,1,n);
yy=repmat(y,1,n);
zz=repmat(z,1,n);
dx=xx-xx'; dy=yy-yy';
h=sqrt(dx.^2+dy.^2);
%eliminate duplicate values in the lower triangular part of the matrix
% and sort values by distance
hv=reshape(triu(h),nn,1);
[nr,nc,nhv]=find(hv); %nhv are the nonzero values of hv
[sh,ih]=sort(nhv);
%calculate the squared differences in z values for each pair of points
zvar=(zz-zz').^2; vz=reshape(zvar,nn,1); nvz=vz(nr); sv=nvz(ih);
%only compare distances that are half or less of the largest distance
hmax=max(sh)./2; nm=length(find(sh<=hmax));
nbin=200; hinc=hmax/nbin; %set the number of distance bins to 20
% adjust bin width to be round number
% The values for the magnitude of hinc (10, 100, 1000) may need to be
% adjusted depending on domain size and distance units
if hinc<=10, hinc=floor(hinc);
elseif hinc<=100, hinc=floor(hinc/10)*10;
elseif hinc<=1000, hinc=floor(hinc/100)*100;
end;
hvec=0:hinc:nbin*hinc; %vector of bin endpoints
for i=1:nbin-1;
ib=[]; ib=find(sh>hvec(i)&sh<=hvec(i+1)); %find distances falling in
bins
if ~isempty(ib),
ni(i)=length(ib);
gamh(i)=sum(sv(ib))./(2*ni(i)); %calculate semivariance for each
distance bin
else gamh(i)=0; ni(i)=0; %set semivariance to 0 if no data fall in a
bin
end;
end;
hvmn=(hvec(1:nbin-1)+hvec(2:nbin))./2; %find the mid-point of each bin
plot(hvmn,gamh,'bo') %plot the results
xlabel('Distance (ft)')
ylabel('Semivariance')
xlswrite('WellsMatlab.xls',gamh,'MatlabSemi2','A1')
xlswrite('WellsMatlab.xls',hvmn,'MatlabSemi2','A2')
46. 40
Appendix C - MATLAB Code – Semi-variogram 09.02.2014
%semivar.m
data=xlsread('DO_MatLab_Data.xlsx','MatLabData09.02.2014','B3:D13');
%select x, y, and ground-surface elevation data
dtX=detrendsurf(data); %detrend surface
x=dtX(:,1); y=dtX(:,2); z=dtX(:,3); %read x,y,z values
n=length(x); nn=n*n;
%calculate distance between each pair of points
xx=repmat(x,1,n);
yy=repmat(y,1,n);
zz=repmat(z,1,n);
dx=xx-xx'; dy=yy-yy';
h=sqrt(dx.^2+dy.^2);
%eliminate duplicate values in the lower triangular part of the matrix
% and sort values by distance
hv=reshape(triu(h),nn,1);
[nr,nc,nhv]=find(hv); %nhv are the nonzero values of hv
[sh,ih]=sort(nhv);
%calculate the squared differences in z values for each pair of points
zvar=(zz-zz').^2; vz=reshape(zvar,nn,1); nvz=vz(nr); sv=nvz(ih);
%only compare distances that are half or less of the largest distance
hmax=max(sh)./2; nm=length(find(sh<=hmax));
nbin=200; hinc=hmax/nbin; %set the number of distance bins to 20
% adjust bin width to be round number
% The values for the magnitude of hinc (10, 100, 1000) may need to be
% adjusted depending on domain size and distance units
if hinc<=10, hinc=floor(hinc);
elseif hinc<=100, hinc=floor(hinc/10)*10;
elseif hinc<=1000, hinc=floor(hinc/100)*100;
end;
hvec=0:hinc:nbin*hinc; %vector of bin endpoints
for i=1:nbin-1;
ib=[]; ib=find(sh>hvec(i)&sh<=hvec(i+1)); %find distances falling in
bins
if ~isempty(ib),
ni(i)=length(ib);
gamh(i)=sum(sv(ib))./(2*ni(i)); %calculate semivariance for each
distance bin
else gamh(i)=0; ni(i)=0; %set semivariance to 0 if no data fall in a
bin
end;
end;
hvmn=(hvec(1:nbin-1)+hvec(2:nbin))./2; %find the mid-point of each bin
plot(hvmn,gamh,'bo') %plot the results
xlabel('Distance (ft)')
ylabel('Semivariance')
xlswrite('WellsMatlab.xls',gamh,'MatlabSemi2','A1')
xlswrite('WellsMatlab.xls',hvmn,'MatlabSemi2','A2')
47. 41
Appendix C - MATLAB Code – Semi-variogram 09.11.2014
%semivar.m
data=xlsread('DO_MatLab_Data.xlsx','MatLabData09.11.2014','B3:D13');
%select x, y, and ground-surface elevation data
dtX=detrendsurf(data); %detrend surface
x=dtX(:,1); y=dtX(:,2); z=dtX(:,3); %read x,y,z values
n=length(x); nn=n*n;
%calculate distance between each pair of points
xx=repmat(x,1,n);
yy=repmat(y,1,n);
zz=repmat(z,1,n);
dx=xx-xx'; dy=yy-yy';
h=sqrt(dx.^2+dy.^2);
%eliminate duplicate values in the lower triangular part of the matrix
% and sort values by distance
hv=reshape(triu(h),nn,1);
[nr,nc,nhv]=find(hv); %nhv are the nonzero values of hv
[sh,ih]=sort(nhv);
%calculate the squared differences in z values for each pair of points
zvar=(zz-zz').^2; vz=reshape(zvar,nn,1); nvz=vz(nr); sv=nvz(ih);
%only compare distances that are half or less of the largest distance
hmax=max(sh)./2; nm=length(find(sh<=hmax));
nbin=200; hinc=hmax/nbin; %set the number of distance bins to 20
% adjust bin width to be round number
% The values for the magnitude of hinc (10, 100, 1000) may need to be
% adjusted depending on domain size and distance units
if hinc<=10, hinc=floor(hinc);
elseif hinc<=100, hinc=floor(hinc/10)*10;
elseif hinc<=1000, hinc=floor(hinc/100)*100;
end;
hvec=0:hinc:nbin*hinc; %vector of bin endpoints
for i=1:nbin-1;
ib=[]; ib=find(sh>hvec(i)&sh<=hvec(i+1)); %find distances falling in
bins
if ~isempty(ib),
ni(i)=length(ib);
gamh(i)=sum(sv(ib))./(2*ni(i)); %calculate semivariance for each
distance bin
else gamh(i)=0; ni(i)=0; %set semivariance to 0 if no data fall in a
bin
end;
end;
hvmn=(hvec(1:nbin-1)+hvec(2:nbin))./2; %find the mid-point of each bin
plot(hvmn,gamh,'bo') %plot the results
xlabel('Distance (ft)')
ylabel('Semivariance')
xlswrite('WellsMatlab.xls',gamh,'MatlabSemi2','A1')
xlswrite('WellsMatlab.xls',hvmn,'MatlabSemi2','A2')
48. 42
Appendix C - MATLAB Code – function: detrendsurf
function [dtX,b] = detrendsurf(X)
% remove the 1st order trend surface from a data matrix X
% with N rows and 3 columns: values of x, y, and z
[nr,nc] = size(X); % determine no of data (rows)
xew=X(:,1); xns=X(:,2); z=X(:,3);
A=[nr sum(xew) sum(xns);...
sum(xew) sum(xew.^2) sum(xew.*xns);...
sum(xns) sum(xew.*xns) sum(xns.^2)];
rhs=[sum(z);sum(xew.*z);sum(xns.*z)];
b=Arhs; % solution of matrix equation
zhat=b(1)+b(2).*xew+b(3).*xns;
zres=z-zhat; %residuals
dtX=[xew xns zres];
49. 43
Appendix C - MATLAB Code – Plot DO Concentration (Scaled to 6) 08.27.2014
num=xlsread(' DO_Concentration_Data_Scaledto6_08_27_2014.xlsx')
x=num(:,1);
y=num(:,2);
z=num(:,3);
tri = delaunay(x,y);
trisurf(tri,x,y,z);
50. 44
Appendix C - MATLAB Code – Plot DO Concentration (Scaled to 6) 09.02.2014
num=xlsread(' DO_Concentration_Data_Scaledto6_09_02_2014.xlsx')
x=num(:,1);
y=num(:,2);
z=num(:,3);
tri = delaunay(x,y);
trisurf(tri,x,y,z);
51. 45
Appendix C - MATLAB Code – Plot DO Concentration (Scaled to 6) 09.11.2014
num=xlsread(' DO_Concentration_Data_Scaledto6_09_11_2014.xlsx')
x=num(:,1);
y=num(:,2);
z=num(:,3);
tri = delaunay(x,y);
trisurf(tri,x,y,z);