Introduction

The tropical and subtropical areas are prone to climate change and variability due to the complex interactions between land surface, water, and atmosphere. The greenhouse gas (GHG) emission through anthropogenic activities is the main reason for the warming of the earth’s atmosphere and resulted in a 1 °C increase in average global temperature compared to the pre-industrial era (Connors et al. 2019). Over the last 100 years, the average temperature has increased by 0.62 °C across India (Government of India, 2021). The amount and frequency of rainfall across the country are equally varied. The different states of India experienced rainfall variability as some parts of Meghalaya received over 4000 mm of rain and some parts of the Thar Desert received less than 100 mm of rainfall in a year (USAID 2017). The summer monsoon rainfall is expected to fall by 6% between 1951 and 2015 over India, with notable decrease over Indo-Gangetic Plains and Western Ghats (Krishnan et al. 2020).

The Indian Ocean Dipole (IOD) and El Niño-Southern Oscillation (ENSO) are the two dominant phenomena that impact rainfall in India. The Indian summer monsoon (ISM) represents a major source of annual water and is mainly dependent upon these two phenomena. The warming of the eastern Pacific during the El Niño period leads air to descend in the western Pacific and Indian sectors, resulting in lower monsoon rainfall. The annual and monthly rainfall intensity is influenced by interaction with monsoon and local dynamics (Power et al. 2021).

Rainfall trends were studied to evaluate the influence of climate change and variability in different areas of the country. An analysis of rainfall trends over the Eastern Ganga Canal command area depicted a declining trend in annual and monthly rainfall from 1901 to 2012 (Krishan et al. 2018). The long-term rainfall variability analysis was conducted in the lower Shivalik plains of Punjab, and Kaur et al. (2021) found the decreasing trend of 12 to 17 mm in annual rainfall at all the three locations, i.e., Patiala ki Rao, Ballowal Saunkhri, and Saleran. Similarly, Kumar et al. (2010) studied the rainfall trend in north-east India, central north-east India, and west-central India and state that the Mann–Kendall test has a better confidence level compared to linear regression. Moreover, a Mann–Kendall test found a decreasing trend in annual rainfall. Vennila (2007) also found a decreasing trend in monthly and seasonal rainfall patterns in the Vattamalaikarai sub-basin of Tamil Nadu, India. The rainfall amount during different seasons indicate decreasing trend in the summer monsoon rainfall over Indian landmass and increasing trend in the rainfall during pre-monsoon and post-monsoon months (Dash et al. 2007).

The rainfall trends in recent years have a significant impact on the agricultural sector. The change in the behavior of rainfall in terms of intensity, frequency, and distribution will affect crop planning and may result in crop failure (Apata, 2010). In India, 70.9 lakh ha of crop area (2% of total area) is affected due to extreme weather events. The GDP of India may be reduced by 2.6% due to the impact of climate change (Kahn et al. 2019). The trend analysis study can help set up adaptation and mitigation measures to reduce climatic variability (Allan and Soden, 2008).

Considering the history of rainfall variability in the mid-hills of Himachal Pradesh, conducting long-term trend analysis of rainfall with MK test and Sen’s slope estimate test to obtain the results on what has been changing in the past few decades would be a vital contribution. Research on the rainfall trend in the mid-hills of Himachal Pradesh is a first step in assessing climate change impact on a local scale. As a result of climate change, the behavior of rainfall in the study area is changing. The mid-hills of Himachal Pradesh are highly dependent on rainfall. The findings will come in handy in formulating a better climate change adaptation and mitigation plan. Therefore, the trend analysis of this region needs to be done, which would help adopt new technologies for climate-smart agriculture.

Materials and methods

Study site

The Solan district falls under mid-hills of Himachal Pradesh lying between 33°12′40″ N latitude and 79°04′20″ E longitude (Fig. 1). It covers an estimated area of 1,936 km2. Its altitude ranged between 1200 and 1275 m above mean sea level. The annual rainfall is 1115.1 mm in the region. The high rainfall was recorded during the monsoon season which starts from June to September.

