Atmospheric rivers and associated extreme rainfall over Morocco

Atmospheric rivers (ARs) are long, narrow, and transient corridors of enhanced water vapour content in the lower troposphere, associated with strong low‐level winds. These features play a key role in the global water cycle and drive weather extremes in many parts of the world. Here, we assessed the frequency and general characteristics of landfalling ARs over Morocco for the period 1979–2020. We used ECMWF ERA5 reanalysis data to detect and track landfalling ARs and then assessed AR association with rainfall at the annual and seasonal scales, as well as extreme rainfall events (defined as a daily precipitation amount exceeding the 99th percentile threshold of the wet days) at 30 gauging stations located across Morocco. Results indicate that about 36 ARs/year make landfall in Morocco. AR occurrence varies spatially and seasonally with highest occurrences in the autumn (SON) and Winter (DJF) in the northern part of the country and along the Atlantic across northern regions. AR rainfall climatology indicates up to 180 mm·year−1 recorded in stations located in the northwest. High fractional contributions (~28%) are recorded in the north and the Atlantic regions, with the driest regions of the south receiving about a third of their annual rainfall from ARs. For extreme rainfall, the highest AR contributions can attain over 50% in the southern dry regions and along the Atlantic north coast and Atlas highlands.


| INTRODUCTION
Morocco is located in northwest Africa, with the Mediterranean Sea in the north and the Atlantic Ocean in the west. Its climate ranges from subhumid to desert from the north to the south. Mid-latitude storm tracks and large-scale circulation patterns in the Atlantic such as the North Atlantic Oscillation (NAO) drive precipitation conditions (Bolle, 2002;Driouech et al., 2009), especially in the winter season (Driouech et al., 2021). Positive (negative) phases of the NAO are generally associated with dry (wet) conditions, and atmospheric rivers are an important atmospheric feature affecting rainfall over North Africa (Akbary et al., 2019;Massoud et al., 2020).
Atmospheric rivers (ARs) are corridors of strong horizontal water vapour transport in the lower troposphere, driven by low-level jets (Zhu and Newell, 1998;Neiman et al., 2008;Lavers et al., 2012;Gimeno et al., 2014). These "rivers in the sky" are essential components of the global water balance, carrying sometimes between 7 and 15 times the water in the Mississippi Rivers combined (Ralph and Dettinger, 2011). In the winter months, between three and five ARs can generally be found within the Northern Hemisphere at any given time. They are thus a key component of the global water cycle: they cover about 10% of the zonal extent of the Earth and constitute the majority of meridional moisture fluxes (Zhu and Newell, 1998). Hence, ARs provide essential water supply: they contribute to approximately 22% of total global runoff and over 50% in some regions (Paltan et al., 2017).
Association of ARs and rainfall is well-established and extensively discussed in the literature: ARs control precipitation in much of the globe (Neiman et al., 2008;Rutz et al., 2014;Lavers and Villarini, 2015;Paltan et al., 2017;Liang and Yong, 2020) including extreme rainfall and flooding (Dettinger, 2011;Moore et al., 2012;Lavers and Villarini, 2013a;2013b;Rutz et al., 2014;Ralph et al., 2016). More recently, ARs have also been found to induce compound events including intense precipitation and extreme wind or storm surges (Ridder et al., 2018). Khouakhi and Villarini (2016) conducted the first analysis of the link between AR events and coastal extreme sea levels along the United States west coast. AR landfall can drive about 40-75% of extreme wind and rainfall over 40% of global coastlines . Along North America's west coast, AR events can produce widespread on-shore currents, producing strong jets and significant rises in of local sea level (Shinoda et al., 2019).
Research on the projected changes in ARs and their impacts over the coming decades suggests an increase in AR frequency by approximately 50% at the global scale, and $50% ($60%) north (south) of the equator under a high-emissions (RCP8.5) scenario (Espinoza et al., 2018). An evaluation of changes in the frequency of ARs suggested that they may increase by $50% worldwide, with increases in intensity of around 25% (Massoud et al., 2019). Other studies have focused on changing AR impacts at the regional scale. In California, AR frequency is expected to increase by about 30% by the end of the 21st century depending on the model, alongside increases in AR storm temperature, length of AR season, and peak AR intensity values (Dettinger, 2011). In the eastern Atlantic Ocean and United Kingdom, a doubling in the number of ARs and extreme storms by 2,100 is projected in response to warming (Lavers et al., 2013). More broadly in Europe, the number of AR days (frequency) is projected to increase by $127-275% by the end of the century under RCP8.5 (Gao et al., 2016). The authors highlight that the fraction of extreme precipitation events (defined as daily precipitation exceeding the 99th percentile of all daily precipitation ≥1 mm in each season) and seasonal total precipitation induced by ARs are expected to increase as a result of growing AR frequency. In contrast, ARs and their historical and future impacts in Africa have received relatively less attention in the literature. Although some recent studies have examined ARs and their impacts (Blamey et al., 2018;Akbary et al., 2019;Massoud et al., 2020), AR-driven rainfall and extreme precipitation events are still not adequately assessed at the regional scale in Africa. There is currently no study focusing on the role of ARs in Moroccan extreme rainfall and flooding comprehensively for the whole country. Such a study is an essential prerequisite before even considering future changes in ARs and their impacts with climate change. Thus, the objectives of this study are (a) to investigate the spatiotemporal characteristics of ARs over Morocco and (b) to examine their relationship with extreme rainfall. We first introduce an algorithm for AR identification and apply it over the region extending from 60 W to 23 E and from 20 N to 40 N. Then, based on the results of identified ARs, we select only landfalling ARs or those passing within 250 km from Moroccan shores. Finally, we systematically analyse AR characteristics and their relationship with extreme rainfall using rain gauge data across the country ( Figure 1).

