1 Introduction

In recent decades, climate change has had an increasing impact on water resources, agricultural activities and the environment (Shi and Xu 2008). Increased variability of the magnitude and frequency of precipitation and temperature are among the major impacts of climate change (Dinpashoh et al. 2014). It is projected that globally, by the 2050s, annual average runoff will increase by 10–40% at high latitudes and in some wet tropical regions; on the other hand, there will be a decrease of 10–30% in some dry areas at mid-latitudes and in the dry tropics (IPCC 2007). For water resources planning and management, it is often preferable to use trend analysis of climatic variables such as precipitation, temperature and river flows, which has been widely reported in many studies.

There have been various studies on the trend of extreme precipitation events in different regions of the world, such as Donat et al. (2013); You et al. (2011); Zhai et al. (2005); Powell and Keim (2015). Conversely, extreme events due to the lack of precipitation, e.g., droughts can also have a considerable impact on social economic development and the environment. Unlike extreme precipitation events whose impact is often readily perceived as severe flooding, the onset of droughts is dependent on many different factors. It also takes much longer for the impact of droughts to be fully appreciated than that of heavy precipitation events.

The definition of droughts is complicated (Wilhite and Glantz 1985). Drought can be defined as “an extended period of deficient rainfall relative to the multi-year mean for a region” (Schneider et al. 2011). In other words, it is a shortage of water associated with normal conditions (Sheffield and Wood 2011). Typically, drought is categorised into four types (Wilhite and Glantz 1985; Rad et al. 2017):

  1. 1.

    Meteorological drought originates from a lack of precipitation over a long time period that is often appended by remarkably high winds, high temperature, high solar radiation and low humidity which cause increased evapotranspiration and is categorised by the dryness degree compared to a normal condition (Utah Division of Water Resources 2007).

  2. 2.

    Agricultural drought originates from the deficit of evapotranspiration and rainfall over an extended time period, which leads to prolonged periods of low soil moisture that would affect agriculture productivity and cause failure of ecosystem rehabilitation (Lei et al. 2015).

  3. 3.

    Hydrological drought appears when a deficit of precipitation perseveres for a long period, leading to an overall shortage of water supply in different forms such as streamflow, reservoir storage. etc. (Van Loon and Van Lanen 2012). Additionally, anthropogenic activities have a considerable influence on hydrological droughts.

  4. 4.

    Socioeconomic drought links the demand and supply of some economic goods with elements of hydrological, meteorological and agricultural drought (Shiferaw et al. 2014).

Drought can be characterised by three quantities: the areal extent, the severity of the occurrence and the duration (Tsakiris et al. 2013) which are often represented by the indices derived from chosen climatic observations. These indices can assist the policy makers and economists in the planning and management of water resources and decision-making process. In the literature, it is no surprise that there is over 100 drought indicators reflecting the complexity of the subject matter (Lloyd-Hughes 2014), to name just a few, the standardized precipitation index (SPI; McKee et al. 1993); the Palmer drought severity index (Palmer 1965); the vegetation drought response index (Brown et al. 2008); the multivariate standardized drought index (Hao and Aghakouchak 2013); the surface water supply index (Shafer and Dezman 1982) and the drought severity index (Mu et al. 2013). A comprehensive review on the drought indices has been given by Tsakiris et al. (2007) and Stagge et al. (2017).

It is worth noting that although the multi-factor based indices can describe drought events more accurately, other indices using only the precipitation data such as SPI, have also been widely adopted in many studies thanks to the high availability of precipitation data, especially when studying future climate where other factors, such as vegetation are often unavailable or need to be further derived.

As to the methods used for trend analysis, ordinary linear regression is among the first choices of many researchers. This method is often accompanied by other non-parametric methods, such as Mann-Kendall test (Mann 1945; Kendall 1975) helping to further confirm the statistical significance of the trends detected, e.g., Martinez et al. (2012) and Song et al. (2014). In many cases, although the trend indicated by the fitted regression line may not be statistically significant, its gradient is used nonetheless as a rough indicator.

One of the major drawbacks of this method is that the trend it manifests is often expressed as the mean value of climatic variables that are conditioned on time. As such, it is difficult to gain further necessary insights as to how the events associated with more extreme values vary with time. For example, water managers are usually more concerned with the trends of severe storms or extreme dry spells than those of the ‘mean’ conditions. To a certain degree, such problem can be mitigated by stratifying the data into different categories, e.g. high flows versus low flows; however, one must realise that doing so would effectively reduce the sample size and hence sacrifice the information of data variability.

