A new regionalization of rainfall patterns based on wavelet transform information and hierarchical cluster analysis in northeastern Algeria

Due to its geographical location, Algeria is characterized by high spatiotemporal rainfall variability. In this study, data from 69 rain gauges located in representative humid, semiarid, and arid Mediterranean basins in northeastern Algeria were analyzed from 1970–2007 on a monthly scale using continuous wavelet analysis and hierarchical cluster analysis with the aim of regionalizing the rainfall patterns. The analysis shows that northern Algeria (Cluster 1), which has a humid climate, is dominated by periodic annual fluctuations in the 8–16-month band. This mode explains most of the total variance, with a contribution between 25 and 60%. In the Cluster 2 and Cluster 3 regions, the climate varies towards aridity (humid to arid from north to south), and the climate is dominated by long-term periodic phenomena characterizing multiannual fluctuations of 64–128 months to decadal periods greater than 128 months, which explains why the total cumulative contribution exceeds 50% of the total variance. In addition, the regional analysis of the isolated spectral bands of the 3–6-month (3 clusters), 8–16-month (3 clusters), and 1–3-year (4 clusters) scale-average variance revealed, globally and for the different regions, a long period of drought that was most pronounced during the 1970s, 1980s, and 1990s, whereas the wet years were marked by fluctuations that exceeded the 95% confidence level during the study period, with a very remarkable tendency towards wet conditions, particularly since the late 1990s. The obtained results can assist decision-makers in better sustainable development practices, especially in the fields of water resources, agriculture, and energy.


