Spatio-temporal trend mapping of precipitation and its extremes across Afghanistan (1951–2010)

The civil war, harsh climate, tough topography, and lack of accurate meteorological stations have limited observed data across Afghanistan. To fulfill the gap, this study analyzed the trend in precipitation and its extremes using Asian Precipitation Highly Resolved Observational Data Integration Towards Evaluation (APHRODITE) daily dataset between 1951 and 2010 at the spatial resolution of 0.25° × 0.25°. Non-parametric modified Mann-Kendall test and Sen’s slope estimator were employed to detect the trend and quantify it at the significance level of 5%. Significant decreasing trends were observed only in small clusters of southwestern regions ranging between 0 and −1.5mm/year and the northeastern region between −1.5 and −6 mm/year for the annual time series. A similar trend pattern was observed in the spring season decreasing at the rate of −0.15 and 0.54 mm/year in the northeastern and 0 to −0.15 mm/year southwestern region. A decrease in spring precipitation is expected to affect crop production especially in the northeastern region which hosts 22% of the arable area. An increasing trend in the eastern region at a maximum rate of 0.16 mm/year was observed which could intensify the flooding events. Trend analysis of extreme precipitation indices indicated similar spatial distribution to the mean precipitation, concentrated around southwestern, northeastern, and eastern regions. The increasing frequency of consecutive dry days in the western region and very heavy precipitation (R10mm) and extremely heavy precipitation (R20mm) in the eastern region could be fueling the occurrence of droughts and floods respectively. Taking these findings of the erratic nature of rainfall and extreme events into consideration for sustainable management of water resources would be fruitful.


