Rainfall trend analysis and weather forecast accuracy in selected parts of Khyber Pakhtunkhwa, Pakistan

Climate change is a multidimensional phenomenon, which has various effects on people's environmental and socioeconomic conditions. In the agricultural economy that is susceptible to natural changes, its impact is more profound. Therefore, climate change directly affects society in different ways, and society must pay a price. Climate change, especially the changes in annual temperature and rainfall, has attracted widespread attention worldwide. The variability of these factors or the magnitude of fluctuations varies according to location. Therefore, in the context of climate change, especially in countries dominated by rainfed agriculture, studying the trend of meteorological variables is essential to assess climate-induced variations and propose feasible adaptation approaches. Focusing on this fact is the main goal of this research study was to determine the rainfall trend and the accuracy of predicted temperature at three particular stations of Khyber Pakhtunkhwa (Kp) Province, Pakistan. For this purpose, rainfall and temperature data were provided by Pakistan Meteorological Department (PMD), Islamabad, for the period 1960–2020. Two types of nonparametric techniques, Sen’s slope estimate and the Mann–Kendall test, were applied to determine a trend in the average monthly and annual rainfall. The results of the annual rainfall trend analysis showed that Peshawar and Dera Ismail Khan stations showed a positive increasing trend, while the monthly rainfall trend showed a negative decreasing trend for all stations. The trend was statistically significant for Peshawar and Saidu Sharif stations. The accuracy of predicted and actual temperature and rainfall indicated that mostly over-forecast occurred at Saidu Sharif and Peshawar. Most of the precipitation and temperature records showed under forecast for Dera Ismail Khan, but some over-prediction has also occurred.


Introduction
As the mother of major external factors, climate change has led to extreme weather events such as temperature fluctuations, humidity changes, and heavy rainfall, resulting in huge economic losses [33]. Variations in the hydrological cycle have become a challenge that has affected society and the environment [8]. Precipitation, which directly affects water resources, ecosystems, floods, and droughts, is a major hydro-climatic variable [9,21]. Therefore, thorough information on the spatiotemporal changes in rainfall characteristics is needed to calculate possible fluctuations in the hydrological structure [7]. Climate change is one of the main concerns of modern humans in the twenty-first century. It not only affects precipitation but also other important characteristics, such as precipitation intensity, the length of the rainy season, the actual dates of rainfalls, and trends in a given season. According to the previous research, it has been determined that more and more extreme events of weather exist worldwide, and the proposed trend has continued in current years ( [11,29,31,34], Reason 2017).
A weather forecast is a statement of estimated weather at a particular location and duration of time [5]. Therefore, it is difficult to overestimate the consequences and the comparative rate of weather predictions. Weather forecast needs continuous observation of conditions related to weather. To monitor these situations, a developing estimation system needs to be established. Although the most important research tasks are still overdue, scientists are quite ready for the rise of mechanical weather forecasting systems that convert these interpretations into the sound analysis. Rainfall prediction is important for mitigating and managing environmental flows and floods and water demand in various parts. However, due to complex atmospheric processes, quantitative rainfall forecasting is challenging [24]. Changes in rainfall patterns affect many sectors of a country such as agriculture, economy, and disaster management [15]. Based on this evidence, the researchers are more and more interested in rainfall forecasting and use deterministic solvers [3,26] and random programs to provide different accurate and reliable forecasts [10,14,19,20,22,25,32].
Pakistan is an agricultural and agronomic country. The climate is diverse and uneven, from arid to semi-arid. Agriculture depends on the occurrence and quantity of rainfall. Due to unfriendly environmental activities, the country's temperature change is exceeding its normal limit, which has an optimistic impact on crop production, and this climate change has caused problems such as melting glaciers, floods, and severe droughts in different regions. The parts of the country that sway and influence social and economic conditions particularly affect people who rely mainly on agriculture for their basic needs. A climate change-based report of Pakistan was submitted by the Task Force on Climate Change (TFCC) [26]. Based on the report of TFCC, Pakistan is suffered from several natural adversities, which contains heavy precipitation, torpedoes, severe droughts, earthquakes, and unchanged floods.
Trend analysis of rainfall on a local and regional based has been determined by various researchers. These studies aimed to evaluate monthly, seasonal, and annual precipitation trends for an individual or group of stations. According to the latest research on climate change in Pakistan, rainfall follows very unpredictable, uneven, and unreliable patterns in the area. A difficult situation was created by this type of climate for the individuals living in this atmosphere, and it is necessary to make suitable arrangements and solutions for their livelihood needs. For instance, because of heavy rain in certain areas of Khyber Pakhtunkhwa, Pakistan faced a catastrophic flood on July 29, 2010. It was estimated that there were about 2,000 people died and 700,000 houses were destroyed. The 24-h rainfall in Peshawar reached a record-breaking 274 mm, which exceeds the previous maximum rainfall of 187 mm in April 2009. On the contrary, the central and southern areas of Pakistan suffered severe drought ranging from 1998 to 2001. The primary purpose of the proposed study was to analyze the precipitation trends and weather forecast accuracy in three parts of the country, i.e., Peshawar, Dera Ismail Khan, and Saidu Sharif. This includes an understanding of trends or fluctuations in temperature and rainfall in the area. Considering the reservations related to temperature and precipitation patterns will provide data for better management of irrigation, hydropower, agriculture, and supplementary water-related activities in selected areas.

