1 Introduction

Regional and global precipitation changes are among the most substantiating aspects of climate change, but there is little consensus on the magnitude and spatial patterns of the observed and expected changes (Donat et al. 2016). Furthermore, extreme precipitation events can change differently from total precipitation, hence the special attention of their regional assessment in recent years (Gu et al. 2022; Mastrantonas et al. 2022).

Spatiotemporal prediction of such events is crucial to help mitigate their negative impacts. However, although the Mediterranean has been classified as one of the hotspots of climate change, previous extreme precipitation scenarios focused, due to lack of data, mainly on Europe, providing projections for the entire Mediterranean (Giorgi and Bi 2009; Tramblay and Somot 2018; Zittis et al. 2021). This means that there is a knowledge gap in the Southern Mediterranean translated into imprecise information, which will have a negative impact on adaptation actions and resilience measures (Hadria et al. 2021; Salhi et al. 2021). Therefore, a significant need is identified in regions like the Maghreb, where development horizons can be weakened by cascading precipitation-related hazards (Salhi et al. 2020).

Moreover, the examination of previous works reveals another gap which is the lack of spatial coverage of the entire Maghreb and the need to update the available results, which are significantly fewer (Salhi et al. 2022; Tramblay et al. 2013). There is also a third gap identified in some previous studies which characterize the variability and trend of precipitation without addressing key parameters such as concentration, disparity, deviation, and associations with regional geographical factors, except locally and partially (Benabdelouahab et al. 2020; Benhamrouche et al. 2015; Mathbout et al. 2021; Salhi et al. 2019).

Thereby, this study aims to fill these gaps by analyzing trends in the intensity and timing of daily and extreme precipitation in the Maghreb. This allowed (1) to assess patterns of precipitation concentration, disparity, and deviation, and (2) to explore associations and correlations between precipitation characteristics and geographical factors.

The article is organized as follows: Sect. 2 describes the study area and shows the data and the methodology; the results are detailed in Sect. 3 and then discussed; finally, the conclusions are in Sect. 4.

2 Materials and methods

2.1 Study area

This article has approached the study of precipitation in the Maghreb from the point of view of physical geography, focusing on structural aspects rather than political and boundary ones (Fig. 1).

Fig. 1
figure 1

Geography of the study area and the stations studied (red squares). The legend shows the altitude in meters

The Maghreb forms a relatively homogeneous geographical unit, concentrated in the north-western part of Africa, close to Europe, and belonging to the Mediterranean civilization. A long orogeny affected the region following the convergence between European and African plates to create a complex compartmentalized relief. The Rif belt in the northwest which is a stacking and thrusting nappe structure with a contrasting relief where the mountain ranges alternate with littoral or sublittoral depressions/valleys. The Atlas belt (Atlas-Tell) is a wide barrier between the Sahara and the Mediterranean coast which stretches across northern Algeria, with ends in northeast Morocco and northwest Tunisia (Agadir-Gabes). It is made up of plains and high plateaus, bordered by high mountains including the High Atlas up to the Tunisian ridge. The Sahara, in the South, is the largest desert in the world, made up of an eroded sedimentary base. It extends throughout the Maghreb and continues as far as Egypt, Sudan, and the semi-arid zones of the Sahel. Its relief includes basins interspersed with plateaus and a few isolated volcanic mountain systems.

A sharp climatic contrast divides the region into three environmental areas: the northern Mediterranean coasts which have a humid and warm Mediterranean climate, the humid and cold Atlas belt, and the great dry and hot Sahara desert (Walas and Taib 2022). This means that the Maghreb is mainly under semi-arid and arid climates except for a narrow coastal strip which is under subhumid Mediterranean climate (Beck et al. 2018). This obviously influences precipitation, which is marked by strong spatiotemporal variability. Consequently, water scarcity is intensifying due to population growth, and accelerated urbanization and socioeconomic development, particularly in agriculture (Taabni and Jihad 2012).

2.2 Data

