1 Introduction

The increasing frequency of extreme weather events along the last decades is already causing a pronounced impact on the socio-economic status of the countries and the health and mortality of their populations (Amengual et al. 2014; Miralles et al. 2019). Since the 1980s the evidence of positive trends in temperatures, accompanied by the increasing of the atmospheric concentration of greenhouse gases, is confirmed around the world and especially in the Mediterranean region (IPCC 2022). European countries have experienced several severe heatwaves since the year 2000 (Russo et al. 2015; Tomczyk and Bednorz 2016), with the notable example of the devastating 2003 heatwave (Stott et al. 2004; Fisher et al. 2007; Rebetez et al. 2009; Trigo et al. 2009; Dousset et al. 2011) leading to substantial economic losses (García-Herrera et al. 2010) and a significant mortality, particularly among the elderly, in France, Germany, Italy, Portugal and Spain. More recently, the June 2019 heatwave affected Central and Western Europe, resulting in several cities setting temperature records (Sousa et al. 2019; Xu et al. 2020). These European heatwaves, HWs, were caused by an anomalous long-lasting anticyclone in the upper troposphere, causing warm air advection from the South.

The Mediterranean region, with a dense population, is one of the most affected by the climate change with an evident increasing frequency and intensity of heatwaves (Della-Marta et al. 2007; Fisher and Schär 2010; Perkins et al. 2012; Perkins-Kirkpatrick and Lewis 2020; Thiébault et al. 2016; Winter and Tawn 2016; Molina et al. 2020; Lorenzo et al. 2021; Qasmi et al. 2021), as well as prolonged droughts and extreme high summer temperatures (Hoegh-Guldberg et al. 2018; Zampieri et al. 2009; IPCC 2021). For instance, Della-Marta et al. (2007) have found that, for the period 1880–2005, the length of summer heatwaves over Western Europe has doubled and the frequency of hot days has almost tripled. According Fisher and Schär (2010), for the Iberian Peninsula and the Mediterranean region, the frequency of heatwaves days is projected to increase from two days for the period 1961–1990 to around 40 days for 2071–2100. For the Mediterranean region, Molina et al. (2020) have obtained a large increase by the end of the 21st century in both intensity and length of heatwaves from several emissions scenarios. Some other recent studies, with different research objectives and points of view can be also cited. Tolika (2019) has quantified the heatwaves over Greece by means of the concept of excess heat factor (EHF). More recently, Lolis et al. (2022) have analysed the air temperature extremes along 40 years by using data of the Southern Balcans, and Demirtas (2023) has examined several aspects of the anomalously hot summer 2021 over the Euro-Mediterranean region. Concerning heatwaves in Spain, AEMET (2018) has analysed data since 1975. More recently, Sánchez-Benítez et al. (2020) have studied the linkage between Iberian HWs and atmospheric circulation patterns, while Lorenzo et al. (2021) have derived future heatwave intensity in the Iberian Peninsula, using temperature projections with a spatial resolution of 12 km under two future warming scenarios.

The present research specifically focuses on a smaller spatial scale, the city of Barcelona and its metropolitan area, with the aim of identifying the main hotspots during heatwave episodes. The Metropolitan area of Barcelona, BMR, located in the northeast of the Iberian Peninsula, experiences a typical Mediterranean climate (Lionello 2012; Thiébault et al. 2016) characterised by hot summers, droughts, long dry spells along the year and, relatively copious rainfall amounts during autumn (Burgueño et al. 2002; Martínez et al. 2010; Serra et al. 2014; Llasat et al. 2016; Lana et al. 2020; López-Bustins et al. 2020). A forthcoming increase in frequency, duration and intensity of heatwaves notably concerns for very densely populated cities like Barcelona and its metropolitan area, where the urban heat island, UHI, phenomenon exacerbates the effects of global warming (Moreno-García 1994; Salvati et al. 2017).

