Keywords

1 Introduction

The availability and accessibility of water must be addressed from both qualitative and quantitative standpoints. A large number of factors may deteriorate the groundwater quality, including among others the expansion of the irrigation activities, industrialisation and urbanisation [1, 2]. A thorough and comprehensive evaluation of the negative impacts of all potentially hazardous activities is of paramount importance for the protection of groundwater bodies and ecosystems associated [3]. Compliance with standard regulatory normatives such as the European Water Framework Directive (WFD) requires continuous and intensive monitoring, thus resulting in large data sets of many potential physico-chemical parameters. Such data sets need to be routinely evaluated and interpreted by water agencies, stakeholders and assessors to provide answers to questions such as (a) the processes controlling the chemical composition of groundwater and the corresponding spatio-temporal distribution, including the delineation of the recharge area; (b) the water quality signature and how it may relate to the geological and hydrogeological setup along the travel path, as well as the soil use; and (c) the regional background composition of groundwater [4].

Water managers, stakeholders and decision-makers that are assigned with these tasks may face several difficulties. These may arise from (i) having to deal with large data sets, spanning many years; (ii) integrating data from different sources, gathered with different data access techniques and of eventually different formats; (iii) managing data with various degrees of accuracy and with different temporal and spatial extent; (iv) correlating groundwater quality information with other relevant information (e.g. geology, geophysics) so as to further investigate the underlying hydrogeochemical processes involved; and (v) integrating into the database the resulting interpretations and modelling efforts with the necessary documentation to be potentially used by third parties [5].

Handling and analysing such large amount of spatio-temporal information call for a unified database combined with a number of efficient technologies and methodologies capable of comparing, classifying and interpreting large data sets. Conventional methodologies, including preparation of hydrogeochemical diagrams, spatio-temporal representation of the data as well as uni- and multivariate analysis, are convenient tools for this purpose [6]. Nevertheless, the selection of the proper methodology for efficient chemical data handling is not straightforward and cannot be easily determined a priori because it depends on the type, quality, spatial distribution and potential use of data [7, 8]. Furthermore, the complexity and variety of processes associated with the vast amount of chemical species monitored hinder the analysis.

We present a software platform developed in a GIS environment for a comprehensive hydrogeochemical data analysis. It integrates a geospatial database that arranges all the available spatio-temporal dependent data into a coherent and logical structure and incorporates a set of analytical instruments that cover a wide range of methodologies for querying, interpreting and comparing groundwater quality parameters. It allows handling relevant auxiliary information (hydrology, geology, climate, etc.) in an efficient way, and it is coupled to a number of technologies such as hydrogeochemical modelling or geostatistical analysis. The software platform is here illustrated with a case study of the metropolitan area of Barcelona (Spain).

2 Background: Existing Software Instruments for Hydrogeochemical Analysis

Commercial and research instruments that assist the storage, handling, analysis and interpretation of hydrogeochemical data are found in different software packages. A short review of some of these existing packages is here presented.

Existing software that provide tools for correlation analysis, trend analysis and statistical analysis that enable the user to classify water samples include, without being exhaustive, SSPS [9] STATISTICA [10], SAS/STAT software [11] Stata [12], Minitab [13], Systat [14] or Microsoft Excel and MS Excel add-ins like BiPlot 1.1 [15].

Specific software packages include several methodologies to analyse and interpret hydrogeochemical data by means of the creation of classical diagrams and other calculations for ionic balance or ionic ratios. These include free software codes such as GW-Chart [16], EasyQuim [17], Piper SpreadSheet [18] or INAQUAS [19]. The last one also facilitates the classification of chemical species according to water quality norms. In particular, AqQA [20], apart from diagrams and ionic ratios, allows the comparison of samples to laboratory standards or regulatory limits. In the same line, Logicels [21] is a free software that performs convectional hydrogeochemical diagrams, calculation of ionic balance and statistical analysis but also includes additional features such as isotopic calculations and is linked to hydrogeochemical modelling software such as PHREEQC [22].

