1 Introduction

A major earthquake occurred in Wenchuan, Sichuan Province, China, on 12 May 2008, claiming over 80,000 lives [1, 2]. Many scholars studied various aspects of this earthquake. Tectonically, some scholars proposed that these are a result of the joint action of three tectonic units: the strong deformation of the Western Sichuan Plateau (deformation unit), the Longmenshan Fault Zone of weak deformation of high stress accumulation (locking unit) and the Sichuan basin unit (support unit) [3, 4]. Some scholars numerically simulated the evolution of the eastern margin of the Tibetan Plateau and the spatial distribution of its stress field over time, and also studied the dynamic process of the Wenchuan earthquake; the results are consistent with the above conclusions [5]. Other scholars studied the tectonic stress field of the focal region according to the focal mechanism solutions of some microearthquakes before and after the Wenchuan earthquake [3, 6, 7]. These results show that the maximum horizontal principal stress direction changed obviously; an approximate east–west direction was observed before the earthquake compared with a north–south direction after the earthquake [8]. Gravity observation before the earthquake indicated that the gravity value decreased at Wenchuan, Qingchuan, Guangyuan and Ningqiang stations from 1998 to 2005; the largest negative change was −119.2 µGal at Qingchuan station [9]. The borehole strain value has exhibited abnormal changes (burr phenomenon) at GuZa station (southwestern side of the Longmenshan faults) since 2007 [10]. Based on the phase arrival times of Pg and Sg, some scholars studied the temporal variation of wave apparent velocity and compared the velocity variation with the temporal variation of the wave velocity ratio in the Longmenshan Fault Zone and its surrounding area. The results indicated an obvious decrease in the P- and S-wave apparent velocity in 2017, but both the wave velocity ratio and apparent velocity decrease recovered rapidly 6 months before the main shock [11]. However, those studies focused on medium- and long-term anomalies, and few studies have been published on the impending anomalies of the earthquake. This study aims to extract impending anomaly information from the observation data of geomagnetic stations near the epicenter. We believe the presented results will be useful for study of the occurrence mechanism.

2 Methods and data

The Wenchuan earthquake (Ms8.0) occurred in Wenchuan, Sichuan Province, western China, at 14:28 on 12 May 2008. According to the China Earthquake Administration Network Center (CENC) and the United States Geological Survey (USGS), the epicenter of the Wenchuan earthquake was at the southwestern side of Yingxiu Town (31.01°N, 103.38°E), with a focal depth of 19 km. The slip surface is inclined westward, the dip angle is 40°–60° and the seismic rupture length is greater than 300 km. This was the worst earthquake in mainland China since the Tangshan earthquake in 1976.

Compared with the Fourier transform, the wavelet transform is a local transform in the time and frequency domain, and its multi-scale and time–frequency analysis can be performed by using its scaling and translation functions. The cross-wavelet transform is an extension of the wavelet transform, and it is a signal analysis method combined with cross-spectrum analysis. For the two time series, the wavelet transform of X and Y is Wx(s) and Wy(s), respectively, and the cross-wavelet spectrum is defined as:

$$ W_{n}^{XY} (s) = W_{n}^{X} (s)W_{n}^{{Y^{*} }} (s) $$
(1)

Then, the cross-wavelet power spectral density is \( |W_{n}^{XY} (s)| \). The greater the value, the higher the correlation between them.

Assuming that the red noise spectra of the expected spectra of X and Y are PkX and Pk0Y, respectively, the cross-wavelet power spectral distribution can be expressed as:

$$ \frac{{|W_{n}^{X} (s)W_{n}^{Y} |}}{{\delta_{x} \delta_{y} }} = \frac{{Z_{\text{v}} (P)}}{v}\sqrt {P_{\text{k}}^{X} P_{{{\text{k}}0}}^{Y} } $$
(2)

where δx and δy are the standard deviations of time series X and Y, respectively. Significant tests were performed using the red noise standard spectrum, and at a significant level of 0.05, Zv (95%) = 3.999. The complex angle W XYn is described in the time–frequency domain in the phase between two time series X and Y in the time–frequency domain. For n angles, αi (i = 1, 2,…, n), \( \bar{\alpha } \) is the average angle. Then,

$$ \bar{\alpha } = \arg ( - x, - y)\quad - x = \sum\limits_{i = 1}^{n} {\cos \left( {\alpha_{i} } \right)} \quad - y = \sum\limits_{i = 1}^{n} {\sin \left( {\alpha_{i} } \right)} $$
(3)

This study is based on geomagnetic data collected from the period before the Wenchuan earthquake. The cross-wavelet spectral analysis method was applied to extract abnormal information of the geophysical field before the earthquake. Observed geomagnetic data were used at Chengdu station (CDP) and Chongqing station (COQ) for the period 1–12 May 2008; the sampling rate is 1 sample per second, the cross-wavelet spectrum was calculated for the vertical component (Z) and the declination component (D). The stations and epicentral distribution of the earthquake are shown in Fig. 1. The epicenter distance of CDP is 109.6 km, while that of COQ is 376.2 km.

Fig. 1
figure 1

The distribution of stations and the main shock

3 Cross-wavelet spectrum of geomagnetic data

