# Surface Formations Salinity Survey in an Estuarine Area of Northern Morocco, by Crossing Satellite Imagery, Discriminant Analysis, and Machine Learning

Youssouf El Jarjini, Moad Morarech, Vincent Valles, Abdessamad Touiouine, Meryem Touzani, Youssef Arjdal, Abdoul Azize Barry, Laurent Barbiero

► To cite this version:

Youssouf El Jarjini, Moad Morarech, Vincent Valles, Abdessamad Touiouine, Meryem Touzani, et al. Surface Formations Salinity Survey in an Estuarine Area of Northern Morocco, by Crossing Satellite Imagery, Discriminant Analysis, and Machine Learning. Soil Systems, 2023, 7 (2), pp.33. 10.3390/soilsystems7020033. hal-04119965

HAL Id: hal-04119965

https://hal.science/hal-04119965v1

Submitted on 10 Nov 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
<figure><img src="image_2.png" /></figure>

Article

# Surface Formations Salinity Survey in an Estuarine Area of Northern Morocco, by Crossing Satellite Imagery, Discriminant Analysis, and Machine Learning

Youssouf El Jarjini<fnref n="1" />, Moad Morarech <fnref n="1" /> ID, Vincent Valles <fnref n="2" />,<fnref n="3" />, Abdessamad Touiouine <fnref n="4" /> ID, Meryem Touzani <fnref n="5" />, Youssef Arjdal <fnref n="6" /> ID, Abdoul Azize Barry <fnref n="7" /> and Laurent Barbiero <fnref n="8" />,* ID

<figure><img src="image_3.png" /></figure>

check for
updates

**Citation:** El Jarjini, Y.; Morarech, M.; Valles, V.; Touiouine, A.; Touzani, M.; Arjdal, Y.; Barry, A.A.; Barbiero, L. Surface Formations Salinity Survey in an Estuarine Area of Northern Morocco, by Crossing Satellite Imagery, Discriminant Analysis, and Machine Learning. *Soil Syst.* **2023**, *7*, 33. https://doi.org/10.3390/soilsystems7020033

Academic Editor: Jarosław Zawadzki

Received: 25 February 2023

Revised: 5 April 2023

Accepted: 6 April 2023

Published: 8 April 2023

<figure><img src="image_4.png" /></figure>

**Copyright:** © 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

**Abstract:** The salinity of estuarine areas in arid or semi-arid environments can reach high values, conditioning the distribution of vegetation and soil surface characteristics. While many studies focused on the prediction of soil salinity as a function of numerous parameters, few attempted to explain the role of salinity and its distribution within the soil profile in the pattern of landscape units. In a wadi estuary in northern Morocco, landscape units derived from satellite imagery and naturalistic environmental analysis are compared with a systematic survey of salinity by means of apparent electrical conductivity (Eca) measurements. The comparison is based on the allocation of measurement points to an area of the estuary from Eca measurements alone, using linear discriminant analysis and four machine learning methods. The results show that between 57 and 66% of the points are well-classified, highlighting that salinity is a major factor in the discrimination of estuary zones. The distribution of salinity is mainly the result of the interaction between capillary rise and flooding by the tides and the wadi. The location of the misclassified points is analysed and discussed, as well as the possible causes of the confusions.

**Keywords:** estuary; salinity; zonation; satellite imagery; electromagnetic induction; discriminant analysis; machine learning

## 1. Introduction

Due to their very low altitude, estuarine areas are outpost regions exposed to climate change, one of the consequences of which is the rise in sea level [1–4]. They are not only subject to alternating tidal flooding twice a day, the amplitude of which varies according to astronomical cycles [5], but also to freshwater, which depends on the distribution of rainfall locally and in the river catchment. This results in gradients in the spatial distribution, intensity, and duration of flooding, making them extremely dynamic, complex, and particularly interesting environments to study [6].

In arid or semi-arid areas, these estuarine zones can have extreme ranges of soil and groundwater salinity, with salt being concentrated by evaporation during dry periods

<footnote n="1">¹ Laboratory in Applied and Marine Geosciences, Geotechnics and Georisk (LR3G) Faculty of Science Tetouan, Abdelmalek Essaâdi University, Tetouan 93002, Morocco</footnote>

<footnote n="2">² Laboratoire Environnement Méditerranéen et Modélisation des Agro-Hydrosystèmes, Université Avignon, 84000 Avignon, France</footnote>

<footnote n="3">³ Faculty of Sciences and Technics (FSTBM), Beni Mellal 523 000, Morocco</footnote>

<footnote n="4">⁴ Geosciences Laboratory, Faculty of Sciences, Ibn Tofail University, BP 133, Kénitra 14000, Morocco</footnote>

<footnote n="5">⁵ National Institute of Agronomic Research, Rabat 10060, Morocco</footnote>

<footnote n="6">⁶ Natural Resources and Sustainable Development Laboratory, Faculty of Sciences, Ibn Tofail University, BP 133, Kenitra 14000, Morocco</footnote>

<footnote n="7">⁷ Geoscience and Environment Laboratory, (LaGE), Department of Earth Sciences, Joseph KI-ZERBO University, Ouagadougou 7021, Burkina Faso</footnote>

<footnote n="8">⁸ Géoscience Environnement Toulouse, IRD, CNRS, UPS, OMP, Mixed Research Unit UMR5563, 14 Av. E. Belin, 31400 Toulouse, France</footnote>