Introduction
Precipitation is one of the most important variables in hydrology that directly influences the hydrologic processes. Change in precipitation has a direct effect on water resources, agriculture, forestry, ecosystem, natural resources, plant cover, and drinking water (Cannarozzo et al. 2006). Because of this, it has garnered wider attention from scientific communities in light of climate change. Intensification of extreme precipitation events in frequency, duration, and intensity are recurrent with global warming than the mean precipitation and are expected to continue in the future (Myhre et al. 2019). Escalation in extreme events aggravates the frequency of floods/droughts (Easterling et al. 2000) which disrupts socio-economic balance affecting every aspect of human activities. Assessing the trend of climatic variables plays a pivotal role in assessing the state of the climate in the region and quantifying variations in them. Hence, understanding the historical trend of extreme precipitation events provide insight to understanding change in regional climate dynamics across time and space. These understandings help governments to cope up with the hazards and adopt necessary strategies for sustainable water management.
A wide assortment of studies spanning across global, continental, regional, and local scales have been conducted in the past to understand the behavior of extreme events and their variability (Kim et al. 2019;Nguyen et al. 2018;Sheikh et al. 2015;Sun et al. 2021). However, the spatial and temporal variability of the precipitation and extreme events are not consistent across the world. The mean precipitation trend increased by 7 to 12% for areas between 30° and 85° N in Northern Hemisphere and by 2% in Southern Hemisphere between 0° and 55° S (Xu et al. 2005). Similar trends for extreme events were observed in mid-latitude regions of the Northern Hemisphere on a global scale (Alexander et al. 2006). At the continental scale, an increasing trend in precipitation was seen in North America, Argentina, and Australia from 1900 to 1988 (Dai et al. 1997). A remarkable increase in precipitation has been observed over Europe (Schönwiese and Rapp 2013) whereas the extreme rainfall trend has reduced over southeast Asia, western and south Pacific over the period of 1965 to 1998 (Manton et al. 2001). Variability of precipitation in the south and central Asia showed little change with the positive and negative trends during 1961 to .
However, the global scale or continental-scale studies may not completely represent the regional or national scale trend. Though the annual precipitation has reduced slightly throughout China over the last five decades (Zhai et al. 1999), the heaviest precipitation has significantly risen over the Yangtze River and West China in the last decades of the twentieth century (Zhai et al. 2005). Further, the spatial distribution of interannual precipitation trends may be different within a region compared to the annual trend. Praveen et al. (2020) in their study revealed that northeastern, central, and southern India detected a negative trend for summer and monsoon seasons and insignificant trends for rest. While for the winter season, the northeastern, western, and eastern parts of India experienced a positive trend and the central part, southern and western Ghat exhibited a declining trend. The precipitation has reduced in the winter and post-monsoon and has risen in monsoon and pre-monsoon on the China-Pakistan economic corridor throughout for 1980-2016 (Bhatti et al. 2020). In fact, a mixed spatial trend pattern persists at sub boundaries level which when spatially aggregated to global or continental level could lead to averaged increasing or decreasing trend. That is, at a larger scale opposite trends may nullify or a small area with significant trends could dominate over a larger area which otherwise may not exhibit any trends (Nguyen et al. 2018). To address these variabilities into national-level planning, national and regional scale studies are required.
Afghanistan is a landlocked agrarian country by nature and about 79% of its population is engaged in farming though the contribution to GDP from this sector is just 22% (Jawid and Khadjavi 2019). Political turmoil and decades of war have devastated the country and resulted in more than 50% of poverty and 23% undernourished (The World Bank Group and The Asian Development Bank 2020). The country is prone to flood and drought hazards. More than 100,000 people are displaced every year due to flooding events (Ginnetti and Lavell 2015). Similarly, several incidences of drought cycles were recorded in the past (1963-1964; 1966-1967; 1970-1972; 1998-2006) affecting 9.8 million rural population leading to their displacement from west and northwest towards provincial centers (Přívara and Přívarová 2019). Despite minimal contribution to climate change, the country is already experiencing climate-induced hazards further exacerbated by a low capacity to adapt (The World Bank Group and The Asian Development Bank 2020). In addition, farmers in the least developed countries like Afghanistan are ravaged by extreme climatic events (Mendelsohn et al. 2006). Prolonged drought, exposed soil with minimal vegetation cover, and reduced water draining capacity have increased the vulnerability of the land to respond to these extreme events. Precipitation is highly variable in Afghanistan owing to its complex topography and climatic characteristics. An increase in extreme events is likely to aggravate the situation in the future. Therefore, it is important to assess long-term trends and variability in precipitation and its extremes for appraisal of water resources among different sectors (Meshram et al. 2018). To statistically signify the rate of change with a certain level of confidence, the use of appropriate statistical techniques has always been put forward by the scientific community. Several trend analysis methods are available; however, two methods are most widely used: parametric tests (Malik and Kumar 2020) and non-parametric tests (Aawar et al. 2019;Cannarozzo et al. 2006;Sediqi et al. 2019;Nashwan et al. 2019).
However, one of the main challenges in analyzing precipitation trends in Afghanistan is the availability of long-term observed climate data. Trend analysis involves long-term time series from a dense network of rain gauge stations. To fill the gap, the use of gridded precipitation data along with the station data is seeking wider attention (Aich et al. 2017;Nashwan et al. 2019;Saini et al. 2020) of researchers. Constrained to data availability, very few studies are available on climate variability analysis in Afghanistan. Those available are mostly focused on local or basin-scale climate change analysis of glaciers concentrated around the Hindu-Kush region (Akhundzadah et al. 2020;Ososkova et al. 2000;Unger-Shayesteh et al. 2013) and few on precipitation trend analysis (Aawar et al. 2019). Studies at the national scale are based on the use of gridded precipitation data and mostly focused on climate change analysis (Aich et al. 2017;Qutbudin et al. 2019;Stockholm Environment Institute 2009). Stockholm Environment Institute (SEI) used Coupled Model Intercomparison Project (CMIP3) of 2.5° × 2.5° to analyze the socio-economic impact of climate change for Afghanistan. The study revealed a decrease in spring precipitation by 6.6% per decade . Likewise, Aich et al. (2017) studied the impact of climate change along with the two extreme indices for rainfall (heavy precipitation and spring precipitation) and three indices for droughts using reanalysis data of 0.5°×0.5° spatial resolution. The study found that the trend in annual precipitation was less distinct with −10 to 10% change for most parts and only small clusters in the west and north experienced a decrease up to 20% from 1951 to 2010. Further, the study also indicated an increase in heavy precipitation concentrated around the eastern region along the border of Pakistan. On the other hand, declining trends were observed in northern, western, and central highlands. Similarly, Qutbudin et al. (2019) studied the meteorological droughts during the wheat and rice cropping season using gridded data (GPCC for precipitation and CRU for temperature) of 0.5°×0.5° spatial resolution. The study highlighted the declining (inclining) trend of precipitation in southwestern (northeastern) during the, wheatgrowing seasons (winter and spring) for the historical climate analysis between 1951 and 2010. The same study observed the increasing (decreasing) trend of precipitation for eastern and southern (southwestern) during rice growing seasonssummer and autumn. Most of the results from later studies were consistent with the former studies in terms of trends but different in terms of quantities. Also, the trend for spring precipitation was reported different by Qutbudin et al. (2019).
Based on the discussion, all the former studies were limited to either the average climate variability and future climate projections or heavy precipitation and drought analysis using coarser resolution reanalyzed data. Aich et al. (2017) highlighted the limitation of the coarser resolution data to represent the climate of the highly varying topography of Afghanistan. Further, the climate extremes have a profound impact compared to the climatic mean. Thus, the main objective of this study is to analyze the trend in average precipitation as well as nine extreme indices proposed by the Experts Team on Climate Change Detection Indices (ETC-CDI) of the World Meteorological Organization (WMO) (Bhatti et al. 2020;Iqbal et al. 2019;Xuebin Zhang et al., 2011;Zhang et al. 2011) using non-parametric Modified Mann-Kendall (MMK) test (Hamed and Ramachandra Rao 1998) and Sen's slope (Sen 1968) estimator for the quantification of the trend. To achieve the objective, this study evaluated publicly available and differently scaled gaugebased interpolated gridded precipitation dataset at daily scale: Asian Precipitation Highly Resolved Observational Data Integration Towards Evaluation (APHRODITE) and Climate Prediction Center (CPC). Gridded datasets were evaluated against the available gauge-based dataset using continuous statistical measures (bias, correlation coefficient, root-mean-squared-error, and standard deviations) and better performing dataset was considered for further analysis.