This research makes use of the comprehensive and high-quality maximum and minimum temperature records from the Fabra Observatory (Serra et al. 2001; Burgueño et al. 2002; Lana et al. 2009; Prohom et al. 2016), for years 1914–2020. These records facilitate the identification of daytime and night time heatwaves over an extensive period, allowing for the study of the time evolution and trends using different HW indices. Principal component analysis, PCA, has been applied to reduce the number of indices describing a HW, thereby facilitating the interpretation of the results. Additionally, different hotspots within the Barcelona Metropolitan region, BMR, have been identify and represented. To achieve this, the land surface temperature data, LST (MODIS Satellite data of 1 km2 resolution), is also used. HWs obtained from the temperature records of the Fabra Observatory would be enough representative for the whole Metropolitan Region. The research is complemented with an analysis of the Western Mediterranean Oscillation, WeMO, indices corresponding to heatwave days, aiming to investigate possible relationships between the WeMO and heatwave episodes. These possible correlations could improve the HWs forecasting.

2 Database and methodology

2.1 Database and study area

The maximum, TX, and minimum, TN, temperature series used for the analysis of the heatwaves in Barcelona has been obtained from the Fabra Observatory (Royal Academy of Art and Sciences of Barcelona) (41.418° N, 2.124° E), placed in the Barcelona Metropolitan Region, at 6,5 km distance from the Mediterranean shoreline (Fig. 1a, b). This location, at a moderate altitude of 411 m.a.s.l. in the Littoral Chain, surrounded by pine trees and away from buildings, is much less affected by the UHI effects than other thermometric stations within Barcelona city. This thermometric series is one of the longest and complete of Spain, without any gap all along the 107-year period considered (1914–2020) and the World Meteorological Organization (WMO) awarded Fabra Observatory with the title of centenarian station in 2018. The quality of the series, considered homogeneous at a 95% level, has been previously assessed by Quereda Sala et al. (2000), Serra et al. (2001); Lana et al. (2009) and Prohom et al. (2016), among others.

Fig. 1
figure 1

a Main orographhic features of BMR (source base map: Google maps). b Fabra Observatory and a view over Barcelona city (source: RACA). c Map of the Barcelona Metropolitan Region, BMR, showing altitude, at 1 km2 resolution, and the location of the thermometric stations, including Fabra Observatory (FBR)

The Barcelona metropolitan region, BMR, with an extension of 3242.2 km2 and a population density of 1566.2 inhabitants/km2, is one of the most crowded areas in the Mediterranean region. Particularly, Barcelona city, with a population of 1.6 million inhabitants, covers an area close to 100 km2. It is delimited by the Littoral Chain, the Mediterranean shoreline and the Llobregat and Besós Rivers (Fig. 1a). Daily maximum and minimum temperatures of 48 stations (Fig. 1c), covering the BMR area, together with the land surface temperature LST of the MODIS satellite, have been also used in order to complete the study of the spatial distribution of hotspots related to summer HWs. These stations, provided by the Servei Meteorològic de Catalunya (SMC) and the Agencia Estatal de Meteorología (AEMET, Spain), were previously used in Serra et al. (2020).

As a preliminary analysis of the Fabra Observatory HWs, Fig. 2a shows, for every year, the maximum TX and TN. From 1914 to 1970, non-significant negative linear trends are observed for TX and TN. However, for the period 1970–2020, outstanding significant positive trends of 0.49 and 0.58 °C/decade are obtained.

Fig. 2
figure 2

a Yearly summer maximum TX and TN. Blue and red lines depict the linear trends for the periods 1914–1970 and 1970–2020. b Daily 90th (blue), 95th (green) and 98th (red) percentiles of màximum, TX, and minimum, TN, temperature of the Fabra Observatory for summer days (JJAS)

2.2 Methodology

2.2.1 Heatwave definition