Fig. 1
figure 1

Map of the study region

Data source

The daily rainfall data for 50 years (1971–2020) for district Solan was collected from an ordinary rain gauge installed in the Agrometeorological Observatory, Department of the Environmental Science, Dr. Yashwant Singh Parmar University of Horticulture and Forestry, Nauni, Solan (HP). The normal values of rainfall were derived by averaging monthly sums for all the years used for comparison, i.e., 1971–2020 for district Solan. For seasonal trend analysis, the year was divided into four seasons, i.e., winter (January–February), summer (March–April–May), monsoon (June–September), and post-monsoon (October–December) (Attari and Tyagi, 2010). The change in behavior of rainfall for kharif (July–October) and rabi (November–April) cropping seasons were also analyzed.

Data analysis techniques

A number of techniques have been developed for the analysis of rainfall. The techniques are generally divided into two categories, viz., variability analysis and trend analysis.

Variability analysis

Variability analysis involves the use of mean, standard deviation (SD), coefficient of variation (CV), and percent contribution of annual rainfall. Data analysis was undertaken by using excel spreadsheet. Standard deviation is calculated to measure the amount of variation. Coefficient of variation was calculated to evaluate the variability of the rainfall. A higher value of CV is the indicator of larger variability and vice versa which is computed as:

$$\mathrm{CV}=\frac{\sigma }{\mu }$$

where CV is the coefficient of variation; σ is standard deviation and μ is the mean rainfall.

Wet and dry years

Spatial distribution of the number of wet and dry years was analyzed by using a transformed annual precipitation departure (Z).

$$Z=\frac{x-\mu }{\sigma }$$

where x is the annual precipitation of each year, \(\upmu\) is annual mean precipitation of 49 years from 1971-2020, and \(\sigma\) is the standard deviation of the annual precipitation.

Dry year existed where Z <  − 0.5, and wet years existed if Z > 0.5

Trend analysis

a. Man-Kendall test

MK trend test is a non-parametric test commonly employed to detect monotonic trends in series of meteorological and hydrological data. The test determines the increasing and decreasing trends in the study area and whether the trend is statistically significant or not. The statistics of test is based on (+ or −) signs. MAKESENS perform two types of statistics depending upon the number of data values, i.e., S-statistics used if number of data values is less than 10 while Z-statistics for data values greater than or equal to 10 (Kendall, 1975).

The statistics S was calculated as shown in Eq. (1)

$$s=\sum \begin{array}{c}n-1\\ i=1\end{array}\sum \begin{array}{c}n\\ j=i+1 \end{array}sgn(xj-xi)$$
(1)

where \(xj\) and \(xi\) are annual values in years j and i, j > i, respectively, n is the number of data points, and sgn(xj-xi) was calculated using Eq. (2)

$$sgn\left(xj-xi\right)=\left\{\begin{array}{c}1\;ifxj-xi>0\\0\;ifxj-xi=0\\-1\;ifxj-xi<0\end{array}\right.$$
(2)

A positive or negative value of S indicates upward or downward trends, respectively. If numbers of data values were 10 or more, the S-statistics approximately behave as normally distributed, and test was performed with normal distribution with the mean and variation as given below Eq. (3).

$$E\left(s\right)=0$$
(3)
$$var\left(S\right)=\frac{n\left(n-1\right)\left(2n+5\right)-\sum\begin{array}{c}n\\i=1\end{array}ti\left(ti-1\right)(2ti+5)}{18})$$

where n is number of tied (zero difference between compared values) group and \(ti\) is the number of data points in the ith tied group. The standard normal distribution (Z-statistics) was computed using Eq. (4).