Introduction
Understanding climate variability, climate change, and global warming is essential for understanding world's water cycle. Understanding the various water cycle's components has been the aim of a large body of studies on rainfall, flow, temperature, evaporation, and infiltration (Mengistu et al. 2021;Dang et al. 2021;Pokharel et al. 2020;Nistor et al. 2020;Li et al. 2020;Bouabdelli et al. 2020;Zerouali et al. 2020;Machiwal et al. 2019;Pathak et al. 2017;Santos et al. 2018;Gocic and Trajkovic 2014;Duncan et al. 2013;Meddi et al. 2010) to be the key elements in designing and managing civil engineering structures, particularly studies on the precipitation component (Wolski et al. 2021;Ghorbani et al. 2021a;Martinez-Artigas et al. 2020;Zerouali et al. 2021a;Machiwal et al. 2019;Merabti et al. 2018a, b;Lazri and Ameur 2018;Teodoro et al. 2016;Conway et al. 2009;Massei et al. 2011). Studies on rainfall are the most common compared to the other components; thus, the results of these works can help managers in decision-making processes in the field of water resources.
Some of the most common problems encountered by researchers in the fields of hydrology and meteorology are the lack and inadequacy of high-quality meteorological databases with long periods of observation and the lack of full coverage in measurements of hydroclimatic variables throughout river basins worldwide (McCabe et al. 2017). Therefore, researchers have developed and expanded tools, databases, mathematical, and statistical theories to solve these problems (Hoffmann et al. 2004). Climate regionalization is one of the most popular methods used in the decision-making process, particularly in cases of ungauged basins. It is the most commonly used method for reducing and assessing the uncertainties associated with predictions of climatic model outputs to provide more information for the understanding of atmospheric mechanisms, which can affect the climate of a region (Abadi et al. 2020). This technique consists of cutting or partitioning an area into homogeneous zones with similar climatic behaviors (Samantaray et al. 2021;Cislaghi et al. 2020;Ullah et al. 2020;Abadi et al. 2020;Fathian and Dehghan 2019;Santos et al. 2019a, b;Roushangar and Alizadeh 2019;Mrad et al. 2019;Brito et al. 2017;Rau et al. 2017;Lyra et al. 2014).
Among such studies, Ali et al. (2019) identified homogeneous regions for drought characterization and monitoring based on the k-means classification algorithm and data from 52 rain gauges across Pakistan. The results identified nine groups and showed that a rain gauge located in one of the groups can be used for monitoring and characterizing drought in the whole region. Fathian and Dehghan (2019) used a hybrid weighting-clustering approach for a regional frequency analysis of maximum 24-h precipitation based on the statistical, geographic, and climatic factors of 63 rain gauges in the Lake Urmia basin. The results indicated that the combination of these factors and the approaches that were used presented better values and increased the reliability of the extreme rainfall estimations. Roushangar and Alizadeh (2019) coupled a multiscale basic analysis of the maximal overlap discrete wavelet transform with a SOM algorithm for the classification of monthly rainfall based on data from 31 rain gauges in Iran. Based on verification of the silhouette coefficient index and physical analysis, the approach allowed the determination of homogeneous regions very well. García-Marín et al. (2015) applied a hybrid approach, combining multifractales analysis with the L-moments method for the delimitation of homogeneous regions based on data from 72 rain gauges in Andalusia (southern Spain). The results showed the success and effectiveness of the proposed approach for the clustering of homogeneous regions. Teodoro et al. (2016) applied the clustering method to analyze the spatiotemporal variability of monthly precipitation at 32 rain gauges located in Mato Grosso do Sul (Brazil). The analysis identified five homogeneous rainfall regions, and altitude was found to be one of the factors responsible for the spatiotemporal diversity of precipitation. Wang and Yin (2019) analyzed the variability and regionalization of precipitation based on a SOM network using a database of 1113 grid points covering the period from 1900 to 2014 on the Tibetan Plateau. The analysis suggested four clusters and that the SOM network satisfactorily represented the influences of atmospheric circulation systems. Rodriguez et al. (2016) improved the detection of homogeneous regions using entropy theory and the clustering method based on Euclidean distance in the Brazilian semiarid region. Based on the precipitation disorder index and latitude, the results revealed seven homogeneous areas in the Brazilian semiarid region. Brito et al. (2017) applied multivariate analysis on data from 100 rain gauges at a monthly scale in Rio de Janeiro (Brazil), and the analysis indicated six homogeneous regions. According to the authors, the obtained results can help decision-makers formulate public policies for better risk and natural disaster management and future investments. Machiwal et al. (2019) analyzed rainfall regionalization and the factors that affect it using principal component and hierarchical cluster analyses in dry regions in western India based on data from 62 rain gauges from 1957 to 2011. The method succeeded in separating regions with low and high rainfall, and the results could be essential for planners formulating strategies for hydraulic and civil engineering structure management. In Alagoas State, northeastern Brazil, Lyra et al. (2014) used the hierarchical cluster method to analyze spatiotemporal rainfall variability. The results indicated a uniform spatial rainfall distribution with strong gradients from north to south and from the coast to the continent due to the physiography of the study area and weather systems.
In other hand, the IPCC (IPCC 2014) has documented that many semiarid regions such as the Mediterranean region, western North America, southern Africa, and northeastern South America, particularly in Brazil, will suffer from a lack of water resources due to climate change. In mid-2021, the IPCC has finalized the first part of the Sixth Assessment Report, Climate Change 2021, and indicated that there is a gradient in Africa, whereas precipitation decreases in the west and increases in the east (medium confidence). The report also documented a decrease in hydrological drought over the Mediterranean and diminished summertime river flows in West Africa with high and medium confidence, respectively. Spatiotemporal drought was analyzed between 1960 and 2010 on the plains of northwestern Algeria (Cheliff watershed) using the standardized precipitation index (Achour et al. 2020). The analysis indicated that a severe drought affected the region, and the severity and duration of the drought decreased in the eastern part of the region. Hallouz et al. (2020) assessed meteorological drought during the period from 1972-2012 in the semiarid climate region of northwestern Algeria. The drought analysis revealed that the rain gauges in the western region recorded the largest durations of dry sequences, and the highest values of consecutive dry days were recorded in February. Using copula analysis on data from 194 rain gauges located in northern Algeria for drought event identification, the severity-area-frequency and severity-duration-frequency curves indicated that the western part of the region is the most sensitive to dangerous and severe droughts of short durations and high probabilities of exceedance (Mellak and Souag-Gamane 2020). Based on rain gauges in northern Algeria, Zerouali et al. (2020) used relatively new hybrid methods for the detection of changes points and trends during the period from 1920 to 2011. The results revealed a decline in the rainfall amount beginning in the 1970s in the western part of the region. The authors also concluded that low-frequency phenomena (multiannual to interdecadal modes of variability) can contribute to hiding long-term trends in the studied rainfall time series.
In the Seybouse basin (Algeria), Khezazna et al. (2017) observed a long period of drought with significant interannual variability during the period from 1970 to 1999, followed by an increase in rainfall beginning in 2001. Using the Köppen-Geiger climate classification scheme, Zeroual et al. (2019) analyzed climate change in Algeria from 1951 to 2098 based on representative concentration pathways (RCP4.5 and RCP8.5) and CORDEX-Africa regional climate models. The authors revealed a shift in the rate of climate zone areas from 1951 to 2005, with an increase in the surface area of the desert zone. The RCP8.5 scenario indicated an increase in the desert climate from 2045 to 2098. Based on the RCP4.5 and RCP8.5 scenarios, Bouabdelli et al. (2020) analyzed the impact of climate change on hydrological drought risk recurrence in northwestern Algeria using coupling methods among bivariate frequency analysis, RCP4.5, RCP8.5, and GR2M. The results indicated that the future hydrological drought risk could increase due to decreases in the return periods of drought in all study areas. In northern Algeria, rainfall variability was analyzed using field observations and regional model simulations by Taibi et al. (2019). The simulation analyses revealed a downward trend starting in 1970; similarly, future climate projections indicate declines in rainfall in the 2021-2050 and 2070-2099 periods.
Studies in the fields of statistical hydrology, agriculture, and natural resource management specifically related to Algeria are not sufficient and cover only short periods in relation to the natural resources available. In the climate context, climate models project that future rainfall in Algeria will be less frequent but more intense with high variability in its spatiotemporal distribution, while droughts will be more frequent and longer (Boucherf 2004). In the context of rainfall regionalization and spatiotemporal analysis in Algeria, studies have been carried out by Rata et al. (2020), Mrad et al. (2019), Lazri and Ameur (2018), Merabti et al. (2018a, b), and Mokdad and Haddad (2017).We could not find any study regarding regional analyses of rainfall behavior over Algeria in terms of variability patterns and rainfall changes using statistical methods coupled with a multiscale spectral analysis approach. Thus, this study proposes a new method for the clustering of different modes of rainfall variability and climate trends in the time-frequency domain in the eastern part of northern Algeria. The analyses were based on data from 69 rain gauges for the period from 1970 to 2007 at a monthly scale and were conducted by combining the ascending hierarchical clustering method with Ward's method and the Euclidean distance algorithm, considering the global wavelet spectra and the scale-average variance time series resulting from the continuous wavelet transform.