A heatwave, HW, is detected when a number of consecutive days reach temperatures over a certain hot threshold. Nevertheless, several hot threshold criteria exist to compute the consecutive days of a HW (Della-Marta et al. 2007; Fisher and Schär 2010; Perkins and Alexander 2013; Russo et al. 2015; Vogel et al. 2020; Kostyrko et al. 2020). In this paper, we assume that a HW is detected when three or more consecutive days reach temperatures over the 90th percentile of each calendar day for summer months (Perkins et al. 2012). These percentiles are obtained with a 15-day moving window, with a 1-day shift, of daily TX and TN over 1914–2020, from June to September. Along this period, 148 heatwaves for TX and 163 for TN have been detected, large enough numbers to assure the statistical significance of the analyses. Figure 2b shows the 90th, 95th and 98th percentiles for Fabra Observatory, varying the corresponding thresholds with the summer calendar day. The maximum values are reached around the first days of August with 31.5 °C and 22 °C for the 90th percentiles of maximum temperature, TX90, and minimum temperature, TN90, respectively. The minimum thresholds correspond to the end of September (25 °C) for TX90, and the first days of June (17 °C) for TN90.

2.2.2 Heatwave indices and trends

Over the last years, several heatwave indices have been defined, depending on the region and the proposed research. In this paper, according to Fisher and Schär (2010), four indices are computed for daytime and nigh time (TX and TN) heatwaves: the number of events per season, HWN, the amplitude of the hottest day event per season, HWA, the length of the longest event (days), HWD, and the total number of days satisfying heatwave criterion, HWF. Time trends for each heatwave index are obtained by means of the least square method and their statistical significance assessed by the Mann–Kendall statistic (Sneyers 1990) at the 95% confidence level. They are obtained for the whole recording period, for different time periods ending in the year 2020, and for 31-year moving window subsets with a 1-year shift.

2.2.3 Extreme heatwave and hotspots

In this research, an extreme heatwave is defined as an episode with three or more consecutive days with temperatures higher than the 98th percentile. The main characteristics of these episodes, as well as the spatial distribution of temperatures across the BMR, are analysed. For this purpose, the daily MOD11A1 LST measured by MODIS Terra, including daytime 10:30 UTC surface temperature, LSTd, and night time 22:30 UTC, LSTn, with 1 km2 spatial resolution, has been used. Even though these temperatures are not equal to the air temperatures at 2 m height above ground, are highly correlated with air maximum, TX, and minimum, TN, temperatures. These correlations and the multiregression equations were obtained for the BMR in Serra et al. (2020). To confirm the hotspots detected with LST values, the spatial distributions of the daily air temperatures, TX and TN, of 48 thermometric stations are represented. First, the representation is applied to some particular days pertaining to an extreme HW (98th percentile) and when MODIS data is available, that is from the year 2000. Second, a principal component analysis (Jolliffe 1986) is applied to the summer of 2015 and the spatial patterns of the obtained rotated principal components, RPCs, are illustrated.

2.2.4 PCA and HW indices

The diversity of HW indices used in different researches and the uncertainties concerning the independence among these indices, lead us to consider the analysis of the correlation within them. With this aim, the Pearson correlation coefficient is computed so that possible relationships between previously assumed independent variables can be detected. Additionally, the rotated principal component analysis (RPCA) (Jolliffe 1986; Richman 1986; Preisendorfer 1988) is applied in order to reduce data dimensionality. The main characteristics of the obtained principal components, PCs, can be established; first, the ratio of data variance explained by every rotated principal component, RPC, second, the contribution (factor loading) of every independent variable in the RPCs, and third, the factor scores which represent the transformed values of the original variables in the new coordinate system defined by the principal components. The retained PCs are rotated by means of the varimax orthogonal technique to simplify and interpret the factor loadings of the principal components. According to the Kaiser criterion, only PCs with eigenvalues greater than or equal to 1.0 have been extracted.

2.2.5 WeMO and HW

