1 Introduction

Climate anomalies often cause natural disasters, which severely impact the lives of people and their social and economic developments. As a result, the topic of climate change is receiving increasing attention from governments and society. Research into historical climate patterns is invaluable in understanding the climate variability, the mechanisms of climate change and the impacts of human activities on climate change, and for guiding climate forecasts (Yang et al. 2009).

The high-resolution historical climate series plays an important role in studying the rate of climate change, constructing climate models, improving the accuracy of climate forecasts and investigating the impacts of human activities on Earth’s climate (Eddy 1992). Many studies have used archaeological data to investigate the precipitation across historical timescales (COHMAP 1988; Rodrigo et al. 1998; Kunklb et al. 2003). The Cooperative Holocene Mapping Project (COHMAP 1988) reconstructed the gridded precipitation and temperature maps for North America at time intervals of 3000 yrs. Important discoveries were made by comparing the data with numerical simulations.

Rodrigo et al. (1998) reconstructed the formation mechanisms of rainfall for Andalucía in southern Spain between 1601 and 1650 using city yearbooks, letters and other records. This climatic information was categorised into precipitation, temperature, wind or cloudiness, and the annual precipitation was divided into five grades as \(-2,\, -1,\, 0,\, 1\) or 2, wherein the negative grades were attributed to lower rainfall amounts and positive grades represented higher rainfall amounts. Monthly and seasonal precipitation indices were determined, and the latter were used to derive a reasonable annual precipitation index. Annual, seasonal and monthly precipitation characteristics were then compared. Kunklb et al. (2003) studied the extreme precipitation in the USA from 1895 to 2000 using daily precipitation data and found that the extreme precipitation was frequent between the late 19th century and the early 20th century. In the subsequent years, the extreme precipitation was less frequent, and the frequency increased once again from the 1920s and 1930s until the late 20th century.

Due to the uniqueness of historical meteorological records in China and the differences between national and international research priorities, there remain few international studies on Chinese historical meteorological disasters. A relevant research typically utilises the observational data from weather stations. However, there are many studies on historical droughts and floods in China. Qu (1989) investigated the associated climate characteristics and the variability of droughts and floods in northern China using precipitation data from 54 weather stations and spanning 35 yrs since 1945. They used the Z-index and continuous power spectra to investigate these historical trends. Chen (1991) calculated the annual drought index for northern China from 1940 to 1979 using the drought and flood intensity data and showed that the period between 1637 and 1643 CE was the most severe and the longest drought in the region over the past 500 yrs.

Yan (1995) analysed the variability of historic droughts and floods using a graded series of the Hai River in northern China from the past 700 yrs, power spectrum characteristics, the fractional dimensions of attractors and forecastable times. Using the partial Kolmogorov entropy of the analytical system, the forecastable times for drought and flood trends were found to be essentially the same, approximately 4 yrs. Zhang and Liu (1997) reconstructed the drought and flood series for six regions in eastern China over the past 1000 yrs using historical records. They then performed mutation tests by applying a sliding t-test on the series and found that the variations in drought and flood series for all regions were on scales of either a century or 10–20 yrs.

Wang et al. (2000) discovered a quasi-period of 27 yrs in the variation of mean annual precipitation in eastern China from 1880 to 1999, which included six wet seasons and one dry season. Zhu and Wang (2001) used 500 yrs drought and flood records to show a clear 80-yr period in summer precipitation in northern China, the mid- and downstream regions of the Chang Jiang (including the Yangtze River) and coastal regions of southern China, and that the 80-yr period accounts for 27% of the low-frequency variance of all summer precipitation in northern China.

Li et al. (2014) established a drought and flood grade sequence of the Shijiazhuang area during a 268-yr period of the Qing Dynasty and analysed the frequency, stage and periodicity of the drought and flood disasters within the years and across the centuries. The study revealed that the dry and wet characteristics of the Shijiazhuang area during the study interval were characterised by partial wetness, wetness and partial drought, and were clearly correlated with the occurrence of drought and flood disasters in North China. Furthermore, Li et al. (2016) also established a drought and flood grade sequence using the drought and flood data in Shijiazhuang for the last 545 yrs and analysed the periodicity, the mutagenicity and the spatial distribution. The results indicated that there were prominent climatic periods of 3–5, 18, 30 and 75 yrs in Shijiazhuang, and that the southern part of eastern Shijiazhuang was wetter than the western part of western Shijiazhuang. Bi et al. (2018) rebuilt the drought and flood sequences for 442 yrs between 1470 and 1911 in the middle and lower reaches of the Yellow River and performed multi-time-series analysis to obtain the natural model function components with good stationary characteristics on different timescales. The results of this recent study show that the climate in the whole region was generally in a state of drought during this period. The drought and flood disasters in the middle and lower reaches of the Yellow River exhibit interannual variation of quasi-periods of 3, 5 and 7 yrs, and interdecadal quasi-periods of 16, 25 and 50 yrs. In addition, there is a centennial quasi-period of 87.57 yrs. Yang et al. (2014) used the reconstructed historical rainy season rainfall data and the historical drought and flood data to analyse the spatial and temporal distributions and the evolution of droughts and floods during the last 500 yrs in the Huaihe Basin. The results showed that droughts and floods were the most serious in the Huaihe River Basin during the 17th century, but extreme drought and flood events occurred most frequently in the 20th century. The drought and flood events in the Huaihe River Basin exhibit a stable period of \(\sim 40\) yrs, and the main period gradually decreased from 15 to 20 yrs during the 18th century to 5 yrs by the 19th century.