$$z=\left\{\begin{array}{c}\frac{s-1}{\sqrt{var\;(s)}}ifs>0\\0\;if\;s=0\\\frac{s+1}{\sqrt{var\;(s)}}if\;s<0\end{array}\right.$$
(4)

Statistically the significance of trend was assessed using the Z-value. A positive value of Z shows upward (increasing) trend, while the negative value indicates the downward (decreasing) trend.

b. Sen’s estimator method

Sen’s nonparametric estimator method was used for predicting the magnitude of weather data series which uses a linear model for trend analysis (Sen, 1968). The slope Ti was calculated as:

$$Ti=\frac{xj-xk}{j-k}\mathrm{For}\;i=1,2,3\dots n$$

where \(xj\) and \(xk\) are data values at time j and k (j > k) separately.

The median of these n values of \(Ti\) represented by Sen’s slope estimation which is estimated by using the following equation:

$$Qi=\left\{\begin{array}{c}T\frac{n+1}2f\;or\;n\;is\;odd\\\frac12\left(T\frac n2+T\frac{n+2}2\right)f\;or\;n\;is\;even\end{array}\right.$$

Sen’s estimator (\(Qi\)) was calculated by using the above equation depending upon the value of n which is either odd or even, and then \(Qi\) is computed using 100 (1-ɑ) % confidence interval. A positive value of \(Qi\) indicates increasing trend, while negative value represents decreasing trend of time series data, where a is different significance level (0.05, 0.01, etc.).

c. Linear regression analysis

Linear regression analysis is a parametric model and one of the most commonly used methods to detect a trend in a data series (Kaur and Kaur, 2019). This model develops a relationship between two variables (dependent and independent) by fitting a linear equation to the observed data. The data is first checked whether there is relationship between the variables of interest or not. This can be done by using the scatter plot. The linear regression model is generally described by the following equation:

$$Y\hspace{0.17em}=\hspace{0.17em}aX\hspace{0.17em}+\hspace{0.17em}b$$

where Y is the dependent variable, X is the independent variable, a is the slope of the line, and b is the intercept constant.

Results and discussion

Monthly and seasonal rainfall and rainy days variation

A monthly and seasonal rainfall variation at the Nauni station was presented in Table 1. The average annual rainfall from the study period was 1115.1 mm, with a corresponding standard deviation of 296.5 mm. The average annual rainfall had a coefficient of variation of 26.6%. The highest rainfall was recorded in July (241.5 mm), followed by August (227.6 mm) with 130.3 mm and 140.6 mm standard deviations, and has the lowest CV of 54.0% and 61.8% at station Nauni. The months with the highest percent rainfall contribution are June (13.4%), July (21.7%), August (20.4%), and September (10.9%), while January, April, October, November, and December contributed less than 5%. The contribution of rainfall during winter, summer, and monsoon seasons (11.6, 16.3, and 66.3%) except post-monsoon season (5.8%) is less than 10%. As depicted in Table 1, the monsoon is the major season in the study area which contributes about 66.3% of the annual rainfall (where nearly 42.1% comes only in 2 months, July and August, while June and September contributed 13.4 and 10.9% of monsoon rainfall, respectively), which clearly explains the presence of a high concentration of rainfall. Overall, the study analyzed that there was a considerable variation in rainfall, indicating the region with higher inter-annual variability, and hence has more vulnerability to extreme weather events. Due to diverse factors such as topography and elevation, the state of Himachal Pradesh exhibits significant variation in the distribution of rainfall (SCCAP, 2012). Jaswal et al. (2015) concluded that 93% of the Himachal Pradesh population depends on agriculture and horticulture; a decrease in rainfall in the state will have a significant impact on a large number of the farmer population.

Table 1 Monthly and seasonal rainfall and rainy days variation from the years 1971 to 2020

The rainfall variability analysis is of great importance for farmers and researchers in their decision-making. Box and Whisker plot graphically skillfully describes the statistical distribution to understand. The plot includes median (central horizontal line), 25th percentile (bottom horizontal line), 75th percentile (top horizontal line), vertical lines (upper, 90th percentiles; lower, 10th percentile), and outliers. If the median line is significantly shifted away from the center, it may indicate skewness in the distribution. From 1971 to 2020, box plots of monthly rainfalls in the Solan district are shown in Fig. 2. The plots depict the relative maximum amount of rainfall in July and August because the length of the boxes and whiskers is longer in July and August, and the variability is higher than in other months.

Fig. 2
figure 2

Box and whisker plot of the monthly rainfall (mm)

Variability analysis of rainfall on decadal basis

Variability analysis of rainfall on a decadal basis is presented in Table 2. The mean annual rainfall in the study area from 1971 to 2020 was 1115.1 mm as depicted in Table 1. The annual amount of rainfall on decadal basis of 1042.8 mm (1971–1980), 1056.2 mm (2001–2010), and 1010.6 mm (2011–2020), respectively, indicate that the average annual rainfall was deficit by 93.5%, 94.7%, and 90.6% in the past decades. On the other hand, the mean annual rainfall during 2 decades (1981–1990 and 1991–2000) was above the normal rainfall. Kaur et al. (2021) also analyzed the annual and seasonal changes of rainfall during the past 15-year period for three regions of Punjab and concluded that annual and monsoon rainfall has decreased from 2001 to 2015 as compared to 1986 to 2000. The annual rainfall was reduced to 926. 7 mm from 2001 to 2015.

Table 2 Variability analysis of rainfall on decadal basis in mid-hills of Himachal Pradesh

Monthly and seasonal rainfall features

The rainfall received in the study area for various months and seasons over the last 50 years is presented in Table 3. The highest and lowest ever recorded annual rainfall was 2205.0 mm in the year 1988 (the wettest year) and 530.3 mm in the year 1984 (the driest year). Over the past years, the highest rainfall (683.0 mm) was recorded in August of the year 1982. The lowest rainfall (0.0 mm) was recorded during the monsoon season months of July (1981), August (1979), and September (1979 and 1980) and (19.3 mm) of rainfall during June (2012) , whereas the highest rainfall (683.0 mm) was received during August 1982, followed by (666.4 mm) during July 1988, (415.5 mm) rainfall received during June 1973, and (408.0 mm) rainfall received during September 2009. The monsoon season highest rainfall (1653.0 mm) in the year 1988 and the lowest rainfall (189.0 mm) during 1979 at the station Nauni, respectively. Over the past 50 years, the most frequent are the number of dry years rather than wet years in the study area (Nauni). The number of dry years is 13, while the number of wet years is 10. The results are in line with the study of Kaur et al. (2021) who also analyzed that the highest rainfall is recorded in the year 1988 at three different locations in lower Shivalik of Punjab.

Table 3 Monthly and seasonal rainfall features

Annual and seasonal trend analysis by Mann–Kendall test statistics of rainfall

The Mann–Kendall test and Sen’s slope estimator were applied to the time series data from 1971 to 2020 for the study area (Nauni). The results of the MK test and Sen’s slope estimator are presented in Table 4. The trend analysis has been done for all the months of the year, climatic seasons (winter, summer, monsoon, and post-monsoon), and crop seasons (rabi and kharif) and the whole year. The results of the Z-test for monthly rainfall data revealed an increasing trend for January, April, July, September, November, and December. On the other hand, a decreasing trend was observed for February, March, May, June, August, and October as shown in Fig. 3. The MK test revealed a decreasing trend on an annual basis from the years 1971 to 2020. The rate of decrease is − 0.79 mm/year in the study area. Using Sen’s slope estimator, the rate of change of average annual rainfall is − 2.28 mm/year as depicted in Table 4.

Table 4 Annual and seasonal trend analysis by Mann–Kendall test statistics of rainfall
Fig. 3
figure 3

The Mann–Kendall (Z) and Sen’s Slope estimator test (Q) for monthly trend analysis of rainfall from 1971 to 2020

The results of the Q-test revealed an increasing trend for January, April, July, and September while a decreasing trend for February, March, May, June, and August. According to the Q-test, there is no change in rainfall for October, November, and December as shown in Fig. 3. The decreasing trend was observed for the climatic seasons, i.e., summer (Z =  − 0.05), monsoon (Z =  − 0.23), and post-monsoon (Z =  − 0.70) as well as crop seasons, i.e., rabi (Z =  − 0.23) and kharif (Z =  − 0.08) and the increasing trend for winter season (Z = 0.43) as depicted in Table 4 and Fig. 4. Climate variability results in a change in the amount of rainfall in the monsoon season. It has been observed in the study area that rainfall shows a decreasing trend in the kharif season. The delay in the onset of the monsoon season results in a delay in the sowing of kharif crops. Thus, the rainfed regions are going to be affected more by the changing behavior of rainfall as compared to the irrigation regions. Therefore, farmers are advised to develop rain-water harvesting structures when the rainfall is high and change their cropping patterns to grow crops that require less water, viz., pulses, millet, and fodder crops. The results are in line with the findings of Kaur et al. (2021) who also analyzed a significant decrease in annual (12 to 17 mm), kharif (9 to 15 mm), and monsoon (9 to 14 mm) rainfall at Patiala ki Rao, Saleran, and Ballowal Saunkhri in the lower Shivalik of Punjab. They also revealed that inadequate rains during the sowing of kharif (mid-May to mid-June) and rabi (mid-October to mid-December) season crops result in poor soil moisture, leading to poor germination and seedling growth of major crops.

Fig. 4
figure 4

The Mann–Kendall (Z) and Sen’s slope estimator test (Q) for annual and seasonal trend analysis of rainfall from 1971 to 2020

Annual and seasonal rainfall trend analysis with Sen’s slope estimator test by using linear regression model

By using a linear regression model, the rate of change of average annual rainfall is defined by the slope of the regression line, which was − 2.28 mm/year for the study area (Nauni). The declining trend of average annual rainfall was presented in Fig. 5. Using a linear regression model, different seasons also showed the decreasing trend, i.e., summer (− 0.08 mm/year), monsoon (− 0.88 mm/year), and post-monsoon (− 0.28 mm/year), whereas winter season depicted increasing trend (0.33 mm/year). The crop seasons rabi and kharif seasons also showed the decreasing trend (− 0.17 mm/year and − 0.18 mm/year). Jaswal et al. (2015) also analyzed seasonal and annual trends in rainfall over Himachal Pradesh for 37 stations from 1951 to 2015. Annual rainfall was showing significantly decreasing trends by − 4.58 mm/year. The study concluded that all the 37 stations in Himachal Pradesh were not showing an increasing trend in annual rainfall. The decreasing trend in annual rainfall was observed for Dharampur (− 7.04 mm/year), Kasuali (− 6.18 mm/year), and Nalagarh (− 0.60 mm/year) regions, respectively.

Fig. 5
figure 5

Annual and seasonal rainfall trend analysis with Sen’s slope estimator test from 1971 to 2020

Conclusion

The present investigation experienced the changing rainfall pattern in Solan district of Himachal Pradesh. The annual rainfall is about 1115.1 mm and analyzed decreasing trend for annual and seasonal rainfall except winter season. The study revealed that the majority of the rainfall received during the monsoon season, with the month of July receiving the most (241.5 mm), contributing for 21.7% of the total annual rainfall. The results of MK and Sen’s slope estimator test found a decreasing trend for the seasons (summer, monsoon, and post-monsoon), crop seasons (kharif and rabi), and yearly annual, which coincides with the lifetime experience of the farmers. Furthermore, a decreasing trend of rainfall for the months of February, March, May, and June has a determinant effect on the fruit quality of temperate fruits. After the breaking of the dormancy of temperate fruits, new growth arises for which the availability of soil moisture is very essential. The decrease in rainfall results in increasing temperature and drier condition which results dropping of temperate and stone fruits. The increase in temperature also shifts the belt of apple production to higher altitudes. Thus, a decreasing trend in rainfall adversely affects the yield and quality of fruit crops. A significant increasing trend was observed for the month of September, which has an adverse effect on the physiological maturity and harvesting stage of kharif crops. Moreover, the erratic rainfall makes the cropping calendar shorter and affects the agricultural practices. The experience of farmers for the last 3 decades has been that there is no rain when needed and more rain than normal when rain is not actually necessary.