The Western Mediterranean Oscillation index, WeMOi was defined by Martin-Vide and Lopez-Bustins (2006) as the difference in surface atmospheric pressure between Padua, Italy (45°24′ N, 11°47′ E) and San Fernando, Spain (36°17′ N, 06°07′ W). Although the high correlation between torrential episodes in the Spanish Mediterranean coast and the WeMO has been extensively proved (Martin-Vide and Lopez-Bustins 2006; López-Bustins et al. 2020), the correlation with temperatures is not so evident. El Kenawy et al. (2013) detected a significant linkage for the period 1960–2006 between the negative phase of WeMO and maximum temperatures during the warm season in NE Spain. However, opposite results were obtained for the Iberian Peninsula for the period 1994–2013 (Mohammed et al. 2018), concluding that the values of the extreme hot temperatures are higher for years with a positive WeMO phase. Due to the mentioned controversies about the relationship between the WeMOi and hot summer temperatures, this research would contribute to a new analysis of the possible correlations, restricted to Barcelona city, although they could also be assumed for the Barcelona metropolitan area, very close to the north-western coast of the Mediterranean.

3 Results and discussion

3.1 HW indices and trends

The results concerning HW indices and their time trends are shown in Figs. 3, 4, 5, 6, 7 and 8. Figures 3 and 4 show the time evolution of the four HW indices, for TX and TN. Linear trends and their statistical significances, ZMK, for TX, computed for 31-year moving window (31-YMW) subsets, with 1-year shift, are respectively represented in Figs. 5 and 6, and those corresponding to TN are shown in Figs. 7 and 8. Trends and ZMK values are assigned to the year in the centre of the window. Dashed lines in Figs. 6 and 8 indicate the 95% confidence level (ZMK = ± 1.96).

Fig. 3
figure 3

Time evolution (black line) and linear trend (red line) of the number of events (HWN), amplitude of the hottest event (HWA), duration of the longest event (HWD) and frequency (HWF) for maximum temperatures at Fabra Observatory

Fig. 4
figure 4

Time evolution (black line) and linear trend (red line) of the number of events (HWN), amplitude of the hottest event (HWA), duration of the longest event (HWD) and frequency (HWF) for minimum temperatures at Fabra Observatory

Fig. 5
figure 5

31-year moving window trends (1-year shift) obtained for the four HW indices, for maximum temperatures. X-axis (year) corresponds to the year in the centre of the window

Fig. 6
figure 6

Mann-Kendall statistic, ZMK, for trends obtained from 31-year moving window (1-year shift) for the four HW indices, for maximum temperatures. Dashed lines correspond to the 95% confidence level. X-axis (Year) corresponds to the year in the centre of the window

Fig. 7
figure 7

31-year moving window trends (1-year shift) obtained for the four HW indices, for minimum temperatures. X-axis (Year) corresponds to the year in the centre of the window

Fig. 8
figure 8

Mann-Kendall statistic, ZMK, for trends obtained from 31-year moving window (1-year shift) for the four HW indices, for minimum temperatures. Dashed lines correspond to the 95% confidence level. X-Axis (Year) corresponds to the year in the centre of the window

3.1.1 Number of events per season, HWN

The time evolution of HWN_TX, (Fig. 3a), shows that, up to 1980, only in 1928 there is a marked value of four events, while since 1980 there are 13 years with a number between 4 and 7 events per season, 10 of these years corresponding to the period 2000–2020. In fact, since 2000, every year has suffered at least one heatwave episode. The HWN_TN index (Fig. 4a) depicts a remarkable value of 7 events in year 2003, and since 1985, all years have at least one heatwave episode.

The trends for different periods, all of them ending in the year 2020, are summarised in Table 1. All trends are positive and significant at the 5% level. For the whole recording period (1914–2020), the HWN_TX trend is positive and equal to + 0.29 events/decade. Nevertheless, the maximum trend is reached for the last period 1990–2020, with + 1.38 heatwaves per decade. In agreement with this trend, the HWN increment would be of 11 episodes per season in 2100. If the reference is the trend of the whole period 1914–2020, the increment would be lower, 2.5 events per season. For TN, the trends obtained for the different periods are significant, as for the maximum temperature, though with lower values. The maximum trend is obtained again for the period 1990–2020, with a value of + 0.64 events/decade, being likely expected an increment of 5 HWs per season in 2100. Trends computed for 31-YMW subsets (Figs. 5a and 6a), since year 2000, are systematically greater than + 0.5 events/decade and statistically significant. Another period with significant positive trends is around 1970–1980. Conversely, significant negative trends are obtained for 1940–1960. For HWN_TN, maximum positive significant trends are reached in 1990s (Figs. 7a and 8a). Trends corresponding to non-overlapped 31-year periods can be obtained choosing the year in the centre of the selected period.