Brief explanation of research region
Khyber Pakhtunkhwa (Kp) is situated from 31.25° to 36.95° North Latitude and 69.83° to 74.11° East Longitude. The province contains two ecological regions known as the small hilly mountains in the south, the mountains in the north, and the Trans-Indus Plain. The hilly areas include the Hindu Kush and the Himalayas, as well as the Kohistan Swat and Dir mountains. Asymmetrical boundary through hilly areas and Indus plains are considered as the river of Kabul. Kp, containing Federally Administrated Tribal Areas (FATA), covers 25.4 million acres of area. The province has 6.27 million acres of arable land. The province's irrigated land includes tube wells, canals, and lifting irrigation programs (total area of 2.29 million acres). The irrigated area of the region is 4.44 million acres.
Pakistan Metrology Department (PMD) provided the data for the current research study. The sites comprised in the data collection are Dera Ismail Khan, Saidu Sharif Swat, and Peshawar (Fig. 1). The analysis of the data was carried out using the techniques described below.

Data source and acquisition
Long-term high-resolution rainfall data were obtained from Pakistan Meteorological Department (PMD), Islamabad, and Regional Meteorological Centre (RMC), Peshawar, Pakistan, for the period 1960-2020. Before providing the precipitation dataset, the Pakistan Meteorological Department (PMD) takes all the necessary quality control measures on a standard basis. These measures include homogeneity and extreme value examination, removal of errors either coding or typing in station data, scrutiny of missing data in each station, etc. To interpolate the rain gauge data, a statistical technique named inverse distance weighted interpolation was used. The descriptive statistics for the three stations are shown in Tables 1, 2, and 3, respectively.

Reason for choosing three specific localities
In the past few decades, some areas (Peshawar, Dera Ismail Khan, and Said Sharif ) of Pakistan have seen unprecedented rainfall, causing catastrophic floods of more than 400,000 cusecs, surpassing the 1929 Floods (250,000 cusecs) which badly affected the designated three regions in the Kp Province, Pakistan. Due to changes in weather patterns, Pakistan's Kp province, especially the locations selected in this study, has often been threatened by floods and droughts in recent years [30, PDMA 2012]. However, most of the past studies have focused on the analysis of climate trends in other parts of the province. There is no precipitation trend research focused on these three stations. The proposed study fills this research gap. The criteria of length, uniformity, and completeness were also considered to select these sites.

Mann-Kendall test
It is a nonparametric statistical technique which is commonly used to determine the trend in hydrological and climatic time series data. The data need not be normally distributed for this test. According to this test: H 0 : There is no trend in time series data. H 1 : There is a trend in the data.
If the results of the test follow the null hypothesis (H 0 ), it means that the data will not have a positive or negative trend. Similarly, if the result follows the alternative hypothesis (H 1 ), then the data will have a positive or negative trend. The mathematical equation for the test is:  The test can be used for time series data x k , if k = 1, 2, 3,…, n − 1, and x j ranges from j = i + 1, i + 2, i + 3, …, n. Then, Here, x j and x k are values of chronological data, and n = length of the data set.
If a sample has a value larger than 10, then the normal distribution is used to test the null and alternative hypothesis. In this case, the mean and variance can be calculated as: where, t p = Data points number in the pth tied group. q = tied group number in the data set. Z mk known as standardized test statistics can be calculated as: Z mk value indicates the Mann-Kendall test statistic which followed the standard normal distribution, which has an average value and variance of zero and 1, respectively. If − Z 1 − α/2 ≤ Z mk ≤ Z 1 − α/2 in a two-way trend test, then the null hypothesis H 0 will be accepted, where α is an important level indicating the strength of the trend.