| Data
To detect ARs, we use the vertically integrated water vapour transport (IVT) computed based on 6-hourly reanalysis data (i.e., specific humidity, zonal and meridional wind velocities) from the European Centre for Medium Range Weather Forecasts (ECMWF) ERA5 products (Hersbach et al., 2020). The data range from 1979 to 2020 with a horizontal resolution of 0.25 . Atmospheric reanalyses are considered the best complete estimates (i.e., "maps without gaps") of the historical state of the Earth's atmosphere, and are produced by assimilating land, ocean, atmospheric, and space-based measurements into state-of-the-art operational weather forecast systems. We used ERA5 data as it provides higher spatial gridded data compared to the other reanalysis. Here, IVT is computed by integrating the zonal and meridional moisture fluxes through each atmospheric level between 1,000 and 300 hPa (Equation (1)). The zonal (IVT u ) and meridional (IVT v ) components of IVT are computed as where u and v are wind field in the zonal and meridional directions, respectively, q is the specific humidity, p is the pressure at different pressure levels, and g = 9.81 mÁs −2 the gravity. The IVT is then computed as We also used ERA5 6-hourly mean sea level pressure and 500-hPa geopotential height over 1979-2020 to examine the atmospheric and synoptic conditions driving AR occurrence over Morocco.
For precipitation, we used daily rain gauge precipitation data from 30 stations distributed across Morocco with daily records ranging from 1979 to 2016 (Figure 1, bottom map). The data ends in 2016 as provided by the Moroccan National Meteorological Service (La Direction de la Météorologie Nationale). Each gauge has at least 33 years of data with 90% of complete records (330 days) each year. More information on the rain gauge data and its quality control can be found in Driouech et al. (2021).

