## 3 Materials and Methods
### Aquifer Geometry and Saltwater Intrusion  
The aquifer geometry is used to define boundary conditions in hydrogeological modeling and outlining saltwater intrusion to characterize transient groundwater features in coastal aquifers. We have used Leapfrog Geo v 6.0. software [54] for deriving the aquifer geometry model from discrete variables such as lithological information from boreholes and ERT data and ERT data for deriving a saltwater intrusion model. Geoelectrical electrical data was positioning first using a differential GRS1 GPS instrument (Topcon, Itabashi, Japan), and relative relief profiles of ERT cross-sections were converted into georeferenced elevation profiles using an earth digital elevation model provided by the Catalan Geographical and Geological Institute (ICGC). The elevation model has a 2 \(\times\) 2 m resolution and its estimated absolute vertical accuracy corresponds to an average mean quadratic error of 0.15 m in flat and low vegetation areas. Placing all this data in the same framework allowed to delimit the aquifer-aquiclude contact in the software. First, the ERT data contrasts--in the resistivity values--mark the boundary as 2D lines and provide great detail. Next, the 1D information from the boreholes reaching the substratum was incorporated. Finally, the geologic map data [41] were also integrated into the model to include the plan view contact of the two units as an additional boundary condition. Leapfrog workflow is based on an implicit modeling method and on creating contact surfaces between different lithologies. Afterward, these surfaces are activated, and they \"cut\" finite volume into respective units. Adopting this approach of starting with a finite volume and using contact surfaces to \"cut\" it into units means that, inherently, there will be no void space or overlapping volumes in the geological model. Leapfrog geo was also used to interpolate the ERT data. Leapfrog Geo uses FastRBFtm, a mathematical algorithm developed from radial basis functions (RBF). FastRBF employs the numerical or categorical data and parameters supplied to derive any one of a number \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**ID** & \begin{tabular}{c} **Number of** \\ **Profiles** \\ \end{tabular} & **Length (m)** & \begin{tabular}{c} **Electrode** \\ **Interval (m)** \\ \end{tabular} & \begin{tabular}{c} **Orientation to** \\ **Water Stream** \\ \end{tabular} \\ \hline P1 and P2 & 2 & 235 & 5 & \begin{tabular}{c} parallel and \\ transverse \\ oblique \\ \end{tabular} \\ P3 & 1 & 188 & 4 & \begin{tabular}{c} parallel and \\ transverse \\ \end{tabular} \\ P4, P5 and P6 & 3 & 235 & 5 & \begin{tabular}{c} parallel and \\ transverse \\ \end{tabular} \\ P7 & 1 & 94 & 2 & \begin{tabular}{c} transverse \\ parameter \\ parallel \\ \end{tabular} \\ P8 & 1 & 235 & 5 & \
\begin{tabular}{c} transverse and \\ parallel \\ parallel \\ \end{tabular} \\ P9 and P10 & 2 & 235 & 5 &
\begin{tabular}{c} transverse, \\ parallel \\ transverse, \\ parallel and \\ oblique \\ \end{tabular} \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Main characteristics of the ERT profiles (Port de la Selva). of variables to be modeled in 3D space. RBFs are a family of interpolation functions that were first introduced into the geological literature by [PERSON] [55] to interpolate scattered topographic data. RBF techniques have been considered good surface interpolators due to their attempt to honor raw data [56] and their ability to provide the smoothest surface of interpolation [57; 58], which is ideally suited for geological modeling [59; 60]. Implicit geologic modeling using RBFs is also comparable in quality to modeling using popular co-kriging approaches [61; 62]. ERT data were interpolated using this method inside the boundaries of the geological model created in the previous steps. Moreover, new information from borehole and resistivity data has been progressive, fast, and dynamically incorporated into the aquifer geometry and saltwater intrusion models using implicit modeling tools.