## 3 Materials and Methods  
### Electrical Resistivity Tomography  
In order to assess the thickness and lateral extent of the alluvial aquifer, an electrical resistivity survey (ERT) was conducted. The resistivity method is based on measuring the potentials between one electrode pair while transmitting DC between another electrode pair. The depth of penetration is proportional to the separation between the electrodes, and by varying the electrode separation, information is provided on the subsurface stratification. This geophysical technique can be considered the modern evolution of the classical geoelectrical methods, as the vertical electrical sounding. In fact, the physical principle is the same, but in this case, instead of using only four electrodes (two for energizing and two for measuring the potential generated), multiple electrodes that change function automatically are fixed in the soil surface. All possible combinations of electrode pairs are considered, resulting in a dataset of apparent resistivities at the so-called pseudo-depth at different locations. The large amount of data produced by multielectrode systems requires automated data handling and processing [44].  
Figure 4: Location of the electrical resistivity tomography profiles and boreholes (Port de la Selva).  
In the present study, the Wenner-Schlumberger array was used. The apparent resistivity for the array is given by \(\rho_{\text{a}}=\pi\text{m}(\text{n}+1)\cdot\text{a}\cdot\text{R}\), where R represents the resistance, a is the spacing between the potential electrodes, and n is the ratio of the distances between the current and potential electrodes [28]. The depth study range increases with increasing space between the current electrodes, whereas a shorter separation increases resolution [45].  
The software for the inversion of the ERT data was RES2 DInv [46]. The subsurface is divided into cells of fixed dimensions and the inversion procedure is based on the smoothness-constrained least-squares method. The resistivities are adjusted iteratively until a satisfactory agreement between the experimental data and the model responses is achieved, based on a nonlinear optimization technique by least-squares fitting [47]. During the inversion process, the root-mean-square value of the difference between experimental data and the updated model response is used as a criterion to assess the convergence.  
In the present paper, the smooth constraint method was selected, after making a comparison with the robust method. The method assumes the subsurface consists of a few homogeneous regions with a smooth interface between them. Such an inversion scheme is the logical choice where the subsurface comprises units with smooth boundaries in order to determine both layer boundary locations and layer resistivities accurately. Indeed, it produces models by minimizing the absolute value of data misfit, making it more efficient in removing noise compared to other inversion methods [48].  
The subsequent subsurface characterization using electrical conductivity or resistivity depends on several factors, such as soil water content, grain size distribution, porosity, and permeability. For instance, an air-filled void soil type will have higher geoelectrical resistivity values contrary to a water-filled void soil type [49].  
Resistivity decreases with increasing salinity. A high-salinity pore fluid has a greater concentration of ions available for conduction. Besides, igneous and metamorphic rocks typically have high resistivity values while resistivity decreases as grain size particles decrease in unconsolidated sediments.  
Lastly, the geological interpretation of the resistivity cross-section is performed incorporating, as far as possible, prior knowledge based on outcrops, supporting geophysical or borehole data, and any information gained from laboratory studies of the electrical resistivity of geological materials [50].