Drought and flood variability are affected by multiple factors and across different timescales, and the solar activity affects temperature and precipitation. The stagnation in the increase of global mean annual temperatures since the 21st century (Easterling and Wehner 2009; Foster and Rahmstorf 2011) and the frequent occurrence of cold events have reignited the debate over whether or not we are in a ‘mini-ice age’ driven by natural causes (Beer 2006; Gray et al. 2010; Scafetta 2010; Wang et al. 2010; De Jager 2012). Many studies have analysed and confirmed the correlation between historical climate records and the solar activity (Clayton 1923; Denton and Karlen 1973; Hoyt and Schatten 1977; Haigh 2007). Eddy (1976, 1977) discovered that the Sporer and Maunder solar minima created global ‘mini-ice ages’. When investigating the 11-yr solar cycle envelope, Reid (1987) found that the 80- to 90-yr cycle (i.e., the Gleissberg cycle) had a similar trend to that of the global sea surface temperatures (SSTs) over the past 120 yrs, and that the two were highly correlated between 1952 and 1969. Zhao et al. (1999) analysed the relationship among the solar activity, the El Niño phenomenon, and the precipitation and temperature changes in Beijing. They suggested that solar activities have a certain degree of influence over precipitation and temperature in Beijing. Mendoza et al. (2001) analysed the temperature changes recorded by five weather stations in central Mexico from 1920 to 1990 and found that temperature changes correlated with fluctuations in the geomagnetic field. Further investigations have shown that temperature changes have similar periodicities with the number of sunspots and solar magnetism. Wang et al. (2016b) analysed the statistical relationship among drought and flood and sunspot activity based on monthly precipitation data from 60 meteorological stations from 1961 to 2013 in the Bohai Sea area. The results of their study indicated that the relative number of sunspots was positively correlated with drought and flood grades, wherein droughts occurred during single cycles of sunspot activity, whereas droughts and floods alternated during double cycles. The relationship between the sunspot activity and the small-scale period of the drought and flood index was strong (i.e., the period of few sunspots corresponded to increased precipitation, whereas the period of active sunspots corresponds to reduced precipitation). Therefore, the sunspot activity appears to have a great influence on the alternation of droughts and floods.

Apart from solar activity, oceans have important effects on global climate, as any anomaly in the tropical SST is a thermal forcing factor that affects the climate of multiple regions around the world (Gong and Wang 1999; Ashok et al. 2007; Wang 2007; Xu et al. 2008; Feng et al. 2010). Wang et al. (2012) studied the relationship between the tropical mid-Pacific Ocean temperature anomalies in autumn and the winter precipitation and temperature in China and found that the autumnal tropical mid-Pacific Ocean temperature anomalies have a 10-yr quasi-period. When SSTs exhibit positive anomalies, conditions are favourable for cold air at high latitudes to be transported to northern and eastern China. Convergence occurs above 850 hPa in southern Shandong and central Henan, causing more precipitation. When SSTs exhibit negative anomalies, the conditions are unfavourable for such northward transport of cold air in winter. This causes the temperature in the Hebei region to rise in December.

Zhou et al. (2012) explored the anomalous relationship among springtime precipitation in Shanxi, the 500 hPa circulation field and the Pacific Ocean temperature field by using the monthly precipitation data from 62 meteorological stations in Shanxi during the springs of 1961–2008, the reanalysis data of the United States National Centers for Environmental Predication/National Center for Atmospheric Research (NCEP/NCAR) and the National Oceanic and Atmospheric Administration (NOAA) Pacific Ocean SST data. The results suggested that in spring, when the SSTs of the equatorial mid-eastern Pacific are very high, the SSTs in the southeastern part of the North Pacific are relatively low, and they are distributed similarly to the preceding winter, and there always appears to be more precipitation in Shanxi during springtime. If these conditions are not met, then spring precipitation is generally lower. Wang et al. (2013) studied the anomalous characteristics of typical droughts and floods, the Pacific Ocean temperature field and the annular flow field during the same period in Hebei using precipitation data from 1961 to 2009 from 73 adjacent meteorological stations. Their results indicated that when the mean annual SST of the eastern equatorial Pacific is low and the annual average SST in the middle of the North Pacific Basin is very high, then most regions of Hebei will experience flooding. Meanwhile, if these conditions are not met, then a drought will occur. Li and Luo (2014) studied the low-frequency periods of northwestern Pacific Ocean SST and analysed the relationship between its seasonal variations and precipitation anomalies in China. They found that in the Jianghuai River Basin, which covers a large area of northern China, mid-stream areas of the Chang Jiang and coastal southern China are the three regions most significantly affected by the interactions among circulation fields above 850 hPa. Li et al. (2015) analysed the response of the annual precipitation in Shanxi to the El Niño-Southern Oscillation (ENSO) event over the last 56 yrs based on local monthly precipitation data from 1958 to 2013 and monthly Pacific Ocean temperature. The results showed that the annual precipitation in Shanxi and the Pacific Ocean temperature in the previous year were positively correlated with the areas of Niño 3 and 4. When the corresponding SST in the previous year was high, the annual precipitation was greater, whereas when SSTs were low, the annual precipitation was also lower. Furthermore, the precipitation was negatively correlated with the Pacific Ocean temperature in the Niño3 region during the same time. When the SST was high, the annual precipitation was low, and when the SST was low, the annual precipitation was greater.