Study area
Afghanistan is a vast country with a 652,000 km 2 area and an estimated population of 34 million with 70% residing in rural areas (Sediqi et al. 2019). It is geographically located approximately between 29° and 38°N latitude and 61° and 74°E longitude in the central zone of Asia and a part of the country lies within the Hindu-Kush Himalayan region. The country is bordered by Iran in the west, Uzbekistan, Tajikistan, and Turkmenistan in the north, Pakistan to the southeast, and China in the northeast. The elevation of the country ranges between 230 and 7471 m above msl with highly undulating topography as presented in Fig. 1. The country's area is dominated by mountains especially in the north, northeast, and east while relatively flat and deserted areas in the southwest. Seven agro-climatic regions (ACR) (Li-Ge et al. 2013) adopted by the Ministry of Agriculture Irrigation and Livestock (2017) in its "Climate Change Scenarios for Agriculture of Afghanistan project" is adopted in this study for the regional analysis. The provinces under each ACR are given in Table 1.
Significant proportions of the Afghani population, 79% are engaged in agriculture (Jawid and Khadjavi 2019;Qutbudin et al. 2019) and the agriculture system is largely rain-water fed especially in rural Afghanistan. Different conditions for agriculture and livelihood persist due to its topographic heterogeneity. Large contiguous agricultural fields rarely exist in Afghanistan rather prevail in scattered strips along the valleys. Relatively contiguous areas and extensive farming can only be seen in northern foothills and Turkistan Plains where fairly flat terrain prevails (MAAH and FAO 2003). Northern and northeastern ACRs cover more than 55% of arable land in the country also known as the food basket of Afghanistan. Cropping is mainly done during the summer, spring, and winter seasons. The main summer crops are rice and corn, and the main winter crops are barley and wheat. Wheat covers a major share, about 79% of the total cultivated area followed by rice 6.2% and corn 4.3%. Winter crops are usually sown between mid of October and mid of December and harvested between mid of May and mid of July considering longer winters. Similarly, summer crops are usually sown between the end of March and the end of June for corn and the start of June to mid of July for rice, and harvesting is done between mid of August and end of October (Qutbudin et al. 2019). Wheat cultivation is done throughout the country while corn and water-intensive rice is mainly cultivated in the northern part of the country owing to its water availability.
Afghanistan has a predominantly dry continental climate with hot and sunny summers and cold and rainy winter. It is characterized by little to no precipitation. However, considering the undulating topography of the nation, the climate varies greatly between these topographic regions. Afghanistan generally observes four seasons. Winter commences in December and ends by the end of February (hereinafter DJF). March, April, and May are observed as spring season (MAM). Similarly, June, July, and August are observed as summer (JJA) and September, October, and November as autumn (SON). Winter and spring seasons are usually wet, and summer and autumn are dry in Afghanistan except for the eastern region which is influenced by the summer monsoon. The winter monsoon is influenced by the large-scale humidity from the Caspian and the Black sea approaching from the northeastern, northern, and western ACRs. Similarly, the summer monsoon approaching from the Bay of Bengal, Indian Ocean, and the Arabian sea crossing India and Pakistan is only observed in the eastern, southern, and central ACRs with heavy rainfall (Shokory et al. 2017). The precipitation falls as snow in high mountains during winter and spring seasons that act as water towers and sources of water in rivers during summer.
The spatial distribution of rainfall is heterogeneous throughout the country. The northeastern, eastern, central,  and southern ACRs receive higher rainfall compared to the scanty rainfall in southwestern, western, and northern regions. The average annual, seasonal, and monthly rainfall of the country is presented in Figs. 2 and 3 based on Asian Precipitation Highly Resolved Observational Data Integration Towards Evaluation (APHRODITE) considering the confinement of provided observed gauge data into certain ACRs only as presented in Fig. 1. The name, latitude, and longitude of stations are provided in Table 5. The choice and evaluation of gridded products are provided in subsequent sections. The average annual precipitation ranges from < 60 mm in the southwestern ACR to > 840 mm in the eastern ACR. Seasonal precipitation changes between < 39.47 mm (southwest end) and > 350mm in eastern ACR in the winter and spring seasons. It is remarkably below 10 mm in summer and autumn for a majority of ACRs (Tunnermeier and Houben, 2005). The southwest monsoon usually extends two seasons, winter and spring for all ACRs.
In addition, the eastern, southern, and central ACRs receive precipitation during the summer season as a part of the Asian Summer Monsoon (Aich et al. 2017).
The temperature in summer is approximately 33°C and 10°C in winter, but in cold areas, the temperature could fall below −20° C (McSweeney et al. 2010).

Observed station data
One main challenge in climate analysis in Afghanistan is the availability of long-term and reliable observed climatic data. Observed long-term time series in Afghanistan is scarce because of scattered meteorological stations, political instability, destruction of records, and stoppage of observation during the Taliban regime (Aich et al. 2017). The in situ daily precipitation gauge data from 17 meteorological stations were made available by the Islamic Republic of Afghanistan Civil Aviation Authority Meteorological Department from 2006 to 2011. The provided data are mostly concentrated around the central, eastern, northeastern, and southern ACRs. Considering the short-term availability of the observed dataset, gauge-based interpolated gridded datasets were considered for long-term trend analysis.

Gridded dataset
To overcome the shortcomings of the observed dataset for trend analysis, gauge-based interpolated gridded daily precipitation datasets: APHRODITE and Climate Prediction Center (CPC) were used for this study. Summary of the dataset along with their spatial and temporal resolution and sources are presented in Table 2.

APHRODITE
APHRODITE datasets are the quality-controlled interpolated continental-scale daily precipitation product at the spatial resolution of 0.25° × 0.25° for the period of 1951 to 2010 (60 years) collected from in situ rain gauge observation network ranging between 5000 and 12,000 stations including Global Telecommunication Systems (GTS) and compiled products of several national and international institutes (Kim et al. 2019). Daily precipitation data were spatially averaged and extracted for each ACR for further regional analysis.

Fig. 2 Average annual (left) and seasonal precipitation (right) distribution across Afghanistan
The daily precipitation data were further processed to obtain monthly, annual, and seasonal time series.