Table 1 Linear trends obtained for the four HW indices, for TX and TN and different time periods

3.1.2 Amplitude of the hottest event per season, HWA

The maximum amplitudes for TX (Fig. 3b), are close to 7 °C, mainly concentrated in the last years. The maximum of 8.7 °C should be carefully considered, as it would be a consequence of a forest fire occurred very close to Barcelona city in 1982. For TN (Fig. 4b), there are several amplitudes around 6 °C spread out along the whole period and a notable maximum of 7.5 °C (year 1931) and a second maximum of 6.6 °C (year 1923). Significant positive trends from + 0.28 to + 1.02 °C/decade (for TX) and from + 0.19 to + 0.77 °C/decade (for TN) are obtained for the different analysed periods (Table 1). While for HWA_TX the maximum trend corresponds to the last period (1990–2020), as observed for HWN index, the maximum trend for HWA_TN is detected in the period 1970–2020. Amplitude increments varying from 1.6 to 8.2 °C, depending on the period trend considered, could be expected in 2100. Consequently, the average increment would be close to 5 °C with respect to the present values. As an example, taken as a reference the maximum temperature of 38.4 °C reached in 2003 (Table 2), it could be likely to reach maximum temperatures around 40 °C for the near future (2050) and of 44 °C at the end of the 21st century in Barcelona. For the 31-YMW subsets (Figs. 5b and 6b), the maximum HWA_TX trend is reached in the 1970s with significant positive trends around + 1.5 °C/decade. Since 2000s up to nowadays, the trends are significantly positive again. Instead, the maximum trends for HWA_TN are reached 20 years later, in 1990s, around + 1.0 °C/decade (Figs. 7b and 8b).

3.1.3 Length of the longest event per season, HWD

The maximum values reached by HWD index are 15 and 14 days in 2003 for TX and TN, respectively (Figs. 3c and 4c). Others years reached values greater or equal 10 days. For TX, values of 10–12 days are reached in years 1947, 1982, 1987, 2005 and 2009. For TN, values of 11–12 days occur in 1923, 1947 and 2006. Table 1 shows significant positive trends for all the periods considered, with values from + 0.50 to + 1.52 days/decade for HWD_TX and from + 0.35 to + 1.34 days/decade for HWD_TN. It would imply that increases from 3 to 12 days in the maximum HW duration could be expected in 2100. By comparing these trends with those obtained by Perkins-Kirkpatrick and Lewis (2020) for the Mediterranean region (+ 0.61 days/decade) in the period 1950–2020, it is observed that the trends derived for Barcelona are slightly greater (+ 0.89 days/decade for TN and + 1.14 days/decade for TX). When the 31-YMW trends are analysed (Figs. 5c, 6c, 7c and 8c), clear decreasing trends until 1960 and an abrupt change to higher positive trends since 1960 until the end of the period, are observed. This behaviour is detected in both temperatures TX and TN, but with a higher sharp increase for TX. For HWD_TX, maximum trends are of 1.5 days/decade for the 1970–1980 years and since year 2000. For HWD_TN maximum trends are slightly higher, 2.0 days/decade, during 1990s.

3.1.4 Number of heatwave days per season, HWF