<footnote>* Correspondence: laurent.barbiero@get.omp.eu</footnote>
while being exported from areas influenced by fresh river water [7]. This wide range of salinity is an original feature, but it can also lead to methodological difficulties in data processing in case of extreme values and strong gradients. Several factors are likely to disturb, temporarily or permanently, the balance of salt distribution in estuarine landscapes. These factors include short-term climatic factors, during rather dry years when freshwater inflow from the river will be moderate, or rather wet years with more significant freshwater inflow. There are also long-term climatic aspects, which modify the aridity of certain regions, and are already causing a rise in the seas and oceans, with the extension of the salt water wedge increasing in coastal areas [8,9]. On the scale of a few thousand years and in tropical areas, mangrove vegetation is developing that can accumulate sulphides [10]. During oxidation following marine regression, or following the artificial drainage of soils for land use, this potential acidity is likely to manifest itself, solubilise the carbonates present, and precipitate sulphate salts, which, within the profiles, are superimposed on the salts resulting from the direct evaporation of a salt water table [11,12]. Finally, there are anthropogenic effects, such as the development of estuarine areas through irrigated agriculture, which imposes a certain amount of freshwater pressure locally, but also through pumping of the saline water table and forced evaporation on the surface to exploit the salts. This brief overview highlights the diversity of processes that can lead to the distribution of salts in estuarine landscapes. Beyond a certain salinity threshold, which depends on the type of natural vegetation and its stage of development, plant growth and biomass production are impacted. Therefore, the spatial distribution of soil salinity is often highlighted by a specific zonation of different groups of halophilic vegetation, each group corresponding to a given level of salinity [13]. Similarly, the surface condition of the soil differs according to the duration and frequency of flooding periods. It is therefore possible to map the different vegetation zones or surface states using satellite imagery coupled with field surveys. Such a naturalistic landscape analysis incorporates, consciously or unconsciously, many factors. On the other hand, modern geophysical tools, and more particularly low-frequency electromagnetic induction, make it possible to measure soil salinity rapidly and to multiply georeferenced measurements in order to obtain an accurate salinity map [14]. These are documents based on few parameters, but many point measurements.

The aim of this work, carried out in a North African estuarine environment, is to determine how these two approaches can be correlated and to take advantage of their complementarity in order to better understand the processes behind the distribution of salts in this type of environment. In other words, the aim is to assess the importance of soil salinity in the zonation of the estuarine landscape. The two approaches will be compared, i.e., salinity mapping from in situ measurements on the one hand, and zonation of surface states, halophilic vegetation, and more generally, landscape analysis on the other. For this comparison, two families of methods will be used; on the one hand, the classical linear algebra methods, such as discriminant factor analysis, a widely proven mathematical method, and on the other hand, machine learning methods that free themselves from the constraint of linearity of the boundaries between the different environments in the data hyperspace.

## 2. Materials and Methods

### 2.1. *Study Area*

The study area (35°54′ to 35°65′ north and 5°87′ to 6°01′ west) is located on the Atlantic coast of the Tangier peninsula in northwestern Morocco. It has an area of about 16 km² in the estuary of Oued Tahaddart and its tributary Oued Mharhar. It is a low and marshy alluvial plain surrounded by hills, whose altitude varies from 50 to 228 m (Figure 1).

The geological context consists mainly of formations of the northwestern Rif related to the two Rifian structural domains, namely, the flysch domain represented by the Numidian, and the external domain by the Tangier unit, the internal Prérif and the Habt [15]. These formations are covered by more recent deposits made up of Neogene post-mantle biocalcarenites, upper Tortonian blue marls, Messinian sandy marls, lower Pliocene quartz
sands, then quaternary deposits constituting fluvial terraces and continental accumulation glaciers [15,16]. The marine quaternary is visible along the Atlantic coastline [17,18].

<figure><img src="image_5.png" /><figcaption>**Figure 1.** Study area in northern Morocco: (a) delimitation of five zones from satellite images and field observations; note the presence of salt exploitation sectors and the outlet of the watershed from the Haouta Ben Mediar hill (red arrow); (b) location of apparent electrical conductivity (ECa) measurement points. Coordinates are WGS84 in metre.</figcaption></figure>

The climate is typical of the western Mediterranean area, with a short, cold, rainy winter (November to April) and a dry, hot summer (May to September). Annual rainfall is relatively high, ranging from 655.8 to 765.3 mm [19], but irregularly distributed throughout the year with a maximum in December. The average annual temperature is 18.2 °C, with a maximum in August and a minimum in January (27.3 and 14.3 °C, respectively) [18].

The flow regime of the Oued Mharhar, with an average discharge of about 1 m³/s [20], is controlled by the rainfall regime. The alluvial plains of the wadi are periodically flooded by fresh water during floods, most notably when there is a combination of the arrival of atlantic depressions and high tidal coefficients around the equinoxes. During heavy rainfall events, freshwater flows prevent saltwater upwelling, whereas during dry periods, the wadi channels are invaded by marine waters towards upstream [21,22]. A survey of the study area was conducted based on Google Earth (USGS) images from 2003 to 2021, as well as on field observations, including a detailed floristic survey. Five areas were distinguished, namely:

1. A hilly area covered by xerophilous vegetation where permeable and well aerated sandy soils are developed;

2. A zone covered by halophytic plants. This zone actually includes several types of halophytic vegetation and several types of soil surface conditions, which vary spatially over short distances;

3. A non flooded saline bare soil zone;

4. A periodically flooded barren zone;

5. A frequently flooded barren zone (Figure 1a).

To this zonation, we must add some information likely to influence the distribution of salinity, such as the outlet of a watershed from the Haouta Ben Mediar hill to the south
of the area (Arrow on Figure 1), and the presence of two sectors of salt exploitation by pumping the water table, one old, the other still in activity. Field data acquisition was complemented by 60 salinity measurements in the water table, either from hand auger holes in the alluvial plain or from existing wells in the surrounding hills.

## 2.2. Soil Salinity Measurements

Soil salinity was assessed by low frequency electromagnetic induction with a portable electromagnetic conductivity meter type EM38B (Geonics Ltd., Ontario Canada) [14,23–26]. This instrument measures the apparent electrical conductivity of the soil (ECa) in mil- lisiemens per meter (mS m⁻¹). This cost-effective, noninvasive technique provides a high number of quantitative measurements that may be easily georeferenced and are therefore well suited to assess the temporal and spatial variability of soil salinity [27]. The device was used with both vertical (ECaV) and horizontal (ECaH) modes. Under these conditions, it is estimated that about 75% of the signal comes from the upper 1.8 metre and 1 metre of the soil, respectively [14]. The combination of these two measurement modes (ECaV/ECaH) therefore allows estimating the saline profile, either upward for lower values or downward for higher values [23,28]. The measurement range is 0 to 1000 mS m⁻¹. For values above 700 mS m⁻¹, a correlation was established for both, ECaV and ECaH, between measure- ments at the topsoil and at 0.7 m above ground, which was then applied to estimate ECa values over areas of high salinity. This procedure causes a loss of accuracy both in terms of ECa and of salinity gradient evaluation, but it allows the instrument to remain in a mea- surement range with a substantially linear response. The 4171 measurement points were georeferenced with an accuracy of about 2 to 3 m using GPS. They cover the whole study area with a variable density according to the lateral gradients of ECa values (Figure 1b), but also with higher density on pilot sites for further research (not presented in this work). The measurement campaign took place from August to September 2021, combining low tidal coefficients and low wadi flow in order to have a maximum surface of exposed soil.