Other software includes tools and methodologies to manage and visualise hydrogeochemical data. Some examples are AQUACHEM [23], ChemPoint Professional Edition [24] and HyCA [25]. The last one includes a database and a map manager (visualisation aid) and facilitates the creation of diagrams, time series analysis and the creation of 3D and 2D maps (planar and cross sections) for all physico-chemical parameters included in the database. AQUACHEM has a fully customisable parameter database and a complete set of analysis, calculation and modelling tools. Additionally, it allows generating standard graphical plots and data visualisation by means of a combination of geological and hydrogeological maps; furthermore, it is coupled to PHREEQC. Finally, ChemPoint includes a variety of tools for entering the hydrochemical data in a structured database and allows the user to obtain different hydrochemical graphs and to obtain contour parameter concentration maps.

The need for a comprehensive management, visualisation and retrieval of spatio-temporal data has triggered the development of geographical information systems (GIS) applications to hydrogeology [26]. Due to advances in computer capabilities and data availability, a number of GIS-based applications have been developed since the turn of the century for hydrogeological analysis (e.g. [2729]). In two recent applications, both developed in a GIS environment [8] presented a method to map groundwater contaminant concentration distribution based on different interpolation techniques and [30] developed a spatial multi-criteria decision analysis software tool to select suitable sites for managed aquifer recharge (MAR). Another example of GIS-based application is ArcHydro Groundwater tools [31], coupling the ArcHydro Groundwater data model [32] with an ArcGIS [33] platform for managing, archiving and visualising hydrogeological information.

3 The Software Platform

The software platform was intended to perform a conventional hydrogeochemical analysis, including data check, diagrams and ionic ratios, and facilitate the visualisation, processing and interpretation of the hydrogeochemical data, including a number of capabilities: (1) all tools are directly programmed in a GIS environment as in-built utilities to allow for efficiency, and (2) it incorporates new instruments for hydrochemical analysis to combine diagrams, specific queries and calculations. We first present the technical requirements and specifications and in subsequent subsections how these specifications were implemented in the final software.

3.1 Design Specifications

  1. I.

    Management and storage of spatial features and time-dependent data on a geospatial database, supporting:

    1. 1.

      Management of different data derived from both field data, analysis of water samples at the laboratory and groundwater models (also representative scales are quite different)

    2. 2.

      Integration of different types of information (e.g. geological, meteorological, hydrological)

    3. 3.

      Standardisation and harmonisation of data, including specific mechanisms for facilitating data transcription, managing different formats, editing data and dealing with unit conversion

    4. 4.

      Exportation of archived hydrochemical data to be used as input in external software

  2. II.

    Data processing and analysis using:

    1. 1.

      GIS environment which provides tools to (1) estimate/validate the spatial distribution of the chemical/physical components; (2) generate spatio-temporal queries and calculations; (3) visualise and operate with different types of data settings; (4) create interactive mapping; (5) perform an effective assessment of the legitimacy, consistency and correlation of the input data; (6) apply index overlay techniques; and (7) allow for further analytical tools for spatial analysis, geostatistical analysis, etc.

    2. 2.

      Specific tools that facilitate the hydrogeochemical analysis by using data quality control and conventional graphical analysis techniques

    3. 3.

      Statistical tools to preprocess (e.g. detection and visualisation of outliers) and validate data (e.g. deletion of obvious transcription errors and of duplicates)

  3. III.

    Interaction with external software for further analysis:

    1. 1.

      Geostatistical software packages such as SGeMs [34] and GSLIB code [35]

    2. 2.

      Groundwater modelling packages such as TRANSIN [36, 37] and Visual TRANSIN [38]

    3. 3.

      Hydrogeochemical modelling packages such as PHREEQC, NETPATH [39] and MIX [40]

  4. IV.

    Post-processing instruments to facilitate the integration of the results obtained from analysing and interpreting the hydrogeochemical data included in the database in the same GIS environment or in an external platform

3.2 General Description

The requirements enumerated in the foregoing section were adopted as guidelines during the design of the present software platform. This platform is composed of a geospatial database (termed HYDOR) and a set of tools allowing graphical and statistical analysis of hydrogeochemical parameters divided into two modules (ArcGIS Tools and Statistical Tools) integrated in a graphical user interface (GUI) that coordinates its activities with several external software (ArcGIS, MS Excel, MS Access). A sketch of the graphical interface is shown in Fig. 1