| Methods
Different AR detection algorithms have been developed in the last two decades (Neiman et al., 2008;Lavers et al., 2012;Guan and Waliser, 2015;. These algorithms are generally based on a thresholding variable and magnitude that can be either integrated water vapour (IWV) or IVT expressed in either absolute (e.g., IVT ≥250 kgÁm −1 Ás −1 ; e.g., Rutz et al., 2014) or relative (e.g., IVT ≥85th percentile of local climatological IVT; e.g., Lavers et al., 2012). The Atmospheric River Tracking Method Intercomparison Project (ARTMIP; Rutz et al., 2019) provides a comparison of more than 20 different AR identification and tracking algorithms based on the absolute or percentile thresholding and they showed that AR frequency, duration, and seasonality exhibit a wide range of results across different algorithms. The authors recommend also that AR studies focusing on a specific region should consider basing analyses on regional methods developed to assess that specific region (rather than global tracking methods) to take into account important regional characteristics of ARs and their impacts.
One drawback of the conventional magnitude thresholding methods is that the use of a predetermined threshold does not provide the flexibility to adjust to the fast-changing conditions in which ARs are embedded. A recent algorithm based on image processing, making the detection independent of AR magnitude, has thus been proposed by Xu et al. (2020a). This novel methodology, named "the image-processing top hat by reconstruction (THR) approach for AR detection and tracking," is particularly interesting because it provides an objective and automatic way of identifying ARs based on IWV or IVT. The method uses filtering on the spatiotemporal "spikiness" of the IVT distribution rather than filtering on the IVT/IWV magnitude and has proved skilful compared to conventional magnitude thresholding methods (Xu et al., 2020b). Another useful feature of this methodology is that the outputs include not only the number and location of the AR axis points, but other characteristics that could be very advantageous in the characterization of the AR-extreme, such as AR width and orientation, core IWV content, velocity of propagation and duration.
In this paper, we applied the THR AR algorithm over the domain ranging from 60 W to 23 E and from 20 N to 40 N, covering AR features generated in the North Atlantic. Briefly, the procedure for defining ARs can be summarized in two key steps: extraction of the AR feature based on the IVT magnitude at each grid cell and application of the geometrical filtering criteria (IVT direction, length, and length/width ratio) ( Figure 2).
Here, the identified ARs must have a length equal to or greater than 2,000 km and a length-to-width ratio equal to or greater than 2. The AR region area is required to be within the range of 500-10,000 × 10 3 km 2 , to filter out features that are either too small or too large. Figure 2 summarizes the main steps used for AR detection and tracking, as described in (Xu et al., 2020a). The algorithm implementation in Python can be found in https://github.com/ihesp/IPART.
Given our interest in this study in AR rainfall over Morocco, we only subset AR features (i.e., AR axes) that made landfall over Morocco and have at least three continuous 6-hourly time steps (hereafter referred to as Moroccan ARs). We then used this AR subset to characterize AR annual and seasonal frequency and subsequent AR-rainfall over Morocco. To associate precipitation at rain gauges with an AR, rain gauge location must be located within 200 km from the AR axis and rainfall must have occurred within the same or the following day of the AR event (Gao et al., 2016;. We divided AR-related precipitation by the total precipitation at each rain gauge to obtain the fraction of the contribution of ARs to precipitation. Similar to Lavers and Villarini (2015), we consider that precipitation accumulation is ARrelated even if an AR is detected only on one 6-hour time step within a day.
We define extreme daily rainfall as rainfall exceeding the 99th percentile of wet days distribution (rainfall ≥1 mm) at each gauge over the period of record. We then quantify the proportion of those events that were associated with ARs.

| AR characterization
Based on the 6-hourly (0000, 0600, 1200, and 1800) time step, we detected 40,930 ARs (i.e., ARs across the entire search domain of 60 W-23 E, 20 -40 N and time period 1979-2020) representing 10,798 daily ARs (note that even if an AR is detected only on one 6-hour time step within a day, we consider that as an AR day). To obtain a sense of how the THR detection algorithm compares with other algorithms, we used the AR database based on the global AR detection algorithm of Guan and Waliser (2019), hereafter referred to as GW-ARs. The AR detection was based on the relative threshold approach (Rutz et al., 2019). We subset 6-hourly GW-ARs for the same domain used in this study (60 W-23 E, 20 -40 N) using AR axis locations and then compared the detected ARs over the common period of 1979-2019. Figure 3 shows that overall, the number of ARs detected using GW-ARs is comparable to the number detected by THR here, with mean AR strengths of about 339 and 335 kgÁm −1 Ás −1 for GW-ARs and THR respectively for all the ARs detected over the whole AR search domain. There are fewer THR-ARs compared to Guan-ARs during the summer, potentially because THR does not employ a specific threshold. Additionally, THR tends to detect fewer and stronger ARs in JJA and SON (Figure 3, bottom panel). This may be due to the fact F I G U R E 2 Summary of the AR detection and tracking method used in this study based on the method described in Xu et al. (2020a)  that in the THR algorithm, AR regions are generally larger than threshold-based algorithms: a comparative analysis of THR and two magnitude thresholding approaches applied to the Northern Hemisphere indicated that ARs detected by the THR method have a larger number of AR tracks, longer track durations, and stronger AR-related moisture transport in the AR tracks (Xu et al., 2020a).
To compute AR statistics over Morocco, as well as AR-associated rainfall including extreme rainfall, we considered only Moroccan ARs, as defined in the Methods. Figure 4 shows examples of ARs that occurred during different seasons and years in Morocco. The events are associated with rainfall during the day and the following day of AR occurrence (blue shading illustrates rainfall intensity above 10 mm based on CHIRPS rainfall data (Funk et al., 2015)). Some AR events are associated with exceptionally heavy rainfall, such as November 29-30, 2010 (Figure 4, bottom map). This event caused flooding in many parts of the northwest coastal areas where major urban centres are such as the region of Casablanca, the largest city of the country causing loss of life and significant damage to infrastructure such as bridges and roads. The rainfall amount on the 29th of November approached 180 mm in Casablanca rain gauge. Further analysis of AR extreme rainfall events is provided in section 3.2. Generally, the climatology of the IVT magnitude along the Moroccan Atlantic is weaker (less than 150 kgÁm −1 Ás −1 ) compared with IVT for coastal areas in higher latitudes, such as European Atlantic coasts ( Figure S1, Supporting Information). The distribution of the Moroccan AR IVT over the period 1979-2020 ( Figure S2) indicates also weaker IVT intensity ($290 kgÁm −1 Ás −1 on average) compared to the IVT intensities reported for landfalling ARs in the European West Coast and North American West Coast throughout the period 1979-2016, with average IVT of about 420 and 330 kgÁm −1 Ás −1 , respectively (Eiras- Barca et al., 2021). Analysis of the frequency of Moroccan ARs (i.e., landfalling ARs over Morocco) indicates an average of 37 AR days per year, ranging from 16 in 1999 to 90 AR days in 2010. No trend has been detected in the annual Moroccan AR frequency ( Figure S3). The spatial distribution of the frequency of ARs (calculated at each grid cell as the number of days with the existence of AR conditions during the study period of 1979-2020) indicates that most ARs occur in the northern part of the country and along the Atlantic coast, with an average of about five ARs per year (Figure 5b). At the annual scale, a higher frequency hotspot can be seen in the northernmost part of Morocco and in the southern half of the country south of Agadir (more than five ARs per year) (Figure 5b).
The distribution of AR frequency at the seasonal scale shows that ARs can occur in any season except in the summer (JJA), where very few ARs tend to occur. Highest seasonal ARs occur in SON with an average of three to eight ARs with the largest spatial occurrence along the Mediterranean coast (Figure 5f). About six daily ARs make landfall during winter (DJF) in the northern part and along the north Atlantic coast. Most ARs occurring during DJF tend to come from the west and occur along the north Atlantic and the Mediterranean coasts, while SON and MAM ARs tend to have a southwest to northeast orientation (Figures 5c,d,f and  S4). ARs occurring during SON tend to shift north compared to those occurring in spring (MAM). ARs occurring in SON also tend to be the strongest in terms of the AR magnitude (i.e., IVT over AR regions), with an average across all AR regions of about 330 kgÁm −1 Ás −1 (Figure 5a).
Next, to assess the impacts of ARs, we analysed rainfall associated with Moroccan ARs. We consider daily rainfall to be associated with ARs if the gauge location is located within 200 km from the AR axis ( Figure 6).
The results show that highest absolute annual total AR-induced rainfall is recorded in the northern part of the country and along the northern Atlantic coast, with AR-rainfall exceeding 100 mmÁyear −1 (Figure 6a). Stations located in the far northwest recorded over 150 mm of AR-rainfall; the gauging stations of Larach, Tangier and Ifrane recorded over 170 mmÁyear −1 . Using the ratio of AR-induced precipitation to total precipitation at each rain gauge, the highest contributions of ARs to annual rainfall (20-30%) are found in stations located along the north west part (north of 32 N) of the country (Figure 6b). This is the region where the most croplands are located, such as the Gharb and Loukkos agricultural plains, as well as the largest reservoirs of the country, where AR rainfall can have beneficial impacts. The southernmost dry part of the country receives also high fractions of its rainfall from ARs however despite high fractions in stations such as Dakhla, less than 10 mmÁyear −1 of rain is actually associated with ARs in this station. The southern regions of Morocco have a dry climate with generally less than 100 mmÁyear −1 of rainfall ( Figure 1). The fact these regions receive the highest AR-rainfall contribution highlights the key role that ARs play in water resource management in this area, and in alleviating drought.

| AR extreme rainfall
A key question in the literature is understanding the association between ARs and extreme precipitation. For this, we used daily rainfall exceeding the 99th percentile of the rainfall distribution (>1 mm) (Figure 7a) to define extreme rainfall and examined the association with ARs.
We find that ARs trigger extreme rainfall in different parts of the country. Percentages of extreme AR-driven rainfall are as high as 55% in stations located along the North Atlantic coast, north of latitude 32 N, and in the southernmost regions (Figure 6b). High percentages exceeding 30% are also found in many stations located along the Atlas mountain regions and along the north Atlantic coast south of 32 N. Overall, ARs account for higher percentages of extreme rainfall than climatological rainfall (annual rainfall), especially along the north Atlantic coast and the southern regions.
To examine the occurrence of AR-extreme rainfall in each season, we extracted the date and season of each AR. The seasonal distribution of AR-driven extreme rainfall at each station indicates that most AR rainfall occurs in autumn (SON) and winter (DJF), with few extreme events occurring in spring (MAM) (Figure 7c).
We found that some AR events were associated with exceptionally extreme rainfall at multiple gauges. For example, the AR events that occurred on February 14, 2002, November 30, 2010, and November 23, 2013 triggered extreme rainfall at more than five gage stations ( Figure 7d) located in areas where regions where major urban centres are located such as Casabalnaca, Rabat, Tanger, and Kenitra. Analyses of trends in the annual frequency of AR rainfall and AR-extreme rainfall based on Poisson regression indicate an overall weak trend, although some stations point to an increase in the frequency of AR rainfall events-particularly stations located in the centre north of the country ( Figure S5).
Finally, to examine the atmospheric and synoptic conditions driving AR occurrence over Morocco, we calculated the composite of mean sea level pressure (MSLP) and of the 500 hPa geopotential height (Z500) anomalies using ECMWF's ERA5 reanalysis data. For each AR day, we computed the MSLP and GP500 anomalies with respect to the same dates over the years 1979-2020. We then computed the composite mean anomaly patterns at the annual and seasonal scales for both MSLP and GP500 for the AR days that occurred over Morocco (Figure 8).
At the annual scale, we find that ARs tend to occur when there are strong negative MSLP and GP500 anomalies over southwestern Europe, over the Iberian Peninsula (region encompassing Spain and Portugal) and the northern coast of Morocco, and positive MSLP and GP500 anomalies southwest of Iceland (Figure 8a,b). This pattern sets up the North Atlantic storm track with embedded ARs impacting Morocco and southern Europe, but with blocked flow over northern Europe. The setup resembles the negative NAO pattern, which has been found to drive ARs over southern Europe (Lavers and Villarini, 2013a;Thandlam et al., 2020). A similar pattern (i.e., negative MSLP and GP500 anomalies in the southern Atlantic Europe and positive MSLP and GP500 anomalies over Iceland) can be seen in the winter, spring, and autumn (DJF, MAM, SON) as driving ARs over Morocco (Figure 8c,d,e,f,i,j).
Conversely, in the summer, the weakening of the low pressure over the Iberian Peninsula and Morocco (Figure 8g,h) corresponds with fewer ARs over Morocco (Figure 5e). Higher AR days and AR extreme rainfall days tend to occur during the negative phase of NAO, and particularly in stations along the North Atlantic coast and southern stations ( Figure S6). Understanding the synoptic drivers (i.e., NAO phases) that are conducive to a higher or lower frequency of ARs and AR-driven extreme rainfall over Morocco, as shown here, is particularly relevant for enhancing local rainfall and flood forecasting, particularly in the mountainous and Atlantic.

| CONCLUDING REMARKS
We investigate the spatial and temporal characteristics of ARs over land in Morocco and their association with both total and extreme rainfall. AR events can cause heavy rainfall and damaging floods in Morocco, particularly along the north Atlantic ( Figure 3). IVT data from 1979 to 2020 indicates that ARs reach Morocco about 36 days per year on average (defined as overland ARs with at least three consecutive 6 hourly time steps). Most ARs originate in the north Atlantic and enter Morocco from the west and southernmost regions of the country, in a predominantly west-east (winter) and south-west to north-east (spring and autumn) direction. The highest AR frequency occurs in autumn, followed by winter and spring. Spatially, the highest number of ARs is found in the northernmost area and along the Atlantic north coast.
We find that ARs make a significant contribution to annual and extreme rainfall, especially in the stations located along the Mediterranean, Atlantic north coast and in the dry regions in the south of the country. About 30% of annual rainfall is associated with ARs in the north and southern half of the country, highlighting the important role of ARs in contributing to the water supply. In terms of extreme rainfall, ARs contribute to over half of extreme rainfall (defined as rainfall exceeding the 99th percentile threshold of the wet days at each gauge) at stations located in the North and the southern dry regions and along the Atlas highlands. It should also be noted that these daily rainfall extremes are not necessarily associated with local flooding because we do not consider factors such as antecedent rainfall (soil saturation), geological setting, catchment size, land use, and management of local rivers/dams. However, it is likely that ARs have significant effects on hydrological variability in Morocco. Other studies have shown for instance that high flow events in the Moulouya River increase by 40% in the presence of ARs (Paltan et al., 2017).
Finally, we investigated the synoptic patterns associated with ARs over Morocco. The pattern of the composite MSLP and GP500 anomalies for AR days over Morocco resembles the negative NAO pattern, where storms crossing the Atlantic tend to track further south, affecting Morocco. The NAO is known to control weather patterns over Europe and North Africa, with direct impacts on precipitation and temperature (Knippertz et al., 2003;Driouech et al., 2021). We find fewer ARs and AR-driven extreme rainfall days over Morocco tend to occur during the positive phase of the NAO, in many stations located along the Atlantic coast. The predictability of these large-scale weather patterns holds promise for forecasting of AR-driven meteorological and hydrological extremes in future work.
Overall, our results improve understanding of the importance of ARs for regional rainfall patterns over Morocco. The next scientific challenge is to investigate and understand the factors that influence the formation and location of ARs in Morocco, and to understanding changes in AR patterns and their associated rainfall in the future.