## 2.3. Statistical and Geostatistical Tools

### 2.3.1. Normality Test

Shapiro–Wilks normality tests were performed on the salinity data, both raw and log-transformed, on the whole data set or separately on each of the five zones. In addition, quantile–quantile (QQ) plots were constructed to visually compare the residuals of each distribution to a normal distribution of the same mean and standard deviation [29]. The diagonal on these plots represents the normal character of the distribution. The closer the points of the studied data distribution are to the diagonal, the closer the distribution is to normality.

### 2.3.2. ECa Data Spatial Analysis

Sample variograms were calculated to describe the spatial structure of ECa and log(ECa) variables. Variograms were estimated from the formula:

$$ \gamma(h) = \frac{1}{2N(h)} \sum_{i=1}^{N(h)} (s(x_i) - s(x_i + h))^2, \quad (1) $$

where N(h) is the number of pairs of points, and s(x_i) and s(x_i + h) are the ECa or log(ECa) values at x_i and x_i + h. The analysis of the variograms was based on their standard characteristics, i.e., range, sill, and nugget effect. The directional variograms, for which point pairs are only included in the calculation of the semi-variance if they were within a 20 degree angular sector, were calculated to obtain a maximum range. The angle minimising the range was then refined by reducing the sector step to 4 degrees. A model variogram was fitted to the sample variograms using the least squares method. Finally, ordinary kriging was used to construct ECa or log (ECa) distribution maps.
#### 2.3.3. Discriminant Analysis

A discriminant analysis (DA) was performed to check whether each measurement point could be identified as belonging to one of the five zones from the ECa measurements alone. DA consists of finding a discriminant function that projects the points onto a line passing through the centroids of the scatter plots corresponding to each zone in an optimal direction in order to best discriminate these scatter plots. However, this proven method has two drawbacks. The first is the linear nature of the approach, which does not necessarily match the nature of the boundaries between the different zones in the data hyperspace. The second is that the effectiveness of the discrimination is assessed on the same dataset that was used to find the discriminant function, and not on a dataset that is independent of the analysis result. To overcome these two drawbacks, non-linear machine learning methods were also used [30].

#### 2.3.4. Machine Learning

Four widely used machine learning algorithms were compared to the discriminant analysis, namely (1) linear naïve Bayesian classification (NBC), a supervised learning algorithm used for classification, (2) K-nearest neighbours (KNN), a non-parametric, supervised learning classifier, which uses proximity to make classifications or predictions about the grouping of an individual data point, (3) K-means clustering (K-means), a distance-based algorithm that group the closest points to form a cluster, and (4) Gaussian mixture models (GMM), which assume that there are X Gaussian distributions, that each of these distributions represents a cluster and therefore groups the data points belonging to a single distribution. The latter two algorithms use the entire data set and distribute it into a given number of classes (here 5 classes). For the first two algorithms, the dataset was split into a training part and a test part. For this, the data were classified according to their electrical conductivity and every second sample (50%), every fourth sample (25%) and three out of four samples (75%) were chosen to form a training dataset, with the rest of the data used for cross-validation, i.e., to check the performance of the method in classifying the measurement points according to their area of belonging. In this way, each subset of the data covers the entire ECa salinity range. The machine learning algorithms used do not have a linearity constraint, i.e., they can accommodate non-linear (curvilinear) boundaries between different areas in the hyperspace of the data, and are therefore likely, if this is the case, to provide better results than discriminant analysis.

All calculations were performed with the XLStat software (addinsoft). A confusion matrix was used to validate the accuracy of the classification obtained by discriminant analysis or machine learning. Particular attention was then paid to the location of misclassified points according to each method used.

### 3. Results

Within the alluvial zone, the saline water table varies between 1 and 3 m in depth upstream of the study area, in the area covered by halophyte plants and bare soil, and between 0.5 and 1.5 m downstream, in the areas of periodic or frequent flooding. The ECa range was from 3 to 2842 mS.m⁻¹ and from 1 to 2310 mS.m⁻¹ with mean values of 1165 and 858 mS.m⁻¹ for vertical (ECaV) and horizontal (ECaH) mode measurements, respectively. The coefficient of variation (Cv) was 58% for ECaV and 60% for ECaH. The other statistical parameters (median, variance, and standard deviation) are presented in Table 1.
<table><caption>**Table 1.** Major statistics of the ECa measurements.</caption><thead><tr><th>Statistique</th><th>ECaV</th><th>ECaH</th><th>ECaV/ECaH</th></tr></thead><tbody><tr><td>N. of observations</td><td>4171</td><td>4171</td><td>4171</td></tr><tr><td>Minimum</td><td>3</td><td>1</td><td>0.20</td></tr><tr><td>Maximum</td><td>2842</td><td>2310</td><td>2.19</td></tr><tr><td>Median</td><td>1102</td><td>840</td><td>0.73</td></tr><tr><td>Mean</td><td>1165</td><td>858</td><td>0.71</td></tr><tr><td>Variance</td><td>459919</td><td>262159</td><td>0.01</td></tr><tr><td>Stand. deviation</td><td>678</td><td>512</td><td>0.10</td></tr><tr><td>Coef. of variation</td><td>0.58</td><td>0.60</td><td>0.14</td></tr></tbody></table>

The normality tests led to the rejection of the hypothesis of a normal distribution, both on the raw and the log-transformed data (Figure 2c,f). However, although the normality test was still negative, the Q-Q plots suggested that when each zone was analysed separated, the distribution of the log-transformed data approached normality as illustrated for the hills area (Figure 2,d) and the halophytes area (Figure 2b,e).