Fig. 1
figure 1

Graphical user interface (GUI) of the software platform. It is composed of two main modules: ArcGIS Tools and Statistical Tools. Lower right inset shows a sketch representing the toolbar implemented in ArcMap (ArcGIS Tools) and its principal commands. Lower left inset shows the query form created to query the hydrogeochemical data of the HYDOR database for performing statistical analysis

3.2.1 Geospatial Database

The database HYDOR represents geospatial information based on the Personal Geodatabase structure provided by ArcGIS [7]. This is a MS Access database that can store, query and manage a vast multiformity of attribute data, geographical features, raster data, CAD data, surface modelling or 3D data, utility and transportation network systems, GPS coordinates and survey measurements [41].

This framework offers a comprehensive interface for geospatial data management and the possibility of exchanging geospatial data through XML, thus extending its interoperability [42]. Moreover, although the data model of the hydrogeological database described here was implemented within ArcGIS, most of these concepts are flexible enough to enable implementation into other platforms.

3.2.1.1 Description of Data Contained

The hydrogeological database is composed of different data sets that store a variety of spatial and nonspatial data necessary for a complete hydrogeological study. The data model of HYDOR is conceptualised in 8 main components: Geology (e.g. borehole lithological description, stratigraphic units, depth to bedrock), Geophysics (e.g. diagraphies), Hydrogeology (e.g. well descriptions, springs, pump rates, hydrogeochemical data), Hydrology (e.g. rivers, lakes, sea), Hydrometeorology (e.g. precipitation, temperature), Environment (e.g. protection zones), Regional Geography (e.g. topography) and Water Management Administration (e.g. River Basin Districts). Each of these components is represented in the geospatial database by a feature data set composed of a group of feature classes (points, lines and polygons). In addition, several tables are used to represent and store the feature attributes and the measurements obtained. A complete description of this database can be found in [4345]; nevertheless a summary of the database components and their main structural characteristics is given below for illustration purposes. A sketch of some of the components of the database related with the management of hydrochemical data can be visualised in Fig. 2.

Fig. 2
figure 2

Sketch showing the simplified conceptual diagram representing some contents of the HYDOR database related with hydrogeochemical data. The 1 and 1*. represent the cardinality of the relationship between tables

In HYDOR, each sample is associated to a point-type entity included in the feature class termed DB_Points. The main attributes of each point are the geographical coordinates with a description of the different names used to identify those points (potential different sources of data), the type of sampling point (e.g. well, spring, surface water body), point accessibility and other administrative information (e.g. owner).

Physico-chemical parameters together with its measured units are listed in a permissible value list (DB_LibChemParam). Organic and inorganic compounds, as well as isotopes, can be entered into the database. In addition, parameters, such as temperature, Eh, pH, electrical conductivity, alkalinity, etc., are correctly registered. Further information about existing standard normative (e.g. Water Framework Directive, Groundwater Directive, Nitrate Directive) is also included to allow classifying hydrogeochemical data according to given thresholds in the attribute tables DB_LibNorm and DB_LibchemParamNorm. Each sample is included in accordance with sampling date, campaign and depth in the table DB_ChemSample. Thereafter, hydrogeochemical measurements for each sample are stratified in accordance with sampling data analysis, parameter and value and are included as a table in DB_ChemMeasurements.

Besides, other relevant information such as sampling methodology, the characteristics of the measurement site (e.g. well properties), analysis protocol, classification and detection limits for different laboratories can be readily included in the database. Finally, information about the campaign (DB_Campaign), the project (DB_Project) and the original source of information references (DB_References) are structured and stored in the database.

3.2.1.2 Incorporating Data to the Database

The management system of the geodatabase enables importing information from different spatial or nonspatial databases or spreadsheets and in different formats. Massive digital data can be transferred to the geospatial database through the use of intermediate conversion tables or existing wizards of ArcGIS following an established entry protocol. If the data are handwritten, they should be introduced manually using assisted menus.