CPC
The CPC is a gauge-based interpolated daily precipitation dataset of the National Oceanic and Atmospheric Administration (NOAA). It is a quality-controlled daily precipitation product with improved quantitative accuracy and inter-products consistency developed based on the gauge reports from over 30,000 stations including GTS, Cooperative Observer Network (COOP), and several national and international institutes. The dataset is available at 0.5° × 0.5° spatial resolution starting from 1979 onwards (Xie et al. 2007). Table 2 presents a summary of the gridded dataset used in the study. Table 3 houses four continuous statistical measures, correlation coefficient (r), bias (B), standard deviation (SD), and root mean square error (RMSE) used to quantify the errors and evaluate the performance of the gridded datasets. These statistical metrics are chosen because they have been widely  used to evaluate the performance of satellite-based rainfall products using ground observation as reference data and are found to provide a consistent and trustful products evaluation (Deng et al. 2018;Ghulami et al. 2017;Nkunzimana et al. 2020;Yeggina et al. 2020). The evaluation is carried out between the period of 2006 and 2011 on the monthly time scale overlapping with the time period of observed data. To capture the differences in spatial performance, these indices were calculated separately for each station under study. The correlation coefficient measures the linear consistency between the gridded and observed datasets. The r value close to 1 indicates good performance and 0 indicates no relation at all. Similarly, RMSE is the measure of differences (error) between the observed and gridded dataset. The value of RMSE close to 0 indicates better performance. The bias is the difference between the observed and gridded dataset. A positive value indicates the magnitude of overestimation of precipitation by gridded product and a negative value indicates an underestimation. Likewise, SD is the measure of the amount of variation or spread in the dataset. A higher value indicates data is widespread from the mean and a lower value indicates the data is concentrated around the mean value. O, Y are the observed precipitation and estimated gridded respectively; Ō, Ȳ are mean observed precipitation and average estimated gridded precipitation respectively; n is the number of data points

Statistical analysis
This study utilizes skewness and kurtosis to describe the distribution of the monthly, seasonal, and annual precipitation datasets. Skewness, a dimensionless parameter, is a measure of the asymmetry of a probability distribution, i.e., the negative value of skewness indicates that the left tail is larger than the right tail of a probability distribution curve and vice versa. Similarly, kurtosis is also a dimensionless parameter that characterizes the relative peakedness or flatness of a probability distribution curve compared to a normal distribution. A positive value of kurtosis indicates the peakedness in data while a negative value indicates the flatness of the distribution. A larger absolute value of kurtosis specifies a significant deviation of the probability distribution from the normal distribution.
Several data analysis techniques are in practice for the variability analysis and trend analysis of climatic time series. The most commonly used techniques involve the coefficient of variation (CV), standardized precipitation anomaly (SPA), and precipitation concentration index (PCI), and moving average (Li-Ge et al. 2013;Saini et al. 2020;Asfaw et al. 2018;Miheretu 2021). This study uses CV and SPA to describe the variability and interannual variability of precipitation time series.
The CV is calculated as: where σ is the standard deviation and μ is the mean precipitation. The higher the CV higher is the variability in temporal distribution and the lower the value more stable is the time series.
To compute the SPA, the daily data of grids falling into each ACR were spatially averaged and transformed to an annual time series. The SPA is calculated as: where y i is the annual precipitation for the i th year and ȳ and s is the long-term mean precipitation and standard deviation of the observed period (60 years). The SPA enables the detection of the dry and wet years and is also used to examine the severity of droughts. The obtained SPA values are then categorized into four drought severity classes (Agnew and Chappell 1999) which are extreme drought (SPA<-1.65), severe drought (−1.28>SPA>−1.65), moderate drought (−0.84>SPA>−1.28), and no drought (SPA>−0.84).
Both parametric and non-parametric tests are used to analyze the trends in the climatic time series. Data should be continuous, normally distributed, independent, and have identical distribution in the parametric test while the only condition to be met for the non-parametric test is data should be independent (free from serial correlation). The MMK, a non-parametric test, was employed to analyze the trends of mean perception and the extreme indices at monthly, seasonal, and annual time scales in this study.

Extreme precipitation indices (EPIs)
This study used nine precipitation indices suggested by the Experts Team on Climate Change Detection Indices Bias to study extreme indices events (Bhatti et al. 2020;Ongoma et al. 2018;Xuebin Zhang 2011). These nine indices can be put into 3 categories (Zhang and Liang 2020;Zhou et al. 2018) namely, frequency indices, duration indices, and intensity indices. The description of the indices is presented in Table 4. The EPIs for the entire nation were calculated using the Xclim package for python using daily precipitation NetCDF file. Indices were calculated at an annual scale. The trends in EPIs were assessed using the MMK test and the significance of the trend was obtained using Sen's slope estimator at the significance level of 5%.

Normality test
Before the application of trend analysis, monthly, seasonal, and annual time series were tested for normality for each ACR. Both graphical and statistical methods are available for the normality test. This study utilized two statistical normality tests namely, Shapiro-Wilk (SW) test and Anderson-Darling (AD) Test. SW test followed by AD test has proved their powerfulness in determining the normality of the time series dataset (Aamir and Hassan 2018;Mendes and Pala 2003). Shapiro and Wilk (1965) test was initially limited to a sample size of 50. Royston (1982) later developed an algorithm to generate approximation and tabled values for the coefficients (Mendes and Pala 2003). It has been widely used owing to its good power properties (Mendes and Pala 2003;Razali and Wah, 2020). For a given ordered random sample of y 1 , y 2 , y 3 ,……,y n , the SW test statistic is defined as:

Shapiro-Wilk test
where y i is the i th order statistic, ȳ is the sample mean, a i = (a 1 , a 2 ,…., a n )= ., m n ) T are values of order statistics of identically distributed and independent random variables sampled for the normal standard distribution and V = covariance matrix of ordered statistics. Anderson and Darling (1954) normality test is defined as:

Anderson-Darling test
where ψ is a non -negative weight function calculated as: Both tests assume the null hypothesis that the time series comes from a normal distribution. The test statistics (W) are compared against a critical value of the theoretical distribution. The null hypothesis is rejected if the test statistics are greater than the critical value and accepted otherwise. Both SW and AD tests were implemented using SciPy, open-source software for mathematics, science, and engineering, in a python(version 3.8) environment (Javari 2016). A significance level (critical value) of 5% (0.05) was considered for the evaluation of all ACRs.

Modified Mann-Kendall test
The Mann-Kendall (Mann 1945), a statistical non-parametric test, is widely used in the trend analysis of hydroclimatic time series. The test was first devised by Henry B. Mann in 1945 and has been extensively used since then. The test assumes the absence of trend as a null hypothesis (H0) which is tested against the alternate hypothesis (H1) Maximum 1-day precipitation Annual maximum 1-day precipitation mm RX5day Maximum 5-day precipitation Annual maximum consecutive 5-day precipitation mm that assumes the presence of trend in the time series. For a time series data of x1, x2, x3 …..xn with n≥8, the M-K test statistic (S), the variance (V(S)), and the associated standard normal test statistic (Z) are computed as follows: where q represents the total number of tied groups. Tied groups are the set of the same values in the dataset and each tied group is represented by t p . The positive values of Z indicate the increasing trends in time series while negative values represent decreasing trends and 0 represents no trend at all. The presence of serial autocorrelation (correlation between n and n−k time series, where k is the lag) in the time series would sometimes mislead the trend results, i.e., increase in the chances of rejecting the null hypothesis of no trend (Piyoosh and Ghosh 2017). To overcome this issue, Modified Mann-Kendall Test (MMKT) devised by Hamed and Ramachandra Rao (1998) is used in this study (Hamed and Ramachandra Rao 1998;Saini et al. 2020). The MMKT follows a similar approach to the Mann-Kendall test with variance correction in addition. The MMKT does not require data to be free of serial correlation. The variance correction approach in MMKT assumes that N serially correlated dataset gives the same information as M (M<N) uncorrelated variables however serial correlation changes the variance of the dataset.
Variance correction, V(S)* is the corrected variance obtained after correction and cf represent the correction factor proposed by Rao et al. (Saini et al. 2020).
The statistical significance of the computed tests is then compared against the critical values (Z 1−ɑ ) where 1−ɑ is the confidence level.

Sen's slope estimator
The MK/ MMK tests indicate the presence of trend and Sen's slope, also a non-parametric test, quantifies the magnitude of detected trends in the time series (Sen 1968). Sen's slope method is widely used and is robust against outliers. The Sen's slope (SS) is calculated as below: where x i , x j are the values of the data in time step i and j respectively.
The pyMannKendall (Hussain and Mahumud 2019) package was employed to calculate test statistics for the MMK test and Sen's slope in the python 3.8 environment.

Evaluation of gridded datasets
Results for different performance measures of APHRO-DITE and CPC for seventeen stations are presented in Table 5. From 2006 to 2011, the APHRODITE product outperforms the CPC dataset for about 70% of stations in terms of bias, RMSE, and correlation coefficient. Ten of seventeen stations indicated a high correlation coefficient (>0.7) for APHRODITE compared to just four stations for CPC. Further, the continuous statistical performance indicators for each station against APHRODITE and CPC are presented in Fig. 4 by Taylor diagram (Taylor 2001). Taylor diagram (Fig. 4) summarizes the performance based on three statistical metrics: (i) standard deviations, (ii) Pearson's correlation coefficient, and (iii) centered root-meansquared differences. Comparatively, the better performance of APHRODITE can be attributed to the pivotal role of the gauge-based dataset Merino et al. 2021) and its spatial resolution. Furthermore, the selection was also guided by the performance outlined in existing literature (Ghulami et al. 2017;Lauri et al. 2014;Rai et al. 2015;Yang et al. 2017). APHRODITE precipitation product has better performance in the Asian region in both flat plains (Lauri et al. 2014;Rai et al. 2015) and arid and semi-arid regions (Yang et al. 2017). Henceforth, all the analysis of the precipitation and its extreme indices for Afghanistan is carried out only for the APHRODITE dataset.