<figure><img src="image_6.png" /><figcaption>**Figure 2.** Quantile-quantile plots for (a–c) ECaV and (d–f) log (ECaV) for the whole study area (c,f), the hills area (a,c) and the halophytes area (b,e).</figcaption></figure>

Histograms for raw and log-transformed data on the whole area are presented in Figure 3.
<figure><img src="image_7.png" /><figcaption>**Figure 3.** Frequency distribution of data for (a) ECaV, (b) ECaH and (c) the ECaV/ECaH ratio.</figcaption></figure>

The average salinity values on each landscape unit were more or less contrasted. The range of salinity followed the succession hills < halophytes < bare soils < frequently flooded area < periodically flooded area (Table 2). While the hill zone was quite distinct, there was a significant overlap of ECa values for the halophyte zone and bare soil on the one hand, and for both flood zones on the other, both for the vertical (ECaV) and horizontal (ECaH) measurements.

<table><caption>**Table 2.** Means and standard deviations of ECaV and ECaH values (mS m⁻¹) for each zone of the estuary.</caption><thead><tr><th></th><th></th><th>Hills</th><th>Halophytes</th><th>Bare Soils</th><th>Frequent Flooding</th><th>Periodic Flooding</th></tr></thead><tbody><tr><td rowspan="2">ECaV</td><td>Mean</td><td>252</td><td>786</td><td>1034</td><td>1698</td><td>1792</td></tr><tr><td>Stand. Dev</td><td>355</td><td>320</td><td>242</td><td>285</td><td>393</td></tr><tr><td rowspan="2">ECaH</td><td>Mean</td><td>182</td><td>559</td><td>767</td><td>1268</td><td>1333</td></tr><tr><td>Stand. Dev</td><td>275</td><td>247</td><td>197</td><td>203</td><td>286</td></tr></tbody></table>

The raw and directional variograms at 58° and 148° for the vertical mode measurements ECaV and log (ECaV) are plotted in Figure 4. The variograms show periodic structures, which are consistent with the presence of spots. The smaller range for the 58° angle and the maximum range for the 148° perpendicular suggest that these spots
were roughly oriented along the wadi axis, i.e., parallel to the hydrological axis of the study area. For a study area of 16 km², the number of 4171 measurements corresponded to one measurement per 3832 m², i.e., on average, one measurement every 62 m. This value was much lower than the range, which was around 500 metres. The map calculation is therefore reliable.

<figure><img src="image_8.png" /><figcaption>**Figure 4.** (a)Variogram and adjusted spherical model for ECaV and log(ECaV) and (b) directional variogram for ECaV at angle 58° and its perpendicular at angle 148°.</figcaption></figure>

The resulting kriging maps of ECaV, ECaH, and ECaV/ECaH data are presented in Figure 5. There was an upstream-downstream salinity gradient, but also a lateral variation with the highest values concentrated at the edge of the alluvial plain, near the contact with the hilly areas. In this sector of highest salinity, the ECaV/ECaH ratio was rather low (1.3 to 1.35), reflecting an upward saline profile and capillary rise.

The results of the discriminant analysis and the confusion matrix in the classification of the points according to zones are presented in Tables 3 and 4. The best rate of well-classified points was obtained by considering the raw data (ECaV and ECaH), and the logarithm of the conductivity ratio log(ECaV/ECaH), which contains information on the vertical salinity gradient within the soil profiles. Under these conditions, the rate of well-classified points was 62.29%.

<table><caption>**Table 3.** Rate of points well-classified according to data conditioning (raw or log-transformed) and according to the consideration of the salinity gradient within the soil profiles (ECa ratio).</caption><thead><tr><th></th><th>ECaV And ECaH</th><th>ECaV, ECaH And ECaV/ECaH</th><th>ECaV, ECaH And log(ECaV/ECaH)</th><th>Log(ECaV) And log(ECaH)</th><th>Log(ECaV), Log(ECaH) And log(ECaV/ECaH)</th></tr></thead><tbody><tr><td>Well-classified</td><td>60.66%</td><td>59.22%</td><td>62.29%</td><td>56.39%</td><td>55.26%</td></tr></tbody></table>

<table><caption>**Table 4.** Results of the discriminant analysis using variables ECaV, ECaH, and log(ECaV/ECaH).</caption><thead><tr><th>From\To</th><th>Freq. Flooding</th><th>Per. Flooding</th><th>Halophytes</th><th>Hills</th><th>Bare Soils</th><th>Total</th><th>% Correct</th></tr></thead><tbody><tr><td>Freq. flooding</td><td>760</td><td>46</td><td>10</td><td>1</td><td>51</td><td>868</td><td>87.56%</td></tr><tr><td>Per. flooding</td><td>784</td><td>222</td><td>28</td><td>6</td><td>60</td><td>1100</td><td>20.18%</td></tr><tr><td>Halophytes</td><td>97</td><td>2</td><td>1008</td><td>87</td><td>135</td><td>1329</td><td>75.85%</td></tr><tr><td>Hills</td><td>16</td><td>3</td><td>100</td><td>537</td><td>31</td><td>687</td><td>78.17%</td></tr><tr><td>Bare soils</td><td>19</td><td>0</td><td>97</td><td>0</td><td>71</td><td>187</td><td>37.97%</td></tr><tr><td>Total</td><td>1676</td><td>273</td><td>1243</td><td>631</td><td>348</td><td>4171</td><td>62.29%</td></tr></tbody></table>
<figure><img src="image_9.png" /><figcaption>**Figure 5.** Salinity distribution map of the study area for (a) ECaV, (b) ECaH, and (c) ECaV/ECaH ratio.</figcaption></figure>

