Statistical analysis of extreme weather events in the Diyala River basin, Iraq

Extreme climate and weather events have direct impacts on human life, the environment, and resources. The Diyala River basin is shared between Iraq and Iran, which makes it vulnerable not only to climate change effects but also to upstream control. Therefore, understanding and predicting extreme events is an essential step to help decision-makers make proactive plans to reduce expected damages. The pattern of extreme events has been identified using climate extreme indices developed by the World Meteorological Organization and Expert Team on Climate Change Detection Indices using ClimPACT2 software. Data were obtained from three meteorological stations in Iraq (Sulaymania, Khanakin, and Baghdad) and one in Iran (Sanandaj) over a period of 20 years (2000–2020). Results for temperature showed seven statistically significant positive trends for only three indices (annual number of days with daily maximum temperature of .35°, difference between daily maximum and daily minimum temperatures, and percentage of days with maximum temperature of .90th percentile, indicating an increase in that temperature). Baghdad station had positive temperature trends for all indices. Trends for precipitation were nearly all nonsignificant and difficult to anticipate compared with those for temperature. Percentile-based indices showed more dry and warm events than wet and cold.


GRAPHICAL ABSTRACT INTRODUCTION
Extraordinary extreme weather and climate events have resulted from a changing climate. Natural variability and anthropogenic changes will determine future extremes. They could also result from accumulated ordinary events that are individually not extreme (Intergovernmental Panel on Climate Change (IPCC) 2012). Recently, the intensity and the frequency of extreme temperature and precipitation events have increased, with greater impacts on society, the economy, and environment (The United Nations Economic and Social Commission for Western Asia (ESCWA) 2017a, 2017b). The Expert Team of Climate Change Detection Indices (ETCCDI) has developed a set of indices that describe temperature and precipitation extremes, including 27 extreme indices for both variables. They provide a uniform perspective for detecting changes in extremes and make it possible to compare results from different locations and gain a comprehensive picture of globally extreme changes (Albert et al. 2009).
Many studies have investigated the relationship between extreme weather and various life aspects. For example, Lubczynśka et al. (2015) recognized a clear impact of high temperature on heart disease. Naif et al. (2020) explored the relationship among the normalized difference vegetation index (NDVI), temperature, and precipitation at Baghdad. They found a negative correlation between NDVI and temperature and a positive correlation between NDVI and precipitation. Bai et al. (2017) explored the impact of temperature on the seepage transport of suspended particles in porous media for different seepage velocities. That study showed that higher temperatures increase the irregular movement of suspended particles and decrease the velocity.
World Bank (2008) analyzed the expected impacts of the combined effects of climate and land-use change across southeastern Europe. The study indicated an increase in weather variability and extreme events, leading to more disasters and a reduction of resilience in the countries of the region. Trends of extreme climate indices for temperature and precipitation across the eastern Mediterranean were investigated by Kostopoulou & Jones (2005). They showed positive trends for temperature in summer and negative trends for cold nights in winter. Precipitation indices varied from positive ones with a tendency toward wetter conditions in the western part of the study area to one of drier conditions in the east. Mastrantonas et al. (2020) studied extreme precipitation events over the Mediterranean region using the ERA5 dataset and reanalysis data from the European Centre for Medium-Range Weather Forecasting and their relationship with atmospheric patterns. They showed that troughs and cutoff lows in the lower and middle troposphere were connected with extreme events that occurred mostly during winter and autumn. Zhang et al. (2005) detected trends in Middle East climate extreme indices at 52 stations in 15 countries, including Iraq. Their results showed significant increasing trends in temperature-related indices in the area. Precipitation-related indices were nonsignificant and spatially incoherent. Climate extreme indices over the Arabian Peninsula (AP) were investigated by AlSarmi & Washington (2014) using observed data from 23 stations in six countries of the region. There was a significant increase in temperature trends for daytime extremes over the northern AP and increasing trends for nighttime extremes in the south. Precipitation extreme trends were weak except for a precipitation of .10 mm, which had decreasing trends.
Future extremes in the Middle East have been projected by many studies. Verner (2012) indicated that drier and hotter conditions will predominate in some areas of that region. There will be no specific precipitation pattern but a continuous increase in flood events. ESCWA (2017a, 2017b) investigated future extremes in the region for the mid and late 21st century, using representative concentration pathways (RCPs) 4.5 and 8.5. Supporting many other research findings, temperature indices had upward trends. The precipitation extreme indices showed spatial variability over the region, with a tendency toward drier conditions and decreasing trends in the annual number of 10 and 20 mm precipitation days. Extreme trends and the relationship between long-term extreme trends and the El Niño-Southern Oscillation (ENSO) and North Atlantic Oscillation (NAO) were examined by Donat et al. (2014). They found consistent warming trends but nonsignificant precipitation trends, with temporal and spatial variability. A stronger relationship has been found with NAO than that with ENSO, especially for the western Arab region. ENSO had a more significant relationship in the east. Mohammed (2018) studied the dynamics and physical processes behind temperature extremes using minimum and maximum temperatures from the ERA-Interim database for Iraq and the Iberian Peninsula. They found that air masses of prolonged duration and recirculation within a weak pressure gradient on summer days were responsible for heat extremes, whereas the advection of air masses from Siberia and eastern Europe produced cold extremes. A positive correlation was found between temperature extremes in Iraq and the annual East Atlantic Oscillation. The dynamics of cyclones that produce extreme precipitation over Baghdad were explored by Al-Nassar (2018) using the ERA-Interim database for the period 2005-2016, including 20 extreme precipitation events producing 51.3% of the total precipitation at Baghdad in that period. Rex block conditions, cutoff lows, upper-air troughs, and jet streaks were the main causes of these extremes. Waheed et al. (2019) analyzed outcomes from general circulation models to test future possible scenarios of precipitation and temperature in future climate scenarios used for analyzing the response of hydraulic structures in the Diyala River basin. The results indicate considerable hazards in the basin hydrologic system during the next 25 years.
The majority of water resources in Iraq come from transboundary countries, mainly Turkey and Iran, with whom Iraq shares its main river watersheds. Iraq is a downstream country, which makes its water security and management highly vulnerable to upstream practices and plans (Rahi et al. 2019;Al-Madhhachi et al. 2020a;Lateef et al. 2020). Given that changes in extreme weather and climate events would have catastrophic impacts on the water sector, it makes the understanding and prediction of such events crucial for water resource management in Iraq. It is a difficult task to anticipate extreme events, but better understanding and analysis of them using proper software helps mitigate their consequences and take proactive actions for adaptation.
In this paper, the Diyala River basin, which is shared between Iraq and Iran, was selected to explore changes in extremes and predict the probability of occurrence of such events. This basin was chosen because of its vulnerability to extreme events, as it has experienced the effects of floods and droughts. In addition, the Diyala is one of the most important rivers in Iraq because it is the major source of irrigation and municipal water for the city of Diyala. Our work was aimed at: (1) calculating temperature and precipitation extreme indices proposed by the ETCCDI for the Diyala River watershed; (2) using the nonparametric Mann-Kendall (M-K) test to detect slopes of monthly data plots of rainfall and temperature; (3) statistical analysis of precipitation events including the probability of distribution, in order to explore future precipitation extreme events. The RHtestsV4 software package was used to perform homogeneity tests for detecting and adjusting for possible multiple change points in a data series. The software ClimPACT2 in the R package was used to calculate temperature and precipitation indices using daily data of maximum and minimum temperatures and precipitation.