Precipitation statistics
The statistics of spatially averaged precipitation for monthly, seasonal, and annual time series for the entire Afghanistan is presented in Table 6. The mean annual precipitation during the study period in Afghanistan was 313.85 mm with a standard deviation of 89.38 mm. The minimum and maximum values of precipitation were 157.47mm and 559.29 mm respectively with 30.07% of the CV. The skewness and kurtosis values of 0.5 and 0.11 indicated that the probability distribution of the annual rainfall was approximately symmetrical and normal. Winter (DJF) and spring (MAM) seasons (monsoon) observed the highest precipitation cumulatively accounting for more than 75% of the annual precipitation and least CV (38.12 to 39.14%). Contrarily, cumulative summer (JJA) and autumn (SON) seasons (dry) precipitation contributed less than 25% of the total annual precipitation and more than 90% of CV indicating high variability and inconsistent precipitation during these seasons. Similarly, the lower (higher) values of skewness and kurtosis for spring and winter (summer and autumn) precipitation revealed relatively light (heavy) tailed and flat (peaked) precipitation. Precipitation during June, July, August, September, and November exhibited high skewness towards the right and relatively peakedness compared to the monsoon months. The grid-wise spatial distribution of average precipitation for different temporal resolutions (annual, seasonal, and monthly) are presented in Figs. 2 and 3. Figure 5 presents the five-number summary (minimum, first quartile, mean, the third quartile, and maximum) and outliers of spatially averaged precipitation for eight ACRs. The summary is similar to grid-wise distribution with Eastern ACR receiving the highest precipitation followed by central and northeastern ACRs and northern and southwestern ACRs receiving minimum precipitation for all time scale. The summer and autumn observed outliers for almost all ACRs and are positively skewed.

Annual and seasonal variability in precipitation
The spatial patterns of the average annual and seasonal variability in precipitation are presented in Fig. 6. The provinces in southwestern ACR observed the highest annual precipitation variability ranging between 32.97 and 51.57% followed by the central and west-central ACRs between 29.25 and 40.41%. Less variation can be observed in annual precipitation as we move northeast and east of central ACR. The eastern ACR observed the minimum variability between 18.08 and 32.97%.
Similarly, Fig. 6 reveals high interannual variability in the seasonal precipitation ranging between 16.53 and > 200% between seasons. The winter and spring seasons demonstrate less variability in precipitation ranging between 16.53 and 58.36% for all ACRs compared to the high variability during summer and autumn especially in western, southwestern, and northern ACRs. A cycle of variation occurs in average seasonal precipitation with the least variation in winter (DJF), peaking in summer (JJA) then declining in autumn (SON). The highest variability of 204.776% occurred during the summer season in the border of southwestern and western ACRs. The southern, central, and eastern ACR showed the least variation

Regional interannual precipitation variability
SPA revealed the high interannual variability indicating uneven precipitation from year to year for different regions of Afghanistan. Different ACRs witnessed different interannual variations. All ACRs observed both positive (43%) and negative anomalies (57%) (i.e., values above and below the mean precipitation) as presented in Fig. 7 1964-1969, 1991-1994, and 2008-2010 -central experienced 1965, 2008, 2009, and 2010 as very wet years. Similar to west-central ACR, more than 80% of years observed moderate to severe droughts between 1973 and 1989 and the years 1965, 1990-1998, and 2005-2010 as wet years. The eastern ACR on the other hand exhibited extreme drought in the year 2001 and severe droughts in 1960, 1971, 1974, and 1985. The very wet years for eastern ACR were observed in the years 1956, 1965, and 1992 with SPA value >2. The central ACR exhibited extreme droughts in the years 1975 and 1978 while 1990-1999 observed wet spells. Likewise, the southwestern ACR experienced extreme droughts for four consecutive years from 1977 to 1980. After 1980s, the southwestern ACR has SPA values greater than 0 for more than 80% of the years indicating wetter years attributed to increased precipitation.

Extreme precipitation indices
The averaged spatial distribution of the EPIs across Afghanistan is presented in Fig. 8. It can be seen from the figure that the lower parts of western ACR (Farah province) and southwestern (Nimroz province), observed the CDD (CWD) of 233.75 (<3.17) days making these regions the driest belt. On average, the CDD (CWD) ranged between 142.16 and 165.06 (3.82 to 5.77) days for northern ACR, comparatively dry considering <73.46 (5.77 to 8.37) days of CDD (CWD) in central and southern ACRs. The eastern ACR is the wettest region with CDD(CWD) < 50.56 (6.42 to 9.02) days.
Regarding the frequency indices, the majority of the ACRs including southwestern, southern, western, westcentral, and northern exhibited consistent R20mm with the frequency of < 1 day. While northeastern ACR observed R20mm between 0.93 and 2.78 days, eastern ACR observed the highest frequency of 8.35 days. Likewise, R10mm exhibited similar spatial distribution to R20mm where higher values were obtained in eastern ACR (23.42 days) and northeastern ACR (15.64 days) and lower values were obtained in western and southwestern ACRs (< 2.69 days). The average number of days receiving very wet day precipitation (R95P) for entire ACRs except for Nimroz province of southwestern ACR was 18.27 days. A singular value of 3.67 days for extremely wet precipitation (R99p) was observed for the entire nation.
The spatial distribution of intensity indices of Rx1day and Rx5day followed a similar pattern. The intensity of Rx5day is almost twice the Rx1day intensity in all ACRs. Eastern ACR received the highest Rx1day (Rx5day) with values of 47.42 (98.90) mm. In contrast, the dry southwestern ACR received the lowest Rx1day (Rx5day) values of 6.62 (13.16) mm. Similar spatial variability can be observed in annual total wet day precipitation (PRCPTOT) with eastern ACR receiving a maximum precipitation value of 848.84 mm while southwestern ACR receiving the lowest PRCPTOT of 50.92 mm and other regions receiving between 228.23 and 582.87 mm.