Long-term (1970–2021) quality-controlled observed daily precipitation data was used from the Moroccan Meteorological Directorate and the National Climatic Data Centre (https://www.ncdc.noaa.gov/) archive of global historical weather and climate data in addition to station history information. The quality of data was reviewed using the following criteria: (1) percentage of total missing data less than 5% and (2) annual percentage of missing data less than 10%. This selection process results in a subset of 45 scattered meteorological stations distributed over the study area.

For spells of precipitation, a dataset of daily precipitation from the CHIRPS Daily: Climate Hazards Group InfraRed Precipitation with Station Data’ (version 2.0 final) collection was used at a resolution of 5.56 km over a 42-year period (1981–2021). The same data collection was used to assess the long-term annual average and the spatiotemporal precipitation trend in Google Earth Engine. A Sen’s slope trend algorithm at the pixel scale was executed and tested later based on the Mann–Kendall statistical test (α ≤ 0.05 and Z = 1.96).

Different studies have shown the similarity of the pattern and the good agreement of CHIRPS with station-based data, which makes it possible to link and consolidate them reliably (Ayoub et al. 2020; Babaousmail et al. 2019; Caparoci Nogueira et al. 2018; Hordofa et al. 2021).

In this paper, the kriging method was considered for data and parametric mapping because it is better suited to regional variability (Di Piazza et al. 2011; Farnell et al. 2018; Guo et al. 2020; Salhi et al. 2019).

2.3 Methods

2.3.1 Mann–Kendall trend test

The nonparametric Mann–Kendall test (Kendall 1975; Mann 1945) was chosen to assess randomness against trend for its reliability in quantifying the significance of trends in hydrometeorological time series (Da Silva et al. 2015). It is calculated according to Eq. (1):

$$S=\sum_{i=1}^{n-1}\sum_{j=i+1}^{n}\mathrm{sgn}\left({x}_{j}-{x}_{i}\right)$$
(1)

where n is the data points number, xi and xj are the data values in the time series i and j (j ˃ i), respectively, and sgn(xj − xi) is the sign function determined according to Eq. (2):

$$\mathrm{sgn}\left({x}_{j}-{x}_{i}\right)=\left\{\begin{array}{c}+1\\ 0\\ -1\end{array}\right.\begin{array}{c} \mathrm{ if} {x}_{j}-{x}_{i}>0\\ \mathrm{if} {x}_{j}-{x}_{i}=0\\ \mathrm{if} {x}_{j}-{x}_{i}<0\end{array}$$
(2)

Later, the variance is calculated according to Eq. (3):

$$\mathrm{Var}(S)=\frac{n\left(n-1\right)\left(2n+5\right)-{\sum }_{i=1}^{P}{t}_{i}({t}_{i}-1)(2{t}_{i}+5)}{18}$$
(3)

where n is the data points number, P is the tied groups number, (Σ) is the summary sign that indicates the total over the entire tied groups, and ti is the data values number in the Pth group.

A tied group is a set of sample data having the same value. In cases where the sample size n ˃30, the standard normal test statistic ZS is calculated according to Eq. (4):

$${Z}_{\mathrm{S}}=\left\{\begin{array}{c}\frac{S-1}{\sqrt{\mathrm{Var}(S)}}\\ 0\\ \frac{S+1}{\sqrt{\mathrm{Var}(S)}}\end{array}\right.\begin{array}{c} \mathrm{ if} S>0\\ \mathrm{if} S=0\\ \mathrm{if} S<0\end{array}$$
(4)

Increasing trends correspond to positive values of ZS while decreasing trends correspond to negative values. Importantly, trends are tested at a specific a significance level which in this study is α = 0.05.

Null hypothesis is rejected when |ZS| ˃ Z1−α/2, which means that a significant trend exists in the time series. The value of Z1−α/2 is obtained from the standard normal distribution table.

2.3.2 Sen's slope model

The slope of the trend in a sample of n pairs of data is assessed according to the well-known Sen’s nonparametric method (Sen 1968). The latter evaluates the slope of the trend based on a linear model, and the variance of the residuals should be constant in time computed according to Eq. (5):

$${Q}_{i}=\frac{{X}_{j}-{X}_{k}}{j-k} \mathrm{for} i=1,\dots , n$$
(5)

where Xj and Xk are the data values at times j and k (where j ˃ k).

If case of one datum in each time-period: N = n(n − 1)/2, where n is the time-periods number. Otherwise, N ˂ n(n − 1)/2 when there are multiple observations in one or more time-periods. The n values of Qi are ordered from smallest to largest, and the median of slope or Sen’s slope model is calculated according to Eq. (6):

$${Q}_{\mathrm{med}}= \left\{\begin{array}{l}{Q}_{\left[(n+1)/2\right]}\;if\;n\;is\;odd\\ \frac{{Q}_{\left[n/2\right]}+{Q}_{\left[(n+2)/2\right]}}{2}\;if\;n\;is\;even\end{array}\right.$$
(6)

The value of Qmed reveals the trend steepness while its sign indicates data trend. The confidence interval of Qmed at a specific probability should be obtained to evaluate whether the median slope is statistically different than zero or not. This confidence interval is calculated according to Eq. (7) (Gilbert 1987):

$${C}_{\alpha }= {Z}_{1-\propto /2}\sqrt{\mathrm{Var}(S)}$$
(7)

where Var(S) is the variance (Eq. 3), and the value of Z1−α/2 is, as previously mentioned, obtained from the standard normal distribution table. In this study, the confidence interval was calculated at a significance level (α = 0.05). Then, M1 = (n − Cα)/2 and M2 = (n + Cα)/2 were calculated. The lower and upper limits of the confidence interval, Qmin and Qmax, are the M1th largest and the (M2 + 1)th largest of the n-ordered slope estimates (Gilbert 1987). If the two limits (Qmin and Qmax) have similar sign, then the slope Qmed is statistically different from zero.

2.3.3 Consecutive Disparity Index

Standard statistics such as the average, standard deviation, variance, and coefficient of variation do not consider the temporal order of the values in a time series. Nonetheless, chronological ordering of the values constitutes an important characteristic in the temporal behavior of the analyzed variable. A high contrast between consecutive values of precipitation can produce a stress in ecosystems and in some socioeconomic sectors. In order to evaluate the “jumps” between consecutive values in a series, the Consecutive Disparity Index (D) (Martín Vide 1986) was defined as follows:

$$D=\frac{1}{n-1}\bullet {\sum }_{i=1}^{n-1}\left|\mathrm{ln}\frac{{p}_{i+1}}{{p}_{i}}\right|$$
(8)

where pi is the value in position i and n is the series length, ∀pi, pi + 1 ≠ 0. Several options exist for avoiding numerical indetermination (division by 0), when a time series contains zeroes (which is common in monthly precipitation data in desertic climates or ones possessing a dry season, as many regions in the study area): one is to convert the values below 1 mm, including the 0, to 1 mm; another is to add a constant, c, that can also be 1, to all values of the entire time series (Fernandez‐Martinez et al. 2018; Martin-Vide et al. 2022), as

$$D=\frac{1}{n-1}\bullet {\sum }_{i=1}^{n-1}\left|\mathrm{ln}\frac{{p}_{i+1}+c}{{p}_{i}+c}\right|$$
(9)

D is always positive and is equal to 0 when pi = pi + 1, ∀ i, an ideal case with all values of the series equal.

2.3.4 Daily concentration index

The concentration index (CI) allows to calculate the concentration curves that link the accumulated percentages of precipitation contributed by the accumulated percentage of days on which it took place (Vyshkvarkova et al. 2018). It identifies areas with high and low intensity of precipitation to better understand daily precipitation variability, namely, its temporal and spatial structure. It is more informative and better suited to spatially assess hydrological and geomorphological hazards, such as landslides, floods, drought, and soil erosion.

To assess CI, only good quality daily data were used according to recognized data-sensitive method (Martin‐Vide 2004). It consists of aggregating daily precipitation events into increasing (1 by 1 mm) categories and determining the relative impact of the different classes by analyzing the relative contribution (as a percentage) of progressively accumulated precipitation (Y) as a function of the accumulated percentage of wet days (X) (Cortesi et al. 2012) as described in Eqs. (10) and (11):

$${Y}_{j}=100\bullet \frac{\sum_{i=1}^{j}{p}_{i}}{\sum_{j=1}^{N}{p}_{j}}$$
(10)

where pi and ni are the precipitation and the number of wet days (respectively) falling into the i-th category, and N is the total number of categories. These percentages are related to exponential curves, called normalized rainfall curves (Jolliffe and Hope 1996), so the above-mentioned method can be improved by substituting the empirical lines with the fitted exponential curves. Such functions have the form of Eq. (11) (Olascoaga 1950; Riehl 1949):

$$\widehat{Y}=a\widehat{X}\bullet {e}^{b\widehat{X}}$$
(11)

where a and b are constants that can be calculated according to the least-squares method shown in Eqs. (12) and (13):

$${\mathrm{ln}}_{a}=\frac{\sum {X}_{i}^{2}\sum \mathrm{ln} {Y}_{i}+\sum {X}_{i}\sum {X}_{i}\mathrm{ln}{X}_{i}-\sum {X}_{i}^{2}\sum \mathrm{ln}{X}_{i}-\sum {X}_{i}\sum {X}_{i}\mathrm{ln} {Y}_{i}}{N\sum {X}_{i}^{2}-{(\sum {X}_{i})}^{2}}$$
(12)

and

$$b=\frac{N\sum {X}_{i}\mathrm{ln}{Y}_{i}+\sum {X}_{i}\sum \mathrm{ln}{X}_{i}-N\sum {X}_{i}\mathrm{ln}{X}_{i}-\sum {X}_{i}\sum \mathrm{ln}{Y}_{i}}{N\sum {X}_{i}^{2}-{(\sum {X}_{i})}^{2}}$$
(13)

This was used to fit the empirical couples of values (Xj, Yj) defined previously. The concentration can be considered a function of the relative separation of the equidistribution line (Wang et al. 2013). Subsequently, CI is computed according to Eq. (14) based on the values of the constants a and b, previously calculated:

$$CI=S/5000$$
(14)

where S is the area delimited by the exponential curve, and the line Y = X:

$$S=\left(\frac{\mathrm{10,000}}{2}\right)-A$$
(15)

with A is the definite integral of the exponential curve aX · ebX between 0 and 100.

$$A=\left[\frac{a}{b}{e}^{bx}\left(x-\frac{1}{b}\right)\right]\genfrac{}{}{0pt}{}{100}{0}$$
(16)

CI value varies between 0 and 1. Previous studies show it is high when CI > 0.61, moderate when 0.55 < CI < 0.61, and low when CI < 0.55 (Vyshkvarkova et al. 2018). For instance, a CI value of 0.61 means that around 70% of the total precipitation amount happens on the 25% of the rainiest days (Monjo and Martin‐Vide 2016).

2.3.5 Spearman correlation

The Spearman’s correlation coefficient (ρ) is a nonparametric correlation coefficient that allows to determine how well the relationship between two variables can be described using a monotonic function (not necessarily linear). It is usually defined as the Pearson’s correlation coefficient between the rank variables; in other words, it measures the statistical dependence between the rankings of two variables. The ρ must be used instead of the Pearson’s r when the variables are not Gaussian, as is the case of many precipitation variables in dry climates. ρ ranges between − 1 and + 1. If the n ranks are distinct integers, it can be computed using Eq. (17):

$$\rho =1-\frac{6\sum {d}_{i}^{2}}{n({n}^{2}-1)}$$
(17)

where di is the difference between the two ranks of each couple and n is the number of couples.

2.3.6 Definition of precipitation days

Precipitation days were evaluated in terms of frequency and duration. According to frequency-based classification, three categories were distinguished (Li et al. 2021):

  • The total number of wet days (N) which is the annual count of all the days when precipitation is greater than 0 mm,

  • The days of significant precipitation (DSP) which is the annual count of the days when precipitation exceeds the threshold of 10 mm (R10mm), and

  • The days of extreme precipitation (DEP) which is the annual count of the days when precipitation exceeds the threshold of 50 mm (R50mm).

Subsequently, an average annual value was calculated at the station level for each of the three indices to assess the frequency of precipitation per category. For the DSP, the evolution and the average trend were evaluated using a linear regression curve.

According to duration-based classification (Phuong et al. 2022), the consecutive annual maximum dry spell was calculated which is the maximum number of consecutive days when precipitation is lesser that 1 mm. In Google Earth Engine, a first image was created on which an iteration function was applied to calculate the counter accumulation. Later, the average dry spell was calculated by averaging the annual maximum value at the pixel scale.

3 Results and discussion

3.1 Spatial patterns and trends of precipitation

Based on the station data, the average annual precipitation amount was calculated for the last 52 years (1970–2021) to assess its spatial patterns in the study area (Fig. 2a). It shows that the Atlas Mountain belt channels precipitation northward. Consequently, the Mediterranean fringe receives the highest precipitation, particularly in the Algiers-Annaba axis and in the Tangier peninsula (Rif Mountain arc) where it exceeds 900 mm per year on average. In the mountainous belt, it is in the range of 700 to 500 mm, then it drops rapidly toward the South below 100 mm. The Sahara Desert (South) receives very little or almost no precipitation. The orographic effect of the Atlas belt and the Rif arc is clearly perceived since the axis of the intercalary coastal valleys Melilla-Oran receives much lower precipitation than the neighboring mountains.

Fig. 2
figure 2

Spatial patterns and statistical trends. a The average annual precipitation during the last 52 years (1970–2021) (legend: precipitation amounts in mm). b The average duration in days of dry spell (legend in days). c The Mann–Kendall trend of precipitation and its statistical significance. d The annual consecutive disparity index

Another characteristic element of the precipitation pattern is the average duration of dry spells (successive days with no precipitation) assessed from CHIRPS data. They are shorter all along the Atlas Mountain belt and to the North of it (until less than a month) while they increase rapidly up to six successive months in the south (Fig. 2b). The transition between the Mediterranean climate of the north of the Maghreb and the tropical desert climate of the south is clearly seen in the decrease in annual rainfall and the increase in the average duration of droughts. This means that the North of the mountainous belt will receive on average more abundant precipitation and with scattered rains interspersed even in the summer period. This has repercussions on water reserves and their availability for use which will be favored in the North against a shortage in the South.

The statistical trend of annual precipitation derived from CHIRPS data was examined by the nonparametric Mann–Kendall test and its statistical significance (Fig. 2c). Two main observations can be drawn:

  • The Atlas Mountain belt shows a significant negative trend, which will result in a forecast precipitation deficit regime, and most likely, an extension of dry spells,

  • Most of the study area is under a non-significant trend, reflecting frequent disturbances in precipitation patterns.

The positive and negative trends found to the south of the Atlas belt do not mean anything because there the average annual values are very low.

The negative trend in the Atlas Mountain is consistent with that observed by other authors in North Africa (until − 16 mm/decade) (Caloiero et al. 2018).

All the above indicates the existence of a North–South spatial disparity imposed by the regional geography (altitudinal belt and latitude). Therefore, by examining the station-based consecutive temporal disparity (D) on an annual scale, it was found that this follows the same North–South pattern of precipitation (Fig. 2d). From a hydrological point of view, high D values imply a high risk of water contrasts and shortages and vice versa. Consequently, the Algiers-Annaba axis and the Tangier peninsula are the most favored by an abundant precipitation pattern and a low interannual disparity.

The same North–South pattern has been found in the Iberian Peninsula. The values of the annual D in the north of Morocco are a bit higher than in the south of the Iberian Peninsula and similar to those in the north of Algeria and Tunisia (Martin-Vide et al. 2022). Therefore, there is coherence in the values found on both shores of the Mediterranean.

3.2 Daily patterns and deviation

Previously, the pattern of the disparity of annual and interannual precipitation was examined. Subsequently, the station-based daily pattern of precipitation was studied to characterize its concentration and pluviometric significance. Regarding the distribution of the daily concentration of precipitation (Fig. 3a), it was found that the high concentrations (≥ 0.61) are spatially localized in the mountainous arc of the Rif, on the Atlantic coast between Casablanca and Dakhla, in Algiers, and on the Annaba-Gabes. The eastern façade of Tunis, faced to the central Mediterranean basin, is the area with the highest values of the daily concentration index. Moderate values (0.58) are observed throughout the Atlas Mountain belt, south of which the values become lower until the minimum observed in the Sahara Desert (≤ 0.54). It should be noted that in deserts, where the number of days of precipitation is very low, this index loses statistical interest. It is concluded that in addition to the orographic effect observed previously, the Atlas belt slows down the cloud masses by its altitudinal gradient until they pour heavy precipitation concentrated in the North, East, and West (disruptive effect). Once lighter, the cloud masses can gain altitude to penetrate and water the Atlas belt.

Fig. 3
figure 3

Precipitation concentration and average days of precipitations. a The daily precipitation concentration index (CI). b The average annual days of precipitations (N) (legend in days). c The average annual days of significant precipitations (DSP) (legend in days). d The average annual days of extreme precipitations (DEP) (legend in days)

It is interesting to highlight that in the Maghreb, the highest values of the concentration index are localized in the eastern Mediterranean façade of the region (eastern Tunisia) as it occurs in the Iberian Peninsula (Martin‐Vide 2004; Serrano‐Notivoli et al. 2018b) and, in general, in Europe (Cortesi et al. 2012). In general terms, the values obtained for the North of Algeria are somewhat lower than those calculated by Benhamrouche et al. (2015) and quite similar than those obtained by Bessaklia et al. (2018) for Northeast of Algeria, with different periods.

Station-based precipitation days were also evaluated in terms of number and quantities. According to volumes, three types were distinguished: the total number of wet days (N), the days of significant precipitation (DSP), and the days of extreme precipitation (DEP). The first result is that the regionalization of the annual average of N shows a North–South latitudinal gradient but does not reflect the orographic effect of the Atlas belt (Fig. 3b). On the contrary, the two other types (DEP and especially DSP) clearly show the orographic pattern and the disturbing effect exerted by the latter mountainous belt. DSP and DEP depend more likely on latitude and altitude and show higher values on the Mediterranean coast in association with abundant precipitation and higher concentration.

The second result is that the DSP gradient is more detailed, allowing better differentiation of precipitation areas. Thus, the Algiers-Annaba axis is the wettest with an average annual DSP of more than 12 days (Fig. 3c). The direct entourage of this axis and the Tangier peninsula follow with 10 DSP then the average goes down to around 1 week in the North of Morocco, North of Algeria, and North-West of Tunisia. Then, the DSP decreases progressively in the Atlas belt and then falls toward the South until less than 1 DSP on average in the Sahara Desert.

The frequency of DEP occurrence is linked to the probability of torrential events responsible for intense flooding. This frequency amounts to more than one DEP per year on average in two restricted axes: Tangier-Tetouan (Northern Morocco) and Tizi Ouzo-Jijel (Northern Algeria) (Fig. 3d) which reflects the repetitive character of this type of precipitation events. The annual frequency remains significant (0.5) in the Rif arc and outside the Atlas Mountain belt (Northern Algeria and Western Tunisia) which results in a moderate to high cumulative probability during a series of successive years. In the Atlas belt and in the South, the frequency decreases a lot which makes the occurrence of torrential precipitation events an exceptional character.

The statistical significance of these latter results was examined by Spearman’s correlation test (Table 1). The association between DSP and P (precipitation) is overall strong to very strong (≥ 0.700), which reaffirms the results of recent similar articles (Mathbout et al. 2018). It is much stronger than the association between N and P which differs and oscillates a lot from one station to another. On the contrary, the association between DEP and P is generally moderate to weak (≤ 0.500). This finding validates the conclusions drawn on the regionalization of the DSP and highlights the particularly interesting character of the pattern of precipitation in the Maghreb: the rainfall importance of a year is associated with the number of days when the rains are significantly important (≥ 10 mm) rather than the total number of rainy days.

Table 1 Spearman correlation of the average annual days of precipitations (N), the average annual days of significant precipitations (DSP), and the average annual days of extreme precipitations (DEP) with the annual precipitation amounts (P)

This is important for two reasons:

  • A technical reason observed during the data processing: most rainy days receive very low precipitation (even less than 1 mm). This means that the count of these days distorts the real picture of the annual precipitation because of the minimal effect of these days on the magnitude of annual precipitation,

  • A practical reason linked to the minimal effective impact of very low precipitation on the watering of vegetation and on the increase in the hydrological reserve, especially in the Maghreb as a region marked by very high evapotranspiration (real and potential) which makes that these very low volumes of rains are directly consumed.

This particular importance of DSP led us to study their deviation over time for the last 12 years (2010–2021) compared to a reference period of 40 years (1970–2009) on a scale of half a month (Fig. 4). Overall, a small decrease in DSP is observed at the beginning of autumn (September) which corresponds to the start of the rainy period in the Maghreb. This decrease is followed by another more significant one between November and the first half of February (winter decrease): the maximum decrease is observed during the month of December. From mid-February, there is an almost general increase in DSP until May.

Fig. 4
figure 4

Half-month deviation of the days of significant precipitations (DSP) during the last 12 years in comparison to a 40-year reference period (1970–2009)

These observations are interpreted as an intra-annual offset in significant precipitation (≥ 10 mm) during the last 12 years with a trend to decrease slightly at the beginning of the rainy season (autumn), drop in winter, then increase considerably in spring. This offset varies from one year to another and from one station to another, but it is observed that it generally oscillates between 2 and 7 fortnights. From a spatial perspective, the largest amplitudes of DSP deviation are observed in the Rif arc and in the Algiers-Annaba axis (i.e., outside the Atlas Mountain belt).

In terms of the intra-annual deviation ratio of precipitation, this DSP offset results in a precipitation deficit of 19% in winter and an accumulation of 8.7% in spring (Fig. 5). It should be noted that exceptional watering during summer months (e.g., August) increased by 9% approximately causing flash floods which had negative consequences on infrastructure and agriculture. This summer increase has statistically conditioned the annual increase (3.4%), even if its hydrological and agricultural impact is negligible.

Fig. 5
figure 5

Average annual deviation of precipitation in the Maghreb in the last 12 years

Recall that the statistical trend test (Fig. 2c) reflected the frequent disturbances of the precipitation pattern of a forecast deficit regime. Combining this with the observed DSP offset, it is concluded that a generalized precipitation deficit will be dominant with a pattern altered by frequent droughts in the rainy season and significant scattered downpours outside of it. This is consistent with observed changes in daily extreme precipitation on an annual scale (Mathbout et al. 2018). It also agrees with recent simulations of extreme precipitation trends in the Mediterranean (Benabdelouahab et al. 2020; Meddi and Eslamian 2020; Salhi et al. 2022; Zittis et al. 2021).

This altered pattern is validated by the trend curve of the average DSP which shows a negative evolution over the last 52 years, and which is likely to continue this downward trend (Fig. 6). According to the Mann–Kendall test, the negative trend is observed in the stations located east and west of the Atlas belt (Table 2). This negative trend is quite similar with the conclusion obtained for Calabria (Southern Italy), using six categories of daily amounts of a decreasing trend of the higher categories (Caloiero et al. 2016). On the contrary, the Mann–Kendall test shows a positive trend in the stations located in the Atlas belt and toward the north (significant at the alpha level of 99% in Miliana and of 95% in Bou Chekif, Es Senia, and Mostganem) (Table 2). In conclusion, there is an irregular pattern of the annual DSP which joins that of precipitation not only in average but also in amplitude of variation and in regionalization.

Fig. 6
figure 6

Evolution and average trend curve of the annual days of significant precipitations (DSP)

Table 2 Trends of annual days of significant precipitations (DSP) obtained by Mann–Kendall test and Sen’s slope estimator

It remained to understand the intensity that the precipitation of this altered pattern will have. To achieve this, the trend curve of the station-based daily concentration of precipitation and disparity for the last 52 years was examined. In terms of concentration (Fig. 7a), the Atlas belt and the Mediterranean coast show a positive trend which reflects increasingly concentrated downpours (significant at the alpha level of 99% in Jendouba, of 95% in Ain Sefra, and of 90% in Annaba and Kairouan) (Table 3). Putting this in the context of previous observations, it is concluded that the DSP will be more intense and more dispersed so that the precipitation will not have a sequential character where it is more abundant. Contrariwise, the negative trend of the daily concentration is observed in the Atlantic coast and between Melilla and Algiers (significant at the alpha level of 99.9% in Nouasseur and of 95% in Algiers) (Table 3). On the other hand, the disparity (Fig. 7b) in the places of abundance shows a negative trend which reflects a forecast decrease in the interannual variations of precipitation without however signifying that the disturbed character (irregularity) will be changed.

Fig. 7
figure 7

Spatial distribution of the trend curve of the daily concentration index (CI) and disparity (D). a Trend of CI. b Trend of D

Table 3 Trends of annual CI obtained by Mann–Kendall test and Sen’s slope estimator

4 Conclusions

Recall that the objective of this study was to analyze trends in the timing and intensity of precipitation in the Maghreb to characterize patterns and explore possible associations with geographic factors. It was found that the precipitation is channeled under the orographic effect of the Atlas and Rif Mountain belts and then according to the latitudinal gradient (continentality). Therefore, these two factors spatially determine the abundance of precipitation and the duration of dry spells along a dominant North–South axis which is consistent with the transition between the Mediterranean climate in the north and the tropical desert climate in the south. The high daily concentration outside the Mountain belts (North, East, and West) highlights the importance of the orographic and maritime effects (Atlantic and Mediterranean) as on the eastern side of Tunisia, facing the central Mediterranean basin, where the highest values of the daily concentration index are found. As a result, the north of the Mountain belts are favored by abundant precipitation with a low interannual disparity but constrained by a negative statistical trend and frequent disturbances. The consequence is an expected precipitation deficit pattern marked by more widespread and intense droughts.

The days of significant precipitation index (R10mm), DSP, is a good indicator of precipitation given its strong statistical association with annual precipitation. It allows better differentiation of precipitation areas according to the aforementioned deficit pattern and it considers the impact of watering on the vegetation and the increase in the hydrological reserve. However, DSP shows an intra-annual timing shift in the number of days of significant precipitation (≥ 10 mm) over the past 12 years according to a clear delay of 2 to 7 fortnights with respect to the core of the rainy season (December–January). This timing shift is spatially greater in places of abundance outside the Mountain belts. Simultaneously, there is a decrease in DSP intensity in winter (19%) and an increase in spring (8.7%) and summer (9%). This means that significant precipitation will be more intense but delayed and dispersed outside the rainy season according to a forecasted disturbed and non-sequential character in places of abundance.

Recent simulations suggest an increase in the recurrence of intense precipitation events in the western Mediterranean (Benabdelouahab et al. 2020; Salhi et al. 2022). This is in line with our conclusions which, moreover, specify that the number of these events (DSP and DEP) is the factor which predominates the pluviometric behavior of the year; in other words, the variation of 2 or 3 days of significant precipitation (≥ 10 mm) per year influences whether it will be wet or dry. Added to this is the delay compared to the normal of several weeks in the occurrence of DSP and their preponderance outside the Atlas and Rif belts (North, East, and West) where the main agricultural areas and densely populated coasts are located. Consequently, the pluviometric behaviors marked by a prolonged and staggered intra-annual drought regime (even during wet years) will have profound ecological and socio-economic impacts. Depending on the year, the Maghreb is likely to face repetitive hydroclimatic hazards (intense damage linked to flash floods and soil degradation processes or to loss of biodiversity and water availability) which in all cases will compromise economic development.

It is necessary to assess seasonal and monthly disparities in consecutive precipitation amounts for better analysis at different time scales. Either way, their apparent contrast on an annual basis shows geographic consistency with clear spatial patterns making it more regular and smoother than the amount of precipitation, which consolidates recent findings (Martin-Vide et al. 2022).

In addition, it is necessary for the future to consider teleconnections and even to categorize the weather to better explain the subtleties and drivers of the spatial distribution of trends. Considering what is available, a complex range of atmospheric circulation patterns intersects in the Maghreb. Thus, severe, intense, and widespread droughts are mainly associated with the Western Mediterranean Oscillation (WeMO) and the Eastern Atlantic/Western Russia (EATL/WRUS) (Mathbout et al. 2021; Serrano‐Notivoli et al. 2018a), while the frequency and intensity of precipitation events are strongly associated with the North Atlantic Oscillation (NAO) and Mediterranean Oscillation (MO) (Tramblay et al. 2013). Local and regional processes (e.g., changes in land surface and anthropogenic impact) have shown their effect on precipitation trends in adjacent areas in the Mediterranean and should be taken into account as well (Trigo et al. 2006). Therefore, this work should be continued and intensified with the aim of determining the expected impact of current climate variability at the regional scale to better guide adaptation and resilience modes.