The quantile regression (QR) method (Koenker and Bassett 1978; Koenker 2005) extends the ordinary linear regression to explain how the quantiles of response variables are conditioned on the input variables, which offers a new window through which different regimes of the response variables can be examined in detail. Clearly, there is a need for identifying trends of climatic variables in different quantity regimes as mitigation measures would be more effective with such refined information.

Since quantiles are often a convenient measurement of the data departing from its mean and thus offer an association with the rarity of those values, it follows naturally to use the QR method for revealing the trend of ‘extreme’ events as indicated by different quantiles. A more vigorous approach of linking QR with extreme value distribution can be referred to Cai and Reeve (2013).

In this paper, we demonstrate a study of using the QR based methods to identify the rainfall trends in two remarkably different climate regions: the Dee river catchment in the UK and the Beijing Metropolitan Area (BMA) in China. Focus is set on the trend of both wet (indicated by high quantiles) and dry conditions (indicated by low quantiles) as they are of great value as far as flood risk management and water resources management are concerned. We make use of a higher quantile 0.98 to represent wet conditions – where severe flooding may occur; and a lower quantile 0.02 for dry conditions where prolonged droughts may be induced. We further show that the spatial distribution of such trends can also help produce a coherent, refined spatial structure for the use of flood risk and water management purposes.

The rest of this paper is organised as follows: the two study areas are introduced in section 2 followed by the discussion of the methodology. A detailed discussion on the result is given in section 4, and finally, several concluding points are drawn in section 5.

2 Study Area

Two regions with drastically different climate are studied: the Dee river catchment in the UK and the Beijing metropolitan area in northern China. The Dee river in the UK originates from Snowdonia in North Wales a total length of 113 km and a catchment area of 2215 km2 as shown in Fig. 1a.

Fig. 1
figure 1

The study areas with the locations of the rain gauges

The annual rainfall over the Dee catchment ranges from 650 mm in the downstream area in the east to 1200 mm in the upstream in the west (BADC 2015). Daily rainfall records from 13 rain gauges over a period of 35 years (1970–2004) are used in this study. Figure 1a shows the catchment elevation and the locations of the rain gauges.

In contrast, the metropolitan area of Beijing is far larger (16,410 km2) yet with a similar layout of topography with its west and north (68% in area) having elevations between 1000 and 1500 m, while the central and south-east parts are just 20–60 m above the sea level. The monsoon-driven humid continental climate in this region is rather opposite to the Dee catchment, having cold and dry winters and hot humid summers. Over the last two decades, the area has suffered both very dry winters/springs and wet summers which caused severe shortages in the water supply as well as local flooding in the urban areas. Annual rainfall recorded at the 45 rain gauges (Fig. 1b) over the period of 1960–2012 were obtained alongside the monthly areal average precipitation over the entire region for the same period. Monthly values at the rain gauges, however, were not available due to licence restriction.

3 Methodology

3.1 Quantile Regression

The Quantile Regression (QR) (Koenker and Bassett 1978; Koenker 2005) is a statistical technique that was initially introduced for regression analysis in econometrics as an alternative and possibly better tool to the ordinary least square method (OLS). It has since been gradually applied in many other disciplines. The method has received considerable attention in many statistical literatures, but less so in areas related to water resources analysis and environmental studies (Tareghian and Rasmussen 2013). An overview of some of the reported studies of the using of quantile regression in water and environmental studies is given by Abbas and Xuan (2019).

The QR method is a powerful extension to ordinary linear regression in a way that the quantiles instead of the mean of the given response variables are conditioned on independent variables with many additional benefits as discussed in Koenker (2005).

Details of the derivation of QR can be seen in many literatures, e.g. Koenker and Bassett (1978), Koenker (2005). Abbas and Xuan (2019) also give a quick recap. Readers are advised to refer to these papers for more details. Basically, consider Y is a random response variable which is related to M predictors at time t, i.e. xi(t) (i= 1, 2…, M), the generic form of the linear quantile regression with regard to a given quantile τ of the predictand at same time t, i.e. y(t) can be written as:

$$ {\hat{y}}_{\tau }(t)={\sum}_{i=1}^M{b}_i\ {x}_i(t)+{b}_0 $$
(1)

where the gradients bi and the intercept b0 can be estimated by minimising the quantile error function

$$ {E}_{\tau }=\frac{1}{N}{\sum}_{t=1}^N{\rho}_{\tau}\left[y(t)-{\hat{y}}_{\tau }(t)\right] $$
(2)

The suitable optimisation algorithms are outlined in Koenker (2005) and the outcome is the linear quantile regression model. Although the linear form of QR is very common, parametric models that are non-linear in parameters (i.e. models in which the form of the non-linear regression equation is explicitly specified by the modeller) can also be estimated (Cannon 2011).

The linear form of such relationship (Eq. 1) can then be used to describe the magnitude (in terms of its gradient) of the trend. It should be noted that proposing a linear tendency of the response variable quantiles on the input variable (time) renders the process parametric.

The QR method is not limited to its linear form only; where necessary, it can be conveniently extended to nonlinear case as well as non-parameteric; however, to serve our purpose of identifying a general trend in a time series, it is convenient and beneficial to use its linear form. While non-parametric quantile regression is not necessarily the best choice for representing trends, it can clearly give a better fit in many cases and indeed needs to be explored in further studies.

3.2 Significance Test of the Linear Trend

A warranted question related to any trend analysis is whether the trend is statistically significant. For quantile regression, several bootstrap methods are developed to test the significance of the fit. Discussion of this topic goes beyond the scope of this paper. The analysis in this study is conducted using the R-package ‘quantreg’ (Koenker et al. 2016) which includes both the fitting and the significance test methods.

3.3 Choice of the Quantiles

Another advantage of using QR in trend analysis is due to the natural link between the quantiles and the random events they represent. Certainly, this relationship is dependent on the underlying probability distribution. In order to overcome the unnecessary difficulties of fitting yet another distribution model, the widely used plotting method is applied in this study to estimate the associated probability. One of the plotting position formulae is given by Gringorten (1963):

$$ p=\frac{r-0.44}{n+0.12} $$
(3)

where r is the rank of the data and n is the sample size. Following this, it can be seen that the 0.98 (0.02) quantile of the rainfall records roughly represents an event of wet condition (dry condition) with a frequency of 1 in 64 years. Of course, estimating in this way is not always accurate but nonetheless can indicate a ‘mildly’ extreme event.

3.4 Standardised Precipitation Index (SPI)

The QR method can be readily applied to the time series of precipitation directly. For the purpose of comparison, it would be interesting to see how indices derived from the precipitation vary with time. One of such indices is the Standardised Precipitation Index (SPI) developed by McKee et al. (1993) which has been widely utilised by the research community to indicate a range of conditions from extremely dry to extremely wet (Table 1) from rainfall observation.

Table 1 Classification of SPI values (McKee et al. 1993)

The SPI index is an extensively utilised technique that permits harmonic comparison across both space and time and has the flexibility to evaluate a deficit of rainfall over a defined accumulated time period. It also provides a sign of probable occurrence of a drought with increasingly negative values representing a severe drought condition (Lloyd-Hughes and Saunders 2002). SPI has been employed in many analyses based on long-term precipitation data (e.g. Nalbantis and Tsakiris 2009).

The relative flexibility, comparability and simplicity of computation of the SPI have resulted in an authorisation by the World Meteorological Organisation as the indicator for monitoring meteorological drought (Hayes et al. 2011). Despite these advantages of the SPI, there are identified disadvantages. The utilisation of the rainfall dataset alone does not consider the evaporative demand, which may lead to underestimated drought severity in seasons or areas with high levels of evapotranspiration. Furthermore, the selection of a suitable theoretical probability distribution for the precipitation data is still under study (e.g. Stagge et al. 2015) and the fitting of an appropriate probability distribution function with a high percentage of zeros is challenging.

The SPI index measures the magnitude of the deviation of a sample value from the mean of the population. The standardisation is achieved by dividing the difference by the standard deviation for a specific duration (McKee et al. 1993). For example, a monthly rainfall value xi, the corresponding SPI can be calculated as:

$$ SPI=\frac{x_i-{\overline{x}}_i}{\sigma } $$
(4)