Normality test
The Shapiro-Wilk and Anderson-Darling normality tests were applied on annual, seasonal, and monthly time series at 5% significance level. The result is presented in Table 7. None of the time series during the months from June to November were normally distributed for all ACRs. Only the month of March witnessed the normality of the data for a majority of ACRs (except for northeastern ACR and central ACR). Similarly, only northern, and western ACRs passed both the normality tests for January. While northern, northeastern, and eastern ACRs passed both the normality tests, western ACR failed SW for the February time series. The west-central ACR passed the AD test for December but failed to converge on the SW test. All the ACRs except for northern and western ACRs demonstrated the normally distributed annual data series. The precipitation data were normally distributed for all ACRs in the spring season and winter season (except for southern ACR). The majority of the ACRs failed both SW and AD tests for the summer and autumn seasons.

Annual, monthly, and seasonal trends
The spatial distribution of the MMK trend test and Sen's slope (only in the region with significant trends at the significance level of 5%) are presented Figs. 9, 10, and 11.

Annual trends
The spatial distribution of the MMK test statistics (Z) and the significance of the trend using Sen's slope estimator are presented in Fig. 9. The northeastern ACR observed the highest declining trend in annual precipitation at the rate of −1.5 mm/year at high hills to −6 mm/year along the low lands. Similarly, Farah province in western ACR and Nimroz province in southwestern ACR recorded a declining trend at the rate of 0 to −1.5 mm/year. Only Nuristan province in eastern ACR observed the increasing trend of precipitation at the rate of 1.5 to 4.5 mm/year. The majority of ACRs (northern, central, southern) did not show any trends.

Monthly trend
The spatial distribution of the Sen's slope where a significant trend was observed at 5% significance level is presented in Fig. 10. The notable changes in trends are concentrated around western, southwestern, central, parts of west-central, and northeastern ACRs. The west corner of southwestern ACR revealed the increasing trend of precipitation during February, April, May, September, and November at the rate of < 0.13mm/year. Similarly, the eastern part of southwestern ACR, central ACR, west-central ACR northeastern ACR, and eastern ACR observed an increasing trend in June, July, August, and September at the rate ranging between 0.13 and 0.69 mm/year. In contrast, the northeastern ACR observed a declining trend in March and partially in April, November, and December. The declining trend in northeastern ACR ranges between −0.431 and > −1.5 mm/year.

Seasonal precipitation trend
The seasonal spatial trend distribution is presented in Fig. 11. It shows high spatial and temporal variability. Winter (autumn) season observed decreasing (increasing) trends in very few regions especially in northeastern ACR (Uruzgun Province in southwestern ACR and Bamyan in westcentral ACR) at the rate of −0.184 to −0.03mm/year (0 to 0.04mm/year). Summer precipitation exhibited the highest increasing trend of 0.19 mm/year extending east of Kandhar in southwestern ACR to southern, central, eastern ACRs and a small part of Badakshan province in northeastern ACR at the border of Pakistan. Similarly, the spring season exhibited a declining trend. Northeastern ACR observed the highest declining trend of −0.18 to −0.48 mm/year and parts of Western ACR at the rate of −0.18 to −0.03 mm/year.

Trend analysis of extreme indices
The Nimroz province of southwestern ACR (Bamyan in west-central and part of central, northeastern, and northern ACRs) showed a significant increase (decrease) in CDD at the rate of 0.65 to1.64 days/year (−2.82 to −0.34 days/ year) as presented in Fig. 12. Likewise, parts of eastern and northeastern ACRs observed a decrease in CWD at the rate ranging between −0.07 and −0.03 days/year.
In terms of frequency indices, the southern corner extending from west to east exhibited the increasing trends in the frequency of days receiving high-intensity rainfalls: R10mm and R20mm at the rate of 0 to 0.23 days/year and 0 to 0.12 days/year respectively. In contrast, parts of northeastern ACRs observed a declining trend in R20mm at the rate of −0.02 to −0.33 days/year. A declining trend was observed for the very wet precipitation days R95p in the southwestern, part of western ACR and northeastern ACR at the rate of −0.15 to −0.33mm/year. Contrastingly, east corners of both eastern and northeastern ACR observed the increasing trend in R95p at the rate of 0.11 to0.24 mm/year. A similar pattern was observed for extremely wet precipitation R99p with higher spatial coverage for increasing trends concentrated along the border of Pakistan compared to R95p. Bamyan province of the westcentral ACR and northeastern ACR revealed the declining trend at the rate ranging between −0.03 and −0.09 mm/year. On the other hand, the southern corners of southwestern (extending east of Kandhar province), southern and eastern ACRs manifested the increasing trend ranging between