The year 2003 is the most remarkable, with 47 and 55 days for TX and TN, respectively (Figs. 3d and 4d). Table 1 shows that trends for the different studied periods range from + 1.5 to + 6.2 days/decade for TX and from + 1.1 to + 4.0 days/decade for TN, again with greater values for TX. Consequently, an extreme increment of 48 days per season for HWF_TX and of 32 days for HWF_TN in 2100 would be possible. The HWF-trend obtained for the Mediterranean region by Perkins-Kirkpatrick and Lewis (2020) was + 2.61 days/decade for the period 1950–2017, in agreement with the values summarised in Table 1 (+ 3.05 days/decade for TX and + 2.22 days/decade for TN) for an almost coincident period. (1950–2020). Whit respect to the 31-YMW trends (Figs. 5d and 7d), a maximum of 6 days/decade is obtained for both TX and TN in the 2010s and 1990s, respectively. The Mann-Kendall test coefficients (Figs. 6d and 8d) are significant for the periods 1965–1982 and 1995–2005 for TX, and for 1985–1997 and 2002–2005 for TN. These different time periods detected for TX and TN manifest the discrepancies between the time behaviour of maximum and minimum temperatures.

Table 2 Date, duration and maximum temperature of the HWTX and HWTN extreme events, exceeding 98th percentiles of calendar day TX and/or TN

3.2 Extreme HWs and hotspots

Table 2 shows date, duration and maximum, TX or TN, for the extreme heatwave episodes occurred all along the period considered (1914–2020). During these extreme events, in three or more consecutive days, TX and/or TN exceeded the corresponding calendar-day 98th percentiles. Most of these extreme episodes occurred after the year 1980 (21 out of 25) and especially since 2000 (17 out of 25). It is notable the extremely severe episode of august 2003, with maximum TX of 38.4 °C and maximum TN of 27.8 °C, and durations of 13 and 11 days respectively. A second outstanding episode occurred in June 2019 with extreme TX and TN of 37.7 °C and 27.5 °C, respectively. This second episode was shorter than the first (3 and 4 days), but also very remarkable since it occurred in June, when is rather unusual to suffer extreme heatwaves with so higher extreme TX and TN. Recently, in August 2023, outside of the study period of this article, a heatwave set a new minimum temperature record reaching 29.4 °C at the Fabra Observatory.

It is also worth of mention that 10 out of the 25 HW events along the period considered are compound TX and TN (daytime-night time) heatwaves. A majority of these compound episodes (8 out of 10) have occurred since 2000, three of them in 2003 and the remaining five since 2012. An eventual increase in the frequency of occurrence of these daytime-night time HW events could be a matter of concern, given that the exposure of population to daytime hot conditions with little or no relief from night time cooling may result in increased heat-stress related hazards to human health (Meehl and Tebaldi 2004; Li et al. 2017; Wang et al. 2020).

Figures 9 and 10 depict the spatial distribution of the land surface temperature, LST, obtained from the MODIS satellite for day (LSTd) and night (LSTn), for six extreme HW episodes. These selected episodes are included in Table 2, and are a sample of the 98% percentile HW episodes. MODIS satellite data is only available since the year 2000, for that reason, Figs. 9 and 10 only show the spatial distribution of land surface temperature corresponding to HW episodes from that year. The differences between the spatial distribution of LSTd and LSTn are evident. While for diurnal maps the greater LST values are reached in the inner valleys and basins (Llobregat, Vallès and Penedès, Fig. 1a), for LSTn the higher values are attained mainly in Barcelona city, notably suggesting the evidences of the UHI effect. The exception is the episode of June 28th 2019, when the LSTn highest values spread all over both coastal and inner locations. The LSTd of this extreme episode, represented in Fig. 9, depicts a pattern similar to the rest of the LSTd maps, but showing the highest maximum LST values, greater than 50 °C, in some locations of the Vallès valley. Even though the LST values are not equal than the air temperatures at 2-metres height, these maps are a first insight into the location of the hotspots of the BMR.

Fig. 9
figure 9

Land surface temperature (°C) spatial distribution for some selected days during daytime extreme episodes, HW98

Fig. 10
figure 10

Land surface temperature (°C) spatial distribution for some selected days, during night time extreme episodes, HW98