This study investigates the temporal and spatial distributions of droughts and floods in northern China during the Qing Dynasty using data mining and geographic information system (GIS) methods. We apply statistical analyses and artificial intelligence to the data to extract new, reliable and interpretable information, and to reveal patterns and relationships hidden in the data (Zhao et al. 2010). By applying wavelet analysis and the sliding t-test, we explored periodicity and patterns in the spatial distribution of historical droughts and floods using northern China as an example. To better understand the effects of the Pacific Ocean SSTs and solar activity on drought and flood phenomena in northern China, we performed multidimensional analysis on the cross-wavelet coherence and phase spectra.

2 Study area and data

2.1 Overview of study area

This research used northern China as a study area, which includes the cities of Beijing and Tianjin, and the provinces of Shandong, Shanxi, Henan and Hebei (figure 1). The area lies between approximately \(31{^{\circ }}\)N and \(43{^{\circ }}\)N, and \(110{^{\circ }}\)E and \(123{^{\circ }}\)E. Geographically, it begins in the Taihang Mountains and the western mountains in Yuxi, and extends eastward to the Yellow Sea and Bohai. It is bounded by the Inner Mongolia Plateau in the north and extends to the Huaihe River Basin in the south. The complex terrain of this region, which includes high-elevation plateaus, mountains, plains, river basins and lakes, as well as the wide latitudinal breadth, helps to shape the constantly changing climate.

Fig. 1
figure 1

Study sites in northern China.

Northern China is situated in a monsoon climate region, where it is partially dry and partially wet. As it has a large latitudinal extent, the climate differences observable in N–S transect are substantial (Rong 2004). The mean annual precipitation in northern China is over 500 mm, with more northerly regions receiving more than 300 mm of precipitation annually, southerly regions receiving more than 700 mm and areas with the highest precipitation reaching 1200 mm. Its monsoonal climate means that northern China often experiences drought and flood disasters. The East Asian Monsoon has an important influence on the climate of northern China, and the strength of the monsoon wind is affected by solar activity, which also affects the atmospheric circulation.

2.2 Data sources

We used the ‘Drought-flood Atlas of China for the Past 500 Years’ edited by the Chinese Academy of Meteorological Sciences (1982), which documents the drought and flood intensities in China from 1470 to 1979 CE using municipal records and is an invaluable resource for climate studies. We extracted drought and flood intensity data from 20 locations in the two cities and four provinces of the study area, which have the most complete data among the atlas and thus an excellent representation of droughts and floods. These 20 locations were Beijing, Tianjin, Baoding, Cangzhou, Shijiazhuang, Handan, Anyang, Zhengzhou, Luoyang, Nanyang, Xinyang, Dezhou, Jinan, Laiyang, Linyi, Heze, Datong, Taiyuan, Linfen and Changzi. Their locations are shown in figure 1. We adopted a conventional five-stage grading system (Chinese Academy of Meteorological Sciences 1982) to represent different flood and drought intensities, where grade 1 denotes flooding, 2 denotes partial flooding, 3 denotes normal conditions, 4 denotes partial drought and 5 denotes drought (table 1).

Table 1 Criteria for drought and flood grades.

3 Methodology

Droughts and floods are the most common and important meteorological disasters, and they are also closely related to human economies, infrastructure and life. Many researchers have sought to discern the periodicity of drought and flood disasters across different spatial scales and different time spans. Recently, this has involved studying the grade order and underlying mechanisms of drought and flood disasters in different regions. Quantitative analyses have been conducted for different dynasties, for different periods within the Qing Dynasty (the focus of this study) and for different years and seasons. At the same time, the magnitude of the historical disasters has also been quantified. In addition to the common charts and graphic classification statistics, a large number of statistical methods and models, as well as the use of relevant theoretical methods of metered geography, are needed to analyse the drought and flood disasters of different grades and to discern their periodicity. In the study of drought and flood disasters, time-series analysis (including frequency and cycle analysis), mutation analysis, spatial analysis and wavelet analysis are often used. The following is a brief introduction to the sliding t-test and wavelet analyses, including cross-wavelet power spectrum analysis and wavelet coherence spectrum analysis, used in this study.

3.1 Sliding t-test

Climatic jumps are a common phenomenon in climate systems, which represent sudden changes from one stable climate state to another or from one steady trend to another. From a statistical point of view, a climate jump can be defined as a sudden change from one statistic to another. Climatic jumps can be defined by observing statistics such as the mean and variance (Fu and Wang 1992). Sliding t-tests (Fu and Wang 1992) can detect climatic jumps by continually changing the distances of neighbouring points to the reference point and testing for a significant difference between the two mean values. When statistics calculated from the two neighbouring points differ significantly, then the straddled point in time is referred to as the reference jump point. Assuming that a time series y has n samples and choosing a certain reference point, the number of samples behind and in front of the reference point \( y_{1}\) and \( y_{2} \) are \( n_{1} \) and \( n_{2} \), respectively. The t-statistic can then be calculated by continual sliding and defined as

$$\begin{aligned} t=\frac{\bar{y}_{1} -\bar{y}_{2} }{s \sqrt{\frac{1}{n_{1} }+\frac{1}{n_{2} }}}, \end{aligned}$$
(1)

where

$$\begin{aligned} s=\sqrt{\frac{n_{1} s_{1}^{2} +n_{2} s_{2}^{2} }{n_{1} +n_{2} -2}}. \end{aligned}$$
(2)

In the above equation, \( \bar{y}_{1} \) and \( \bar{y}_{2} \) denote the mean values of the two subseries \( y_{1} \) and \( y_{2} \), respectively, and \( s_{1}^{2} \) and \( s_{2}^{2} \) denote their variances. Equation (1) follows a t distribution of \( n_{1} +n_{2} -2 \) degrees of freedom. A reliability value \( \alpha \) is given, and the critical value \( t_{\alpha } \) may then be obtained. After calculating t using equation (1), \( t_{\alpha } \) and t can be compared; when \({\vert } t{\vert } \ge t_{\alpha }\), there is a significant difference.