Sen's slope
A nonparametric technique that can be used for determining the extent of the trend in a time series data [30]. This method can be implemented to evaluate the actual slope of an existing trend, such as the amount of variation per year. The process can also be applied in case of the linear trend such as: In the above equation, Q is the slope of the data while B is a constant value.
To determine the slope of the data, the following equation can be used.
where x k and X j indicate values of the data during the year k and j where j > k. Suppose we have n values of x j in the time series, then, N = n (n − 1)/2.
The median of N values of Q i is known as Sen's slope.
Based on the Normal distribution and using the nonparametric procedure, we can achieve a two-sided confidence interval about the slope of 100(1 − α) %. An increasing or upward trend is obtained if the value of Q i is positive, while the trend will be decreasing or downward if the value of Q i is negative.

Weather forecast accuracy
Different parameters can be used to check weather forecast accuracy. In the current study, the weather forecast accuracy of two weather factors (precipitation, temperature) was tested. The degree of precision of precipitation was tested by comparing actual and forecasted precipitation. Correspondingly, a comparison of the forecasted minimum and maximum temperature was tested with the actual temperature to examine the accuracy of the temperature.

The basic aim of comparing actual and predicted temperature and rainfall
During the last few years, global warming has fascinated great attention from scientists. Global warming is related to the increasing average temperature of the earth's surface, which in turn leads to climate change. Global warming can lead to changes in rainfall patterns and temperature, rising sea levels, and widespread effects on plants, wildlife, and humans. Therefore, the importance of comparing global temperature and rainfall forecasts has been increased.

Results and discussion
The existing work was done in three parts of Kp, Pakistan (Dera Ismail Khan, Saidu Sharif, and Peshawar) to examine rainfall trends and explore the weather forecast accuracy. To better understand the rainfall trend and weather forecast accuracy, the following section presented and explained the consequences of the existing study.

Trend analysis of annual and monthly rainfall.
A summary of trend analysis is shown in Tables 4, 5, 6 and Figs. 2, 3, 4, 5, 6, 7 for three stations, Peshawar, Dera Ismail Khan, and Saidu Sharif. The analysis was made using Sen's Slope and Mann-Kendal test for the proposed stations. The analysis was carried out using average monthly and annual rainfall for each station. The average annual rainfall for Peshawar station shows a positive increasing trend for which the value of the Mann-Kendall test (Z) is 0.425. The average annual rainfall trend is statistically significant for Peshawar station. Similarly, the average monthly rainfall for Peshawar station shows a negative decreasing trend and it is also statistically significant. Similar results were presented by Salma et al. [29] which indicate that the annual rainfall for Peshawar station shows a significant increasing trend. The annual precipitation in Peshawar is more affected by the winter than monsoon rains because the sub-mountain Punjab and Kp have almost equal proportions of winter and summer precipitation Sadiq and Qureshi [28].
The Dera Ismail Khan station showed an increasing trend of annual rainfall although it is statistically not significant. Similarly, the average monthly rainfall indicated a non-significant decreasing trend for which the Mann-Kendall test (Z) value is − 0.121. Rahman and Dawood [25] conducted a similar study in different districts of Kp, indicating that Dera Ismail Khan showed a mix of increasing and The results obtained from the analysis of Saidu Sharif station revealed that the average annual and monthly rainfall showed a significant decreasing trend. Similar results were presented by Ijaz et al. [18] specifying significant positive trends from January to June and October to December, and negative trends in July and August.

Temperature and precipitation comparison
for Peshawar Station Figure 8 shows the actual average temperature and rainfall of the Peshawar station for three months (January, February, and March 2015) compared to the predicted average temperature and rainfall. Under-estimation was perceived during the first ten days of January, whereas over-estimation was documented during the last ten days. The first ten days of February displayed over the forecast, whereas the residual twenty days were below forecasts. Similarly, the first ten days of March indicated over-forecast, while the last ten days of the month showed slight under-prediction. The January results for rainfall comparison determined that mostly over-forecast occurred during the first two decades of the month, while the third decade shows a lower forecast. The first and third decades of February showed over the forecast, while in the second decade there was a lower forecast. The first and second decade of March indicated that it exceeded the forecast, while the third decade indicated that it was lower than the forecast.  Ave. Annual Rainfall