Figure 11a shows the spatial distribution of TX and TN recorded on July 5 and July 29, 2015, using the temperature data of 48 thermometric stations in the BMR (Serra et al. 2020). For July 5th, pertaining to the extreme HW of 2th -7th July, the two hotspots just observed in the LST maps, are again noticed, with a smoothed resolution, the highest TX observed in inner locations and the highest TN in Barcelona city. Instead, for an example out of the HW episode, July 29th, the maximum values are more spread out for both TX and TN.

A Principal Component Analysis, PCA, is applied to TN recorded in July and August 2015. Figure 11b depicts the spatial distribution of the factor scores corresponding to the two rotated principal components, RPCs, obtained. The maximum values of factor scores for July are located at Barcelona for both RPCs, but the UHI effect is clearly manifested in RCP2, with an explained variance of 28%. The RPC2 is highly correlated with the days pertaining to the HW of the first days of July 2015. For August, the maximum factor scores are detected along the littoral fringe for RPC1 with an explained variance of 54.1%. The RPC2 factor scores for August show higher values (40.5% of variance) in the inner regions of the BMR.

Fig. 11
figure 11

a Spatial distribution of the maximum and minimum temperatures recorded on July 5 and July 29, 2015 b Spatial distribution of RPC1 and RPC2 factor scores corresponding to TN during July and August, 2015

3.3 PCA of HW indices

Table 3 shows the correlations among the four indices HWN, HWD, HWA and HWF for TX and TN. High correlations are obtained among the TX indices (0.762–0.926), with the highest values corresponding to the correlation between the number of episodes per season, HWN, and the total number of heatwave days per season, HWF. The correlations among the TN indices are slightly lower (0.648–0.927). When the correlations among TX and TN indices are computed, the coefficients are lower, with values between 0.49 and 0.77. The possible redundancies in the information provided by the four indices are confirmed by the values of the factor loadings for the RPCs shown in Table 4. Applying the eigenvalue equal to 1.0 criterion, two principal components are retained, thus explaining a total variance of 85.7%. While the first rotated principal component, RPC1, is highly correlated with the TN indices, the second, RPC2, is notably related to the TX indices, and each one of the RPCs explain almost the same variance, 43.3% and 42.4%, respectively. Although the HW indices considered in this research are those proposed by Fisher and Schär (2010), after applying the RPCA, these eight indices could be replaced by two rotated principal components, one for TX and the other for TN. The time evolution of the RPC1 and RPC2 factor scores is illustrated in Fig. 12. It is remarkable the increasing values since 1980s, with the highest maximum in 2003 for RPC1 and in 1982-83 for RPC2. Two secondary maxima are reached in 2009 and 2013 for RPC2.

Fig. 12
figure 12

Time evolution of the factor scores corresponding to RPC1 and RPC2

Table 3 Correlation matrix among TX and TN HW indices
Table 4 Rotated principal components. Factor loadings and variance explained
Table 5 Correlation coefficients for pairs SWeMO and HW indices, and maximum summer TX and TN

3.4 HW and WeMO