We calculated the cross-wavelet spectrum of the vertical component and the declination component (ZD) of CDP and COQ for the period 1–12 May 2008. Here, to avoid interference near stations, we focus on the low-frequency components (period of approximately 5000–17,000 s) of the cross-wavelet spectrum; the result is presented in Fig. 2: high values are shown by warm colors, This means that there is high coherence between the two signals, whereas cool colors indicate low values. A low-value area (in the form of a blue inverted triangle) was clearly observed for each day. The low-value area of CDP was similar for 1–10 May (Fig. 2a, b), but obvious changes were observed from 11 May: the cross-wavelet spectral value increased (the blue color weakens) followed by a further increase (the blue color almost disappears) on 12 May. In other words, the cross spectrum of the vertical component and the declination component (ZD) displayed an abnormal phenomenon at CDP on 11–12 May (Fig. 2c, d). COQ was consistent over the period 1–10 May; however, an abnormal phenomenon was not observed on 11–12 May.

Fig. 2
figure 2

The cross-wavelet spectrum between Z and D components at CDP and COQ geomagnetic stations (1–12 May 2008)

As a contrast, we extracted the data of CDP from May 9–16, 2015, and made the same calculation. The results are shown in Fig. 3. We can see that the regular low-value area (blue area) is displayed every day, but no abnormal phenomena are observed. In addition, we used data of MLI and MGU from May 7–12, 2008. The results are shown in Fig. 4a, b, respectively. As can be seen from Fig. 4, compared with CDP, as a whole, the value is on the high side. However, the results of May 11 showed no significant difference from those of other days.

Fig. 3
figure 3

The cross-wavelet spectrum between Z and D components at CDP geomagnetic station (9–16 May 2015)

Fig. 4
figure 4

The cross-wavelet spectrum between Z and D components at MLI and MGU geomagnetic stations before the earthquake

To summarize, there was a phenomenon of increasing coherence at CDP from 11–12 May, 2008 (one day prior to the earthquake), while this phenomenon did not occur at other stations or at other times. We believe that this abnormal phenomenon may be related to the Wenchuan earthquake.

4 Discussion and conclusion

CDP is the closest station to the epicenter of the earthquake, which seems to imply that the signal of the geomagnetic anomaly has the characteristics of rapid attenuation with propagation distance. Some scholars have studied the magnetic flux density-generated distribution by a closed-loop current based on Biot–Savart law [12], as shown in Fig. 5. Here, we assume that there is a ring circuit with a magnetic conductivity of 4 PI × 10−7 (Henry/m) and a current of 100000 Å. When the radius of the ring is 5 km, the distribution of the magnetic flux density is given in Fig. 5a. When the ring radius is 50 km, and the other parameters are fixed, the magnetic flux density distribution, as in Fig. 5b, indicates that with the increase of magnetic source distance, the magnetic flux density decays quickly. In this study, because CDP is closest to the epicenter, only this station has recorded this phenomenon.

Fig. 5
figure 5

Distribution of magnetic flux density by closed-loop current

The periodic range of anomalies is approximately 5000–17,000 s. We surmise that this anomalous process possibly originates from the deep crust. The Wenchuan earthquake occurred in the Longmenshan fault system, which is the junction of the Tibetan Plateau and Sichuan Basin. It is generally believed that the eastward pushing of the Qinghai-Tibet Plate and the blocking of the Sichuan Basin constitute the dynamic background of the Wenchuan earthquake. Some scholars have studied the Poisson’s ratio of the crust in this area. The results show that the Poisson’s ratio near the epicenter is 0.317 and that near CDP is 0.294, which means that the crust near the epicenter has more plastic characteristics [12]. Tomography based on seismic waves shows that there are obvious rheological bodies in the lower crust of the Wenchuan earthquake area [13]. The magnetotelluric results show that there is a high-conductivity layer at the depth of 20–40 km to the west of Longmenshan, a high-conductivity layer at the depth of 10–20 km near the focal location, and a rigid high-resistivity structure below 20 km [15]. Based on seismic noise imaging technology, the fine velocity structure of the area is obtained; a brittle-ductile transition zone is found at the depth of 20 km south of the epicenter of Wenchuan earthquake [14]. Based on the above results, we believe that the abnormal phenomena of CDP should be related to the occurrence of the Wenchuan earthquake, This anomaly did not occur in other stations, because the stations are far from the seismogenic area. The increase of cross-spectral value means the increase of ZD correlation. Some studies show that beneath Longmenshan, there is a high-resistivity body (HRB). However, a zone of elevated conductivity is observed locally within the HRB, coincident with the Wenchuan earthquake hypocenter, and it is believed to be a zone with an elevated quantity of interconnected (saline) fluids [15,16,17]. The increase of cross-spectral value is probably related to this, but more detailed explanation of the mechanism needs to be confirmed from further observation and research.

5 Data and resources

The geomagnetic data were obtained from the National Earthquake Precursory Network Center (http://10.5.67.11/pdbqz/, last accessed May 2014). The MATLAB codes developed by Aslak Grinsted were used for some of calculations (http://cn.mathworks.com/matlabcentral/fileexchange/47985-cross-wavelet-and-wavelet-coherence, last accessed April 2017). Some figures were prepared using the Generic Map** Tools software ver. 5.2.1 (http://www.soest.hawaii.edu/gmt, last accessed November 2015).