In order to avoid errors when introducing data and to improve data harmonisation, data control procedures were developed. For instance, several permissible value lists were introduced to facilitate encoding, following recommendations of the existing standards and directives such as geological data specifications of the European Directive INSPIRE [46], the OneGeology project [47], the Australian National Groundwater Data Transfer Standard [48], the Common Implementation Strategy for the Water Framework Directive (2000/60/EC) [49], GeoSciML [50], Water ML.2.0 [51] and the Observations and Measurements standard [52]. In addition, some classes and their attributes provided by those standards were imported to guarantee future data exchanges.

Besides, some validation checks can be performed to ensure consistency of the hydrochemical data, allowing the detection of erroneous data. Furthermore, the platform allows the visualisation and manipulation of censored values (concentrations of some compounds reported as ‘non-detected’, ‘less than’ or ‘greater than’ [6]). The user has the option to readily substitute the censored values by 0.5 times the detection limit (following [53]). It is noted that this procedure is not automatic and that the user can choose other methodologies to deal with censored values. Also, other utilities to facilitate the conversion of measurement units were developed to avoid inconsistencies among different data sets.

3.2.1.3 Querying the Spatio-temporal Data

To facilitate data retrieval and expedite the spatio-temporal data analysis, a set of GIS-based tools and other specific instruments were developed (see Sects. 3.2.2 and 3.2.3). Other spatial and nonspatial queries may also be generated from the geodatabase by employing the standardised MS Access query builder and/or by using the inherent capabilities of ArcGIS. Interested readers are referred to further documentation of ArcGIS and MS Access to make other queries.

3.2.2 GIS Tools