Study area
The study region is the eastern part of northern Algeria, which covers an area exceeding 110,000 km 2 , between 3° 15″ E and 8° 70″ E and from 34° 30″ N to 37° 15″ N. It extends from the Mediterranean coast and the highlands of the Tell Atlas mountains in the north to the Saharan Atlas mountains and the southern plains, bordering the Sahara Desert to the south (Merabti et al. 2018a, b). Northern Algeria includes five hydrographic basins, and each one includes several hydrological subbasins. The area contains three distinct hydrographic groups: ID 01 (the Seybouse-Mellégue and the Constantine highlands), ID 02 (Chott Hodna-Soummam), and ID 05 (Chott Melrhir) (Fig. 1a). The study area includes nine basins (ID 02: Coastal Algeries, ID 03: Coastal Constantine, ID 05: Chott Hodna, ID 06: Chott ElMeghir, ID 07: High Plan Constantinoise, ID 10: Kebi ElRhimel, ID 12: Medjreda, ID 14: Seybouse and ID 15: Soummam) (Fig. 1b). The region contains mountains of various heights (low, medium and high), high plains, high plateaus, and the Tell Atlas mountain range. These mountains are cut by deep gorges with large, intercalated bowls. To the south, the highlands are delimited by the chains of the Saharan Atlas mountains and by the Aurès massif, with some peaks higher than 2300 m above sea level ( Fig. 1) (Merabti et al. 2018a, b).
In northern Algeria, rainfall is very variable in space and time, ranging from 148 to 1300 mm per year. Several factors contribute to this distribution, which are related to the relief and orientation of the basins. Northwest winds meet the Iberian mountain chains (Spain), and dry winds from the Moroccan Atlas mountains arrive in northern Algeria and are then recharged in the Mediterranean, contributing to heavy rainfall in the northern Tell Atlas mountains. This decrease in rainfall from north to south is superimposed on an increase in rainfall from west to east (depending on the longitude). This pattern is particular to Algeria (Fig. 1b, c) (Meddour 2010; Zerouali et al. 2018;Merabti et al. 2018a, b;Meddi et al. 2010). According to Hakim et al. (2021), it is worth considering other factors such as geomorphological and geographical parameters in the design of rainfall maps. Achite et al. (2017) reported that the spatiotemporal non-stability of dry areas might be attributed to the change in general atmospheric circulation in North Africa and orography, whereas Bessaklia et al. (2021) reported a general increasing gradient of the extreme precipitation indices from south to north, particularly at the coast and high-altitude regions.

Rainfall data
The rainfall database used in our study includes more than 100 rain gauges, from which 69 rain-gauges (stations) were selected ( Fig. 1b) to provide the monthly time series data from January 1970 to December 2007; these gauges were Fig. 1 Representation of (a) northern Algeria, (b) the study area, the average annual rainfall at the rain gauges used in the analysis, and (c) the relationship between the average annual rainfall and longitudes of the rain gauges selected because they have the longest time series and less than 5% missing data (Table 1 and Fig. 2).The gaps due to missing data were filled using the least square method based on neighboring gauges. The database was obtained from the National Agency of Water Resources (ANRH) of Algeria. Table 1 provides information about the identification number (ID), geographic characteristics, and average annual rainfall of the 69 rain gauges used in the analyses.