The points from the frequent flooding zone had the highest rate of good classification (87.56%). The hilly area also showed a good result, with 78.17% of well-classified points. This is the area with the lowest average salinity. On the other hand, the rate of well-classified observations was lower for the other zones, with many confusions between the bare soil zone and the halophyte zone, and a very poor discrimination of the sector with periodic flooding, with only 20.18% of well-classified points. The distribution of the misclassified points is presented in Figure 6. The points misclassified as belonging to the hill zone were mainly located in the north of the study area, i.e., at the immediate edge of the hill zone, in the first 300 m of the halophyte zone with lower salinity (Figure 6a). Points misclassified as belonging to the halophyte zone were mainly located in the bare soil zone, or along the steep salinity gradient between the hill zones and the other higher salinity zones. A similar distribution was observed for points misclassified as bare soil, mainly confused with the halophyte zone, but also numerous confusions with areas of periodic or frequent flooding. A concentration of confusions could be noted at the outlet of the watershed from the Haouta Ben Mediar hill (red arrow on Figure 6a). Concerning the flood zones, the points misclassified as belonging to the frequent flood zone were located on the former salt exploitation sector, or accompanied the drainage axes towards the halophyte zone. Again, a concentration of misclassified points accompanied the steep salinity gradient between the hills and the periodically flooded area.

Similarly, the results from the machine learning analysis are presented in Table 5. The best results were obtained with the Bayesian naive classification and 5 nearest neighbours algorithms and considering 75% and 25% of the points for training and testing, respectively (Figure 7). On the maps in Figure 7, the density of misclassified points was lower than in Figure 6 as the test sample was only 1042 points instead of the whole dataset for the other algorithms. The results presented by these two methods give very similar results, not only in terms of the percentage of well-classified points, but also in the detail of their location. There were many confusions along the high salinity gradient line, the points classified as belonging to the hilly area were mostly concentrated in the northern part of the halophyte area. The points classified as frequently flooded areas were mainly observed in the former salt exploitation area, and a few other misclassified points at the outlet of the Haouta Ben Mediar basin.
<figure><img src="image_10.png" /><figcaption>**Figure 6.** Position of points misclassified by the discriminant analysis: (a) misclassified as hills, halophytes and bare soils; (b) misclassified as periodic and frequent flooding.</figcaption></figure>

<table><caption>**Table 5.** Results of machine learning analysis using Gaussian mixture modelling (GMM), K-means clustering (K-means), K-nearest neighbors (KNN), and naive Bayesian clustering (NBC).</caption><thead><tr><th></th><th>GMM</th><th>K-Means</th><th>KNN</th><th>NBC</th></tr></thead><tbody><tr><td>Numb. test points</td><td>4171</td><td>4171</td><td>1042</td><td>1042</td></tr><tr><td>Well-classified</td><td>57.68%</td><td>58.71%</td><td>66.03%</td><td>66.03%</td></tr></tbody></table>

<figure><img src="image_11.png" /><figcaption>**Figure 7.** *Cont.*</figcaption></figure>
<figure><img src="image_12.png" /><figcaption>**Figure 7.** Position of misclassified points by: (a,b) the 5 nearest neighbors algorithm; (c,d) the naive Bayesian classification.</figcaption></figure>

# 4. Discussion

## 4.1. A relevant Zonation

The results show the existence of landscape units, each with its own distribution of ECa values, a phenomenon already observed in estuarine environments [31]. Indeed, the fact that the distribution of values is multimodal can be explained by the existence of several zones, each with its own distribution law, which is confirmed by distributions closer to normality when the zones are analysed separately (Figure 2). The hilly areas show a high ECaV/ECaH ratio (Figure 5c), which reflects a downward saline profile, and thus a leaching of salts to depth facilitated by the sandy soil texture. The other areas, on the other hand, have much lower ECaV/ECaH values, particularly the flooded areas. Due to their position further downstream, i.e., closer to the ocean outlet, the water table is close to the soil surface and capillary rise is important and contributes to an upward saline profile. In the periodic flooding zone, the redistribution of salts under the influence of inundation is less frequent, which confers a very high topsoil salinity. It is precisely in this area that people were building salt works for the exploitation of salt for several centuries.

## 4.2. An Effective Discrimination

Many studies aim at predicting salinity by crossing a set of satellite data combining biophysical indicators of vegetation, surface condition, and field measurements [32–34], but few studies focused on the importance of salinity in the zonation of natural or anthropised environments. In our estuary area, the results of the discriminant analysis show that about 62% of the points can be correctly located as belonging to one of the five zones based on the salinity values and the salt profile. The NBC and KNN machine learning algorithms perform slightly better. These results are remarkable considering that only two parameters ECaV and ECaH were measured, representing the salinity at different depths, but which are themselves highly correlated with each other (r² = 0.987). As a result, the information contained in the dataset is poor in terms of diversity, being limited to 1 or 2 parameters. These conditions are outside the usual framework of application of machine learning algorithms, which generally rely on a much larger number of parameters for discrimination [35–37].
Salinity and the salt profile are major parameters in the differentiation of the five zones of the estuary.

For the discriminant analysis, the best result is obtained from the raw data and the logarithmic transform of the salinity gradient information. The confusions concern areas with similar salinity ranges and a high degree of overlap (Table 2), with the two high-salinity inundation areas on the one hand, and the intermediate-salinity areas of bare soil or halophyte plants on the other. Taking into account the vertical salinity gradient within the soil profiles somewhat improves the discrimination. However, for hyper-saline environments, the measurement of the gradient from vertical versus horizontal salinities is less accurate for technical reasons, which does not allow the vertical salinity gradient parameter to play a more important role in the classification of these areas, where the capillary rise and redistribution of salts can be significant. However, it is an important criterion describing the operating differential between the zones. Upward gradients (lowest ECaV/ECaH) reflect areas where capillary rise is almost permanent, while flooding removes salts from the upper part of the soil profile or redistributes them within the profile itself, erasing the traces of capillary rise.

The area with a strong salinity gradient between the hilly area and the periodically flooded area concentrates a high proportion of poorly classified points. This can be explained by several factors. On the one hand, the location of the hill zone boundary, based on satellite imagery, is inaccurate by a few metres. On the other hand, the geo-referencing of the measurement points by GPS also has an inaccuracy which, together with the reading inaccuracy and the stability of the EM38 equipment, is responsible for the nugget effect observed on the variograms (Figure 4). An inaccuracy of a few metres can be accompanied by a very large variation in the electrical conductivity value in this sector with a strong salinity gradient, leading to class confusion.