Discussion
This study analyzed the trend in spatial and temporal variability of the precipitation and its extremes across Afghanistan. The spatio-temporal distribution of precipitation is highly heterogeneous in Afghanistan. The eastern ACR receives precipitation of more than 800mm while scanty precipitation <100mm occurs in southwestern ACR. Similar figures were reported in earlier studies (NEPA 2016). It revealed high annual and seasonal variability in precipitation. The ACRs receiving a higher amount of precipitation showed less variability compared to deserted regions with less precipitation. Almost all the ACRs exhibited moderate to extreme droughts between 1970 and 1989, and 2000 and 2003 for most of the years and wet years between 1990 and1999, and 2008 onwards. Similar incidences of drought years (1964-1965, 1970-1972, and 1998-2006) by Přívara and Přívarová (2019). Afghanistan did not exhibit a significant annual trend in precipitation for most regions rather decreasing trend was observed in isolated clusters as most of the wet years are nullified by the dry years indicated by SPA. The negative trend of annual precipitation in southwestern and northeastern ACRs and insignificant in other ACRs is similar to the findings of (Aich et al. 2017;Haag et al. 2019). Decreasing trends were also reported in semi-arid and arid regions of Iran bordering Afghanistan in the west (Modarres and de Paulo Rodrigues da Silva 2007; Tabari et al. 2012). The increasing (decreasing) trend of the summer (spring) precipitation in the northeastern ACR and the increasing trend of summer precipitation in eastern and central ACRs is consistent with Haag et al. (2019). Most of the Afghani in rural areas rely on a rain-fed agriculture system. Thus, winter and spring precipitation play an important role in Afghanistan as they contribute to more than 75% of the annual total precipitation. The northeastern region observing a declining precipitation trend is likely to have an impact on agriculture as 22% of the total arable land area belongs to this ACR. The westward shift of the South Asian High could be one of the reasons for an increasing trend in the eastern region during summer (Wei et al. 2014). The increasing precipitation trend in the summer season at the rate of 0.08 to 0.16mm/year in the Wakhan corridor and small part near the border of Pakistan in northeastern, eastern, and central ACRs is likely to aggravate the avalanche and flash floods.  The extreme intensity indices-Rx1day and Rx5day and frequency indices-R10mm, R20mm, and R95p were decreasing (increasing) significantly across the northeast of the west-central ACR (eastern and southern ACRs). Similar results were reported by Zhan et al. (2017) in their study related to changes in extreme precipitation events over the Hindu-Kush Himalayan region. Similarly, an increase (decrease) in CDD in southwestern ACR (west-central ACR) is presented in the study by Zhang and Liang (2020). The increase of extreme intensity and frequency indices is likely to exacerbate the events of flash floods in eastern and southern ACRs. In addition, extreme events have an impact on agriculture and infrastructure especially in regions with strong relief like northern, northeastern, central, and eastern ACRs (Qutbudin et al. 2019). More than 100,000 people are affected each year by flooding (Ginnetti and Lavell 2015). The increase of CDD is linked to droughts. Series of lasting drought events in the past (1963-1964; 1966-1967; 1970-1972; 1998-2006) were already reported (Přívara and Přívarová 2019). Further increasing trend of CDD in southwestern ACR and decreasing PRCPTOT in northeastern and southwestern ACRs are expected to affect the cropping pattern and production by altering the water availability for irrigation fueling the drought frequency. Natural disasterinduced migration is regular in Afghanistan especially to informal settlements along the provincial centers and along the dry river beds.
The study presents the precipitation trend analysis in Afghanistan along with extreme indices with the use of finer spatial resolution data for a similar time frame. The validation of the study is limited to the results of previous studies as observed data are unavailable for evaluation of the used gridded data set for the studied timeframe. Though the reanalyzed dataset could represent the regional climate variable but may not reflect the local extremes. Obtained results were mostly consistent with previous studies except for the trend in spring precipitation with Qutbudin et al. (2019). The inconsistency in results could be an outcome of different dataset use ) and time windows (Ngongondo et al. 2011) used in studies. The uncertainty in trend for the gridded data results is mainly due to the method used in producing gridded data, the number of observations used, and the method of interpolation or model used for reanalysis. Lack of quality long-term observed precipitation time series to validate the gridded data, a plethora of gridded dataset availability to choose from with inherent uncertainty, Fig. 12 Map displaying significant trends of extreme precipitation indices at the significance level of 5% using Sen's slope and resolution of dataset further posed significant challenges in this study.

Conclusion
Understanding precipitation variability and extremes at different spatial and temporal resolutions are core to sustainable water resources management and disaster risk reduction. It plays a vital role for countries like Afghanistan which is highly vulnerable to climate change and where a majority of its population is dependent on sustenance agriculture (Jawid & Khadjavi, 2019). This study mapped the spatio-temporal trends in precipitation and its extremes in the country for the period of 60 years from 1951 to 2010. Robust non-parametric trend analysis techniques were applied to the APHRO-DITE gridded dataset of 0.25°× 0.25° spatial resolution due to the unavailability of long-term observed data.
Trend analysis data showed precipitation reduction and increased number of CDD in northeastern and southwestern ACRs, especially in the spring season. This declining trend is sought to intensify the drought events affecting water availability and agricultural production. In contrast, the increasing trend of summer precipitation and frequency of very heavy (R10mm) and extremely heavy precipitation(R20mm) in the central, eastern, and southern ACRs are anticipated to aggravate flooding events. Further 2007 onwards the frequency of wet years had increased for all ACRS. The trend change could be Natural Oscillation induced or human-induced climate which suggests further research is required. Given that the large population is dependent on the sustenance rain-fed agriculture, sequences of series of droughts, and frequent flooding in recent days, the reflection of results into the natural disaster preparedness planning, water resources planning, and sustainable agriculture design.
Author contribution Conceptualization: QA and SD; methodology: SD; software: SD; validation: SD, QA, and SS; formal analysis: SD and QA; investigation: SD; resources: QA and SD; data curation: QA; writing-original draft preparation: SD; writing-review and editing: QA, SD, and SS; visualization: SD; supervision: SS.

Data availability
The datasets generated during and/or analyzed during the current study are available on reasonable request from the corresponding author.
Code availability The codes written for the current study are available on reasonable request from the corresponding author.

Ethics approval Not applicable
Consent to participate Not applicable Consent for publication All authors have read and agreed to the published version of the manuscript. To the Theoretical and Applied Climatology journal editorial team, all authors listed immediately below have participated in the conception and design or analysis and interpretation of the data; drafting the article; or revising it critically for important intellectual content and approval of the final revised version.

Conflict of interest
The authors declare no competing interests.