Continuous wavelet transform
In this study, wavelet analysis using the Morlet motherwavelet was applied to all 69 monthly precipitation time series available in the study area. For each precipitation time series, the global spectra and scale-average variance were evaluated at multiple time scales. The continuous wavelet transform (CWT) is a tool that allows the study of the spectral composition of nonstationary signals (Torrence and Compo 1998;Santos et al. 2001;Grinsted et al. 2004;Massei et al. 2011) and provides representation of the variance time evolution of a time series (Labat 2005). One of the main arguments in favor of wavelet analysis is that the stationarity of the time series is not a prerequisite (Nakken 1999). In addition, the CWT is used to understand changes in the low-and high-frequency periodicities of a time series in the time-frequency domain. According to Truche (2010), at low frequencies, the CWT is precise in frequency but less precise in time. Conversely, at high frequencies, the CWT is precise in time and less precise in frequency. This characteristic translates the adaptation of the CWT to the studied signal, unlike the window Fourier transform, which retains a constant resolution in its analysis regardless of the frequency analyzed.
For a discrete time series consisting of X n values, the CWT W n (s) is defined by the convolution of X n with a wavelet Ψ 0 (η) and consists of a complex wave modulated by a Gaussian function W n (s), which is represented as follows: Further, Ψ 0 (η) is given by the following equation: where (*) is the complex conjugate; s is the wavelet scale parameter related to the frequency; η is the translation or localization factor related to the time (an adimensional parameter); δt is the time interval between X n and X n-1 ; and ω 0 is an adimensional frequency, In order to satisfy the eligibility condition and select the right choice for the Morlet mother-wavelet, 6 is the optimal choice for the value of ω 0 ; (1) this value provides a good experimental balance between the time and frequency locations. According to Anctil and Pelletier (2011), calculating an average power spectrum using bands of periods allows the clear illustration of the differences in the frequency distribution and temporal evolution of the variance. The spectrum for a selected band consists of the weighted sum of the power spectrum between two scales, s 1 and s 2 , defined by the user (Torrence and Compo 1998;Santos et al. 2001;Grinsted et al. 2004;Santos and Morais 2013). The power spectrum or scale-average variance is calculated by the following expression: where δ j is a factor of the frequency resolution (set to 0.1) and C δ is a reconstruction factor for the case of the Morlet mother-wavelet and is set to 0.776. To define a nonzero interval, the value of j 1 must always be less than that of j 2 . According to Santos and de Morais (2013), the global wavelet spectra provide an unbiased and consistent estimation of the true power spectrum of the time series; it is useful in summarizing the temporal variability in a region. According to Al-ani (2013), the steps of CWT implantation are as follows: 1. Initialization of scale (s): The calculation procedure will be started from the scale s = 1 and will continue for increasing values of s, that is, the analysis will start from the high frequencies and proceed towards the low frequencies. 2. Calculation of the CWT: The wavelet is placed at the start of the signal at the point corresponding to time = 0. The scale 1 wavelet function is multiplied by the signal and then integrated over the entire time. The result of the integration is then multiplied by a constant number and recorded as normalized energy 3. Incrementing of τ: After the wavelet at scale s = 1 and then translated (or shifted) to the right by a value τ at location t = τ, and equation is computed again to obtain the CWT at point t = τ, s = 1 in the time-scale space for each point until the end of the signal

Hierarchical cluster analysis
In this work, Ward's method of linkage between clusters, based on Euclidean distance as a dissimilarity metric, was used. Thus, we developed analyses considering the behavior of the global spectra and variance time series for the 69 rain gauges. In the case of the global wavelet spectra, cluster analysis was performed only once. In the case of the variance time series, scales of 3-6 months, 8-16 months, and 1-3 years were used to group the time series into different clusters. The ascending hierarchical classification (AHC) is one of the techniques that used for providing a set of partitions in a series "W'' in increasingly broad classes, wherein each cluster (group) or partition has homogeneous or similar characteristics. The Euclidean distance, as its name implies, computes the distance between points, and then the Ward's method aims at grouping points that are r i,j distance away into a cluster, so that, when adding new points to this cluster, the distance between this cluster and other clusters changes at little as possible (Ward 1963). Ward's method is given by the following expression (Everitt and Dunn 1991;Wilks 1995): where d e is the Euclidean distance between the metrics and P p,j and P k,j indicate the j-th statistic calculated for rain gauges p and k, respectively. According to Brito et al. (2017), the dendrogramic distance between the clusters (d c ) is calculated from the following equation: where n is the number of rain gauges and x i is the i-th rain gauge in the cluster. Hierarchical cluster analysis is suggested as a practical method in identifying meaningful clusters within samples that may superficially appear homogeneous (Yim and Ramdeen 2015;Brasil Neto et al. 2021).
There are clear advantages to offering various options in setting the parameters of the analysis. According to Ferreira and Hitchcock (2009), in general, Ward's method had the highest mean Rand index that gives a proportion of correct groupings to compare the clustering methods, except when there were large differences among cluster sizes. In addition, the performance of Ward's method remains more stable than that of average linkage when most of the data are periodic.

Continuous wavelet analysis
DWT and CWT are the most used tools in the analysis of stationary and nonstationary time series and their application made a scientific revolution in the field of hydrology. In this work, it is not necessary to obtain the detail and approximation components of a signal via DWT, but the continuous information about stationary and no stationary phenomena and its evolution in time-frequency domain. It is worth highlighting that although DWT could give a solution for our needs, CWT is more flexible (Abda et al. 2021;Saraiva et al. 2021;Silva 2014, 2019;Freire et al. 2019;Freire and Santos 2020).
To characterize periodic, stationary, and nonstationary phenomena, identify the main modes of rainfall variability and their percent contributions to the total variance, and identify dry and wet periods in the monthly rainfall time series (Fig. 2), the continuous wavelet transform (CWT) was applied (Fig. 3). The data is 38 years long, and the cone of influence (COI), at period 96 months, is already 12 years large on each side, that is, 24 years of data inside the COI. This leaves only 14 years of data. Therefore, it is easy to determine whether the power of the variance in different scales, from short-to long-term, is stable over the observation period.
The continuous wavelet spectra of rainfall are represented in terms of two-dimensional time-frequency figures (Fig. 3). The rainfall spectra of the study region show, as a first observation, that the spectral responses differ from one rain gauge to another, and globally, the spectra show stationary fluctuations that are well-distributed at different time scales. Annual fluctuations presenting strong wavelet coefficients are not constant over time for the analyzed stations (Fig. 3). Stationary and non-stationary phenomena resulting from the CWT is a marker of trends and change points in rainfall time series.
AHC is the technique that enables to achieve the objective of this study, which is a regionalization of rainfall patterns over Northern Algeria at different modes of variability and trends. The dendrograms in Fig. 4 represent the homogeneous regions based on the AHC for the global wavelet spectra (GWS) (Fig. 4a), 3-6-month (Fig. 4b), 8-16-month (Fig. 4c), and 1-3-year (Fig. 4d) scale-average variance time series based on monthly rainfall over northeastern Algeria.
The variance decomposition analyses for optimal classification, automatically computed using Xlstat, are shown in Table 2.