The watershed outlet from the Haouta Ben Mediar hill is accompanied by a concentration of misclassified points in the flood valley to the southeast of the study area (red arrow in Figures 1, 6, and 7). This area appears darker on some of the satellite images consulted (between 2003 and 2021), but not permanently. In Figure 5a,b it can be seen that the outlet of the catchment extends into a lower conductivity axis within the floodplain. The lower ECa values are accompanied by lower ECaV/ECaH values. These observations suggest the presence of a coarser textured channel below the ground surface where the less mineralised water from the catchment area flows. This illustrates the presence of structure not readily identifiable by landscape analysis, revealed by systematic mapping, confirming the complementarity of approaches to better understand the mechanisms driving salinity distribution [28,38–40].

### 4.3. Linearity as a Low-Constraining Condition

The K-nearest neighbours (KNN) algorithm and the naive Bayesian classification (NBC) perform slightly better than the discriminant analysis when assigning the measurement points to the five zones of the estuary, which is not always the case in salinity class prediction studies [32,41]. This suggests that the linearity condition imposed by the discriminant analysis is not very restrictive, but this difference can be interpreted as the fact that the boundaries between zones in the data space are not linear, but curvilinear and irregular. The logarithmic transformation of the data, a procedure that would be more suitable for curvilinear boundaries, is monotonic and regular, and does not improve the result. On the other hand, machine learning methods, especially K-nearest neighbours, can cope with irregular boundaries between different areas in the data space [30], which might be the case in our study.

### 4.4. Factors Other Than Salinity and the Saline Profile

Salinity and salt distribution in the soil profile are key factors in the discrimination of the five estuary zones, but they are not the only factors responsible for the distribution of vegetation, including halophyte plant associations. The granulometry of the soil and
the frequency/duration of flooding determine the aeration status of the soil and its redox level. For the same salinity, better aerated environments will be likely to be colonised by vegetation, whereas highly reducing environments will be devoid of it [42–44]. The movement of sand transported to the surface by the wind according to the topography can modify the assessment of surface conditions when drawing the zonation. As a result, the distinction between halophyte and bare soil zones can be misjudged. It is important to note that the establishment of halophytic plants is not instantaneous. These plants are slow growing [45], despite high yields under cultivated and seawater-irrigated conditions [46]. Any change in salinity, which can be rapid, is not immediately accompanied by a change in vegetation cover. The river system is extremely active in estuarine environments. This was clearly visible on the satellite images consulted between 2003 and 2021. The position of the wadi and its meanders changes frequently, which notably blurs the zonation between frequent and periodic flooding zones. The same applies to the secondary hydrographic network and the tidal channels, which are generally fractal in structure [47,48] with vertical walls of about 1 metre. They can grow, expand, or fill in as the wadi wanders. This leads to a slow modification and readjustment of water and salt transfers in the landscape. For all these different reasons, the surface mapping does not represent the hydro-saline balance in detail with recent operating conditions of the estuary.

**5. Conclusions**

This study aimed to better understand the role of salinity, its intensity, and distribution within soil profiles, on the zonation of an estuary in northern Morocco. The five zones mapped by naturalistic landscape analysis and satellite imagery have their own statistical distribution of apparent electrical conductivity, with more or less overlapping ranges. The various classifications by discriminant analysis or machine learning algorithms correctly position from 57 to 66% of the points in their original area, attesting to the importance of salinity alone on the characteristics of the estuary areas. The saline profile within the soils, ascending or descending, is a secondary parameter, but it contributes to a better differentiation of the zones. The presence of curvilinear and irregular boundaries between the zones in the data hyperspace can explain slightly better results obtained by two algorithms, namely naive Bayesian clustering and 5 nearest neighbours. The statistical methods of discriminant analysis and machine learning help to critically review the zonation of surface states and the understanding of the mechanisms responsible for their spatial distribution.

**Author Contributions:** Conceptualisation, V.V. and M.M.; methodology, Y.E.J. and V.V.; software, Y.E.J., Y.A. and M.T.; validation, V.V., M.M. and L.B.; formal analysis, Y.E.J., Y.A., M.T. and A.A.B.; investigation, Y.E.J.; resources, V.V. and M.M.; data curation, L.B., A.T. and A.A.B.; writing—original draft preparation, Y.E.J. and M.M.; writing—review and editing, L.B. and V.V.; visualisation, Y.E.J.; supervision, V.V. and M.M.; project administration, M.M.; funding acquisition, not applicable. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Not applicable.

**Conflicts of Interest:** All authors declare that they have no financial or non-financial conflict of interest.

**References**

1. Hay, C.C.; Morrow, E.; Kopp, R.E.; Mitrovica, J.X. Probabilistic reanalysis of twentieth-century sea-level rise. *Nature* **2015**, *517*, 481–484. [CrossRef]

2. Church, J.A.; White, N.J. Sea-Level Rise from the Late 19th to the Early 21st Century. *Surv. Geophys.* **2011**, *32*, 585–602. [CrossRef]

3. Mengel, M.; Levermann, A.; Frieler, K.; Robinson, A.; Marzeion, B.; Winkelmann, R. Future sea level rise constrained by observations and long-term commitment. *Proc. Natl. Acad. Sci. USA* **2016**, *113*, 2597–2602. [CrossRef] [PubMed]
4. Khojasteh, D.; Glamore, W.; Heimhuber, V.; Felder, S. Sea level rise impacts on estuarine dynamics: A review. *Sci. Total Environ.* **2021**, *780*, 146470. [CrossRef] [PubMed]

5. Dusek, G.; Sweet, W.V.; Widlansky, M.J.; Thompson, P.R.; Marra, J.J. A novel statistical approach to predict seasonal high tide flooding. *Front. Mar. Sci.* **2022**, *9*, 1073792. [CrossRef]

6. Mills, L.; Janeiro, J.; Neves, A.A.S.; Martins, F. The impact of Sea level rise in the guadiana estuary. *J. Comput. Sci.* **2020**, *44*, 101169. [CrossRef]

7. Ridd, P.V.; Stieglitz, T. Dry Season Salinity Changes in Arid Estuaries Fringed by Mangroves and Saltflats. *Estuar. Coast. Shelf Sci.* **2002**, *54*, 1039–1049. [CrossRef]