where σ is the standard deviation of the population. The magnitude, length and duration of the droughts can be indicated by a very low value of SPI. Researchers have revealed that precipitation generally follows the law of gamma distribution (Zhang et al. 2015). The areal average of monthly precipitation data in the Dee river basin is computed and checked to see whether the underlying distributions of the data follow gamma distribution. The techniques of density plot, q-q plot, p-p plot and CDF plot are revealed in Fig. 2 which shows good fits in all aspects.

Fig. 2
figure 2

The goodness of fit of the observed areal average monthly precipitation over the Dee river basin for gamma distribution

The SPI can be computed for any given periods (3, 6, 9, 12, 24 or 48 months). In our study, the monthly rainfall amounts are fitted with a gamma probability density function using an R package ‘precintcon’ (Povoa et al. 2016) to produce the annual SPI values at each rain gauges, then the QR method was applied to this series to investigate its variation over time.

3.5 Extreme Precipitation Indices

The higher quantiles may be used to indicate a higher chance of flooding. There are, however, other indices associated with a shorter duration that may be more appropriate to describe possible flooding conditions. Following Donat et al. (2013) the four indices below were produced using daily precipitation data of the Dee catchment over every year:

  1. 1.

    Total precipitation on very wet day (daily precipitation >95th percentile) R95PTOT;

  2. 2.

    Total precipitation on extreme wet day (daily precipitation >99th percentile) R99PTOT;

  3. 3.

    Days with heavy precipitation (daily precipitation >10 mm) R10MM;

  4. 4.

    Days with very heavy precipitation (daily precipitation >20 mm) R20MM.

An R package ‘climdex. Pcic’ (Bronaugh 2015) is used to produce the above extreme indices at each rain gauges, then the QR method was applied to this series to investigate its variation over time.

4 Results and Discussion

For the Dee catchment, daily rainfall records from the 13 rain gauges were aggregated into monthly and yearly datasets from which the linear trend of 0.98 and 0.02 quantiles are produced at each rain gauges, before being interpolated over the catchment using the Inverse Distance Weighted (IDW) method.

As shown in Fig. 3, there is a basin-wide positive trend of 0.98 quantiles. There is also a clear spatial pattern associated with this overall positive trend with strong gradients (> 20 mm/year) in the western coastal area and gradually decreasing to the east flat area (~ 3 mm/year, Fig. 3a). Additionally, the trends at 10 out of 13 rain gauges are statistically significant. In contrast, the 0.02 quantile trend is not so uniform, with an increasing trend to the west and southwest and a rather negative trend covering the rest part. It is also worth noting that for the lower quantile, the trends shown at most gauges are statistically insignificant (Fig. 3b). However, those stronger negative trends are remarkable. In other words, the catchment is shown to be even wetter for the extreme conditions (especially in the west) but only the northeast part becomes significantly dryer during dry conditions.

Fig. 3
figure 3

Spatial distribution of the linear quantile trends of annual precipitation (gauges with significant trends are shown as dots)

Figure 4 demonstrates the results of QR trend analysis of the annual precipitation at every gauge station. The linear form of QR analysis shows that most stations have an increasing trend for the upper quantile (0.98) and a clear trend at lower quantiles.

Fig. 4
figure 4

Yearly linear trends using quantile regression for flooding (τ = 0.98) and Drought (τ = 0.02) conditions at each rain gauge station

The spatial patterns of the annual extreme precipitation indices are revealed in Fig. 5. For both R95PTOT and R99PTOT, a strong dependency on local topography can be seen in Fig. 5 where there is a large amount of precipitation in the mountainous region in the upstream whilst the eastern part of the catchment shows decreasing precipitation. In other words, areas receiving more precipitation have more extreme events in comparison with those receiving less rainfall. Such features also agree with the 0.98 quantile trend in Fig. 3a.

Fig. 5
figure 5

Spatial distribution of the average annual R95PTOT and R99PTOT extreme indices (mm/year) over the Dee river basin. Similar patterns are found for the other two indices R10MM and R20MM (not shown)