This set of analysis tools was developed as an extension of the ArcMap environment (ArcGIS; ESRI). They were created with ArcObjects, which is a developer kit for ArcGIS, based on Component Object Model (COM), and programmed in Visual Basic using the Visual Studio (Microsoft) environment (see [4345). They were intended to manage, visualise, analyse, interpret and pre- and post-process the hydrochemical data stored in the spatial database.

The toolkit has the form of a toolbar integrated into the ArcMap environment (see Fig. 1) and consists of five instruments: (I) Hydrogeochemical Calculator Tools, (II) Hydrogeochemical Diagram Tools, (III) Hydrogeochemical Data Analysis Tools, (IV) Normative Analysis Tool, (V) MIX Tools, (VI) EasyQuim Tools and (V) Hydrogeochemical Data Editor Tools. In addition, ArcGIS inherent commands such as add data and select together with the full menu of the extension of Geostatistical Analyst are integrated into the same customised toolbar. The reported tools are presented next.

3.2.2.1 Hydrogeochemical Calculator Tools

This application consists of a query form that allows the user to perform the following operations for a preselected data set:

  1. (a)

    Calculates charge balance error (CBE) for each sample stored in the database. If one of the major ions is not available for a given sample, this computation cannot be done. Nevertheless, some conventions and assumptions can be used in balancing the analysis such as the estimation of HCO3 concentration from alkalinity values.

  2. (b)

    Calculates ionic ratios: Mg/Ca, Na/K, SO4/Cl and Cl/HCO3, icb index (disequilibrium chlorides and alkaline index) and SAR index (sodium adsorption ratio).

  3. (c)

    Automatically converts all units to meq/L and calculates the relative percentage of a cation or anion.

  4. (d)

    Displays the results of queries in a customisable table in ArcMap, containing all the aforementioned calculations, available for being exported for further analysis into MS Word or MS Excel.

The selection of the hydrogeochemical data to be analysed is made in two steps. The first one involves selecting a set of points on the screen that represents water sampling locations (points from DB_Points). This can be done by using any of the available select commands (e.g. select by location, by attributes, etc.) provided by ArcGIS or else the command already integrated into the toolbar (select by rectangle). In the second step the user selects the sampling period or periods to be included in the query form.

3.2.2.2 Hydrogeochemical Diagram Tools

The graphical methods are designed to simultaneously represent the total dissolved solid concentration and the relative proportion of certain major ionic species. This set of instruments (represented by different buttons in the toolbar) was designed to facilitate the creation of standard hydrogeochemical diagrams for groundwater chemical analysis and interpretation. Piper, Schöeller-Berkaloff, salinity and modified Stiff diagrams can be created automatically for the selected data set (only if the data necessary for the creation of each diagram are available).

As with the Hydrogeochemical Calculator Tools, the selection of the data is done by clicking several points in the map for a given interval of time or else a given point and different periods of time. The resulting diagrams and the attached information (well, data and concentration values expressed in meq/L) can be visualised on the screen in a customisable table or exported as a text file (MS Word) or into MS Excel:

  1. (a)

    Stiff diagram command

    • This command enables generating individual diagrams for a water sample or Stiff diagram distribution on maps (Fig. 3). The Stiff diagram [54] is widely used to display the variation of several ions in the same map. However, when high variability in major ion concentrations exists, a tool to harmonise the size displayed in the map is necessary [55]. Taking this into account, the representation of the Stiff diagram in the map can be customised by selecting diverse concentration scales.

      Fig. 3
      figure 3

      Map representing the Stiff diagrams obtained for several aquifers located in the metropolitan area of Barcelona (Spain) for the samples collected during 2006–2007 (see also Sect. 4 for further explanations). This map was obtained with the aid of the Hydrochemical Diagram Tools. The base map was provided by IGC (Geological Survey of Catalonia). Coordinates are in Universal Transverse Mercator (UTM), zone 31

  2. (b)

    Piper diagram tool

    • This command enables us to obtain automatically Piper [56] diagrams for the selected samples (Fig. 4). The Piper diagram is a most widely graphical form and displays relative concentration of the major anions and cations on two separate trilinear plots, together with a central diamond plot where the points from the two trilinear plots are projected [6].

      Fig. 4
      figure 4

      Piper diagrams obtained by using Hydrochemical Diagram Tools for the samples collected during 2006–2007 and corresponding to the different study areas (see also Sect. 4 for further explanations): (a) BESÒS, (b) BCNCENTER, (c) BCNLLOB, (d) COLL and (e) BDN

  3. (c)

    Schöeller-Berkaloff diagram

    • This tool allows us to generate the Schöeller-Berkaloff logarithmic diagram (Fig. 5) for the selected samples. This diagram allows the major ions of many samples to be represented on a single graph, in which samples with similar trends can be detected.

      Fig. 5
      figure 5

      Schöeller-Berkaloff diagrams obtained by using Hydrochemical Diagram Tools for the samples collected during 2006–2007 and corresponding to the different study areas (see also Sect. 4 for further explanations): (a) BESÒS, (b) BCNCENTER, (c) BCNLLOB, (d) COLL and (e) BDN

  4. (d)

    Salinity diagram

    • This command generates automatically salinity diagrams. This diagram joins the calculated values of SAR index with the electrical conductivity and represents them in a single graph on a logarithmic scale.

3.2.2.3 Hydrogeochemical Data Analysis Tools

This tool allows using a set of methodologies for querying, interpreting and comparing physico-chemical parameters measured for the selected samples:

  1. (a)

    Analysing data. The query form enables the user to apply one or several query criteria (sampling point, sample, campaign, time interval, physico-chemical parameter) and to combine them for advanced queries on the data stored in the HYDOR geospatial database. Results of the query are shown in a list form where the user can also select the desired data for further queries (see following paragraphs) or else can be exported for further calculations or reporting into MS Excel or MS Word.

  2. (b)

    Generating maps. This command allows us to obtain the minimum, maximum, average and standard deviation for each selected parameter, for a given interval of time and for a point or a group of selected sampling points, and to represent these values in a map in shapefile format. The number of samples used to compute the statistics is also displayed in the map. Results can be used for further statistical and geostatistical analyses in the same ArcMap environment (using Geostatistical Analyst menu already integrated into the toolbar) or can be exported to other external platforms. Additionally, further useful representations such as maps of Pie diagram or Stacked charts for the selected parameters can be obtained by using the inherent commands of ArcMap.

  3. (c)

    Plotting graphs. This tool enables the user to explore whether correlations exist between two or more physico-chemical parameters, generating graphs where the temporal component is also added.

3.2.2.4 Normative Analysis Tool

This allows the user to obtain thematic maps for the queried parameters, classified according to the threshold approach established by a given guideline (e.g. Water Framework Directive). This enables identifying areas where some chemical species exceed a prespecified limit.

3.2.2.5 MIX Tool

MIX is an external code that allows the evaluation of mixing ratios using the concentration of samples assuming that these come from a mixing of recharge sources (known as end members) in an unknown proportion and fully accounting for data uncertainty.

The tool command allows obtaining the necessary information for the selected points and time intervals and transfers automatically all the required information to the MIX software (see Fig. 6). The selection of hydrogeochemical data to be analysed by this software is performed in three steps: (1) point(s), (2) sampling campaigns and (3) end members.

Fig. 6
figure 6

Sketch showing the query form of the command MIX Tools

3.2.2.6 EasyQuim Tool

This command enables retrieving the information and exporting data into program EasyQuim, which is a free software developed as a plug-in in MS Excel (thus offering a great portability) to draw convectional graphical methods (Piper, salinity, Schöeller-Berkaloff and modified Stiff diagrams) as well as tables for CBE, icb index, SAR index and ionic ratios. Finally, the code supplies input data exportable to other GIS platforms to visualise Stiff diagrams.

3.2.2.7 Hydrogeochemical Data Editor Tools

This instrument enables visualising and editing information corresponding to a given sampling point by selecting it in the map. As a result, the user can consult and edit the type of sampling site (well, spring, river, etc.), the characteristics of the campaign (e.g. date, observations) and the measurements available at this point (data of sampling, parameters, etc.). The user can add new campaigns and new measurements associated to this sampling point using the same query form. The introduction of these data can be done massively using CVS files or ‘one by one’.

3.2.3 Statistical Tools

This set of tools enables the user to perform a complete statistical data analysis. Again, it offers a query form that allows choosing a time interval and a set of parameters or else an entire time series for one or more parameters (Fig. 1). The result of this query is automatically exported to an MS Excel spreadsheet. By using a set of commands, the following calculations can be generated for the selected data set:

  1. (a)

    Standard statistical analysis. This command provides a statistical univariate analysis: mean, standard deviation, minimum, maximum, variance, quartiles, kurtosis and skewness coefficient. It also creates histogram, scatter plots and box plots.

  2. (b)

    Parameter correlation matrix. This creates the R2 correlation coefficient as well as the covariance and correlation matrices of the selected parameters analysed two by two.

  3. (c)

    Bivariate statistical analysis. This generates correlation graphics for each pair of selected parameters.

Although this module operates independently (even though this module can be accessed directly from ArcMap using the tool termed Link to Statistical Tools included in the toolbar), the results obtained here can be exported to ArcGIS to perform additional analyses. Moreover, all the output from the Hydrochemical Data Analysis Tools and exported to MS Excel can be processed here for a more complete statistical analysis.

4 Application to the Metropolitan Area of Barcelona (Spain)

This software platform was used for the management and evaluation of the quality of groundwater in several study areas (e.g. [44, 45]) located in the metropolitan area of Barcelona (MAB), which is on the Mediterranean coast in NE Spain (Fig. 7). Geologically, MAB is formed by a coastal plain bounded by two deltaic formations and an elevated area, the Catalan Coastal Ranges. The Catalan Coastal Ranges (mainly Palaeozoic rocks) in this area display a NE-SW direction and are limited by NE-SW and NW-SE normal and directional faults [57].

Fig. 7
figure 7

Orthophotograph of the northeastern Mediterranean coast of Spain covering the extent of the study area (see red point in upper left inset for general location). The different sampled areas are also shown in the map together with the sampling points. Coordinates are in Universal Transverse Mercator (UTM), zone 31

The actual plain mainly consists of Quaternary formations that overlie the Pliocene series, mainly composed of marine blue marls and sandy marls [58, 59]. The Quaternary formation can be divided into lower Quaternary (locally termed tricicle) and upper Quaternary. The tricicle is made up of three cycles, from bottom to top, red clays, yellow silts and calcareous muds and calcrete [60]. The upper Quaternary is mainly constituted of torrential, alluvial and foothill deposits, where gravels and sands with a high proportion of clay matrix are present. Hydrogeologically, the Barcelona Coastal Plain can be regarded as an aquifer with a high vertical heterogeneity.

The Barcelona Coastal Plain separates the two deltaic formations (corresponding to rivers Besòs and Llobregat), which consist of two Holocene depositional systems that were also active during the Pleistocene [6163]. In general, these deltaic formations consist of Quaternary materials and have similar characteristics consisting of several aquifer units separated by less permeable units. Quaternary materials in the Besòs Delta overlie a substratum formed by rocks of Palaeozoic (slates and granite) and Tertiary (matrix-rich gravels and sandstones of Miocene age and massive grey marls attributed to the Pliocene) age. The Quaternary of the Llobregat Delta River mainly rests unconformably on Paleozoic to Pliocene deposits [62].

The aquifers of the MAB have been used for irrigation and for industrial purposes in recent decades, posing a serious threat to the quantity and quality of the groundwater resources of the study area. Moreover, this region presents a large number of underground infrastructures which compromises the quantity and quality of groundwater resources.

As an illustration of the potential of this software platform, a general analysis of the quality of the aquifers located in the MAB such as the Barcelona Plain, Badalona and Besòs Delta (see Fig. 7 for location) was chosen, based on a larger study funded by the Catalan Water Agency [64]. The application includes 56 samples (51 obtained from groundwater points) collected during 2006–2007 and distributed over the aforementioned study area. The sampling points can be grouped into five zones attending to its location in the aquifers of the study area as shown in Fig. 7: (1) Barcelona Llobregat (BCNLLOB), (2) Barcelona Ter (BCNTER), (3) Collserola (COLL), (4) Besòs (BESÒS) and (5) Badalona (BDN).

Among the 110 hydrogeochemical variables in the compiled database (physical parameters, organic and inorganic species), we selected only those with the highest frequency for a detailed evaluation (EC, pH, major ions—Ca, Mg, Na, K, Cl, SO4, HCO3, PO4, NO3, NH4—and some minor compounds). In addition, the geospatial database includes information on head measurements, pumping test results, geological description and meteorological and hydrological information.

The first step was to test the chemical analysis for charge balance error (CBE) by using the Hydrogeochemical Calculator Tools. In 95% of the samples, CBE was less than or equal to ±10%, an error found acceptable for the purpose of this study. Indexes such as SAR, icb and ion ratios were also calculated for each selected point by using this command.

The next step was to analyse the hydrogeochemical data by using geochemical techniques including spatio-temporal representation of the data, correlations of different species and graphical diagrams (Piper, Stiff, Schöeller-Berkaloff). This was accomplished by using the different commands of the Hydrogeochemical Diagram Tools and of the Hydrogeochemical Data Analysis Tools. The Stiff map (Fig. 3) shows that the samples present similar characteristics according to the hydrogeological zonation. Additionally, this map shows that in general terms the mineralisation of the water increases seawards.

From the analysis of the Schöeller-Berkaloff and Piper diagrams corresponding to the different zones (see Figs. 4 and 5), it can be concluded that:

  • The groundwater samples collected from springs and wells located at the high topographies (COLL) are low mineralised and present low contents of most compounds, due to the proximity of the recharge area and the possible contact with soils with low Mg and Ca content (see Figs. 4d and 5d).

  • The groundwater from the Barcelona Plain (grouped into BCNTER and BCNLLOB) can be classified as Cl-SO4-Na and becomes of Ca-Mg type, probably as a result of the interaction with the different geological formations (see Figs. 4b, c and 5b, c).

  • The samples from the Badalona area (BDN) are less mineralised in the higher areas. In the northern part of Badalona, mainly constituted by granite, the water can be classified as HCO3-Ca type. In the southern and central areas, the water can be classified as HCO3/Cl-Ca/Na type, probably as a result of cation exchange between sodium and calcium in the finer Quaternary alluvial deposits and an enrichment in Na in the granitic structures (see Figs. 4e and 5e).

  • The water from the wells located in the Besòs Delta (BESÒS) can be classified as Cl-SO4-Na. The samples collected from wells located near the sea show the highest content in Cl and Na, suggesting seawater intrusion (see Figs. 4a and 5a).

In order to evaluate the groundwater quality of the study area and to detect possible sources of contamination, several spatial distribution maps of a number of parameters were obtained by using other command of GIS Tools (see Fig. 8). They show that the concentrations in residual water contamination markers, such as nitrate and phosphate, are higher in the urbanised areas except for samples collected from deeper aquifers or in the proximity of the Besòs Delta, suggesting biodegradation in a reducing environment.

Fig. 8
figure 8

Map of nitrates concentration for the period 2006–2007

Additionally, further maps of minor compounds such as sum of pesticide concentrations or LAS (compounds found in detergents) were obtained (see Fig. 9). Pesticides were only detected in the proximity of Besòs Delta and in one sample in the Barcelona Plain area. Despite of the sum of pesticide concentrations not exceeding the limit established by the Water Framework Directive in any of the observed points, that of terbuthylazine exceeded the limits established for an individual substance in one point close to the river and in another sample collected directly from the river (for further information, see [65]).

Fig. 9
figure 9

Map of pesticides concentration for the period 2006–2007

In contrast with pesticides, LAS were detected in the majority of the samples analysed, including those collected from non-urban or high topographic areas, where the maximum detected was 0.8 μg/L. On the other hand, in the urban area the maximum value detected was 5.06 μg/L. Additionally, the values of LAS measured in the Besòs River (48 μg/L) and in the water treatment plant (from 147.34 to 117.62 μg/L) are even higher, suggesting that (1) aquifer recharge comes mainly from losses in the sewage system and the influence of the river and (2) the degradation process of these compounds is quite significant.

5 Conclusions and Discussion

The GIS-based software platform presented in this chapter offers a user-friendly environment with a wide range of automatic tools designed especially for the management, analysis and interpretation of hydrogeochemical data.

A key element of this platform is the HYDOR geospatial database that provides the following advantages: (1) a comprehensive storage and management of different types of hydrogeological spatio-temporal data, (2) the possibility of querying and visualising data simultaneously and (3) an efficient preprocessing of the hydrogeochemical data. The design of the database offers considerable flexibility since it may be extended and customised to other environments.

Despite the capacity of the database to store a vast amount of data, its consultation is made simple by using different multi-criteria query forms (ArcGIS Tools and Statistical Tools), which enhances the visualisation and analysis of hydrogeochemical data. The ArcGIS Tools module integrates a wide range of specific methodologies for hydrogeochemical analysis into a single GIS integrated framework. This includes: (1) multiple queries for comparing temporal and spatial groundwater parameters, (2) tools for calculating useful hydrogeochemical parameters, (3) instruments that enable the user to generate thematic maps for the parameters measured in the queried area classified according to the threshold values provided in a given guideline, (4) generation of plots with temporal evolution of preselected data for further geostatistical analysis and (5) creation of traditional hydrogeochemical diagrams, adding the spatio-temporal component, thus allowing the combined analysis of sampling points and campaigns.

These tools were implemented in the same ArcGIS software package, and their analysis potentially makes the most of the additional in-built instruments of this platform (e.g. geostatistical analyst tools, spatial analysis tools). Furthermore, ArcGIS fosters a shallow learning curve, easy maintenance and interoperability among different tools owing to its widespread adoption.

The platform integrates Statistical Tools that offer the possibility of performing a complete statistical analysis of data, including descriptive statistical analysis, bivariate analysis, generation of correlation matrix and correlation graphics. It also offers interoperability with external platforms such as EasyQuim or MIX. Moreover, with adequate adjustments this software platform could be easily linked to other programs such as PHREEQC or SGeMs, considerably increasing the variety of hydrogeochemical calculations.

The application of the database model (HYDOR) for the urban environment of Barcelona together with the hydrogeochemical analysis tools proved to be an efficient framework for groundwater studies, which can be easily updated and downscaled.