Study area
The Diyala River begins near Sanandaj in the Zagros Mountains of Iran. The Iraq-Iran border extends ∼30 km across the river basin. The main tributaries are the Tanjeru, Sirwan, and Wand rivers, with many smaller tributaries shared between Iraq and Iran. The Diyala meets the Tigris River 15 km south of Baghdad. Its peak flow is in April and low flows occur from July through November (ESCWA 2017a(ESCWA , 2017b. The basin is situated between 33°21 0 60″N and 35°83 0 30″N and 44°50 0 0″E and 46°83 0 30″E. Its total length is 384 km with a drainage area of 33,240 km 2 , 43% of that area within Iran ( Figure 1).
The water management framework in the Diyala watershed is divided into three parts. The upper part is mainly in Iran, with an area of ∼17,900 km 2 , and the remainder is in Iraq, controlled by Derbandikhan dam (Al-Faraj & Scholz 2014. The middle part is between the Derbandikhan and Hemrin dams, with a transboundary area of ∼11,900 km 2 . The Diyala weir controls the lower part, which covers ∼2,800 km 2 . Al-Tamimi & Gamel (2016) apportioned the Diyala Basin into three zones: semi-humid in the northern part, semi-dry in the middle part, and a dry climate in the southern part. The basin has a dense series of dams and hydraulic works, including 12 dams in the upper basin within Iran (five of them constructed between 1983 and 2010 and seven after 2010). Within Iraq's boundaries, there are three main dams on the Diyala River. Irrigation projects are the main consumers of water resources within the Diyala Basin, followed by domestic uses (Al-Faraj & Scholz 2015).
Temperature and precipitation data from the hydrologic years 2000-2020 were analyzed for four meteorological stations as shown in Table 1. These stations are located within the basin as shown in Figure 1.  Data source and quality assessment Daily observed precipitation amount and daily maximum and minimum temperatures between 2000 and 2020 at Baghdad and Khanakin stations were obtained from the Iraqi Meteorological and Seismology Organization. Data from the other two stations (Sulymania and Sanandaj) were from the Global Historical Climatology Network database (https://www. ncdc.noaa.gov/data-access/land-based-station-data/land-based-datasets/global-historical-climatology-network-ghcn), maintained on the National Oceanic and Atmospheric Administration server (https://www.ncdc.noaa.gov/cdo-web/). Monthly data for the 20 years was used to detect trends in precipitation and temperature and calculate the probability of distribution of extreme precipitation events. Baghdad station had missing data for 2 years (2003 and 2004) because of war. Sanandaj station also had missing daily and monthly data during the study period. Khanakin and Sulymania had much fewer missing data than the aforementioned stations. The R package ClimPACT2 that is freely available at https://github.com/ARCCSS-extremes/climpact2 was used to do quality control to check potential outliers based on the interquartile (IQR). This package can read data from a weather station in the form of a text file, which makes it easy to use and gives accurate results. The IQR is specified by upper (the 75th percentile: þ3) and lower (the 25th percentile: À3) limits. Also flagged are precipitation amounts of .200 mm and temperatures of .50°C, dates of minimum temperature greater than the maximum temperature, and records for which the temperature difference with the previous day is !20°C (Herold 2016). Outliers from the quality control of ClimPACT2 were manually validated based on information from the days before and after the events. The package has the ability to deal with missing data by setting missing values to À999.9.

Data homogeneity
The RHtestsV4 software package proposed by Wang & Feng (2013) was used to conduct homogeneity tests to detect and adjust for possible multiple change points in a data series, especially shifts in the mean. RHtestsV4, which is available at https://github.com/ECCC-CDAS/RHtests, is RHtestsV3 (which is no longer supported) with the addition of quantile-matching adjustments that are estimated with or without the use of a reference series. The package can deal with annual, monthly, and daily time series. Monthly data were used to execute the homogeneity test on the temperature and precipitation data. It is essential to do this test before any trend detection test to avoid any shifts resulting from non-climatic factors. In this software, the penalized maximal t-test (Wang et al. 2007) and the penalized maximal f-test (Wang 2008) were used, which are very similar. This tests the null hypothesis for time series {X t } to detect a change point, as follows (Wang et al. 2007;Wang 2008): where μ 1 ≠μ 2 and 'H 0 : {X t }∼IIIDN (μ, σ 2 )' for '{X t }' follows an IIIDN Gaussian distribution of mean μ and variance σ 2 . These change points may be caused by non-climatic factors that produce inhomogeneity in historical data such as changing the station location, instruments, observing practices, and station environment (Peterson et al. 1998). Therefore, the homogeneity of the records should be tested before any statistical analysis. The test was run without a reference series (the package has that capability). The results show that data at all stations were homogenous, so there was no need for further adjustments.

Extreme climate indices
The main purpose of analyzing extremes is to optimize the use of infrastructure by balancing safety with very expensive structures and preventing damage from extreme events that are likely during the lifetime of those structures (Albert et al. 2009). The ETCCDI developed a core set that includes 27 extreme indices for temperature and precipitation. Zhang et al. (2011) stated that by using such extreme metrics, it is possible to compare the results of studies from different locations around the world to obtain a coherent picture of global extreme changes. Such indices have been applied to different parts of the world in recent years (Donat et al. 2014;Tramblay et al. 2013;Melo et al. 2015;Schoof & Robeson 2016;Chattopadhyay et al. 2017). The ClimPACT2 software was used to calculate extremes of temperature and precipitation using 20 years (2000-2020) of daily observed data. Our study considered 12 of these indices (Table 2) because they are the most important in detecting extremes related to maximum and minimum temperatures and precipitation, which were our focus.

Trend detection
There are many parametric and nonparametric methods to test trends in data series. Hydrometeorological time series often provide asymmetric autonomous recognition of phenomena, and this feature makes the use of nonparametric trend tests very effective (Kundzewicz & Robson 2004). The nonparametric M-K test with a risk of accepting the 5% hypothesis (p , 0.05 or correctness of the hypothesis at 95%) was used to detect monotonic upward or downward trends at annual, seasonal, and monthly scales for precipitation and temperature data during 2000-2020. The freely available online software at https://www.youtube.com/redirect?event=video_description&redir_token=QUFFLUhqbjlvYTV6UmdrVEJQN1kwOXROS G1sdllta UxBUXxBQ3Jtc0trO UxybTdvVEktNk5wemVGcUJXRS1rYVp1aDlZYnpsLXNlTFV4MkJrdUFqd1ZSZV9CYWtse U9abk91ZVVud0hjNU5TVVl5ODU5VXQ2VGdBYWxaMC1CX2Â2ellBd18xVTd0OUdWYTJ5M1A5ak9LSEFZZw&q=htt ps%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F1HVP81cxEpkPwfJ9qksCiV7WrM9p9bwXJ%2Fview was used to detect trends and compute their magnitude using Sen's slope test. Monthly average values were used to compensate missing daily data.
The M-K test statistic was computed by Pohlert (2020) as follows: The M-K test has the advantage of being robust to the effects of outliers. It is able to detect both linear and nonlinear trends and is widely used to detect trends in hydrometeorological series (Zhang et al. 2005;Tramblay et al. 2013;Pohlert 2020). However, the test results were affected by the presence of serial correlation. A lag-1 autocorrelation proposed by Wang & Swail (2001) was applied before trend detection. This is useful in avoiding nonexistent trends. It is widely used and accepted and uses the same method as the RHtestsV4 software to account for autocorrelation. Autocorrelation was detected at all stations for some months, so prewhitening was done using an Excel spreadsheet for those months.

Probability of distribution
There are several probability distributions to describe the observed annual or monthly data, such as the normal, log-normal, Pearson Type III, Weibull, and Gumbel's extreme value. We selected the Weibull distribution because it gave a reasonable fit to the observed data. It has wide applications to various life aspects, including hydrology. It has also succeeded in predicting extreme events such as floods, drought, high winds, and heavy rains (Kizilersu et al. 2018). It has been used by Al-Madhhachi et al. (2020b) to determine the probability of occurrence of flooding (with return period T r ) in any year, with an acceptable fit to observed flow data. We used the following Weibull equation (Al-Madhhachi et al. 2020b): where P is the probability of exceedance, m is the order or rank of the event, and N is the number of events.

Trend analysis for temperature and precipitation indices
Results for temperature during 2000-2020 permitted the detection of seven trends that were statistically significant (p , 0.05) at a confidence level of 95%, all of which were positive but observed in only three indices (SU35, DTR, and DX90p) ( Table 3). It is clear that these three indices are related to T max and indicate its significant increase at Baghdad, Sulymania and Sanandaj. Khanakin, on the other hand, had nonsignificant positive trends, and a nonsignificant negative one for DTR. According to Lelieveld et al. (2016), extreme summer temperatures over the Middle East and North Africa result from many factors. These include a thermal low extending from South Asia to the eastern Mediterranean and expanding westward before merging with the Sahara thermal low, the downward flux of longwave radiation that intensifies during summer over deserts, and a lack of evapotranspiration in dry soils. Mohammed (2018) found that heat extremes over Iraq and the Iberian Peninsula are produced by air masses with long residence times and by recirculation processes due to a weak pressure gradient force during summer. Cold extremes in Iraq are caused by the advection of air masses from Siberia and eastern Europe. Mohamad's results also showed nights with T min . 20°C and warm and cold duration indices with nonsignificant trends (two positive and two negative). Baghdad was the only station that had only positive trends for all indices. This might be a result of land-use change with intensive urbanization relative to the other stations, along with its lowest elevation. Khanakin had the most negative trends, i.e., three of the seven (annual number of days with at least six consecutive days of T max . 90th percentile (WSDI) and annual number of days with at least six consecutive days of T min , 10th percentile (CSDI and DTR)). The annual warmest daily (T x ) for the entire period was 47-51, 48-52.8, 40-45, and 45.3-46.7°C at Baghdad, Khanakin, Sanandaj, and Sulymania stations, respectively. Results for precipitation showed only one significant trend, which was positive for the maximum number of consecutive days with daily precipitation of !1 mm (CWD) at Baghdad station. This indicates an increase in wet spells and a decrease in dry spells. Al-Nassar (2018) found that the synoptic conditions underlying the extreme precipitation events at Baghdad were mainly caused by Rex blocks, cutoff lows, jet streaks, and upper-air troughs. However, this was associated with negative trends for all other precipitation-related indices, including the total annual precipitation at Baghdad. This concurs with the results of many other studies that indicated that the amount of precipitation decreased and will continue to decrease over the arid area including Iraq, owing to climate change. Osman et al. (2017) studied the impact of climate change on precipitation across arid regions of Iraq, using Long Ashton Research Station Weather Generator (LARS-WG) models to represent the outcomes from seven global climate models for present, near-term, medium-term, and long-term futures. The results show that annual mean precipitation over most Iraqi regions is expected to decrease, with wetter conditions during winter and autumn. The three stations other than Baghdad had nonsignificant positive trends for both an annual number of days with daily precipitation of !20 mm (R20) and an annual sum of daily precipitation of !1 mm (PRCPTOT), suggesting an increase in precipitation amount and intensity combined with negative trends for dry spells. Regarding CWD and the annual number of days of daily precipitation of !10 mm (R10), there were two positive and two negative trends (Table 3). It may be concluded from the results of temperature and precipitation indices that trends for precipitation were nearly all nonsignificant and difficult to anticipate compared with those for temperature, owing to spatial and temporal precipitation variability. Mishra & Lettenmaier (2011) conducted a coupled analysis of urban and surrounding nonurban regions in the USA to determine changes in climate indices. Their study indicated that most temperature-related trends were caused by regional climate change more than urbanization impacts. There were mixed effects for precipitation indicators.

Percentile-based indices
Monthly, seasonal, and annual data of precipitation and temperature for the study period 2000-2020 were used to calculate percentile-based indices using Excel. For maximum, minimum, and mean (T ave ) temperatures, the 10th and 90th percentiles were used to determine cold and warm events, respectively. Precipitation data were represented by the 25th percentile to describe extreme dry conditions and the 90th for extreme wet conditions. The results show that precipitation had a greater total number of extreme events than temperature for all stations and time scales. There was also a stronger tendency toward dry and warm conditions than wet and cold situations (Figure 2). This agrees with many other studies over the Arab region, including Iraq (Zhang et al. 2005;ESCWA 2017aESCWA , 2017b. At Baghdad and Khanakin, differences between the number of warm and cold temperature events were more obvious than at Sanandaj and Sulymania. This could be a result of the drier climate and soils at the former two stations, which have limited heat storage capacity to enhance evapotranspiration. In contrast, Sanandaj and Sulymania are within a semi-humid climate zone. The three stations other than Sulymania recorded more warm extreme events (.90th percentile) in the minimum temperature than the maximum.  Table 4 lists the results of the nonparametric M-K trend analysis for Baghdad station as an example. A trend was detected when Z . 1.96 at a 0.05 significance level. Sen's slope represents the value of the trend and reveals how much a variable (temperature for example) has increased or decreased each year. Rainfall data from June to September during summer were not considered in this analysis because there is almost no rain during these periods. Precipitation did not show specific trends, except for a positive one of annual rainfall at Baghdad, and at Khanakin during May (which does not have much rainfall). This is attributable to the strong spatiotemporal variability of precipitation, which makes it difficult to anticipate compared with that of temperature. In contrast, temperature trends were clearer, with only positive ones at Baghdad. Khanakin and Sanandaj had more negative trends than positive, while Sulymania showed the opposite pattern.

Statistics for precipitation
We compared annual precipitation at the four stations to the 20-year average . All stations had more below-average years than above-average years. Baghdad had the greatest number of years with below-average precipitation, followed by Khanakin, Sanandaj, and Sulymania ( Figure 3). Daily precipitation in the period was analyzed to determine its frequency at each station. Results show that precipitation amounts between 10 and 20 mm had the greatest frequency at all stations. Daily precipitation amounts between 90 and 100 mm occurred only once at Baghdad station and twice at the others (Figure 4). Accumulated rainfall for 20 hydrologic years from 1 October 2000-30 June 2001 through 1 October 2019-30 June 2020 was calculated for extreme events (using daily precipitation), based on the 90th percentile at each station, normal precipitation events with an amount of ,90th percentile, and total accumulated precipitation. The 90th percentile was 17,24,17.02,and 27.26 mm at Baghdad,Khanakin,Sanandaj,and Sulymania,respectively. These results indicate that extreme precipitation events contributed about 55.28, 60.71, 61.24, and 72.5% of total precipitation at Baghdad, Khanakin, Sanandaj, and Sulymania, indicating the importance of extreme events to water availability in the Diyala River basin ( Figure 5). Total accumulated precipitation during the period was 2,380.2 mm at Baghdad,6,303.75 mm at Khanakin,6,533.6 mm at Sanandaj,and 12,894.1 mm at Sulymania.
The number of extreme events was calculated and plotted against its hydrologic year to find the trend in event occurrence during the last 20 hydrologic years ( Figure 6). There were weak positive trends at Baghdad and Sanandaj and weak negative ones at Khanakin and Sulymania.
Regression equations were constructed to predict the probability of monthly and annual precipitation amounts at Khanakin station as an example (Figure 7), by plotting the amount against its probability distribution. For the annual amount of precipitation (R y ), the following exponential equation was obtained from best-fit data, with a coefficient of determination R 2 ¼ 0.964: For the monthly amount of precipitation (R m ), the following logarithmic equation was obtained, with R 2 ¼ 0.977:

DISCUSSION
The results of extreme temperature indices reveal many significant positive trends in temperature at all stations, except Khanakin with no significant trends. All these trends (Table 3) were detected for three indices (SU35, DTR, and Tx90p), implying an increase in maximum temperature during the study period in excess of the increase in minimum temperature. This is consistent with numerous studies that showed positive temperature trends upon using observed or simulated data from various general circulation models. Salman et al. (2017) and ESCWA (2017aESCWA ( , 2017b showed an increase in summer days with a temperature of .35°C and a number of days with a maximum temperature of .90th percentile. However, trends in DTR were different from many other studies, showing significant positive trends at three stations, indicative of a greater increase in maximum temperature than minimum temperature. IPCC (2007) and Salman et al. (2017) asserted that DTR is decreasing, implying that the rate of minimum temperature increase is higher than that of maximum temperature and that the DTR in Iraq is increasing following the global pattern. In contrast, precipitation indices had only one significant trend (at Baghdad station for CWD), indicating an increase in the number of consecutive days with precipitation of .1 mm. This was caused by precipitation variability, consonant with the findings of previous studies. Donat et al. (2014) and ESCWA (2017aESCWA ( , 2017b showed that precipitation trends were nonsignificant and had spatial and temporal variability. Homsi et al. (2020) projected precipitation changes in Syria using a multi-model ensemble for RCPs 2.6, 4.5, 6.0, and 8.5. The results show that during the wet season, precipitation is expected to decrease across the entire country for RCP 6.0 and increase in some regions for other RCPs. In the dry season, precipitation would decline by 12-93%, causing drier conditions in Syria in the future. Trend detection using nonparametric M-K trend analysis revealed similar results for precipitation trends, with almost no significant trends for all stations and months. Temperature trends were clearly more significant. Baghdad had only positive trends, Khanakin and Sanandaj had more negative than positive trends, and Sulymania showed a warming tendency with more positive than negative trends. Muslih & Błazėjczyk (2016) found more significant trends in summer than winter. Sillmann et al. (2013) and Lelieveld et al. (2016) projected that summer will have more temperature extremes than winter. Such results at Sulymania station for maximum temperature showed a positive winter trend, while the other three stations had no significant trends in either summer or winter.
The impact of extreme weather on water availability in the Diyala River basin was more related to precipitation indices than those of temperature. This may be better understood by comparing the accumulated river discharge at Derbendikhan (city of Sulymania) and Hemrin (city of Diyala) dams for two periods (2000-2009 and 2010-2019). At Derbendikhan, flow rates were 10,189 and 11,484 m 3 /s, respectively, with 10,558 and 11,743 m 3 /s at Hemrin. This indicates an increase in total discharge at both dams over the last 10 years of the study period relative to the first 10 years, despite new water storage construction and conversion channels within Iran during the last decade. Sanandaj and Sulymania stations are within the catchment area of Derbendikhan dam, which registered a total accumulated precipitation of 3,575 mm for the last 10 years, compared with 2,959 mm for the first decade at Sanandaj station. At Sulymania station, total precipitation was 6,291 mm over 2000-2009 and 6,603 mm over 2010-2019. Both stations received heavier precipitation during 2010-2019 than 2000-2009. This was associated with a nonsignificant positive trend for the annual sum of daily precipitation (Table 3). However, at Hemrin dam, which includes Khanakin station in its catchment area in Iraq, total accumulated precipitation declined from 3,435 mm in 2000-2009 to 2,876 mm in 2010-2019, in spite of a nonsignificant positive trend for the PPCRTOT index at that station. Hemrin dam received water from the catchment area within Iran. The present study did not include any station within Iran, owing to a lack of data. Therefore, the increase of Hemrin dam discharge would be attributable to precipitation falling outside Iraq, which generated many flash flood events in Iran during the last 10 years.

CONCLUSIONS
We used observed temperature and precipitation data from four meteorological stations across the Diyala River basin during 2000-2020. This was done to evaluate trends in extreme weather events at monthly, seasonal, and annual scales, and to statistically analyze precipitation data including estimation of the probability of a specific precipitation amount. Moreover, data quality control and homogeneity testing, which are essential in estimating climate change impacts, were carefully executed using accepted technical procedures. Our study makes an important contribution to climate change research, especially extreme-related events. It helps decision-makers to improve management plans for the studied basin through better understanding and statistical analysis of such events, based on real data and linking them to the incoming discharge at two dams in Iraq.
The findings indicate that precipitation-related indices had only one significant trend, compared with seven trends for temperature indices. The latter indices showed a stronger tendency toward higher maximum temperatures, whereas trends in precipitation indices were nearly all nonsignificant. Percentile-based indices exhibited more dry and warm than wet and  cold events during the study period. Trends in mean precipitation using nonparametric MK tests were significant in only two cases, whereas trends in temperature showed more significant positive and negative trends. Extreme events contributed between 55.28 and 72.5% of total accumulated precipitation during the 20-year study period, demonstrating the strong influence of extreme events on total precipitation and water resources within the basin. The number of extreme precipitation events based on the 90th percentile slightly increased at Baghdad and Sanandaj and decreased at Khanakin and Sulymania. Water discharge into Derbendekhan and Hemrin dams increased during the last 10 years of the study period relative to the first 10 years, associated with an increase in total precipitation and heavier rainfall events. Our findings correspond well with what has been observed in Iraq and neighboring regions. The associated studies showed similar trends in precipitation and temperature indices.
The major limitation of this study is the quantity data. A longer period of data and more stations within the Diyala catchment are needed, especially within Iran. This would provide more confidence in the results and reveal trends more accurately. Future studies using different trend detection techniques for both observed and simulated data will support such studies and help in predicting the patterns of extreme events.