The annual SPI values are calculated for the 13 gauges as shown in Fig. 6. Unsurprisingly, the temporal variation of the annual SPI is very similar to that of the rain data (Fig. 4). Although the annual SPI of every station shows an overall slightly upward trend, those stations in the down streams show very flat trend and very dry situations in mid-1990s. The spatial distribution of the SPI trend is shown in Fig. 7. The results can be interpreted as that overall the wet years have become even wetter for the parts in the upper and middle stream of the catchment and the dry years are getting drier for the downstream of the catchment. Again, such patterns are consistent with the overall trends of the precipitation itself, i.e., a widening gap between wet and dry years.

Fig. 6
figure 6

Annual SPI of the 13 rain gauge stations

Fig. 7
figure 7

Spatial distribution of the linear trend of annual SPI value over the Dee river basin

It is interesting to see how SPI compares with the QR trends in terms of indicting dry and wet conditions. The trend line of the 0.98 quantile from the QR analysis indicates how the amount of rainfall at a given frequency (return period) varies with time (increase or decrease). SPI, however, is a measurement against the entire series assuming no change in the distribution. A single SPI value is like a quantile of rainfall to some extent (as it measures the distance from the mean). Therefore, in general, the value of high SPI should somehow resemble the trend of the 0.98 quantile. This has been supported by the similarity of the pattern shown in both Figs. 3a and 7.

It is clear from Fig. 6 that the use of the overall trend of the annual SPI is not very helpful to indicate the trend of wet and dry conditions, as even with a slightly increasing trend of all stations, severe dry conditions get intensified during the end part of the period. This again shows that the QR regression can better capture those trends.

Following a similar approach, the annual rainfall records for the of the Beijing Metropolitan Area (BMA) from 45 rain gauges are analysed in which linear trends of 0.98 and 0.02 quantiles are produced at each rain gauges, before being interpolated over the area of study using the Inverse Distance Weighted (IDW) method. The results are shown in Fig. 8. Unlike the Dee catchment, the pattern of BMA shows remarkably decreasing trends for both lower and upper quantile (except the small part in the northeast). This indicates that even for wet years the precipitation is decreasing. What is even more remarkable is that such decreasing trends are more obvious in the urban area (south and southeast). Urbanisation might be another important factor when it comes to the impact on annual precipitations.

Fig. 8
figure 8

Spatial distribution of the significant linear trend of annual precipitation over the Beijing Metropolitan Area

The variation of trends conditional on the selected quantiles is shown in Fig. 9. The uncertain bands of the slopes reveal that, for summer (June, July and August), there is an increasing trend for quantiles below 0.5 and decreasing for those above 0.5, but the trends seem to go up for quantiles larger than 0.8. The implication is that overall the summer rainfall tends to be more stable around its median, the heavy rainfall events may become more extreme. For winter (December, January and February), the gradient tends to be flatter and centred around 0. In view of the significance test, it is not yet decisive to conclude any significant trends for winters.

Fig. 9
figure 9

Confidence bands of the gradient (mm/year) of the fitted lines using summer (a) and winter (b) seasons in BMA (The horizontal axes are quantiles and the vertical axes refer to the gradient of the trend lines; the red lines represent the confidence bands of the fits using ordinary linear regression)

5 Conclusion

In this study, we establish a new, quantile regression-based technique for investigating the trend of precipitation. Long term rainfall data from two considerably different climate areas are examined with a focus on the trends of the data close to ‘extreme’ regimes, and an intention of linking them to the events of interests. Two quantiles 0.98 and 0.02 are utilised to reveal the wet (flooding) and dry (droughts) conditions. The results are also spatially interpolated to investigate the trend variation in space. The QR results are compared with the spatial distribution of other selected extreme indices (R95PTOT, R99PTOT, R10MM and R20MM) and with drought index of SPI. In comparison with the commonly used linear regression method, it can be concluded that:

  1. 1.

    The QR based trend analysis shows more detailed information regarding more extreme conditions (wet and dry). This is particularly useful for water managers who are more concerned with these values rather than the average one.

  2. 2.

    The involvement of quantiles brings an extra benefit of bridging trend analysis with frequency, which implies a great potential of its use in studying climate change impact on engineering design without being constrained by assumptions of data stationarity.

  3. 3.

    It helps better to understand the climate change impact. As already shown in the Beijing case, a decreasing trend in summer rainfall may still be accompanied with increasing severe storms in the same season.

  4. 4.

    Not only can the QR method capture the pattern detected by other indices such as SPI, but it can also conveniently reveal the temporal trend of different values of concern.