With the aim of investigating the possible relationship between the WeMO index and the occurrence of HW episodes, Fig. 13a shows the time evolution of the average summer WeMO index from 1914 to 2020. It is notable the negative trend during all the period. The evolution of the annual WeMO analysed by the Climatology Research Group of the University of Barcelona (http://www.ub.edu/gc/wemo/) for the period 1821–2020 reflects a clear positive trend from 1821 to 1910 approximately, and a negative trend from 1910 until 2020. Then, the period studied in this paper is in the phase of decreasing values of WeMOi. A first step has consisted on the study of the correlation between WeMOi and daily TX and TN, which leads to non-conclusive results, given that small correlation coefficients have been obtained. Nevertheless, some non-negligible negative correlations have been obtained between annual average summer WeMOi and HW indices (Table 5). Figure 13b illustrates the annual average summer WeMOi, SWeMOi, histogram, where the highest frequency corresponds to values between − 0.5 and + 0.5. However, Fig. 13a shows that, from 1980, the indices are predominantly negative in concordance with the increasing frequency and intensity of HWs from 1980s. The histograms of WeMOi values corresponding to the first day of the studied HWs are represented in Fig. 13c, e. More than 80% of the values are negative and slightly lower for TX than for TN. When the last-day WeMOi of a HW episode is represented (Fig. 13d, f), the histograms show higher values. This fact suggests that some signs of a forthcoming HW would start with lower WeMOi values and would finish with higher WeMOi values. Figure 14 depicts two examples of the WeMOi evolution for summer 2003 and 2015. In both cases the HW episodes are coincident with a beginning of WeMOi low values, then increasing along the HW. The synoptic situation associated with the summer HWs (Fig. 15) usually shows a low pressure in the southwest of Spain and high pressures in central Europe, implying an advection from the south along the Spanish Mediterranean coast. This low-pressure system shifts towards the Iberian Peninsula centre and remains some days there. At 500 hPa, a ridge comes from Africa and extends towards Western Europe.

Fig. 13
figure 13

Annual summer WeMOi trend (a). Histograms of summer WeMOi HW episodes (bf)

Fig. 14
figure 14

Daily summer WeMOi (grey) and 7-day running average (black) for years 2003 and 2015. Dashed lines show the limits of the HWs

Fig. 15
figure 15

Surface pressure and 500 hPa geoptotential height for August 2003 and June 2019 events

4 Conclusions

Several questions concerning heatwaves in Barcelona have been analysed for a long recording period (1914–2020). On the one hand, time trends and their statistical significance, for different sub-periods and for 31-year moving window subsets, have been studied in detail. On the other hand, spatial distributions of hotspots in the BMR, correlations among the different HW indices, and relationships between the WeMOi and the HW in summer, have been analysed.

In agreement with climate change studies about global warming, with increasing trends especially since 1980s, the time evolution of the four HW indices in Barcelona also reflects increasing values along the last decades. All the trends for the HW indices, both for TX and TN, corresponding to the whole period (1914–2020), are significant and positive. When the 31-year moving window are applied, it is outstanding the abrupt change in the sign of trends since 1960s for TX and TN, showing significant positive trends since 1970s. These trends vary from + 0.5 to + 1.4 events/decade for HWN, + 0.5 to + 1.4 °C/decade for HWA, + 1.0 to + 2.0 days/decade for HWD, and + 2.5 to + 6.2 days/decade for HWF. Taking as a basis the intermediate trends corresponding to the period 1970–2020, the projections of the summer season characteristics for the end of the 21th century, would imply an increment of 5 HW episodes by season, a large increment of 6 °C in the maximum HW amplitude and a remarkable maximum increase of 10 days in the length of HW events. In addition, the expected increase of the frequency would be of 32 days. These results would be more catastrophic if the period 1990–2020 were selected.

The spatial distribution of the hotspots in BMR, when extreme HWs are noticeable, shows two different nuclei. While the highest maximum temperatures are recorded in the inland valleys and basins, the hotspots for the minimum temperatures are detected in Barcelona city, directly associated with the UHI phenomenon. It is worth noting that the high minimum temperatures reached in the city during an extreme HW could be qualified as tropical, or even torrid, with harmful consequences on thermal discomfort of the population during night time hours and negative effects on human health.

The reduction of the number of HW indices, by means of Principal Component Analysis (PCA), permits to explain the 85.7% of the total data variance with two RPCs. The first one is notably related to the TN indices and the second one, principally associated with TX indices. The highest correlation, greater than 90%, is obtained between the number of HW events per season, HWN, and the number of HW days per season, HWF. With respect to the correlations between WeMOi and HWs, significant negative correlations are detected between annual average summer WeMOi and HW indices. Additionally, the beginning of HWs is predominantly related to low values of WeMOi, then increasing along the evolution of the HWs.

As a summary of the obtained results, the detected evolution of HW characteristics towards the end of the 21th century, with remarkable projected increases in the number of HW days and HW events, and in their amplitude and duration, would constitute a matter of concern for Barcelona city and its metropolitan region.