Peshawar Annual Rainfall
Sen's slope  Figure 9 demonstrates an assessment of the actual temperature and rainfall and the forecasted average temperature and rainfall at Dera Ismail Khan for the proposed three months, i.e., January, February, and March 2015. In the first ten days of January, there was a slightly over-forecast situation, while in the remaining two decades there were under-predictions. At the beginning of February, the recorded temperature was lower than expected, while the rest of the month showed that the average daily temperature forecast was higher than the actual. Usually, the temperature recorded was lower than expected in March.

Temperature and precipitation comparison for Dera Ismail Khan station
The January rainfall results determined that most of the over-forecast happened in the first and last ten days of January, while the second-decade results indicate a lower forecast. Keeping in view the February results, it was found that insufficient forecasts were found throughout the month. The forecasts for the first and third decades were lower than expected, while the forecasts for the second decade exceeded expectations for March.

Peshawar Monthly Rainfall
Sen's slope In most cases, January indicates that the average temperature exceeded forecasts but also recorded some under-predictions. Many fluctuations were recorded in February, most of which were below average daily temperature forecasts, while some were above average. The first ten days of March showed over forecasts, while the last ten days showed lower forecasts. The January rainfall results revealed under forecast during the first and second decades, but the third decade indicates over the forecast. Taking into consideration the February results, it was noticed that below-prediction was detected in the first and last ten days, whereas overforecast was examined in the middle ten days of Feb. The average daily rainfall in March showed lower than predicted values but higher than predicted values were also recorded during the first and third decades.
Many research studies fully or partially supported the existing research, i.e., [1,6,34]. The first study develops a univariate model for the prediction of monsoon precipitation. The remaining studies also predict the actual and forecasted precipitation and temperature.

Discussion
Trend analysis of meteorological parameters is very important for the decision-making of researchers and legislators because rainfall plays a leading role in determining the use of the water available in the area. Climate assessment includes a comprehensive understanding of temperature and rainfall patterns. Therefore, there are many factors to consider when studying climate. According to the results of this study, like many developed and developing countries, Pakistan's urban areas are also facing land-seaatmosphere problems caused by global warming. Usually, time series data will give a very significant trend, where the Mann-Kendall trend (Z statistics) and Sen's slope amplitude (Q statistics) values will increase (positive) or decrease (negative). These findings of this study fully or partially follow the same statistical trends reported in Northwest Pakistan [27]. These findings are consistent with the results of [12,16], where they found a statistically significant increase in annual precipitation in Northwest Pakistan. The results of this study also support the results of Hanif et al. [17], which found that the summer rainfall has changed significantly. These changes in rainfall trends may lead to more waterrelated disasters such as drought and floods in Pakistan in the near future. Basistha et al. [4] proposed possible reasons for changes in precipitation trends, such as global climate change, reduction of global monsoon circulation [13], and decline in forest coverage [2,23] and increased aerosols produced by human activities [27].

Conclusions and recommendations
The basic purpose of this study was to determine the trend in monthly and annual rainfall as well as the accuracy of predicted over actual temperature and rainfall. The data were collected from the Pakistan Meteorological Department (PMD) and Regional Meteorological Centre (RMC).
The period of the study is six decades from 1960 to 2020. Two nonparametric techniques, i.e., the Mann-Kendall test and Sen's slope estimator, were used to determine the trend in rainfall. These tests were conducted at a 5% level of significance. The test results revealed that a significant increasing trend was presented by the annual rainfall for Peshawar and Dera Ismail Khan stations, while a negative decreasing trend can be observed by the average monthly rainfall data for all stations. The accuracy of predicted and actual temperature and rainfall indicated that mostly overforecasting occurred in Saidu Sharif and Peshawar. Maximum precipitation and temperature records in Dera Ismail Khan showed below-forecasts, but some over-forecasts also occurred.
Rainfall is a very important agro-climatic variable. It determines the crop planting system and overall agricultural productivity in rainfed areas in Pakistan, and this increase in annual and seasonal rainfall can be used to better plan water resource development and management strategies and soil moisture protection in the research area of Kp, Pakistan. Based on the above conclusions, it is recommended that analysis of changes in precipitation patterns can be applied as benchmark information for upcoming investigations in hydrology and agricultural arenas. Water supply inside an irrigation system should be built on long-standing precipitation patterns. The existing work was done in only three districts of Khyber Pakhtunkhwa (Kp). The same work should be carried out in other districts of the province. To map precipitation in each region of the KP, GIS and remote sensing and other modern techniques should be used.  if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/.