Wavelet Analysis of Rainfall and Runoff Multidecadal Time Series on Large River Basins in Western North Africa

: This work is dedicated to the study of the spatio-temporal variability of climate in Morocco by the analysis of rainfall (gridded and gauged data) and runoff. The wavelet analysis method has been used in this study to compare the rainfall and runoff series and to show the major discontinuities identiﬁed in 1970, 1980, and 2000. Several modes of variability have been detected; this approach has been applied to show annual (1 year) and inter-annual modes (2–4 years, 4–8 years, 8–12/8–16 years, and 16–30 years), and some modes are speciﬁc to some stations. This analysis will be complemented by the gridded data covering the period from 1940 to 1999, which will allow for a better understanding of the spatial variability of the highlighted signals set, which identiﬁed frequencies at 1 year and 8–16 years, distinguished different time periods at each basin and identiﬁed three main discontinuities in 1970, 1980, and 2000. The contribution of climatic indices is important as it is between 55% and 80%.


Introduction
The impacts of climate change and variability have received a great deal of attention from researchers in a variety of fields. The frequency and severity of droughts could increase as a result of changes in both precipitation and evapotranspiration [1]. Recent studies have made tremendous progress regarding the investigation of the time variation of water resources and hydrological processes [2][3][4][5][6][7] in response to climate change. Improving knowledge on the factors controlling the variability of water resources on inter-annual to multidecadal time scales is of major importance in the context of global climate and environmental change, exceptional storms, and sustained droughts [8]. Therefore, it is important to document how the global fluctuations of climate change can affect the local hydrological cycles in the watershed. This may help explain the hydro-meteorological observations [9].
Most inter-annual variability assessment studies are either based on direct correlation to identify a strong statistical relationship between the climatic variable and the teleconnection pattern indices [10,11] or, more recently, on a non-parametric multiple method of spectral analysis [12], the latter being a more direct measure of the occurrence process. All these approaches assume stationary time series, but continuous wavelet analysis has revealed that the inter-annual variability of the North Atlantic Oscillation is non-stationary, since its variance changes in frequency [13,14].
Meyer et al. [15], Benner [16], and Morizet [17] have highlighted the ability of wavelet analysis to show that most climate oscillations are non-stationary and do not persist throughout the time series. Among the numerous available techniques [18], powerful wavelet analysis is more preferable to classical Fourier and fractal analysis; the wavelet technique was used as a powerful tool to study the variability of climate indices such as NAO (North Atlantic Oscillation), being non-stationary [19,20], which highlights complex patterns [21]. It is an analytical tool for non-stationary processes, a process of decomposition of frequency series in time and energy, while considering the time factor [3,13,[22][23][24]. Continuous wavelet analyses, on the other hand, are used to determine the structures (frequencies, fluctuations) and their evolution over time (discontinuities) in stationary signals [3,13,[25][26][27].
Hydrological variability in Africa has been studied by many authors since the start of the recent drought in the 1970s. Many studies have focused on Sahelian areas [28][29][30][31][32][33][34][35][36]. Some authors have compared Sahelian precipitation with precipitation in other regions of Africa, in particular in West Africa, but also in Central Africa [35,[37][38][39][40][41][42][43][44], and others have used standardized hydrological time series anomalies in North Africa [44][45][46][47]. Singla et al. [47] used ruptures tests to identify a period of drought. This work is also devoted to studying the spatio-temporal aspect in the three largest basins in Morocco by using two types of precipitation (gridded rainfall data as well as gauged rainfall data) and streamflowthrough wavelet analysis-to locate the different break dates and to identify the spatial variability of rainfall and runoff rates and their relationship to the climate index. Using gridded data can be useful and can help to identify this variability, and can be considered as a new approach that is different from the rainfall data often used.
Zamrane et al. [48] have found a relationship between the runoff and rainfall with the NAO (North Atlantic Oscillation) climate index in Morocco by applying the wavelet technique. Moreover, [49] discovered an important relationship between NAO and rain using this method in Marrakech. In this study, we will use other climatic indices on a larger area.
The wavelet technique is used in this study to compare the rainfall and runoff series, with the rain record as a climatic signal; it is initially interesting to check whether this climatic signal remains visible in a series of flows, which we know can be modified by human disturbances (dams, irrigation, derivation), or if human disturbances modify this signal and whether certain signals visible in the rain series are attenuated or amplified in the flow series. We apply the wavelet technique to the flow series-although the flows are also an integration of a rain signal on the surface of the basin-and in the other we apply it on grid data series (rains). There might be a somewhat higher frequency stationary variability on the discharge series, which might not be observed on the grid data series due to statistical smoothing between the stationary rainfall series during interpolation. Signals which would be clearly visible in both cases would probably have greater significance.
This study basically aims to address the following general questions that are of great importance at the local scale but are still linked to more global issues like climate variability: 1.
What type of fluctuations is present in gridded and gauged precipitation during the study period? 2.
Is it possible to relate some of these variability to the climatic index? 3.
Is it possible to relate precipitation and runoff fluctuations? Do these fluctuations display a constant temporal variability or not?
The plan of this research can be divided into four parts. Following the introduction, a description of the study area and data base is presented. Then, the rainfall (gridded and gauged) and runoff variability is analyzed and related to the climate index using statistical approaches. Results are finally discussed and concluded in the last part of this report.

Study Area
The Moulouya watershed covers the eastern part of Morocco ( Figure 1) with an area of 55,500 km 2 , between latitudes 32 • 18 and 35 • 8 north and longitudes 1 • 11 and 5 • 37 west and has an elongated shape of the general direction ENE-WSW. It is bordered to the northwest by the Mediterranean Coastal basins, to the west by the Sebou basin, to the southwest by the watershed of the Oum Er-Rebia, to the south by the watershed of Wadi Ziz, to the southeast by the watershed of Guir, and to the east by the Algerian territory. The large extent and the diversity of the reliefs of the Moulouya watershed mean that the climate is very variable from the semi-arid climate in the north to arid in the south, the rainfall is very low, and the dry period extends over a large period of the year. The winters are rigorous, long, and cold, sometimes marked by negative temperatures, while the summers are very hot [50]. The annual rainfall varies between 600 and 350 mm going from the south to the north ( Table 1).
The Moulouya watershed covers the eastern part of Morocco ( Figure 1) with an area of 55,500 km 2 , between latitudes 32°18′ and 35°8′ north and longitudes 1°11′ and 5°37′ west and has an elongated shape of the general direction ENE-WSW. It is bordered to the northwest by the Mediterranean Coastal basins, to the west by the Sebou basin, to the southwest by the watershed of the Oum Er-Rebia, to the south by the watershed of Wadi Ziz, to the southeast by the watershed of Guir, and to the east by the Algerian territory. The large extent and the diversity of the reliefs of the Moulouya watershed mean that the climate is very variable from the semi-arid climate in the north to arid in the south, the rainfall is very low, and the dry period extends over a large period of the year. The winters are rigorous, long, and cold, sometimes marked by negative temperatures, while the summers are very hot [50]. The annual rainfall varies between 600 and 350 mm going from the south to the north (Table 1).    Covering an area of approximately 40,000 km 2 , the Sebou watershed is located in the northwest of Morocco, between the parallels 33 • and 35 • north and meridians 4 • and 7 • west ( Figure 1). It is limited from the north to the south by the Rif massif and by the mountains of the Middle Atlas and the Meseta [51]. The basin is characterized by a Mediterranean climate with an oceanic influence, and it becomes continental inside the basin with an annual total rainfall exceeding 1000 mm at Middle Atlas and decreases gradually to the north 600 mm/year (Table 1).
Tensift river drains a watershed with an area of 20,450 km 2 ( Figure 1). This large continental domain is located between latitudes 32 • 10 and 30 • 50 north and longitudes 9 • 25 and 7 • 25 west. It is characterized by a very different climate from one area to another. Thus, the climate is semi-arid influenced by the cold current from the Canaries in the coastal zone, semi-arid hot in the Jbilets, and arid continental in the Haouz and the Mejjate. The average annual rainfall is about 250 mm in Marrakech and can reach 700 mm on the peaks of the Atlas (Table 1).
The choice of this study area (the Moulouya, Tensift, and Sebou basins) can be explained by specific climate conditions of each watershed and their geographical positioning in Morocco. The fact that they are the largest basins in the country added to the heterogeneity of their surface also makes them ideal for a representative study of the various variability situations.
The climate is semi-arid to arid, with a strong Mediterranean influence that may be related to local effects, to a general trend, or to phenomena of larger extents. The frontal polar winter rains, which regularly affect the northern and western parts of Morocco and the Mediterranean coast, often do not reach the south of the Atlas Mountains. The contribution of summer rainfall is not negligible and rather helps to maintain the provision of water in the oases in northern Mauritania and southern Morocco [52]. Works on the influence of the NAO (North Atlantic Oscillation) and ENSO (El Nino Southern Oscillation) on rainfall in Morocco have been conducted, mainly proving that there is a link between Moroccan rainfall variability and large-scale atmospheric circulation [53,54].
The climate of North Morocco-in our study, this concerns the two northern basins, the Moulouya and the Sebou-is influenced by the atmospheric circulation which is characterized by cells with latitudinal extensions [26]. Among these cells, we can cite (1) The Azores anticyclone, a zone with a permanent high pressure which extends to the central Atlantic in the area of the Azores islands (its extension to the Maghreb zone deviates meteorological disturbances towards Europe) and (2) the Saharan anticyclone, which is much more stable than the former one from the general circulation viewpoint.
Irregularity is a notable aspect of precipitation; this irregularity is spatial-from one region to another-and temporal (inter-annual). Outside of the summer period, it is quite frequent that no rain falls for more than a month.

Data
The rainfall and runoff data used in this study ( Figure 2) were provided by the Agency of the Hydraulic Basin of Tensift and Haouz (ABHT) for the Tensift basin, by the National Meteorology Direction (DMN) and the General Directorate of Water (DGH) for the Sebou basin, and obtained from the Global Runoff Data Centre (GRDC) for the Moulouya basin. The original database comprises daily precipitation records from 14 stations as well as daily streamflow records from 13 stations, all distributed throughout the study area. For the results to be faithfully representative, the study covers different periods of time, each extending over at least 24 years ( Table 2). The data must also abide by two important criteria: the length of the chronicles on the one hand (the data have to cover the longest period possible) and the quality of data on the other hand (the data must have as few gaps as Possible).
The gridded data ( Figure 2) is taken from the System of Environmental Information for the Water Resources and their Modeling (SIEREM) data set, developed at the HydroSciences Montpellier laboratory [54][55][56]. These data are provided on a monthly basis, between the years 1940 and 1999, for each half-square degree scale. The interpolation method used to extract this data set from the observed values was the kriging method [56,57]. For the organization of referential data sets of the study area, data analysis means have to be implemented.  The gridded data ( Figure 2) is taken from the System of Environmental Information for the Water Resources and their Modeling (SIEREM) data set, developed at the Hydro Sciences Montpellier laboratory [54][55][56]. These data are provided on a monthly basis, be tween the years 1940 and 1999, for each half-square degree scale. The interpolation method used to extract this data set from the observed values was the kriging method  Moreover, the study focuses on comparing these data with the climate indices North Atlantic Oscillation (NAO), Southern Oscillation Index (SOI), and Western Mediterranean Oscillation Index (WMOI).
The NAO is the difference in atmospheric pressures measured at sea level (SLP) and in two stations, Iceland and the Azores, which represent the centers of action [58]. The NAO was obtained from https://www.ncdc.noaa.gov/teleconnections/nao/ (accessed on 9 November 2021).
The SOI indicates the evolution and intensity of El Niño or La Niña. The SOI is calculated using the difference in pressure between Tahiti and Darwin. This index was obtained from https://www.cpc.ncep.noaa.gov/data/indices/soi (accessed on 9 November 2021).
The WMOI is a model of low frequency variability of atmospheric circulation. The WMOI, defined as the difference of normalized values of the pressures at sea level between Cadiz-San Fernando (Spain) and Padua (Italy) [59], was collected from http://www.ub. edu/gc/documents/Web_WeMOi-2020.txt (accessed on 9 November 2021).
The climate indices represent diagnostic tools used to define the state of a climatic system and the understanding of the various climate mechanisms. Such indices were related to the local hydrological changes observed in some major rivers [4]; however, the interpretation of these relations is still the focus of several discussions as stated by [3,5]. Most studies have used the North Atlantic Oscillation index to investigate changes in precipitations and streamflows [60][61][62][63][64]; in our study, SOI and WMOI were used to investigate changes in our time series.

Methodology
The wavelet analysis (CWT) is a mathematical technique that is very useful for numerical analysis and manipulation of multidimensional and discreet signals. It is aimed at identifying and quantifying the temporal characteristics of the main spectral components in the time series [3].
Here, wavelet power spectrums were calculated using the Morlet wavelet transform for signal analysis. Morlet wavelet introduces a set of functions in the shape of small waves created by dilations and translations from a simple generator function. In practice, the Morlet wavelet is defined as a harmonic wave with a frequency multiplied by a Gaussian time domain window [26,65]: where η is dimensionless time, Ψ 0 (η) is the wavelet value, and ω 0 is dimensionless frequency (in the present study we used ω 0 = 6; the correction terms become unnecessary because they are of the same order as typical computer roundoff errors). Though the basic wavelet function was introduced, some solutions to change the overall size as well as slide the entire wavelet along in time are required. Thus, the "scaled wavelets" can be defined as follows: where s stands for the dilation parameter which is used to change the scale and n is the translation parameter used to slide in time. The factor s −1/2 is a term of normalization for keeping the total energy of the scaled wavelet constant [66]. Considering a time series X, with values of xn, at time index n, each value would be separated in time by a constant time interval δt. The wavelet transforms W n (s) can be represented as the inner product of the wavelet function with the original time series as follows: Water 2021, 13, 3243 8 of 26 In the above relation, Ψ is the normalized result of a mother-wavelet function Ψ 0 . The asterisk is defined as the complex conjugate, s represents the scale, n is the time, and N is the number of points of the time series.
According to Equation (3), calculation of the continuous wavelet transform is the simplest but most time-consuming method. Equation (3) can be converted using the convolution theorem as below [26,65]: wherex k is the Fourier transform of x n and ω k is the angular frequency which is equal to 2πk/Nδt for k π N/2 or is equivalent to -2πk/Nδt for k > N/2.
Here, CWT has been used in two modes: (1) the univariate mode that aims to identify the main variability forms of signals and (2) the bivariate mode for wavelet coherence whose objective is to compare the spectral structuring of signals (Equation (5)): where WC n corresponds to the wavelet coherence and S to the signal. X and Y correspond to the two studied variables. The wavelet phases are also intended to show the amount of delay between both signals [37]. The values of the phase diagram are contained between −π and π. For a zero-phase difference, we say that the two variables are in phase. If the phase difference is π or −π, the two variables are said to be out of phase (opposite phase) of the corresponding scale. Continuous wavelet transform is used to investigate the variability of monthly gauged and gridded rainfall series according to the time and wavelet scale. The objective is to investigate whether these fluctuations are random or follow a cyclical pattern. For this purpose, we performed a spectral analysis over all the rainfall time series and checked whether their characteristics were common to the whole study area. The detected modes of variability were then compared with those characterizing climate indices.

Characterization of Rainfall Variability Patterns from SIEREM Rainfall
Four modes of variability are recorded in the gridded data (1940-1999): 2-4-year, 4-8-year, and 8-16-year modes in addition to the annual mode. In the Moulouya basin (Figure 3), in the first northwestern area, which is composed of three cells (presented by the BM_A series), the annual cycle and the 4-8-year mode were located between the 1950s and the 1970s. In the second area in the center, oriented northeast and southwest, with the largest number of series of rainfall (BM_K and BM_X), a 1-year band was almost continuous until 1975 and resumed near the end of the series in 1995. This band seemed to be affected by a change towards a 2-4-year band. A 4-8-year band was also identified in the same period in the first area, while this energy was low in the southern part of this section. Lastly, in the eastern part of the watershed, represented by the BM_P and the BM_Y series, the annual cycle was almost continuous during the first time series and was interrupted during the second time series between 1975 and 1995. In this same part of the basin, a 4-8-year band, found at the beginning of the series, was changed into an 8-16-year band.
In the Sebou basin (Figure 4), the band of the annual cycle, in the first region, presented a large energy throughout the study series, while in the second, this phenomenon was only observable between 1950 and 1970. We also noticed that in the third area it was absent between 1975 and 1995. The 4-8-year frequency was found throughout the whole study basin between the years 1960 and 1980.  In the Sebou basin (Figure 4), the band of the annual cycle, in the first region, presented a large energy throughout the study series, while in the second, this phenomenon was only observable between 1950 and 1970. We also noticed that in the third area it was absent between 1975 and 1995. The 4-8-year frequency was found throughout the whole study basin between the years 1960 and 1980.   Contrary to the other basins (Moulouya and Sebou), the Tensift basin is not subdivided (Figure 5), the variability of the annual mode being the same in the north and the south of the basin, except for some discontinuities also observed in the other basins. The 8-16-year frequency appeared in some cells in the south of the basin, and towards the end of the study series.

Characterization of the Temporal and Spatial Variability of Rainfall Gauges
In this section, we are going to analyze the variability of gauged rainfall for all the study basins. During this work, we were faced with some constraints. These concern the lengths of both the series and the periods they cover, which vary from one area to another, in addition to the fact that the patterns of variability could not be identified in all stations.
From the analysis of the continuous wavelet SIEREM rainfall series and the localization of variability patterns in time, the Moulouya and the Sebou watersheds are subdivided into three parts, while in the Tensift basin, we have a homogeneous variability, that is, we did not identify variability in this area. Each part is made up of one or two cells, and in each cell, we have a representative variability.
Several energy bands can be distinguished on the rainfall gauges' local wavelet spectra (Figures 6-8).

Characterization of the Temporal and Spatial Variability of Rainfall Gauges
In this section, we are going to analyze the variability of gauged rainfall for all the study basins. During this work, we were faced with some constraints. These concern the lengths of both the series and the periods they cover, which vary from one area to another, in addition to the fact that the patterns of variability could not be identified in all stations.
From the analysis of the continuous wavelet SIEREM rainfall series and the localization of variability patterns in time, the Moulouya and the Sebou watersheds are subdivided into three parts, while in the Tensift basin, we have a homogeneous variability, that is, we did not identify variability in this area. Each part is made up of one or two cells, and in each cell, we have a representative variability.
The continuous wavelet spectrum of the monthly precipitation of the Sebou basin is presented in Figure 7, where a 1-year band, characterized by a strong and obvious attenuation of the intensity of the annual cycle according to the values in the color bar, observed between the years 1960 and 1980. This phenomenon was less apparent in the Moulouya basin ( Figure 6), which was marked by several ruptures, as strong bands were identified between approximately 1985 and the end of 1990, in all stations except for Midelt station in the South. As for Tensift (Figure 8  Common fluctuations were recorded through all the rainfall series, while others (like the 8-12 years, 6-10 years, and 16-30 years) appear to be more specific to some watersheds, namely the Moulouya and Tensift basins. In addition, lower-frequency variability (superior to 2-4 years) was identified in the majority of stations along the time series. According to the SIEREM series, the Moulouya basin included all modes of variability (2-4 years, 4-8 years, and 8-16 years) that we find in the other two basins (Sebou and Tensift).
The common period between the gauged and SIEREM data (this period varying from one basin to another) showed various patterns of variability. In this period, very few common frequencies are were over the same period, these being the annual cycle and the 8-12 years. Moreover, most frequencies identified from the gauged data are specific to each basin as well as to each study station. However, signals from the SIEREM data were lower, leading to a loss of signals. From the SIEREM data, our study areas were divided into climatic zones, allowing for the study of a large-scale variability. From the station data, however, the variability we found, being quite high and heterogeneous, was a local small-scale one.
In brief, three major discontinuity patterns can be distinguished on the local wavelet spectra: From the gridded data, another discontinuity was identified in 1945, corresponding to an interruption of the annual cycle.
Based on these results, we can identify three different periods of rainfall variability. The dates of these periods differ from one basin to another and from one station to another within the same basin. SIEREM rainfall data and gauged rainfall data do not show the same variability results, as we find more variability from the stations and lower ones from SIEREM data (1 year, 4-8 years, 8-16 years, and in some cases 2-4 years) due to the smoothed signal. The SIEREM rainfall data informs us more about the spatial variability in each watershed, which allows for the subdivision of the basins.

Characterization of the Temporal and Spatial Variability of Streamflows
The wavelet spectrum of streamflow in Moulouya (Figure 9) has several frequency bands, from the annual to the inter-annual and highly powerful frequencies.
We identified the following: From the ruptures that we identified between 1980 and 1985, the series of study presents two periods, with the variability being visible again after a long absence. In Safsaf, there was a significant variability that may be traced back to the creation of the two dams Mohamed V and M. Homadie. In Taourirt  From the ruptures that we identified between 1980 and 1985, the series of study presents two periods, with the variability being visible again after a long absence. In Safsaf, there was a significant variability that may be traced back to the creation of the two dams Mohamed V and M. Homadie. In Taourirt, the variability started in 1980, after the setting up of the O. Za dam.
A loss of energy characterizes Melg El Ouidane station, which lasted from 1980 to 1995, with other discontinuities identified in 1985, 1995, and 2000 in all other stations.
The analysis of streamflow in Sebou shows the existence of annual and inter-annual variability ( Figure 10). There are 1 year, 2-4-year, 3-4-year or 3-5-year, 7-9-year, and 4-10-year bands. The annual cycle, identified all over the Sebou watershed and in different periods, was very discontinuous, especially at Azib Soltane, where variability stopped before 1975. The 2-4-year, 3-4-year, and 3-5-year bands were, respectively, found in Azib Soltane, Ain Timdrine, and Mjara. The 7-9-year fluctuation, also found in Mjara and Ain Timdrine, was affected by a change to a 4-10-year fluctuation in Azib Soltane. In 1965, there was a discontinuity in the whole basin, whereas, in the mid-1970s and mid-1980s, discontinuities varied from one station to another. We identify three periods in Mjara and in Ain Timdrine, and two in Azib Soltane. Contrary to other stations where the discontinuities were still present post-1975-the dates of these differing depending on the station-in Azib Soltane, there was a total loss of energy after 1975.
In 1965, there was a discontinuity in the whole basin, whereas, in the mid-1970s and mid-1980s, discontinuities varied from one station to another. We identify three periods in Mjara and in Ain Timdrine, and two in Azib Soltane. Contrary to other stations where the discontinuities were still present post-1975-the dates of these differing depending on the station-in Azib Soltane, there was a total loss of energy after 1975. Several energy groups can be seen in the Tensift basin ( Figure 11). Here, the annual cycle was generally characterized by a strong attenuation during the 1970s and the 1990s. There was also a high frequency band of 2-4 years/2-5 years, corresponding to a high-power fluctuation identified in mid-1975 and 1990. The 4-8-year band was found in the N'Kouris and Aghbalou stations. The 7-12/8-12-year band was also clearly identified throughout the basin. Several energy groups can be seen in the Tensift basin ( Figure 11). Here, the annual cycle was generally characterized by a strong attenuation during the 1970s and the 1990s. There was also a high frequency band of 2-4 years/2-5 years, corresponding to a highpower fluctuation identified in mid-1975 and 1990. The 4-8-year band was found in the N'Kouris and Aghbalou stations. The 7-12/8-12-year band was also clearly identified throughout the basin.
Results from the continuous wavelet analyses showed some common frequency relationships between rainfall and streamflow in our study area; we can identify some differences in frequencies between these two parameters.
The analyses of the flows by wavelet are more complicated because in each station and in each basin, we have a distribution of the modes of variability which is different without any logical consequence.
It would be interesting to be able to characterize the common (and the different) variabilities between these two variables (rainfall and streamflow), and to estimate the impact of the modes of variability of the precipitations on the variability of the flows. Each station has a different variation from the others (Table 3) which can be related to its position.
In this situation, the analysis of the coherence wavelet was used to characterize the level of linearity between two processes according to the different scale levels over time. Results from the continuous wavelet analyses showed some common frequency relationships between rainfall and streamflow in our study area; we can identify some differences in frequencies between these two parameters.
The analyses of the flows by wavelet are more complicated because in each station and in each basin, we have a distribution of the modes of variability which is different without any logical consequence It would be interesting to be able to characterize the common (and the different) variabilities between these two variables (rainfall and streamflow), and to estimate the impact of the modes of variability of the precipitations on the variability of the flows. Each station has a different variation from the others (Table 3) which can be related to its position.
In this situation, the analysis of the coherence wavelet was used to characterize the level of linearity between two processes according to the different scale levels over time.  Several modes of variability have been identified for rainfall and streamflow, which are different from one basin to another and from one station to another.
In the Moulouya basin, the frequencies identified in the time series of rainfall are different from those identified at the streamflow, describing each series and each station, the 1 y, 2-4 year, and 16-30 year modes were identified for both types of data.
Streamflow and rainfall in the Sebou basin were also presented by a lot of bands at different places; 1 year, 2-4 year, and 3-5 year modes can be identified in rainfall and streamflow.
For the Tensift basin, the bands describing this basin (1 year, 2-4, and 8-12 years) were identified in rainfall and streamflow, while the frequency 4-8 was only found in the streamflow time series.
A major change point was observed in the streamflow and rainfall around 1970 and 1990. This change point, also reported in many other works [38,63], would affect most of the spectral components. It has been shown that this discontinuity is also a characteristic pattern of all the selected climate indices (SOI, WMOI, NAO). The rainfall fluctuations can be reasonably linked to major patterns and to the local climate in relation to the local/regional parameters (relief, distance to the sea, etc.).

Characterization of the Temporal Variability of Climate Indices
The aim of the study of climate indices (NAO, SOI, and WMOI), using the wavelet method, was to compare them with the temporal patterns of rainfall and streamflow variability. All three indices are affected by clear temporal discontinuities in their spectral composition ( Figure 12). For the 1830-2009 period, the selected climate indices were characterized by the following modes (Table 4)    The dotted contours shown statistically significant fluctuations against white noise (AR (1) = 0), to a level of 90% confidence level; the black line shows the cone of influence.

Discussion: Continuous Wavelets Coherence between Climate Fluctuations and Variability of Rainfall and Streamflow
The different patterns of variability detected in the NAO are not statistically significant at a confidence level of 90% [67]. Indeed, as indicated in various works, spectral analyses (including wavelet analysis) show no preferential time scale of the variability of the NAO. The NAO energy spectrum is identified as a slightly "red" noise, with a power that increases with frequency [68,69]. The detected SOI variability bands are all significant at a level of 90% confidence. Moreover, some of these modes correspond to the inter-annual fluctuations, which are characteristic of the SOI, especially the 2-8-year energy band [26,70].
A more accurate description of the spectral modes of these climate indices can be found in many other works, such as Torrence and Compo [26], Garcia et al. [71], Massei et al. [72], and Coulibaly and Burn [73].
The total contribution of climate indices on precipitation by using coherence is between 65% and 72% ( Table 5). The NAO can explain 70% of low frequencies, the SOI can explain 65%, and the WMOI can also explain 65%. Moulouya and Tensift are more influenced by the NAO and the WMOI. The contribution in the streamflow varies between 61% and 74% ( Table 5). The NAO can explain 64% of low frequencies, the SOI can explain 61%, and the WMOI can explain 66% (all basins being influenced to the same degree). In short, climate indices have an influence on rainfall as well as on runoff. Hulme [35] studied the gridded rainfall data and found an increase in the relative variability of annual precipitation in the South of the Atlas Mountains between 1930 and 1990. During the 1980s and 1990s, the southern foothills of the Atlas were quite wet, while the Sahel and the northern area of the Atlas Mountains had drought conditions [51].
For the Moroccan rainfall variability and its relations with large-scale atmospheric circulation, in particular, there are some works that have focused on the influence of the NAO and ENSO on precipitation in Morocco [51,52,74]; other studies, though fewer, discussed the evolution of the climate observed all over Morocco or in some of its regions. Zamrane et al. [48] studied the influence of NAO on rainfall and streamflow in Tensift. Among these studies, we can mention Born et al. [75], who showed, taking as a reference the climate classification of Köppen [50], that the Moroccan climate during the 20th century was becoming warmer and drier.
Knippertz et al. [76] have divided Morocco into three rainfall regions: • Region I, referred to as Atlantic (ATL), covers the northern and western parts of Morocco. A winter rainfall influenced by many factors defines it: the NAO, the southward trajectory of mid latitude disturbances, local depressions, and westerly advection of moist air.

•
The northern region of Morocco, near the Mediterranean coast, called MED, is the homogeneous region II. Here, rainfalls are strengthened by West Mediterranean depressions, and by the moist air advection coming from the northwest. • Region III, called SOA, covers the southern area of the Atlas Mountains. Its winter rainfall is quite complex. It results from different climate factors: the Atlantic humidity carried via a flow towards the South of the Atlas Mountains, cyclone activity strengthened in the Canary Islands, and cyclones occurring in the southwest of the Iberian Peninsula [77].
The rainfall distribution is divided by natural barriers, according to the country's orography; the three regions are separated by the Atlas chain (High Atlas, Middle Atlas, and the Anti-Atlas) and the Rif.
Massei et al. [72] have studied the possibility of a link between the rainfall variability in northern France and the NAO fluctuations, showing, in their research, the complexity of such a relationship. The possible links between NAO and hydrological conditions are very complex and should thus be investigated for the different frequencies or modes of variability by the use of highly statistical methods such as the wavelet technique [6,24,72].
The work [78][79][80] have shown that the North Atlantic Oscillation (NAO) index is a good predictor of seasonal rainfall variability in southern Europe. Recall that the NAO index is the normalized pressure difference between Ponta Delgada in the Azores and Reykjavik in Iceland. It is used to measure the intensity of the North Atlantic Oscillation, the modulation of the western zonal circulation by the pressure dipole between the Azores high pressure and the Icelandic depression [81].
Many authors [76,77,[84][85][86] have explained the temporal trends of the variability of streamflow in relation to the global climate and environmental change. Singla et al. [87] identified an overall decrease in streamflow and annual runoff in 1970. This decrease was observed in the Tensift basin from 1980 to 1986 [50,76]-which coincides with a period of drought all over Morocco-and in the Moulouya basin between 1958 and 2000. The streamflow has also been affected by an annual decrease of 3.5 m 3 /s, attributed to the decrease in rainfall and increase in ETP [88]. The analysis of its runoff shows interannual irregularities characterized by an alternation between humid periods and dry seasons [88,89].
The streamflow intensity depends on the lithological composition and asymmetry of rainfall between the North and South. In the Rif, lands are impermeable and have high slopes; thus, the runoff is extreme in wet years, while the abatement is important during the dry periods [90].
The water resource distribution varies from one area to another in Morocco, as it is low from the North to the South. The Mediterranean and the Sebou basin represent more than 50% of water resources, while other basins only represent 49% of water resources.
In the Mediterranean region, especially in North Africa, the water resource sector is among the most vulnerable, because it is highly affected by the climate variability. In Morocco, as well as in other North African countries, water resources hold an important socio-economic value [10]. Streamflow consists of two components: (1) a low and regular flow during the major part of the year, resulting in hypodermic runoff and resurgences of water infiltration, and (2) a series of short but quite strong floods related to the intensity and duration of rainfall sequences [81] Massei et al. [72] used the wavelet technique to demonstrate the non-stationary behavior of the NAO index and the changes in its component frequencies. Massei et al. [66] detected similar discontinuities around the 1970s and 1990s from the Seine precipitation and streamflow in northwest France. Laignel et al. [91] also identified these discontinuities from climate indices (NAO, SOI, PDO) and from different hydrological factors (precipitation, discharge, and piezometric) in North Africa as well as in the USA.
The inter-annual evolution of Moroccan climate follows the general trend observed in the African climate: a substantial decrease in rainfall from the 1970s to 1980, and a rise in temperatures [92]. The analysis of the evolution of rainfall indices by Benassi [46] indicated a drought tendency up from 1971. Compared to the 1960-1971 period, the 1971-2000 period witnessed a 15% decrease in rainfall. This observation has been further supported by the works of [92,93]. These works divided the 1961-2004 period into two distinct periods: 1961-1972, a normal rainy period, and 1972-2004, less rainy and characterized by two critically long dry periods: 1972-1995 and 1997-2004. The study showed that the rupture occurred during 1970-1990 in most rainfall stations. Several authors have indicated the presence of a rupture during the end of the 1970s and the early 1980s [75,76,93], this rupture being the result of a significant spatial climate change in Morocco during those periods, especially in the Atlas relief, the South of the Rif, and the northeast of the Moulouya Basin. This confirms the studies that have demonstrated decreasing rainfall rates in Morocco since the 1960s [75,94]. The ruptures, which have been detected by [67], indicate a decrease at the level of the flows from the late 1970s to the mid-1980s. In addition, we should remember that since 1967, many dams have been built in Morocco. In fact, their number had been growing between the years 1929 and 1985 and grew even faster up to 2000 [84].
Mahé et al. [95], in their study on the watershed Comoé, observed rainfall breaks between the years 1968 and 1970. This is also the case of Goula et al. [96], whose study on the N'zi basin in Ivory Coast and its rainfall breaks showed that the Kolondieba watershed follows the general changes in the rainfall patterns observed in the late 1960s in West Africa.
Singla et al. [87] identified a global decrease in annual streamflow from 1970; this regression was identified for the Tensift Basin from 1980 until 1986. In addition, Mahé et al. [97] identified breaks in 1971, 1976, 1979, and 1980; these results are in agreement with the dates detected for the annual rainfall at the end of the 1970s/the beginning of the 1980s. We assume that the decrease in runoff is due to an overall decrease in rainfall over the watersheds studied in Morocco [47,97].
These breaks can be explained by the drought sets, which have been witnessed in different regions of Morocco since the early 1980s [71,94,[98][99][100][101][102][103][104]. The end of the 1980s and the beginning of the 1990s were known to be generally characterized by dry conditions over a large part of the Mediterranean basin [105]; many authors demonstrated a significant decrease of annual rainfall in Morocco [46,47] and other regions of the Mediterranean basin such as northwestern Algeria since the 1970s and 1980s [44,[106][107][108][109], as well as Tunisia [110]. Moreover, according to Hurrell and van Loon [111], the period extending from 1981 to 1995 was particularly dry in southern Europe and northern Morocco. The recurrent dry conditions in the Mediterranean area since the beginning of the 1980s have been attributed to the persistence of the positive phase of the North Atlantic Oscillation (NAO) [27,77,105,[112][113][114][115][116][117][118].
Several factors have an influence on precipitation in Morocco, both locally and on a larger scale. Being delineated by the Atlantic West, the Mediterranean North, and the Sahara South influences the country's atmospheric circulation. Besides, at the local level, Morocco is characterized by its very steep orography. The frontal polar winter rains, that regularly affect the northern and western parts of Morocco and the Mediterranean Coast, usually do not reach the south of the Atlas Mountains, and there is the significant contribution of the summer rainfall in maintaining the water supply in the oases in northern Mauritania, southern Morocco.

Conclusions
The wavelet analysis method is rarely used to study the hydrological variability in Morocco. To analyze the relationship between the variability of the rainfall and the streamflow with the fluctuations of the climate indices in the three study basins in Morocco, we referred to two types of rainfall data: SIEREM rainfall and gauged rainfall and streamflow data.
The highest frequencies of the coherence wavelets transform between the climate index and time series (rainfall and streamflow) were observed in two periods: 1970~mid-1970s and mid-1990s~2005. The contribution of climate indices in the hydrological conditions (rainfall and streamflow) is very significant, amounting to 60~79%. We notice here that these percentages, recorded in Morocco, are more important than those registered in Europe.
The SIEREM variability was lower (1 year, 4-8 years, 8-16 years, and in some cases, 2-4 years). However, we could find other modes of variability in gauged rainfall (3-5 years, 8-10 years, 8-12 years, and 10-30 years). This can be explained by the fact that SIEREM data informs us about the spatial variability in each watershed, allowing for the basins' subdivisions. Contrary to variability, the registered discontinuities are important and can be found in the three study basins.
On the whole, this study aimed at showing the impact of climate indices on the hydrological conditions in the Maghreb, using the continuous wavelets analyses.
The limitations of the study are as follows: this study featured a long-term evolution of hydrological and climatic parameters, mainly using data at the annual scale. However, the different climatic factors can be expressed preferentially on certain time scales. For example, some modes of climate variability may be expressed preferentially on a seasonal scale (such as the NAO in winter), therefore having a marked influence over a period of the year.
The hydrological response can be influenced by the hydrological factors, such as the evolution of precipitation in the form of snow, and can contribute to the total flow changes in groundwater resources and their use, or water consumption for irrigation, can be considered.