8. Torres-Rondon, L.; Carrière, S.D.; Chalikakis, K.; Valles, V. An integrative geological and geophysical approach to characterize a superficial deltaic aquifer in the Camargue plain, France. *Comptes Rendus Geosci.* **2013**, *345*, 241–250. [CrossRef]

9. Wei, X.; Williams, M.E.; Brown, J.M.; Thorne, P.D.; Amoudry, L.O. Salt Intrusion as a Function of Estuary Length in Periodically Weakly Stratified Estuaries. *Geophys. Res. Lett.* **2022**, *49*, e2022GL099082. [CrossRef]

10. Huang, J.; Wong, V.N.L.; Triantafilis, J. Mapping soil salinity and pH across an estuarine and alluvial plain using electromagnetic and digital elevation model data. *Soil Use Manag.* **2014**, *30*, 394–402. [CrossRef]

11. Barbiero, L.; Mohamedou, A.O.; Laperrousaz, C.; Furian, S.; Cunnac, S. Polyphasic origin of salinity in the Senegal delta and middle valley. *Catena* **2004**, *58*, 101–124. [CrossRef]

12. Furian, S.; Mohamedou, A.O.; Hammecker, C.; Maeght, J.L.; Barbiero, L. Soil cover and landscape evolution in the Senegal floodplain: A review and synthesis of processes and interactions during the late Holocene. *Eur. J. Soil Sci.* **2011**, *62*, 902–912. [CrossRef]

13. Dar, B.A.; Assaeed, A.M.; Al-Rowaily, S.L.; Al-Doss, A.A.; Abd-ElGawad, A.M. Vegetation Composition of the Halophytic Grass Aeluropus lagopoides Communities within Coastal and Inland Sabkhas of Saudi Arabia. *Plants* **2022**, *11*, 666. [CrossRef]

14. McNeill, J.D. Electromagnetic terrain conductivity measurement at low induction numbers. *Tech. note TN 1980*, *6*, 3–15.

15. Durand-Delga, M.; Kornprobst, J. Carte géologique de Tanger-Al Manzla (1/50000). *Notes Mémoires du Serv. Géologique du Maroc* **1985**, 294.

16. Medioni, R.; Wernli, R. Etude géologique du bassin post-nappe mio-pliocène du Charf-el-Akab (Province de Tanger, Maroc). *Notes Mémoires du Serv. géologique du Maroc* **1978**, *40*, 107–133.

17. Nachite, D.; Bekkali, R.; Macias, A.; Anfuso, G. *El estuario de Tahadart: Integrada de un Espacio en las Bases para una Gestión Plena Transformación*; Servicio Publicaciones Universidad de Cadiz: Cadiz, Spain, 2007; ISBN 9788469163504.

18. Taaouati, M.; Anfuso, G.; Nachite, D. *Morphological Characterization and Evolution of Tahadart Littoral Spit, Atlantic Coast of Morocco*; Springer: Cham, Switzerland, 2015; pp. 289–306.

19. Karrouk, M.S. Apeçu sur les mécanismes climatiques rifains. *Rev. la Fac. des Lettres des Sci. Hum. Tétouan* **1990**, *4*, 11–36.

20. ONEE. *Etude de Canalisation des eaux Brutes du Barrage Ibn Battouta vers la Station de Traitement de Mharhar*; Office National d'Electricité et de l'Eau Potable: Rabat, Morocco, 2018.

21. Achab, M. Les plages et les vasières des environs des embouchures des oueds Tahaddart et Gharifa (NW du Maroc): Dynamique morphosédimentaire et impact des aménagements sur leur évolution récente. In *Sandy Beaches and Coastal Zone Management, Proceedings of the Fifth International Symposium on Sandy Beaches, Rabat, Marocco*, 19–23 October 2009; Bayed, A., Ed.; Travaux de l'Institut Scientifique n°6: Rabat, Morocco, 2011; pp. 1–12.

22. Orbi, A.; Lakdar, J.; Zidane, H. Etude préliminaire de l'estuaire de l'Oued Tahaddart (Automne 1995-printemps et automne 1996). *Trav. Doc. l'Institut Natl. Rech. Halieut.* **1997**, *104*, 1–82.

23. Corwin, D.L.; Rhoades, J.D. An Improved Technique for Determining Soil Electrical Conductivity-Depth Relations from Above-ground Electromagnetic Measurements. *Soil Sci. Soc. Am. J.* **1982**, *46*, 517–520. [CrossRef]

24. Montoroi, J.; Grunberger, O.; Sukchan, S.; Kungklang, N. Estimation de la salinité des sols du Nord-est de la Thaïlande par électromagnétisme en domaine fréquentiel. In *Proceedings of the 5eme Colloque GEOFCAN. Géophysique des Sols et des Formations Superficielles, Orléans, France*, 20–21 September 2005; pp. 60–64.

25. Rhoades, J.D.; Corwin, D.L.; Lesch, S.M. Geospatial Measurements of Soil Electrical Conductivity to Assess Soil Salinity and Diffuse Salt Loading from Irrigation. In *Assessment of Non-Point Source Pollution in the Vadose Zone*; American Geophysical Union (AGU): Washington, DC, USA, 1999; pp. 197–215. ISBN 9781118664698.

26. Rhoades, J.D.; Corwin, D.L. Determining Soil Electrical Conductivity-Depth Relations Using an Inductive Electromagnetic Soil Conductivity Meter. *Soil Sci. Soc. Am. J.* **1981**, *45*, 255–260. [CrossRef]

27. Triantafilis, J.; Laslett, G.M.; McBratney, A.B. Calibrating an Electromagnetic Induction Instrument to Measure Salinity in Soil under Irrigated Cotton. *Soil Sci. Soc. Am. J.* **2000**, *64*, 1009–1017. [CrossRef]

28. El Hamdi, A.; Morarech, M.; El Mouine, Y.; Rachid, A.; El Ghmari, A.; Yameogo, S.; Chalikakis, K.; Yachou, H.; Kacimi, I.; Zouahri, A.; et al. Sources of spatial variability of soil salinity: The case of Beni Amir irrigated command areas in the Tadla Plain, Morocco. *Arid L. Res. Manag.* **2022**, *36*, 245–264. [CrossRef]