Spatial analysis of rainfall patterns
Based on the AHC considering the GWS, three clusters of homogeneous modes of variability were identified over the study region (Figs. 4a and 5). This diversity may be due to the complexity of the study region (distance from the sea, geomorphology, geology, climate, relief, and other characteristics). Cluster 1 (G1) includes the largest number of rain gauges, exceeding 50% of the total number of gauges (39 stations) (Fig. 6b), which are distributed over the northern part of the area near the Mediterranean Sea at altitudes between 40 and 800 m with some peak ridges reaching 2300 m. This region is characterized by a humid and subhumid climate with average annual precipitation reaching 1700 mm according to the recent map by Merabti et al. (2018a, b). The G1 cluster includes the coastal Algiers (02), coastal Constantine (03), Soummam (15), Kebir Rhumel (10), and Saybouse (14) basins (Fig. 1b), covering an area approximately equal to 33% of the study area (Fig. 6a). The area of each cluster was calculated using the area of each basin as a unit of measurement (Fig. 1b).
Cluster 2 (G2) is located in the interior of the study area, which has a subhumid and semiarid climate in which the precipitation is between 250 and 550 mm per year. This cluster includes only nine rain gauges (13% of the total number of gauges) (Fig. 6b), the lowest number of rain gauges of any cluster, and extends over an area comprising 30% of the entire study area (Fig. 6a). In addition, the G2 rain gauges are distributed in sparse manner over the basins, i.e., the Chott Hodna (05) and Kebir Rhumel (10) basins, where altitudes vary between 400 and 1000 m (Fig. 1a).
In the third cluster (G3), the rain gauges are uniformly distributed across the basins, i.e., Chott El-Melghir (06), the high Constantine plains (07), the Medjerda (12), and Chott Hodna (05). G3 occupies the southern part of the study region near the Sahara basin, with a surface area contribution equal to 42% of the total area (Fig. 6a) and altitudes between 800 and 2300 m, which contributed to the homogeneity of this cluster, with the exception of a few peak ridges below 800 m observed in the Medjerda and Chott Hodna basins. G3 is completely subject to a semiarid climate in which rainfall reaches only 300 mm per year and includes 30% of the total number of rain gauges (21 gauges) (Fig. 6b) with four rain gauges located near the border with Tunisia.
The GWS time series of G1, G2, and G3 are shown in detail in Fig. 7a, b and c, respectively. Figure 7d illustrates the time series from a representative rain gauge of each cluster: G1 (blue), G2 (red), and G3 (green), with the 5% significance level represented by the light blue lines (Fig. 7d). It is worth noting that the three 95% confidence curves are stacked on top of each other with slightly different  values. In addition, the percent contributions of the selected seven modes of variability, i.e., 3-6 months, 8-16 months, 1-3 years, 2-4 years, 3-6 years, 6-8 years, and 8-12 years, to the total variance were calculated from the GWS (Fig. 7) for each cluster, i.e., G1 (Fig. 8a), G2 (Fig. 8b), and G3 (Fig. 8c). It is worth noting that the sum of the contribution can be higher than 100% because some mode of variability are in common with each other (e.g., 1-3 years with 2-4 years and 2-4 years with 3-6 years). Globally, the results obtained from the analyses show a heterogeneous rainfall pattern according to the modes of variability (frequency space), which agrees with the results obtained for western and eastern Algeria (Khedimallah et al. 2020), Tunisia (Jemai et al. 2018), and Morocco (Zamrane et al. 2016).
In the short term, the CWT (Fig. 3) and GWS of the G1 precipitation (Fig. 7a) reveal the existence of nonstationary structures, where the seasonal periodicity intervals (3-6 months) are slightly structured and have low percent contributions between 7 and 15% (Figs. 8a and 9). By contrast, in the medium term (8-16 month to 1-3 year), the analysis indicates the dominance of the annual periodic phenomena with significant power at a confidence level of Fig. 5 Spatial distribution of homogeneous clusters obtained by applying the hierarchical ascending classification to the global wavelet spectra Fig. 6 Contribution, in percentage, of (a) the area of each cluster to the total study area and (b) the percentage of rain gauges included in each cluster compared to all rain gauges used in the analysis during the 1970-2007 period 95%, which are expressed by sharp peaks compared to the other modes of variability (Fig. 7a, d). These annual fluctuations explain most of the total variance, with a contribution between 25 and 60% (Figs. 8a and 9). On the interannual scale, the 1-3-year mode of variability appears to be clearly visible between 1975and 1984and from 1999 and 7) with a rupture in the blue color that reveals the disturbance in the continuity. The dominance of 1-year and 1-3-year fluctuations was also observed in the Sebaou River basin (northern central Algeria) (Zerouali et al. 2018). This high variability can be explained by the effects of the Mediterranean effects on rainfall processes. A transition to multiannual modes of variability (2-4 years and 3-6 years) was easily observed, for example, in the rain gauges 021,703 and 030,102 of G1 (Figs. 3b and 7). The various fluctuations cited above explain why the contribution does not exceed 25% of the total variance (Figs. 7a, 8a and 9). The decadal fluctuations are visible, and present a small contribution of 6% (Fig. 7a, 8a and 9).
Analysis of the GWS of G2 represented in Fig. 7b, shows that the mode of variability of Cluster 2's wavelet spectra are very close to those of Cluster 1 with visibility of 128 month mode of variability (Fig. 7b, d). The short-term seasonal fluctuations 3-6 months in G2 show weak amplification in the spectrum, with a low contribution of less than 14% to the total variance (Figs. 8b and 9). The annual periodic phenomena (8-16 months) are visible on the GWS (Fig. 8b) and are expressed by a less intense amplification compared to those of G1 in the CWT and GWS. The annual mode contributes between 15 and 28% to the total variance (Figs. 8b and 9). Compared with the annual mode, the multiannual variability modes of 1-3 years (16-32 months) and 3-6 years (32-64 months) show some amplifications, with a maximum cumulative contribution reaching 55% (Figs. 7b, 8b and 9), and these amplifications are easily observed after 1986 (Fig. 3c,d). The 64-128-month scales, characterizing the multiannual components, show obvious amplifications in the GWS spectra, particularly for the rain gauge 030,204. This mode is the most dominant for this cluster (G2) (Fig. 6b) and explains more than 25% of the variance (Figs. 7b, d,  8b and 9).
For G3, the GWS (Fig. 7c, d) highlights the seasonal (3-6-month), annual (8-16-month) and interannual (16-32month) components that temporally localized, isolated events, revealing singularities (no stationary) (Fig. 3e,  f). The maximum contribution of the different modes of variability does not exceed 28% (Figs. 8c and 9). At small scales, the GWS of G3, which is temporally subjected to semiarid and arid climates, highlights high-frequency processes, the amplifications of which are clearly visible (Figs. 7c, d). The contribution of this mode reaches a maximum of 21% of the total variance ( Fig. 8c and 9). The spectra reveal the presence of some large-scale processes that are more or less well-localized over time. A multiannual Fig. 8 Percent contributions of the selected energy bands to the total variance for the rainfall of (a) Cluster 1, (b) Cluster 2, and (c) Cluster 3 of different modes of variability resulting from the GWS process of 32-64 months (3-6 years) (Fig. 6c) is localized between 1978 and 2002. This mode gradually changes to a decadal fluctuation, which remains insignificant outside the COI (Fig. 3e). The 32-64-month mode shows a contribution to the total variance between 12 and 27% (Figs. 8c and 9). The rainfall of G3 indicates that the annual processes (8-16 months) are slightly structured (Figs. 3e, f) and less attenuated in the GWS than other components are (Figs. 7c,d); when compared with the other components that have lower temporal variabilities, the annual processes disappear very quickly. The annual mode of G3 indicates the lowest contribution compared to the annual modes of G1 and G2, with the maximum contribution not exceeding 23% (Figs. 8c and 9). Overall, for G3, the analysis revealed the existence of nonstationary structures in the medium to long term, which the most spectacular is that of the 64-128-month mode.
It is impossible to interpret anything for periods near 128 months as they are inside the COI, or even outside of it, and the ratio data length/period is negative. In addition, the sum of the contribution higher than 100% is explained because there are overlapping in modes of variability, for example, for 1-3-year and 2-4-year modes of variability; the variance contribution of 2 years and 3 years was computed in both modes of variability. Another example, for 2-4-year and 3-6-year modes of variability, the variance contribution of 3 years and 4 years were computed in both modes of variability. Therefore, it is advisable to read the contribution of each one independently through the histogram and not take into account the cumulative variance.
From these results, we can conclude that the northern part of Algeria (G1) is dominated by annual periodic fluctuations in rainfall of 8-16 months. This indicates that the increase in average rainfall due to the humid climate may be responsible for the formation of periodic components, particularly annual fluctuations (Zerouali et al. 2018). G2 is dominated by periodic interannual fluctuations (1-3 years and 2-4 years), and G3 is characterized by interannual and decadal fluctuations (8-12 years). According to the obtained analyses, when the climate of a region tends towards aridity, the climate will be dominated by periodic long-term phenomena (multiannual to decadal). In contrast, humid and subhumid climate regions will be dominated by seasonal, annual, and interannual fluctuations that explain short-to medium-term processes. Based on long-term and quality-controlled rainfall time series in southwestern Europe (Peña-Angulo et al. 2020) and northern Algeria (Zerouali et al. 2020), the authors of previous studies found that in the absence of statistically significant long-term trends (increasing/decreasing) in rainfall time series, except for over short periods, the interannual to interdecadal mode of variability detected in the analyses can contribute to hiding long-term trends in rainfall time series.
This finding is important for the detection of change points and trends in studies of hydrology and earth science. The diversity of rainfall patterns around the study area can be associated with and affected by longitude, explaining a decline in rainfall from north to south, particularly in Algeria, which explains Figs. 1b and c (Bessaklia et al. 2021;Hakim et al. 2021;Merabti et al. 2018a, b;Achite et al. 2017;Meddour 2010;Meddi et al. 2010). In addition, according to Mathbout et al. (2019), the distance from the sea (longitude, in the present case) and latitude of a given location might be the most important factors that affect the variations and spatial distribution of rainfall across the Mediterranean basin. The results obtained from the analysis indicate that each region of the study area is characterized by a climate stage (humid, subhumid, semiarid, and arid), each climate stage is characterized by a specific mode of variability, and longitude is one of the important factors influencing this diversity.

