Journal Pre-proof A MATLAB based graphical user interface (GUI) for quickly producing widely used hydrogeochemical diagrams Song He, Peiyue Li
PII:
S0009-2819(19)30076-5
DOI:
https://doi.org/10.1016/j.chemer.2019.125550
Reference:
CHEMER 125550
To appear in:
Geochemistry
Received Date:
19 September 2019
Revised Date:
19 October 2019
Accepted Date:
21 October 2019
Please cite this article as: He S, Li P, A MATLAB based graphical user interface (GUI) for quickly producing widely used hydrogeochemical diagrams, Geochemistry (2019), doi: https://doi.org/10.1016/j.chemer.2019.125550
This is a PDF file of an article that has undergone enhancements after acceptance, such as the addition of a cover page and metadata, and formatting for readability, but it is not yet the definitive version of record. This version will undergo additional copyediting, typesetting and review before it is published in its final form, but we are providing this version to give early visibility of the article. Please note that, during the production process, errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain. © 2019 Published by Elsevier.
f
oo
A MATLAB based graphical user interface (GUI) for quickly producing widely used hydrogeochemical diagrams
School of Environmental Science and Engineering, Chang’an University, No. 126 Yanta Road, Xi’an 710054, Shaanxi, China
. Key Laboratory of Subsurface Hydrology and Ecological Effects in Arid Region of Ministry of Education, Chang’an University, No. 126 Yanta Road, Xi’an
Pr
2
e-
1.
pr
Song He1, 2, Peiyue Li1, 2, 3*
710054, Shaanxi, China
. School of Water Resources and Environment, Hebei GEO University, Shijiazhuang 050031, Hebei, China
*
Email:
[email protected];
[email protected]
Jo ur
na l
3
Abstract: Hydrogeochemical diagrams are powerful tools facilitating hydrogeochemical research, among which Piper diagram, Gibbs diagrams, USSL diagram, Wilcox diagram and PI classification diagram are widely applied. However, it is usually tedious and time-consuming to draw these diagrams, not
f
oo
only because of the complex procedures to treat input data, but also due to the different software used. It is always required that several pieces of software should be used for a single hydrochemical study. Therefore, this study reported a MATLAB based graphical user interface (GUI) to overcome these shortages.
pr
Three simple steps are included in the GUI to draw a diagram. The frame of the diagram to be drawn is first selected from the database of the GUI, after
e-
which the input data (water sample data) are imported into the GUI and the properties of the points such as the sizes, colors and shapes are set. Finally, the diagrams produced can be exported from the GUI as images. This MATLAB based GUI is capable of generating quickly five types of diagrams that are
Pr
commonly used in hydrogeochemical research. The codes of the GUI and related functions can be adjusted according to the user’s needs. It is helpful to reduce the time spent in drawing these hydrochemical diagrams.
Introduction
na l
Keywords Hydrogeochemical diagrams; Piper diagram; Gibbs diagram; USSL diagram; Wilcox diagram
Jo ur
In hydrogeochemical research, various diagrams are widely utilized to enhance the understanding of groundwater chemistry, among which Piper diagram, Gibbs diagrams, USSL diagram, Wilcox diagram and PI classification diagram are commonly used (Li et al., 2016, 2017; He and Wu, 2019; Tian and Wu, 2019; Adimalla and Li, 2019). Piper diagram is a trilinear diagram for understanding the hydrogeochemical types of groundwater (Piper, 1944). Piper diagram comprises three major parts. The lower left and lower right triangles illustrate the composition of cations and anions of groundwater, and the diamond shaped zone in the middle reflects the hydrogeochemical type of the groundwater. The groundwater samples are plotted in the Piper diagram according to the
f
oo
milliequivalent percentages of the eight common major ions in the samples (Piper, 1994; Srivastava, 2019). Gibbs diagram was proposed by Gibbs (1970) to analyze the evolution mechanisms of surface water chemistry, and it is now also widely applied to study the mechanisms of groundwater evolution (Li et al.,
pr
2019a; He et al., 2019). Gibbs diagram consists of two sub-diagrams. The left sub-diagram shows the relationship of TDS vs Na/(Na+Ca), while the right
e-
sub-plot illustrates the relationship of TDS vs Cl/(Cl+HCO3). The vertical axes of the two sub-diagrams are in logarithmic coordinates, and the unit of TDS is mg/L. The mechanisms controlling the evolution of water chemistry are classified into three types by the Gibbs diagram (Gibbs, 1970; Wu et al., 2018; Rasul,
Pr
2019). USSL diagram was developed by USSL (1954) to assess the irrigation water quality, which considered the salinity and alkalinity of the irrigation water. The horizontal axis of the USSL diagram represents the electric conductivity (EC, μs/cm) at 25 °C in a logarithmic coordinate with a range of 100 to 12000.
na l
The vertical axis denotes sodium adsorption ratio (SAR), representing the alkalinity of irrigation water with a range of 0 to 40 (Li et al., 2019b). The horizontal and vertical axes of the USSL diagram are both divided into four segments, representing low, middle, high and very high salinity and alkalinity,
Jo ur
respectively. Therefore, the diagram is divided into sixteen zones in the USSL diagram, representing different irrigation water qualities (USSL 1954; Davraz and Özdemir, 2014; Li et al., 2018a; Masouml et al., 2019). Wilcox diagram is another diagram used to assess the irrigation water quality. The diagram is divided into five zones which represent different irrigation water qualities (Wilcox, 1948; Li et al., 2018b). PI classification is a common tool for irrigation water quality assessment, which relates the permeable index (PI) and total salt concentration (meq/L). The PI diagram is divided into three parts for different classifications of irrigation water quality (Doneen, 1964).
oo
f
There are many types of software to draw the hydrogeochemical diagrams. Piper diagram can be plotted by the software ‘AqQa’, ‘AquChem’ and ‘Origin’, and the other four diagrams can be drawn through common software such as ‘Microsoft Excel’, ‘Grapher’ and ‘Origin’ after pre-treatment of the
pr
input data. However, it usually takes much time to draw these diagrams via the software mentioned above. For example, when using ‘AqQa’ to draw the Piper
e-
diagram, the types and colors of the water sample points have to be set one by one, which is tedious and time-consuming in the case of numerous samples (Morris et al., 1983). Before using the software ‘Origin’ to draw the Piper diagram, the unit of ions has to be converted from ‘mg/L’ to ‘meq/L’, which is also
Pr
time-consuming. Therefore, some researchers have carried out research to overcome this shortage. Morris et al. (1983) developed a computer code in BASIC to draw the Piper diagram which was then plotted on the screen and thermal printer or Hewlett-Packard plotter. Then, Rao (1998) wrote a code named
na l
‘MHPT.BAS’ in BASIC to draw the Hill-Piper diagram, which combined Piper diagram and USSL diagram. However, the above mentioned codes can only be used to draw the Piper diagram, and other commonly used diagrams in hydrogeochemical research such Gibbs diagram, USSL diagram, Wilcox diagram
Jo ur
and PI diagram, could not be produced by these existing codes. As such, inventing a tool with which the common hydrogeochemical diagrams can be quickly produced is needed. To our knowledge, there is currently no such a tool. MATLAB is one of the most popular mathematic software for data analysis, data visualization, algorithm development, and numerical calculation. It contains many functions for matrix processing, which greatly simplifies the programming process and disposition of other issues. Therefore, a MATLAB based graphical user interface (GUI) was developed in this study for fast drawing the five hydrogeochemical diagrams. It greatly saves the time
f oo
and efforts spending in generating hydrogeochemical diagrams. GUI setup and plotting principles
pr
Generalization of the GUI
e-
The GUI which is used for generating hydrogeochemical diagrams in this study is structured based on MATLAB, and is named as Hydrogeochemical Diagram (HGCD). The basic idea of the GUI to draw a diagram comprises three steps. Firstly, the frame of a given diagram will be drawn by the function that
Pr
is named ‘xxx_frame.mat’, where ‘xxx’ denotes the title of the diagram (For example, ‘piper_frame’ is designed to draw the frame of Piper diagram). The frames for these diagrams have already been prepared and stored in the GUI database, and users can easily select one from the GUI database. The frame of a
na l
diagram has been pre-configured in the GUI database and consists of all required items of the diagram except the water sample points to be plotted. Secondly, the properties of the points to be plotted (size, color and shape) will be set after importing the water sample data from external excel file. After importing the
Jo ur
data, the water sample points will be added onto the selected frame. This step is implemented via the function named ‘xxx_add_points’ (‘xxx’ denotes the title of the diagram. For example, ‘piper_add_points’ is designed to add the water sample points onto the frame of Piper diagram). The last step is to export the figure as an image to be used in hydrochemical report. As this MATLAB based GUI is designed for fast generation of hydrogeochemical diagrams, as mentioned previously, the frame of the five diagrams is pre-configured. However, the codes of all the functions of the GUI can be modified by the users according to their needs.
f oo
Input data of the water samples
Only excel file (*.xlsx) can be successfully identified by the GUI. The format of the input data is shown as Fig. 1. In the table, the water samples are
pr
stored in rows, and each column represents one water quality parameter. The first column named ‘sample’ is the label of the sample. The following ten
e-
columns represent the water quality parameters, including Na+, K+, Ca2+, Mg2+, Cl−, SO42−, HCO3−, CO32−, total dissolved solids (TDS) and electric conductivity (EC). The order of the water quality parameters can be different from that shown in Fig. 1, but the spellings in the heading row (the first row
Pr
shown in Fig. 1) should be the same as appeared in the Fig. 1. The heading spellings are case sensitive and upper and lower scripts must also be strictly complied with. The ten parameters marked in yellow in Fig. 1 are compulsory for the successful running of GUI and other water quality parameters such as
Jo ur
for the GUI.
na l
NO3− are optional. The unit is μs/cm for EC, and mg/L for other parameters. Based on this rule, the tables in Fig. 1a and Fig. 1b are both acceptable input files
Fig. 1 should be placed here
Plotting principles
The frame of the diagrams is pre-configured and stored in the file named ‘xxx_frame.mat’. Users can select the frame from the GUI database easily. The
f
oo
principles for plotting the five diagrams are introduced as follows to give readers a better understanding of how the GUI works internally (Figure 2):
e-
pr
Fig. 2 should be placed here
Piper diagram
Pr
The coordinate setting of the frame of Piper diagram in HGCD is shown in Fig. 2a. The frame of Piper diagram is symmetric around the Y axis. The X coordinates of the left and right triangles range from -6 to -1 and 1 to 6, respectively, with a length of 5 (These are pre-configured in the GUI to maintain the
na l
simplicity and beautifulness of the diagram). Below is the principle of plotting water samples onto the frame by the GUI. There are three pairs of coordinates for a water sample point in Piper diagram. The coordinates in the left triangle are represented as (xl, yl), the
Jo ur
coordinates in the right triangle are represented as (xr, yr), and the coordinates in the middle diamond shaped zone are represented as (xm, ym), respectively. (xl, yl) is the intersection point of line ① and ② in Fig. 2a, whose equations can be illustrated as follows, respectively. yl
3( xl
yl
3 rMg 2
rCa 1)
(1)
Where, rCa and rMg denote the lengths of the point projected on the axes ‘Ca’ and ‘Mg’, respectively, which can be expressed as follows.
rMg
5cMg
f
5cCa
(2)
oo
rCa
pr
Where, cCa and cMg denote the concentrations of Ca2+ and Mg2+ for the sample, respectively, expressed in meq/L. It should be noted that although the calculation of the coordinates are based on ion concentration expressed in meq/L, the units for the ions in the imported excel file should be expressed in mg/L.
1 5cCa
yl
5 3 cMg 2
5 cMg 2
Pr
xl
e-
The GUI system can transform the units inside automatically. Introduce formula (2) into (1), the point coordinates in the left triangle (xl, yl), can be calculated.
(3)
yr
5 cSO 5cCl 2 4 5 3 cSO4 2
1
Jo ur
xr
na l
Similarly, the point in the right triangle, (xr, yr), can be calculated as
(4)
Where, cSO4 and cCl denote the concentrations of SO42− and Cl− for the sample, respectively, expressed in meq/L. Formula (4) is the intersection point of line ③ and ④ in Fig. 2a, with can be determined by the equations below. yr
3( xr
yr
5 3 cSO4 2
5cCl 1)
(5)
f
oo
After coordinates of the points in the left and right triangles are calculated, the coordinates of the point in the middle diamond shaped zone, (xm, ym), can
by the following formulae. 3xm
ym
yl
3xm
3xl
yr
(6)
3xr
e-
ym
pr
be further determined. It is the intersection point of lines ⑤ and ⑥ in Fig. 2a, and the location of the point in the diamond shaped zone can be determined
ym
1 2 3 1 ( yr 2
( yr
1 ( xr 2
xl )
1 3( xr 2
xl )
yl ) yl )
Gibbs diagram
(7)
na l
xm
Pr
By solving the two equations, the coordinates of the point in the diamond shaped zone, (xm, ym), can be computed.
Jo ur
Gibbs diagram consists of two sub-diagrams. The left one is the plot for TDS vs Na+/(Na++Ca+), while the right one is for TDS vs Cl−/(Cl−+HCO3−) (Gibbs, 1970; Chitsazan et al., 2019). The horizontal and vertical axes of the two sub-diagrams range from 0 to 1 and 1 to 100000, respectively, and the vertical axis is in logarithmic scale. The frame of Gibbs diagrams in the GUI is shown in Fig. 2b. The X and Y coordinates of the left sub-diagram range from 0 to 5 and 0 to 6.5, respectively, while the X and Y coordinates of the right sub-diagram range from 5.5 to 10.5 and 0 to 6.5, respectively. The coordinates of the points in the two sub-diagrams of Gibbs diagram are calculated as follows.
5
yl
1.3lg(TDS)
xr
5.5 5
yr
1.3lg(TDS)
cCl cHCO3
pr
(8)
(9)
e-
cCl
oo
f
cNa cNa cCa
xl
Where, (xl, yl) and (xr, yr) denote the coordinates of the water sample point in the left and right sub-diagrams; cNa, cCa, cCl and cHCO3 denote the concentrations
Pr
of Na+, Ca2+, Cl− and HCO3− of the water sample, respectively, which are expressed in meq/L. USSL diagram
na l
USSL diagram is used to assess the water quality for irrigation purpose (Li et al., 2016). The horizontal and vertical axes of the diagram are electric conductivity (EC, μs/cm) and SAR, ranging from 100 to 12000 and 0 to 40, respectively. The horizontal axis of USSL plot is in logarithmic scale (USSL,
Jo ur
1954; Bhakar and Singh, 2019). The frame of the USSL diagram in the GUI is shown as Fig. 2c, with the lengths of X and Y axes ranging from 0 to 10. The coordinates of the water sample point can be calculated as follows.
10 (lg EC 2) 1 lg12 1 y SAR 4
x
(10)
Where (x, y) denotes coordinates of the water sample point; EC denotes the electric conductivity of the water sample expressed in μs/cm; SAR denotes the
SAR
cNa cCa
(11)
cMg
f
oo
sodium absorption, which can be computed as follows (USSL, 1954; Omonona et al., 2019):
pr
2
e-
Where cNa, cCa, and cMg denote the concentrations of Na+, Ca2+ and Mg2+ of the water sample, respectively, expressed in meq/L. Wilcox diagram
Pr
Wilcox diagram is used to assess the irrigation water quality by relating EC and soluble sodium percentage (%Na). The horizontal axis of Wilcox diagram is EC (μs/cm) ranging from 100 to 12000, and the vertical axis is %Na ranging from 0 to 100%. Fig. 2d shows the frame of Wilcox diagram in the GUI. Both
na l
the X and Y axes range from 0 to 10 in length, and the coordinates of the water sample point in the USSL diagram can be calculated as follows:
1 EC 500 1 y (%Na) 10
x
Jo ur
(12)
Where, (x, y) denotes the coordinates of the water sample point; %Na denotes the soluble sodium percentage, which can be calculated as follows (Rezaei and Hassani, 2018): %Na
cNa
cK
cNa cCa
cMg
100
The concentrations of cations should be expressed in meq/L.
(13)
f oo
PI classification diagram
PI classification diagram is used to assess the effect of long-term irrigation water on soil permeability which is influenced by Na+, Ca2+, Mg2+ and HCO3−.
pr
The horizontal axis of PI classification diagram is permeability index (PI), which ranges from 120 to 0. The vertical axis is the total concentration (meq/L) of
e-
Na+, Ca2+, Mg2+ and HCO3− in the water sample, ranging from 0 to 60. The frame of PI classification diagram in the GUI is shown as Fig. 2e, with the lengths of the X and Y axes ranging from 0 to 6. The coordinates of the water sample point can be calculated as
1 PI 6 20 1 y TC 10
Pr
x
(14)
na l
Where, (x, y) denotes the coordinates of the water sample points in the GUI; TC denotes the total concentration of Na+, Ca2+, Mg2+ and HCO3− in the water sample expressed in meq/L; PI denotes the permeability index influenced by Na+, Ca2+, Mg2+ and HCO3−, and can be computed as (Doneen, 1964; Elango and
PI
cNa cNa
Jo ur
Ramesh, 2012)
cHCO3
cCa
cMg
100
(15)
Where, the concentrations of cations are expressed in meq/L. Function modules supporting the GUI
The GUI generally consists of four function modules: (1) underlying code to set up the general framework of the GUI; (2) module for selecting the frames
f
oo
of the diagrams; (3) module to plot points onto the frames of the diagrams; and (4) auxiliary function modules.
The underlying code of the GUI is named ‘HGCD’, which is designed to generate the GUI controls in the specified location with different callbacks. The
pr
callbacks of the GUI controls contain all the other functions for the interface.
e-
The function module used for drawing the frame of the diagrams in the GUI is named as ‘xxx_frame’, in which the ‘xxx’ represents the titles of the diagrams. The module requires one input argument used to determine the font size in the diagram. The argument is a positive number. As this interface is
Pr
designed for the fast drawing of commonly used hydrogeochemical diagrams, the frame drawn by the interface is fixed in the dialog of the interface. However, the code of the function module can be adjusted if the user wants to change the frame properties.
na l
The module used to plot points onto the frame of a given diagram is named as ‘xxx_add_points’, where the ‘xxx’ is the name of the diagram. There are six input arguments for this function module. The first input argument is a matrix with a dimension of m×10, where m denotes the quantity of water samples,
Jo ur
and ‘10’ demotes the number of water quality parameters considered for drawing the diagrams, i.e. Na+, K+, Ca2+, Mg2+, Cl−, SO42−, HCO3−, CO32−, TDS and EC. The unit of EC is μs/cm and for other parameters the unit is mg/L. The second input argument is a series of strings used for determining the types of the symbols, and the strings are listed in Table 1. The third input argument is a series of strings used to determine the edge colors of the symbols. The fourth input argument is a positive number for determining the symbol size. The fifth input argument is a series strings to determine whether the symbols should be filled with colors, with ‘yes’ indicating filling the symbol with color while ‘no’ indicating not. The last input argument is a series of strings determining the filled
f
oo
colors. The strings representing different colors are listed in Table 2. The strings indicating symbol types and colors are also introduced in the codes of the modules in detail. It is available to users when opening the help file ‘help xxx_frame’ (xxx indicates the name of the diagram) in the command window of
e-
pr
MATLAB software.
Pr
Table 1 should be placed here
na l
Table 2 should be placed here
There are three auxiliary functions for the GUI. One of it is named ‘draw_arrow’. This function is designed to draw arrow from one point towards
Jo ur
another. Two input arguments are required: the coordinates of the starting point and the coordinates of the ending point of the arrow to be drawn. This auxiliary function can be used in drawing the arrows in the Piper diagram. Another auxiliary function is named as ‘HGCD_inputdata’. This function is designed to import the water sample data into the GUI. The last auxiliary function is named as ‘draw_line’. This function is designed to draw line from one point to another. More details of the functions are accessible in the code file of the function modules. External Structure of the GUI
oo
f
After setting the path of the GUI to MATLAB, the HGCD interface can be opened by a command ‘HGCD’, as shown in Fig. 4. The interface can be mainly divided into two sections: the plot section and the operation section. The plot area is an axes control area, while the operation section occupies the rest
pr
part of the main screen of the GUI. The main controls distributed in the operation section includes: (1) a click button named as ‘Import data’ used to import
e-
water sample data into the interface; (2) a drop list menu below words ‘Selection figure’ including selections of ‘none’, ‘Piper’, ‘Gibbs’, ‘USSL’, ‘Wilcox’ and ‘PI class’, which is designed to select the pre-configured frame of the selected diagrams; (3) an editable box after words ‘Point size’ used to configure the
Pr
size of symbol to be plotted; (4) two drop list menus below phrases ‘Point edge color’ and ‘Point fill color’ used to determine the edge and filled colors of the symbols to be plotted; (5) a click button titled as ‘Add point’ designed to plot points representing water samples; (6) a click button named as ‘Clear’ to clear
na l
the plot zone; (7) a click button with title ‘Save figure’ to export the figure shown in the plot area of the interface; (8) a click button titled as ‘Exit’ to close the
Jo ur
interface.
Fig. 4 should be placed here
Validation of the GUI
To verify the applicability and practicality of the interface, the Piper diagram, Gibbs diagram, USSL diagram, Wilcox diagram and PI classification
f
oo
diagram were generated using two sets of water quality data by the GUI proposed in this study and existing software commonly used. Piper diagram was produced by the software ‘AqQa’, and others were plotted by the software ‘Origin’. The data used are listed as Table 3. As illustrated by Figs. 5 to 7, the
pr
diagrams produced by the interface (Figs. 5a, 6a, 7a, 7c and 7e) are the same with the results obtained by ‘AqQa’ and ‘Origin’ (Figs. 5b, 6b, 7b, 7d and 7f).
e-
That is to say, the GUI can generate the same hydrochemical diagrams with commercial software. However, the GUI has some advantages compared to commercial software. First, the GUI is and open-source code and can be shared among hydrochemical researchers. This is especially helpful for those
Pr
researchers without enough funding. Second, it takes more than thirty minutes to calculate the associated indices to draw the five diagrams through software ‘AqQa’ and ‘Origin’, and lots of property settings such as line width, symbol size and color options must be done after generating the diagram. It takes less
na l
than three minutes using the GUI to develop the five diagrams, because it requires the users to import the input date only once, and users do not need to set the properties of the diagrams manually. Most importantly, users can generate the five diagrams within just one piece of software, which reduce the financial
Jo ur
burden for users to buy different types of software. Overall, the GUI proposed in this study is reliable and convenient. It is highly recommended for fast-drawing of hydrogeochemical diagrams.
Table 3 should be placed here
f oo
Fig. 5 should be placed here
e-
pr
Fig. 6 should be placed here
Pr
Fig. 7 should be placed here
Conclusions
na l
In this study, a MATLAB based GUI, Hydrogeochemical Diagram (HGCD), was developed to plot quickly five commonly used hydrogeochemical diagrams (Piper diagram, Gibbs diagram, USSL diagram, Wilcox diagram and PI classification diagram). With concise structure, simple operation and high
Jo ur
reliability, the interface saves users lots of time in drawing these diagrams. Additionally, all the codes of the interface and functions included can be accessed as an open source and can be adjusted by the users according to their requirements. The GUI is highly recommended to hydrogeochemical researchers, and interested readers can contact the authors to get access to this free, effective and efficient hydrogeochemical tool.
Disclosure statement
f pr
oo
No potential conflict of interest was reported by the authors.
e-
Acknowledgements
The authors are grateful for the constructive and helpful comments from the editors and reviewers that improve the quality of this paper. This research was
Pr
financially funded by the National Natural Science Foundation of China (41602238, and 41761144059), the Special Funds for Basic Scientific Research of Central Colleges (300102299301), the Fok Ying Tong Education Foundation (161098), the General Financial Grant from the China Postdoctoral Science
na l
Foundation (2015M580804 and 2016M590911), the Special Financial Grant from the China Postdoctoral Science Foundation (2016T090878 and 2017T100719), the Special Financial Grant from the Shaanxi Postdoctoral Science Foundation (2015BSHTDZZ09 and 2016BSHTDZZ03), and the Ten
Jo ur
Thousand Talent Program (W03070125).
f oo
References
pr
Adimalla, N., Li, P., 2019. Occurrence, health risks, and geochemical mechanisms of fluoride and nitrate in groundwater of the rock-dominant semi-arid
e-
region, Telangana State, India. Human and Ecological Risk Assessment 25 (1-2), 81-103. https://doi.org/10.1080/10807039.2018.1480353
https://doi.org/10.1007/s11053-018-9405-4
Pr
Bhakar, P., Singh, A.P., 2019. Groundwater Quality Assessment in a Hyper-arid Region of Rajasthan, India. Natural Resources Research 28 (2), 505-522.
Chitsazan. M., Aghazadeh, N., Mirzaee, Y., Golestan, Y., 2019. Hydrochemical characteristics and the impact of anthropogenic activity on groundwater
na l
quality in suburban area of Urmia city, Iran. Environment Development and Sustainability 21 (1), 331-351. https://doi.org/10.1007/s10668-017-0039-1 Davraz, A., Özdemir, A., 2014. Groundwater quality assessment and its suitability in Çeltikçi plain (Burdur/Turkey). Environmental Earth Sciences 72,
Jo ur
1167-1190. https://doi.org/10.1007/s12665-013-3036-1
Doneen, L.,D., 1964. Notes on water quality in agriculture. Published as a Water Science and Engineering, paper 4001, Department of Water Science and Engineering, University of California.
Elango, L., Ramesh, K., 2012. Groundwater quality and its suitability for domesticand agricultural use in Tondiar river basin, Tamil Nadu, India. Environmental Monitoring and Assessment 184 (6), 3887-3899. https://doi.org/10.1007/s10661-011-2231-3
f
oo
Gibbs, R.J., 1970. Mechanisms controlling world water chemistry. Science 17, 1088–1090. https://doi.org/10.1126/science.170.3962.1088 He, S., Wu, J., 2019. Hydrogeochemical Characteristics, Groundwater Quality, and Health Risks from Hexavalent Chromium and Nitrate in Groundwater of
pr
Huanhe Formation in Wuqi County, Northwest China. Exposure and Health 11, 125-137. https://doi.org/10.1007/s12403-016-0193-y
e-
He, X., Wu, J., He, S., 2019. Hydrochemical characteristics and quality evaluation of groundwater in terms of health risks in Luohe aquifer in Wuqi County of the Chinese Loess Plateau, northwest China. Human and Ecological Risk Assessment 25 (1-2), 32-51. https://doi.org/10.1080/10807039.2018.1531693
Pr
Li, P., Wu, J., Qian, H., 2016. Hydrochemical appraisal of groundwater quality for drinking and irrigation purposes and the major influencing factors: a case study in and around Hua County, China. Arabian Journal of Geosciences 9, 15. https://doi.org/10.1007/s12517-015-2059-1
na l
Li, P., Feng, W., Xue, C., Tian, R., Wang, S., 2017. Spatiotemporal Variability of Contaminants in Lake Water and Their Risks to Human Health: A Case Study of the Shahu Lake Tourist Area, Northwest China. Exposure and Health 9, 213-225. https://doi.org/10.1007/s12403-016-0237-3
Jo ur
Li, P., Wu, J., Tian, R., He, S., He, X., Xue, C., Zhang, K., 2018a. Geochemistry, Hydraulic Connectivity and Quality Appraisal of Multilayered Groundwater in the Hongdunzi Coal Mine, Northwest China. Mine Water and the Environment 37, 222-237. https://doi.org/10.1007/s10230-017-0507-8 Li, P., He, S., Yang, N., Xiang, G., 2018b. Groundwater quality assessment for domestic and agricultural purposes in Yan’an City, northwest China: implications to sustainable groundwater quality management on the Loess Plateau. Environmental Earth Sciences 77, 775. https://doi.org/10.1007/s12665-018-7968-3
oo
f
Li, P., He, X., Guo, W., 2019a. Spatial groundwater quality and potential health risks due to nitrate ingestion through drinking water: A case study in Yan’an City on the Loess Plateau of northwest China. Human and Ecological Risk Assessment 25 (1-2), 11-31. https://doi.org/10.1080/10807039.2018.1553612
pr
Li, P., Tian, R., Liu, R., 2019b. Solute Geochemistry and Multivariate Analysis of Water Quality in the Guohua Phosphorite Mine, Guizhou Province, China.
e-
Exposure and Health 11, 81-94. https://doi.org/10.1007/s12403-018-0277-y
Masouml, M., Gharale, M.H.M., Ahmadzadeh, H., 2019. Assessment of groundwater quality for the irrigation of melon farms: a comparison between two
Pr
arable plains in northeastern Iran. Environmental Earth Sciences 78, 214. https://doi.org/10.1007/s12665-019-8187-2 Morris, M.D., Berk, J.A., Krulik, J.W., Eckstein, Y., 1983. A Computer Program for a Trilinear Diagram Plot and Analysis of Water Mixing Systems.
na l
Groundwater 21 (1), 67-74. https://doi.org/10.1111/j.1745-6584.1983.tb00706.x Omonona, O.V., Amah, J.O., Olorunju, S.B., Waziri, S.H., Ekwe, A.C., Umar, D.N., Olofinlade, S.W., 2019. Hydrochemical characteristics and quality
Jo ur
assessmentof groundwater from fractured Albian carbonaceous shale aquifers around Enyigba-Ameri, southeastern Nigeria. Environmental Monitoring and Assessment 191 (3), 125. https://doi.org/10.1007/s10661-019-7236-3 Piper, A.M., 1994. A graphic procedure in the geochemical interpretation of water-analysis. Transactions American Geophysical Union 25 (6), 914–928. https://doi.org/10.1029/TR25i 006p0 0914 Rao, N.S., 1998. MHPT.BAS: a computer program for modified Hill-Piper diagram for classification of ground water. Computers & Geosciences 24 (10),
f oo
991-1008. https://doi.org/10.1016/S0098-3004(98)00083-1
Rasul, A.K., 2019. Hydrochemistry and quality assessment of Derbendikhan Reservoir, Kurdistan Region, Northeastern Iraq. Arabian Journal of Geosciences
pr
12, 312. https://doi.org/10.1007/s12517-019-4438-5
e-
Rezaei, A., Hassani, H., 2018. Hydrogeochemistry study and groundwater quality assessment in the north of Isfahan, Iran. Environmental Geochemistry and Health 40 (2), 583-608. https://doi.org/10.1007/s10653-017-0003-x
Pr
Srivastava, S.K., 2019. Assessment of groundwater quality for the suitability of irrigation and its impacts on crop yields in the Guna district, India. Agricultural Water Management 216, 224-241. https://doi.org/10.1016/j.agwat.2019.02.005
na l
Tian, R., Wu, J., 2019. Groundwater quality appraisal by improved set pair analysis with game theory weightage and health risk estimation of contaminants for Xuecha drinking water source in a loess area in Northwest China. Human and Ecological Risk Assessment 25 (1-2), 132-157.
Jo ur
https://doi.org/10.1080/10807039.2019.1573035
United States Salinity Laboratory (USSL), 1954. Diagnosis and improvement of saline and alkali soils. US department of Agriculture (USDA), Washington, pp 69-81, Agriculture handbook 60
Wu, C., Wu, X., Qian, C., Zhu, G., 2018. Hydrogeochemistry and groundwater quality assessment of high fluoride levels in the Yanchi endorheic region, northwest China. Applied Geochemistry 98, 404-417. https://doi.org/10.1016/j.apgeochem.2018.10.016
f
Jo ur
na l
Pr
e-
pr
oo
Wilcox, L.V., 1948. The quality of water for irrigation use. US Department of Agriculture, Washington, Tech Bull 1962
f oo
Figure Captions
Jo ur
na l
Pr
e-
pr
Fig. 1 Form of input data (Tables a and b have different column orders)
Fig. 2 General frames of a. Piper diagram, b. Gibbs diagram, c. USSL diagram, d. Wilcox diagram and e. PI classification diagram in the GUI
na l
Jo ur
oo
pr
e-
Pr
f
f oo
Jo ur
na l
Pr
e-
pr
Fig. 3 The main screen of the MATLAB based GUI
Fig. 4 Validation of the GUI. a) Piper diagram generated by the GUI. b) Piper diagram produced by AqQa
na l
Jo ur
oo
pr
e-
Pr
f
f oo
Jo ur
na l
Pr
e-
pr
Fig. 5 Validation of the GUI. a) Gibbs diagram produced by the GUI, b) Gibbs diagram generated by Excel and origin
na l
Jo ur
oo
pr
e-
Pr
f
f oo
Fig. 6 Validation of the GUI. a, c and e are USSL diagram, Wilcox diagram and PI classification diagram produced by the GUI., and b, d and f are generated
Jo ur
na l
Pr
e-
pr
by Excel and origin
na l
Jo ur
oo
pr
e-
Pr
f
na l
Jo ur
oo
pr
e-
Pr
f
Point type
Marker
.
point
•
o
circle
○
x
cross
×
+
plus
+
*
star
*
s
square
□
d
diamond
◇
v
down-triangle
▽
^
up-triangle
△
<
left-triangle
◁
>
right-triangle
▷
f e-
Pr na l
Jo ur
p
pr
String
pentagram
☆
oo
Table 1 Strings for different symbol types in MatLab
f oo
Table 2 Strings for different colors in MatLab r
g
b
k
w
c
m
y
Color
red
green
blue
black
white
cyan
magenta
yellow
Jo ur
na l
Pr
e-
pr
String
group 2
f
Ca2+
Mg2+
Cl−
SO42−
(mg/L)
(mg/L)
(mg/L)
(mg/L)
(mg/L)
(mg/L)
w01
323.5
43.8
69.1
10.6
356.3
w02
66.4
2.3
38.5
64.9
187.2
w03
200.6
48.8
31.3
13.9
w04
188.9
49.1
31.9
21.5
w05
114.4
36.4
52.9
w06
353.2
30.9
40.9
w07
311.2
52.9
42.1
w08
108.2
s01
71.6
s02
74.0
s03
140.5
s04
HCO3−
CO3−
TDS
EC
(mg/L)
(mg/L)
(mg/L)
(μs/cm)
pr
K+
65.9
0
1320
2012
184.4
40.3
0
593
1020
e-
435.2
308.3
93.4
0
840
1307
211.6
276.7
117.2
0
898
1402
Pr
175.5
65.6
234.0
221.9
186.7
0
838
1324
8.0
382.9
337.2
91.5
0
1262
2243
10.2
340.3
368.9
86.0
0
1126
1748
na l
group 1
Na+
Sample
1.7
21.7
30.7
55.3
115.3
241.6
0
482
911
16.6
87.8
60.4
141.8
232.9
244.1
0
784
1413
3.1
63.9
25.5
60.3
110.9
274.6
0
504
1134
7.1
73.3
37.3
131.2
215.2
289.8
0
796
1737
120.4
6.8
43.1
37.1
40.8
192.1
329.5
0
628
1202
s05
127.5
15.4
170.3
23.7
191.4
316.0
241.0
0
1040
1933
s06
199.8
24.4
51.1
51.7
234.7
230.5
262.4
0
952
1627
s07
297.9
2.6
30.6
35.9
372.3
215
74.8
0
1133
2036
s08
123.0
17.0
46.1
34.0
47.9
153.7
393.6
0
632
1197
Jo ur
Group
oo
Table 3 Water samples data used to verify the GUI
35