29. Marden, J.I. Positions and QQ Plots. *Stat. Sci.* **2004**, *19*, 606–614. [CrossRef]

30. Heung, B.; Ho, H.C.; Zhang, J.; Knudby, A.; Bulmer, C.E.; Schmidt, M.G. An overview and comparison of machine-learning techniques for classification purposes in digital soil mapping. *Geoderma* **2016**, *265*, 62–77. [CrossRef]

31. Goff, A.; Huang, J.; Wong, V.N.L.; Monteiro Santos, F.A.; Wege, R.; Triantafilis, J. Electromagnetic Conductivity Imaging of Soil Salinity in an Estuarine-Alluvial Landscape. *Soil Sci. Soc. Am. J.* **2014**, *78*, 1686–1693. [CrossRef]
32. Wu, W.; Zucca, C.; Muhaineed, A.S.; Al-Shafie, W.M.; Fadhil Al-Quraishi, A.M.; Nangia, V.; Zhu, M.; Liu, G. Soil salinity prediction and mapping by machine learning regression in Central Mesopotamia, Iraq. *L. Degrad. Dev.* **2018**, *29*, 4005–4014. [CrossRef]

33. Farifteh, J.; Van der Meer, F.; Atzberger, C.; Carranza, E.J.M. Quantitative analysis of salt-affected soil reflectance spectra: A comparison of two adaptive methods (PLSR and ANN). *Remote Sens. Environ.* **2007**, *110*, 59–78. [CrossRef]

34. Taghizadeh-Mehrjardi, R.; Minasny, B.; Sarmadian, F.; Malone, B.P. Digital mapping of soil salinity in Ardakan region, central Iran. *Geoderma* **2014**, *213*, 15–28. [CrossRef]

35. Brungard, C.W.; Boettinger, J.L.; Duniway, M.C.; Wills, S.A.; Edwards, T.C. Machine learning for predicting soil classes in three semi-arid landscapes. *Geoderma* **2015**, *239–240*, 68–83. [CrossRef]

36. Ahmad, S.; Kalra, A.; Stephen, H. Estimating soil moisture using remote sensing data: A machine learning approach. *Adv. Water Resour.* **2010**, *33*, 69–80. [CrossRef]

37. Bouramtane, T.; Hilal, H.; Rezende-Filho, A.T.; Bouramtane, K.; Barbiero, L.; Abraham, S.; Valles, V.; Kacimi, I.; Sanhaji, H.; Torres-Rondon, L.; et al. Mapping Gully Erosion Variability and Susceptibility Using Remote Sensing, Multivariate Statistical Analysis, and Machine Learning in South Mato Grosso, Brazil. *Geosciences* **2022**, *12*, 235. [CrossRef]

38. Barbiero, L.; Cunnac, S.; Mané, L.; Laperrousaz, C.; Hammecker, C.; Maeght, J.L. Salt distribution in the Senegal middle valley analysis of a saline structure on planned irrigation schemes from N’Galenka creek. *Agric. Water Manag.* **2001**, *46*, 201–213.

39. Huang, J.; Mokhtari, A.R.; Cohen, D.R.; Monteiro Santos, F.A.; Triantafilis, J. Modelling soil salinity across a gilgai landscape by inversion of EM38 and EM31 data. *Eur. J. Soil Sci.* **2015**, *66*, 951–960. [CrossRef]

40. Sudduth, K.A.; Kitchen, N.R.; Myers, D.B.; Drummond, S.T. Mapping Depth to Argillic Soil Horizons Using Apparent Electrical Conductivity. *J. Environ. Eng. Geophys.* **2010**, *15*, 135–146. [CrossRef]

41. Wang, J.; Zhao, X.; Zhao, D.; Arshad, M.; Zare, E.; Triantafilis, J. Reconnaissance scale mapping of salinity in three-dimensions using EM38 and EM34 data and inversion modelling. *L. Degrad. Dev.* **2020**, *31*, 2936–2951. [CrossRef]

42. Davy, A.J.; Brown, M.J.H.; Mossman, H.L.; Grant, A. Colonization of a newly developing salt marsh: Disentangling independent effects of elevation and redox potential on halophytes. *J. Ecol.* **2011**, *99*, 1350–1357. [CrossRef]

43. Ellouzi, H.; Ben Hamed, K.; Hernández, I.; Cela, J.; Müller, M.; Magné, C.; Abdelly, C.; Munné-Bosch, S. A comparative study of the early osmotic, ionic, redox and hormonal signaling response in leaves and roots of two halophytes and a glycophyte to salinity. *Planta* **2014**, *240*, 1299–1317. [CrossRef]

44. Lokhande, V.H.; Suprasanna, P. Prospects of Halophytes in Understanding and Managing Abiotic Stress Tolerance BT. In *Environmental Adaptations and Stress Tolerance of Plants in the Era of Climate Change*; Ahmad, P., Prasad, M.N.V., Eds.; Springer: New York, NY, USA, 2012; pp. 29–56. ISBN 978-1-4614-0815-4.

45. Flowers, T.J.; Hajibagheri, M.A.; Clipson, N.J.W. Halophytes. *Q. Rev. Biol.* **1986**, *61*, 313–337. [CrossRef]

46. Glenn, E.P.; Brown, J.J.; Blumwald, E. Salt Tolerance and Crop Potential of Halophytes. *CRC Crit. Rev. Plant Sci.* **1999**, *18*, 227–255. [CrossRef]

47. Cleveringa, J.; Oost, A.P. The fractal geometry of tidal-channel systems in the Dutch Wadden Sea. *Geol. en Mijnb.* **1999**, *78*, 21–30. [CrossRef]

48. Angeles, G.R.; Perillo, G.M.E.; Piccolo, M.C.; Pierini, J.O. Fractal analysis of tidal channels in the Bahía Blanca Estuary (Argentina). *Geomorphology* **2004**, *57*, 263–274. [CrossRef]

**Disclaimer/Publisher's Note:** The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.