Spatial analysis of trends and variability at different time scales
In this section, the seasonal (3-6-month), annual (8-16month), and multiannual (1-3-year) components from the Fig. 9 Box plot of the statistical characteristics of the percent contributions of the selected energy bands to the total variance for the rainfall of (a) Cluster 1, (b) Cluster 2, and (c) Cluster 3 of different modes of variability resulting from the GWS 69 CWTs (Fig. 3) were isolated and extracted to examine their variance and analyze their climatic behavior. According to the literature, there is only a single study, by Santos et al. (2018) that combined the wavelet spectra of the scale-average variance of monthly average flows from eight stations and a hierarchical cluster analysis in the Black Sea region (Turkey). The method succeeded in determining similar hydrological regions and extracting dramatic fluctuations. Spatial analysis by the AHC of seasonal components (3-6 months) indicates the existence of three clusters of regions with homogeneous climatic behavior (Fig. 10). G1 comprises 42% of the rain gauges (29 gauges) (Fig. 6b), which are well-distributed over the northwestern part of the region near the Mediterranean Sea with a humid and subhumid climate. The G1 cluster includes the following basins: coastal Algeries (#02), half of the coastal Constantine (#03), and Soummam (#15) (Fig. 1b), covering an area of less than 33% of the study area (Fig. 6a). In contrast, G2 occupies the northeastern part of the study area and contains 11 rain gauges (16%), which are located in the second half of the Constantine coastal area (#03) and in the Seybouse (#14) basin, which together occupy an area equal to 15% of the study area (Figs. 1b and 10a). G3 extends over more than 65% of the study region and contains 42% of the rain gauges (29 gauges) (Fig. 6b). This cluster is distributed over the basins of Chott Hodna (#05), Chott Melghir (#06), the Constantine high plains (#07), Medjerda (#12), and southern Kebir Rhimel (#10) (Fig. 1b).
Hierarchical clustering of the multiannual components (1-3 years) showed four different climatic behavior clusters or heterogeneous clusters, as shown in Fig. 10c. The G1 cluster agglomerates 24 rain gauges as follows: 2 rain gauges in coastal Algeries, 15 rain gauges in Soummam, and 7 rain gauges in the high Constantine plains (Figs. 1b and 10c), with a combined area exceeding 30% of the total study area. The G2 cluster is located in the northern part of the coastal Constantine (3 gauges) and Seybouse (14 gauges) basins (Fig. 10c). However, the G3 rain gauges are sparsely distributed in the following basins: Medjerda (12 gauges) and Kebir Rhimel (10 gauges). G4 included 20% of the rain gauges, which are distributed in the Chott Melghir (6 gauges) basin and in the high Constantine plains (7 gauges) (Figs. 6b and 10c).

Rainfall variability at the temporal scale of 3-6 months
At the seasonal scale, in the 3-6-month band (Fig. 11), great variability in the variance over time is noted, with spectacular peaks exceeding the significance level for G2 and G3 (Fig. 11b, c). In contrast, G1 immediately shows a downward trend. This downward trend is well-illustrated during the 1976-1980 and 1983-1993 periods and has been increasing since 1993 (Fig. 11a, d).

Rainfall variability at the temporal scale of 8-16 months
The global analysis of the scale-average variance of the annual components for the 8-16-month band (Fig. 12) of the three clusters resulting from the cluster method shows exceptionally rainy years exceeding the significance level between 1972-1974, 1980-1984, and 2002-2006. In contrast, dry periods are marked by low variability, below the significance level, between 1974-1980 and 1984-2002. This period of drought is well-established, particularly in the region including G2 (Fig. 12b, d); it has also been observed in the Mediterranean basin (Zerouali et al. 2021a, b;Khezazna, et al. 2017;Philandras et al. 2011;Piccarreta et al. 2013;Nouaceur and Murărescu 2016). According to Hasanean (2004), the negative trends of rainfall in the western Mediterranean coincide with subtropical anticyclonic trends, which, since 1970, have been known to increase pressure.

Rainfall variability at the temporal scale of 1-3 years
At the interannual scale, for the 1-3-year band (Fig. 13), large fluctuations in variance were observed, but they were below the confidence level of 95% (Fig. 13e). G1 shows low variability in variance between 1970-1972, 1974-1993 and 1995-1998 (Fig. 13a), expressed as very remarkable dry periods. G2 and G3 (Fig. 13b, c) also show similar fluctuations to G1 (Fig. 13a) with a wet period starting from the late 1990s, which corroborates the results and information obtained from spectral 3-6-month bands. G4 revealed (Fig. 13d) the lowest variability in the variance, indicating that this region is the region that is most affected by droughts, except for a few severe peaks characterizing wet years in 1990 and 1996. These observed trends (Figs. 11,12 and 13) concern all rain gauges in northern Algeria and the observed a decrease in rainfall over the western Mediterranean, especially in Maghreb countries, France, Italy, and Spain, that might be associated with shift towards positive North Atlantic Oscillation (NAO +), and the authors concluded that the NAO could play an essential role in modulating Mediterranean rainfall. In the Mediterranean region, López-Moreno et al. (2011) observed that the different winter modes in the majority of the mountain areas were closely related to the NAO index, which may lead to a greater frequency of warm and dry winters. Massei et al. (2017) showed that there is a time scale dependence of links between atmospheric circulation patterns (such as NAO) and hydroclimate series in Seine River catchment, France. Using continuous wavelet analysis, Khedimallah et al. (2020) found that the rainfall of the Cheliff and Medjerda basins (Algeria) and the NAO index are strongly correlated, with correlations ranging from 60 to 84%.
The analysis by the cross time-frequency techniques used by Zerouali et al. (2018) shows good consistency between the NAO and precipitation of northern central Algeria, especially in the second half of the period from 1972-2010, corresponding to the period associated with a dry trend starting in 1980. Munoz-Diaz and Rodrigo (2003) found an upward trend in rainfall amounts corresponding to the negative phase of the NAO and a downward trend corresponding to the positive phase, with more extremes associated with the negative or harmful phase of the NAO. Xoplaki et al. (2004) found that the positive phase of the NAO recorded after 1975 corresponds to a period of rainfall deficit for all the plains of the Iberian Peninsula. In the Fig. 11 Evolution of the 3-6-month scale-average variance of the rainfall of (a) Cluster 1, (b) Cluster 2, (c) Cluster 3, and (d) selected normalized spectra of the variance representative of each obtained cluster (the dashed red, blue and green lines represent the 95% confidence level) region of Abruzzo (Italy), Vergni et al. (2016) observed that the positive NOA is responsible in the main cases for negative trends in rainfall, while the negative NAO phase plays the opposite role. Sun et al. (2014) showed that the southern part of Europe has become drier since 1980, which is due to the positive phase of the NAO. According to Massei et al. (2011), the periods of strong NAO/rainfall consistency over Europe generally tend to increase between 1950 and 2000. This general strengthening of the coherence between the two fluctuations, beginning in the 1990s, appears at a recognized, strongly positive NAO phase period. It therefore results in similar oscillations on scales of approximately 1 year, 2-3 years, and 5-7 years. This explains why NAO is one of the main factors responsible for drought occurrence in northern Algeria and the Mediterranean basin (Khedimallah et al. 2020;Mathbout et al. 2019;Mühlbauer et al. 2016;Hamlaoui-Moulai et al. 2013, Ouachani et al. 2013, Zerouali et al. 2018Taibi et al. 2017;Zeroual et al. 2017;Meddi et al. 2010).

Conclusions
In this work, efforts were made, using a large amount of information and data resulting from continuous wavelet analyses, to develop a regional model of climatic rainfall behavior at different frequency and time scales. The results led to the following conclusions: -The northeastern portion of Algeria (G1) is predominantly characterized by periodic annual precipitation fluctuations at the 8-16-month band, which presents the most significant contribution to the region's precipitation variance, with a contribution between 25 and 60%. The appearance of this mode is due to high rainfall variability (rainy character) of the humid climate. -According to observations obtained in G2, where the climate tends towards aridity (from north to south), the region is dominated by periodic long-term phenomena (interannual up to decennial) or by phenomena seen in the spectral 64-128-month band and the bands greater than 128 months, which have a total cumulative contribution that exceeds 50% of the total variance. This diversity may be due to the complexity of the study region (distance from the sea, geomorphology, geology, climate and relief).
-For G3, the analysis revealed the existence of nonstationary structures in the medium to long term, which the most spectacular is that of the 64-128 months. -The results of the three isolated components and the different homogeneous regions highlighted the alternation of wet and dry years, in which the years of drought were more pronounced during the decades of the 1970s, 1980s and 1990s, whereas the wet years were more prominent during a few years of the study period and, particularly, during the decade of the 2000s. The results obtained from the drought analysis are consistent with those of other works carried out in Algeria and the Mediterranean regions for similar periods, which are mentioned above.
This study site, which in this study comprises the northeastern region of Algeria, should subsequently be extended to the entirety of Algeria. In fact, each region in Algeria will face specific problems; this is why separate observations were presented and reported for each region or site, which can help in finding a single model that is applicable to all sites. The information gathered from this study will set up a support base for decisions and will, in fact, allow a dialogue between researchers and managers from different sectors (mobilization of water resources, agriculture, energy, environment, construction and other sectors). The main strength of this study is the use of new and robust hybrid approach of wavelet-based method and statistical technique to extract new information about rainfall pattern and behavior in a time-scale domain compared to the conventional approaches. However, it is worth noting that a weakness of this study was the use of short time series, which prevented us to study, analyze, and understand decadal fluctuations and periodicity near 128 months or higher. Such a periodicity is considered one of the interesting climatic components that may be linked with large scale fluctuations, such as North Atlantic oscillation, Atlantic Multidecadal Oscillation, southern oscillation, and Madden-Julian oscillation. The results obtained on the frequency domain are of great interest for recent research. Therefore, such results will be further explored in future articles using advanced mathematical techniques. Finally, future research perspectives and objectives will be oriented towards analyzing the existence of possible relationships in the time-scale domain between large-scale fluctuations and precipitation trends observed in this study.