3.2 Morlet wavelet analysis

Wavelet analysis (Fu and Wang 1992), also known as multi-resolution analysis, is an effective method for analysing local changes in time domain. The conventional Fourier method can detect the frequency characteristics of convoluted time-domain signals, but it cannot obtain them at an arbitrary time (Fu and Wang 1992). We used the wavelet method to better analyse the periodicity in the time series (Grosselmann et al. 1985) as it has multiple resolutions in both the time and frequency domains. It can not only reveal multiple periods in the time series but also it can locate variations across different timescales, thereby revealing the characteristics of all periodicities.

The working principle of wavelet analysis relies on the approximation of functions or signals with a set of wavelet functions, which are oscillatory and decay quickly to zero. The base wavelet function \( \psi (t)\in L^{2 }(R) \) for all wavelengths satisfies the equality

$$\begin{aligned} \mathop \int \nolimits _{-\infty }^{+\infty } \psi (t)\hbox {d}t=0. \end{aligned}$$
(3)

It can form a set by extension or compression, and a time shift:

$$\begin{aligned} \psi _{a,b} \left( t \right) =\left| a \right| ^{-1/2}\psi \left( {\frac{t-b}{a}} \right) , \end{aligned}$$
(4)

where \( a,\,b\in R,\,a\ne 0, \quad \psi \left( t \right) \) denotes the sub-wavelet, a denotes the scale factor, which reflects the period and b denotes the shift factor, which reflects the time shift. The basis wavelet in equation (4) has a definite amount of energy for the signal \( f(t)\in L^{2}(R) \). Its continue wavelet transform is

$$\begin{aligned} W_{\mathrm{f}} \left( {a,b} \right) =\left| a \right| ^{-1/2}\mathop \int \nolimits _R f\left( t \right) \overline{\psi } \left( {\frac{t-b}{a}} \right) \hbox {d}t, \end{aligned}$$
(5)

where \( W_{\mathrm{f}} \left( {a,b} \right) \) denotes the wavelet transformation coefficient, a denotes the scale factor, b denotes the shift parameter and f(t) denotes a signal or a square-integrable function.

Equation (5) shows that high- or low-frequency components can be obtained by decreasing or increasing the scale factor, a. Hence, the signal can be further analysed locally and at different timescales. The most important step in the calculation is to derive the wavelet coefficients using the wavelet transformation equation. Using these coefficients, the characteristics in the time series can be analysed.

3.3 Analysis of power spectrum

The analysis of the power spectrum is based on the Fourier transform method. It decomposes the total energy of the time series into different frequencies, and the major periodicities can be identified by their respective contributions (Wei 2007). As both the autocorrelation function of the series and the power spectrum density are intrinsic to Fourier transform, the former can indirectly estimate the power spectrum, thus revealing prominent periodicities.

The approximate estimate of the spectrum for different wavenumbers k (\( k=0\), 1, 2, ...,m) is given by

$$\begin{aligned} \widehat{S_k} =\frac{1}{m}\left[ {r\left( {0} \right) {+}2\mathop \sum \limits _{j=1}^{m-1} r(j)\hbox {cos}\frac{k\pi j}{m}{+}r(m)\hbox {cos}k\pi } \right] ,\nonumber \\ \end{aligned}$$
(6)

where r is the autocorrelation coefficient.

There are certain discrepancies between the approximation of equation (6) and the actual spectrum; thus, the approximate spectrum requires smoothing to obtain continuous values. Smoothing is usually performed using the Hanning smoothing coefficients:

$$\begin{aligned} \left\{ {{\begin{array}{l} {s_{0} =0.5\widehat{s_{0} } +0.5\widehat{s_{1} },} \\ {s_k =0.25\widehat{s_{k-1}} +0.5\widehat{s_k } +0.25\widehat{s_{k+1} }} \\ {s_m =0.5\widehat{s_{m-1} }+0.5\widehat{s_m },} \\ \end{array} }} \right. , \end{aligned}$$
(7)

while the relation between wavenumber k and the period is

$$\begin{aligned} T_k =\frac{2m}{k}. \end{aligned}$$
(8)

3.4 Cross-wavelet transform

We used cross-wavelet transform and the wavelet coherence spectra (Torrence and Compo 1998; Chen et al. 2002; Grinsted et al. 2004; Sun et al. 2005; Yu et al. 2007) to analyse the relationship between two time series. The cross-wavelet transform is a method that combines wavelet transformation and coherence spectrum analysis. It can analyse the relationship between the two series in time and frequency domains across multiple timescales. Assuming \( W_x \left( s \right) \) and \( W_y \left( s \right) \) are the cross-wavelet transforms of the two given time series x and y, respectively, then their cross-wavelet spectrum is defined as

$$\begin{aligned} W_n^{xy} \left( s \right) =W_n^x \left( s \right) W_n^{y{*}} \left( s \right) . \end{aligned}$$
(9)

The corresponding cross-wavelet power spectrum density is \( \left| {W_n^{xy} \left( s \right) } \right| \), where a larger power spectrum value indicates a higher correlation between the two series. We compared the cross-wavelet power spectrum against a red noise spectrum, and let \( P_k^x \) and \( P_k^y \) be the expected red noise spectra of time series x and y, respectively. The distribution of their cross-wavelet power spectrum is then

$$\begin{aligned} D\left( {\frac{\left| {W_n^x \left( s \right) W_n^{y*} \left( s \right) } \right| }{\sigma _x \sigma _y }<p} \right) =\frac{Z_\nu \left( p \right) }{\nu }\sqrt{P_k^x P_k^y },\nonumber \\ \end{aligned}$$
(10)

where \( \sigma _x \) and \( \sigma _y \) are the standard deviations of series x and y, respectively. The degree of freedom \( \nu \) was set at 2, and \( Z_\nu \left( p \right) \) was the confidence in probability p. At a significance \( \alpha = 0.05 \), \( Z_{2} \left( {95{\%}} \right) = 3.999 \) (Grinsted et al. 2004). If the result passed the significance test, then the time series x and y were considered to be correlated.

The wavelet coherence spectrum can be used to determine the level of partial correlation between the two time series in time and frequency domains. It corresponds to the low-energy region in the cross-wavelet power spectrum and may correspond to a significant correlation in the wavelet coherence spectrum. We defined the wavelet coherence spectrum of time series x and y as

$$\begin{aligned} R_n^{2} \left( s \right) =\frac{\left| {S\left( {s^{-1}W_n^{xy} \left( s \right) } \right) } \right| ^{2}}{S\big ( {s^{-1}\left| {W_n^x \left( s \right) } \right| ^{2}} \big )\cdot S\big ( {s^{-1}\left| {W_n^y \left( s \right) } \right| ^{2}} \big )^{^{\circ }}}.\nonumber \\ \end{aligned}$$
(11)

This definition of the correlation coefficient is similar to the conventional definition in that it treats wavelet coherence in the frequency domain as a localised correlation coefficient. The wavelet coherence spectrum was tested with a Monte Carlo test, which indicated that \( R_n^{2 } \left( s \right) \ge 0.5 \) and are phase difference vectors with correlation coefficients \( {>} 0.5\). If the vector pointed horizontally and to the right, then it indicated that one series was more advanced than the other by 1.0 cycle; if it pointed downward, then it meant that one series was more advanced than the other by 1 and 0.25 of a cycle. If the vector pointed horizontally left, then it meant that one series was more advanced than the other by 1.5 cycles, and if it pointed upward, then it indicated that one series was more advanced than the other by 1 and 0.75 of a cycle.

4 Results

Three primary analytical approaches were employed to study drought and flood disasters in North China during the Qing Dynasty. We first used the Morlet wavelet analysis of drought and flood disaster grade sequences after polynomial fitting and determined the main periods of drought and flood disaster grade series by wavelet variance. Secondly, we used the Kriging interpolation to study the spatial distribution of drought and flood disasters in North China using the ArcGIS software. Lastly, we analysed the impact of Pacific Ocean SSTs and sunspots on drought and flood disasters in North China. Polynomial fitting of the historical data was performed, and then cross-wavelet power spectrum analysis was made for the drought and flood disasters in North China during the study interval. Finally, the wavelet coherent spectrum analysis was performed. A methodological flow chart is shown in figure 2.

Fig. 2
figure 2

Flow chart of the analytical process.

4.1 Periodic characteristics of the drought and flood grade time series

To investigate the periodic characteristics of drought and flood disasters, we graded annual droughts and floods from 1644 to 1911 in northern China (figure 3). The solid black line in figure 3 shows the sextic polynomial fit to the series, whereas the dotted black line shows the quadratic fit. The drought and flood grade trend shows a significant increase at first and only small variations thereafter.

Fig. 3
figure 3

Drought and flood grade time series from 1644 to 1911 in northern China with sextic (solid line) and quadratic (stippled line) polynomial fits.

We applied the Morlet wavelet analysis to the annual drought and flood grade series in northern China to obtain the frequency and time relationships (figure 4). Figure 4 shows the phases of the modulations. The positive and negative peaks show maximum amplitudes at different timescales. The positive values correspond to periods of partial flooding and relatively high precipitation, whereas the negative values correspond to periods of partial drought. The multi-timescale frequency distribution of the drought and flood series in northern China from 1644 to 1911 shows that there is prominent periodicity at timescales of 10–11, 20–22, 45–50 and 90–100 yrs. Periodicities at timescales of 20–22 and 90–100 yrs were present throughout the time series, whereas that of 45–50 yrs is more prominent from 1644 to 1724, and that of 10–11 yrs is more prominent between 1644 and 1744 and between 1784 and 1904. A periodicity of 20–22 yrs is consistent with the findings of Yan (1999) that there is a modulation of precipitation in northern China with a 20-yr period. In comparison, Hao et al. (2003) found precipitation periodicities of 2–4, 22, 70–80 and 80–100 yrs in the mid- and downstream areas of the Yellow River and its four nearby regions from 1736 to 2000. Wang et al. (2016a) found that there is a 11-yr cycle in drought and flood in the Baoding area in North China, which is consistent with the 10–11-yr cycle found in this study.

Fig. 4
figure 4

Morlet wavelet diagram of the annual drought and flood grade time series for northern China from 1644 to 1911; the colour mark ranges from − 2.5 to 2.5 and indicates the difference in the mean value of the drought and flood grade; warmer colours indicate higher grades.

On the basis of the theory underlying wavelet transformation, the wavelet variance diagram shows the major timescales in the wavelet signals and hence the major periodicities in the series. According to the wavelet variance diagram (figure 5) of the drought and flood grade time series in northern China from 1644 to 1911, there are four peaks in the variance curve, which correspond to periodicities of 11, 22, 45 and 90 yrs, respectively. The 11- and 22-yr timescales exhibited the highest variance, suggesting that modulations of these two timescales are the strongest. Zhang et al. (2013) studied the drought and flood sequence in the middle reaches of the Yellow River from 1644 to 2009 and found that there were many inter-decadal periods, including at 21 yrs, which is in accordance with the 22-yr period found in this study.

4.2 Mutation test analysis

The phenomenon of a stable climate state transitioning to another over a much shorter period of time than that lapsed by the climate state is called a climatic jump. In other words, it is the phenomenon of significant changes in the statistics between two stable climate stages (Yang et al. 2009). We applied the sliding t-test (Sun and Chen 2004) to the annual drought and flood grade time series of northern China, taking samples of \( n = 10 \) and \( n = 30 \), and a confidence level of \( \alpha = 0.05 \) (figure 6). For \( n = 10 \), we counted seven regional jump reference points that exceeded the significance level and four jump points for \( n = 30 \). This indicated that the variation at a timescale of 30 yrs was more stable than that at 10 yrs. Further analysis of jumps in the drought and flood grades revealed their times of occurrence (table 2). In different years, the jump reference points exhibited different jump states.

Fig. 5
figure 5

Wavelet variance of drought and flood grade time series in northern China from 1644 to 1911.

Fig. 6
figure 6

Sliding t-test of the drought and flood grade time series in northern China from 1644 to 1911.

The study of Zhang et al. (2013) also found that there was one climatic catastrophe point in the middle reaches of the Yellow River, corresponding to a progression from drought to rain and waterlogging, which occurred from 1814 to 1816. This finding is also in full agreement with the findings of this study, wherein a climatic jump was estimated to have occurred \( {\sim }1815\). A recent study by Yang et al. (2015) on the time-series characteristics of drought and flood disasters in the Qufu area of Shandong over the past 500 yrs found that the frequencies of drought and flood disasters fluctuate, and that there was a turning point in the vicinity of 1874. This is almost the same as the reference point for the regional jump in 1873 recovered in the current study.

Table 2 Years with climate jumps in the drought and flood grade series in northern China from 1644 to 1911.
Fig. 7
figure 7

Spatial distribution of drought and flood grades in northern China from 1644 to 1911.

4.3 Spatial distribution of drought and flood grades

To analyse the spatial distribution of drought and flood grades in northern China during the Qing Dynasty, we used the ArcGIS spatial analysis module to spatially interpolate the drought and flood grades from 1644 to 1911 (figure 7). The spatial extent of drought and flood grades was interpolated by the Kriging algorithm. Figure 7 shows an uneven spatial distribution of precipitation in northern China during the Qing Dynasty. The annual mean drought and flood grades were found to be as high as 3.06 and as low as 2.70. Overall, the study area transitioned from partial flooding in the east to partial drought in the west. The coastal Shandong province experienced significantly higher precipitation than the inland provinces. Historical records describing a large number of floods in Shandong during the Qing Dynasty support this finding. Examples include records from 1645 of: ‘floods and river overflows’ in the city of Jining, ‘river overflows all over Jinlong’ with ‘farms and houses flooded’ in Yutai County, ‘river overflows’ in Dan County, and ‘river overflows’ and ‘the fall crops are flooded’ in Chengwu County. From 1647, the records include ‘floods in Jinan and Qingzhou’, ‘heavy rainfall causes houses to collapse and crops to drown’ in Jiyang County, ‘continuous rainfall for more than 40 days’ in Linyi and Shanghe counties, ‘floods and showers for more than 40 days and waterlogging in the ground’ in Shouguang and Changle counties, ‘constant rain for 2 months that is destroying governmental and residential buildings and crops’ in the city of Laiwu, ‘increase in water levels, overflows from dams, over a foot of flooding at the cities’ west and north gates’ in Ningyang County, and ‘ten feet of flood killed countless cattle and people’ in Wenshang County. All of these records reflect large amounts of precipitation in Shandong and a frequency of high floods, both of which are likely due to the coastal location of Shandong, where the rich water vapour content facilitates precipitation (Wu and Shen 1980). In addition, Wei et al. (2016) mentioned that the Hebei province was in drought before 17th century and after 20th century. The drought was mainly concentrated in the middle and southern parts of Hebei, and the flood disaster was mainly concentrated in the eastern coastal area of Hebei (Wei et al. 2016), which is in accordance with the spatial distribution found in this study.

Fig. 8
figure 8

SST index of the Niño3 region from 1870 to 1911 and its sextic (solid line) and quadratic (stippled line) polynomial fits.

4.4 Impacts of Pacific Ocean SST

Droughts and floods are influenced by multiple climatic factors. To investigate the possible factors that impact droughts and floods in northern China, we used the cross-wavelet power spectrum and wavelet coherence spectrum to analyse the effects of Pacific Ocean SST (this section) and sunspots (section 4.5). Anomalies in Pacific Ocean SSTs are important forcing factors that drive climatic anomalies in several regions around the world. As external forces, they play a key role in atmospheric circulation and the annual variation of precipitation in northern China (Wang 1999, 2001; Li et al. 2002; Ma et al. 2007). As the SST of the Pacific Ocean changes between the warm and cold phases, the response of precipitation in northern China also changes, as does the resulting drought and flood state.

We used Extended Reconstructed Sea Surface Temperature (ERSST) data obtained by NOAA since 1854. The longitudinal resolution was \(2^{\circ }\times 2^{\circ }\). Previous studies have shown that the tropical eastern Pacific Ocean, especially the Niño3 region, exhibits the greatest SST variation (Jin and Tao 1999). Therefore, we represented the SST index of the Niño3 region by its winter (December to February) SST departure from the annual mean between 1870 and 1911. Figure 8 shows the SST index series of the Niño3 region, where the black solid line and the dotted line denote the sextic and quadratic polynomial fits, respectively. Significant variation can be seen in the SST index of the Niño3 region, and it shows an increasing trend at the beginning of the period and a decreasing trend at the end of the period overall.

We used cross-wavelet transformation to study the multi-timescale correlations between drought and flood grades in northern China and the SST of the Pacific Ocean. Figure 9 shows the cross-wavelet power spectrum for the drought and flood grade series in northern China from 1870 to 1911 and the SST. They show a strong correlation on timescales of 2–4 yrs. Between 1873 and 1885, they show a clear shared period of 8–12 yrs.

Fig. 9
figure 9

Cross-wavelet power spectrum of Pacific Ocean SST and drought and flood grades in northern China from 1870 to 1911; the colour mark ranges from 1/8 to 8 and indicates the spectrum intensity.

Observation of the wavelet coherence spectra of annual drought and flood grades and the SST series (figure 10) reveals that they are strongly coherent across timescales of 2–16 yrs, which indicates that the Pacific Ocean SST has a significant impact on the drought and flood conditions in northern China on timescales of years to nearly two decades. Between 1875 and 1895, the Pacific Ocean SST and the drought and flood grades displayed strongly coherent periods of 2–4 yrs, with the phase difference vector tilted downward, indicating that, on that timescale, the Pacific Ocean SST led the drought and flood grades in northern China by \( \sim 0.125\) of a cycle. A resonance period of 2–4 yrs also existed between 1895 and 1904. However, the phase difference vector pointed to the right, indicating that the Pacific Ocean SST led the drought and flood grades of the previous year by 1.0 cycle. From 1870 to 1885, their phase difference vector pointed downward on timescales of 4–6 yrs, indicating that the Pacific Ocean SST led the drought and flood grades by 0.25 of a cycle. From 1870 to 1895, strong coherent resonating periods on timescales of 6–12 yrs were observed. The phase difference vector pointed downward during this interval, suggesting that the Pacific Ocean SST led the drought and flood grades in northern China by \( {\sim }\, 0.125\) of a cycle. Changes in the Pacific Ocean SST will affect atmospheric circulation, which in turn affects the transport of water vapour and the climate in monsoon areas.

Fig. 10
figure 10

Cross-wavelet coherence spectrum of Pacific Ocean SST and drought and flood grades in northern China from 1870 to 1911; the colour mark ranges from 0 to 1, which indicates the coherence coefficient value.

Northern China is located in a temperate continental monsoon area, where the intense precipitation during the summer constitutes a significant portion of the annual rainfall. When the Pacific Ocean SST is in an abnormal phase, the subtropical high in the western Pacific Ocean also changes. Drifting of the subtropical high in the western Pacific Ocean affects the transport of water vapour in the lower troposphere, interacts with the westerly trough or the northern China cold vortex and affects the quasi-geostrophic winds in northern China. The circulation pattern in northern China is then influenced by both heat and external forcing, causing variations in precipitation during summer and throughout the year. Therefore, the Pacific Ocean SST has important effects on the precipitation and the resulting drought and flood grades in northern China, and they show strongly coherent resonance periods across multiple timescales.

Fig. 11
figure 11

Number of sunspots with sextic (solid line) and quadratic (stippled line) polynomial fits.

The observed resonance period of 2–4 yrs may be related to the ENSO, which has a period ranging from 2 to 8 yrs and a basic period of 4 yrs. When El Niño occurs, the tropical eastern Pacific Ocean SST increases abnormally, and this causes the intertropical convergence zone (ITCZ) to shift southward. Through remote atmospheric actions, precipitation decreases in northern China and makes the climate drier. When La Niña occurs, the tropical eastern Pacific Ocean SST decreases abnormally, and the ITCZ shifts to the north; precipitation then increases in northern China. As a result, droughts and floods in northern China are significantly influenced by ENSO events on timescales of 2–4 yrs.

Fig. 12
figure 12

Cross-wavelet power spectrum of drought and flood grades in northern China and the number of sunspots between 1700 and 1911; the colour mark ranges from 1/8 to 8 and indicates the spectrum intensity.

Fig. 13
figure 13

Cross-wavelet coherence spectrum of drought and flood grades in northern China and the number of sunspots between 1700 and 1911; the colour mark ranges from 0 to 1, which indicates the coherence coefficient value.

For resonance periods of 6–12 yrs, Pacific Decadal Oscillation (PDO) may be an important factor for droughts and floods in northern China. The PDO refers to the component of variation in the Pacific Ocean SST on a decadal timescale, which modifies sea level air pressure in the Northern Hemisphere, including the region affected by the East Asian Monsoon, through interactions between the ocean and the atmosphere, thus affecting the transport of water vapour and precipitation in northern China. The strength of the East Asian Monsoon is an important factor for precipitation in northern China and is controlled by the enormous thermal differences between the Pacific Ocean and the continent of Asia. When PDO is in the warm phase, the SST in the mid- and northwestern Pacific Ocean becomes abnormally low, and the temperature difference between the mid- and low-latitude Pacific Ocean and the continent decreases. Meanwhile, the temperature difference increases between the mid- and northwestern Pacific Ocean and the East Asia high-latitude continental area.

We speculate that these two opposite trends of ocean–continent temperature differences weaken the East Asian Monsoon, discourage the transport of water vapour and reduce the decadal precipitation in northern China. When PDO is in the cold phase, the East Asian Monsoon strengthens, transport of water vapour is facilitated and decadal precipitation is increased in northern China. As a result, PDO has important influences on droughts and floods in northern China on 6–12-yr timescales.

4.5 Impacts of sunspots

The number of sunspots is an indicator of solar activity (Xu et al. 1998; Jin and Tao 1999; Cao et al. 2015). Years of solar minima and maxima correspond to different drought and flood states in northern China. Sunspots have been documented since 1700. Therefore, we analysed the time series of the number of sunspots from 1700 to 1911 (figure 11). The solid black and dotted lines denote the sextic and quadratic polynomial fits, respectively. The number of sunspots exhibits a very clear periodicity and a slowly rising and falling trend over the entire study interval.

As for Pacific Ocean SST, we analysed the drought and flood grades in northern China with the number of sunspots using cross-wavelet power spectrum and cross-wavelet coherence spectrum methods. Figure 12 shows the cross-wavelet power spectrum of the drought and flood grades in northern China and the number of sunspots. It is evident that they are closely correlated on timescales of 8–14 yrs. Between 1710 and 1750, and 1860 and 1890, the phase difference vectors pointed to the right, meaning that the number of sunspots led the drought and flood grades by 0.5 of a cycle. Between 1770 and 1790, and 1810 and 1860, the phase difference vectors predominantly pointed upward, indicating that the number of sunspots led the drought and flood grades by 0.75 of a cycle. Figure 13 shows the cross-wavelet coherence spectrum of the drought and flood grades and the number of sunspots, which highlights the strongly coherent resonance periods on timescales of 16–24 yrs. The phase difference vectors pointed to the left indicated that the number of sunspots led the drought and flood grades by 0.5 of a cycle.

The number of sunspots is one of the most representative characteristics of solar activity. As solar radiation is the most important heat source of the Earth, solar activity has important effects on Earth’s atmosphere, climate and weather. Solar activity affects droughts and floods in different places by varying degrees. For northern China, the sunspot cycle is well correlated with the latitudinal position of the subtropical high of the western Pacific Ocean in summer. In years of peak solar activity, which are the years with maximum number of sunspots, the subtropical high tends to be located in the south. The summer rain belt in China also tends to occur in the south. Therefore, there is less summer precipitation in northern China. Because northern China has a monsoonal climate, summer precipitation makes up the majority of annual rainfall. Therefore, the annual precipitation of those years is low. In years of low solar activity, which are the years with the fewest sunspots, the summer subtropical high of the western Pacific Ocean trends toward the north, as does the rain belt. As a result, both summer and annual precipitations in northern China are high. Sunspots affect and control droughts and floods in northern China through atmospheric circulation on timescales of years or decades.

5 Conclusions

We analysed the spatial and temporal distributions of drought and flood grades in northern China from 1644 to 1911 and investigated their variation and periodicity. Many factors, such as the rotational speed of the Earth, the change in sunspot number and ENSO, affect drought and flood conditions (Tang and Guo 1990). As northern China has a monsoonal climate, the Pacific Ocean SST affects precipitation remotely. Because solar activity also affects precipitation, we used cross-wavelet power spectrum and cross-wavelet coherence spectrum methods to analyse the effects of sunspots and Pacific Ocean SST on the drought and flood state of northern China. The main conclusions of this work are as follows:

  1. (1)

    Wavelet analysis of the annual drought and flood grade time series of northern China shows clear periodicities of 10–11, 20–22, 45–50 and 90–100 yrs from 1644 to 1911. Wavelet variance shows that the 11- and 22-yr periods are the most prominent.

  2. (2)

    We applied the sliding t-test on the annual drought and flood grade time series of northern China with \( n = 10 \) and \( n = 30 \) and found that there were seven and four climate jump points, respectively, that exceeded the significance level. In other words, the annual drought and flood grade time series of northern China from 1644 to 1911 is more stable on a 30-yr timescale than on a 10-yr timescale.

  3. (3)

    The drought and flood grades at 20 locations in northern China were interpolated using ArcGIS. The results revealed an increasing trend of dryness from east to west. The drought and flood grades in Shandong were significantly higher than in other regions, which is consistent with numerous historical records. This is due to the coastal location of Shandong providing a rich source of water vapour.

  4. (4)

    The cross-wavelet power spectra of drought and flood grades in northern China and the SST index of the Niño3 region reveal that they are closely correlated with timescales of 2–4 and 8–12 yrs. The cross-wavelet coherent spectrum shows that they have strongly coherent resonance cycles on timescales of 2–16 yrs, with varying phase differences on different timescales. Thus, on different timescales, the Pacific Ocean SST leads the drought and flood grades in northern China by different degrees.

  5. (5)

    The cross-wavelet power spectrum of drought and flood grades in northern China and the number of sunspots reveal that they are correlated on timescales of 8–14 yrs, whereas the cross-wavelet coherence spectrum shows that they have strongly coherent resonance periods of 16–24 yrs.

In this study, we analysed the spatial and temporal characteristics of drought and flood grades in northern China during the Qing Dynasty and found many correlations among drought and flood grade periodicity and those of external climate and solar forces. However, due to the limitations of historical records, the reconstructed drought and flood grade time series is only semi-quantitative and is an incomplete reflection of reality. This study used the cross-wavelet method to analyse the sunspots, Pacific Ocean SST and the reconstructed drought and flood grade time series in northern China. We conclude that they are closely related on multiple timescales. However, other factors such as ENSO and the circulation associated with the East Asian Monsoon require further study.