## 2 Stochastic Green's Function Method for 3D Ground Motion Simulation and Its Improvement
### Small Earthquakes in Subfaults Superimposed to Form the Large Earthquake
\(C_{1}\) is the distance from the rupture starting point to the left or right edge of the fault along the direction of fault length when the center of the _ij_ subfault is located on the left or right of the rupture starting point, respectively; \(C_{2}\) is the distance from the rupture starting point to the top or bottom edge of the fault along the direction of fault width when the center of the _ij_ subfault is located on the top or bottom of the rupture starting point, respectively:  
\[C_{1}=\left\{ \begin{array}{ll}L-x_{\rm R},&x_{ij}\geq x_{\rm R}\\ x_{\rm R},&x_{ij}<x_{\rm R}\end{array} \right. \tag{13}\]  
\[C_{2}=\left\{ \begin{array}{ll}W-y_{\rm R},&y_{ij}\geq y_{\rm R}\\ y_{\rm R},&y_{ij}<y_{\rm R}\end{array} \right. \tag{14}\]In Equations (12)-(14), \(L\) and \(W\) represent the length and width of the fault, respectively. Equations (12)-(14) represent a functional form describing that the rise time would be longer when a subfault is closer to the hypocenter. According to the above method, the time histories of the P wave, SV wave, and SH wave of the large earthquake are obtained. Assuming that seismic waves propagate in a straight line, the time histories of the P wave, SV wave, and SH wave of the large earthquake are projected and converted to the NS, EW, and UD directions according to Equation (15), respectively:  
\[\left\{ \begin{aligned} & U_{\text{NS}}(t)=U_{\text{P}}(t)\sin i_{ \xi}\cos\phi+U_{\text{SV}}(t)\cos i_{\xi}\cos\phi+U_{\text{SH}}(t)\sin\phi\\ & U_{\text{EW}}(t)=U_{\text{P}}(t)\sin i_{\xi}\sin\phi+U_{\text{SV }}(t)\cos i_{\xi}\sin\phi+U_{\text{SH}}(t)\cos\phi\\ & U_{\text{UD}}(t)=U_{\text{P}}(t)\cos i_{\xi}+U_{\text{SV}}(t) \sin i_{\xi}\end{aligned} \right. \tag{15}\]  
where, \(U_{\text{P}}(t)\), \(U_{\text{SV}}(t)\), and \(U_{\text{SH}}(t)\) represent the time histories of the P wave, SV wave, and SH wave of the large earthquake, respectively; \(U_{\text{NS}}(t)\), \(U_{\text{EW}}(t)\), and \(U_{\text{UD}}(t)\) represent the time histories of the large earthquake in NS, EW, and UD directions, respectively; \(\phi\) is the azimuth angle from the center of the fault to the observation point; and \(i_{\xi}\) is the average takeoff angle. Since it is assumed that the seismic wave travels along a straight line, the average takeoff angle refers to the angle between the line connecting the center of the fault and the observation point and the vertical downward direction. The ground motion obtained from the above simulation is the ground motion at the bedrock below the observation point. On this basis, it is necessary to consider the local site amplification effect to obtain the ground motion at the surface. The horizontal-to-vertical component spectral ratio (HVSR) method [37; 38; 39] is applied in this study to consider the local site amplification effect. The theory of the HVSR suggests that vertical ground motion consists of amplification from part of the source effects that need to be eliminated to achieve a suitable site amplification [38; 40]. Therefore, the ratio of the Fourier spectrum of the horizontal component to that of the vertical component of the seismic records at the local site is taken as the local site amplification of the horizontal ground motion. To reduce the impact of the randomness of a single ground motion on the calculated results, it is necessary to take the average of the calculated results from three or more seismic records. The frequency range for site amplification is set to 0.2 Hz to 10 Hz [41; 42; 43]. The horizontal components of the simulated ground motion at the bedrock are multiplied by the Fourier spectral ratio, and the site amplification of the vertical component of the ground motion is ignored. Then the simulation results of the ground motion at the surface can be obtained. The program code of the improved stochastic Green's function method for 3D ground motion simulation is developed based on FORTRAN 90.