This page presents the code found on the spatial correlation repository: https://github.com/ucgmsim/stochastic_event_set. The repository has all the references cited here, which can be consulted when something is not clear.

Spatial Correlation

There are two main usages of the spatial correlation. The first one is related to Ground Motion Prediction Equations (GMPE) and the second is relevant for physics-based simulations (like CS).

GMPE

Spatial correlation can used in two ways for GMPE. In the first case, it will allow us to generate consistent IMs for a set of close geolocations. The second usage is to use spatial correlation between sites with observed IMs, coming from Strong Motion Stations (SMS) to obtain GMPE median and sigma values that are more in accordance to what has been observed.

Spatially correlated IMs

The idea is to allow the study the impact over several close locations at the same time, in opposition to the more common approach of generating IM observations for a single location.

For this purpose, we have implemented the equations as in Jayaram, 2018 and Loth and Baker, 2013. Basically, the algorithm is as follows:

  1. Calculate the correlation matrix for all sites. For the correlation, we need the distance that is then fed to the Loth and Baker, 2013 model, which works for several pSA periods.
  2. Perform the Cholesky decomposition on the correlation.
  3. Generate uncorrelated within-event values. Generate a unique intra-event value for all sites.
  4. Use Cholesky result to correlate within-event values. IM values for all sites are then given by the sum of the mean, the intra-event term and the correlated within-event values.
  5. Repeat N times as need.

The main script that calls all the needed functions is generate_realisations.py. 

TODO:

  • site-to-site distance matrix, might need a better solution if number of stations is large
  • Add more testing.
  • The script takes lots of parameters, see if we can use something like a config file instead?

Improved GMPE with SMS observations

In this part, we use SMS observations to influence mean and sigma values from GMPEs. The way to do that is to use the spatial correlation between the sites where we have data and all the other sites.

The implementation follows both Bradley, 2013 and Stafford, 2009:

  1. Calculate the residuals between observations and GMPE.
  2. Divide the covariance matrix between known sites and unknown sites.
  3. Calculate the covariance matrix for the within-event terms. Please not that this is similar to the calculation of the correlation matrix above (using site distances) but we need to multiply by the sigma within-events at this stage already.
  4. Create new conditional mean and sigma for the unknown sites, using the known sites and the GMPE for the unknown sites.
  5. Calculate N random realizations of random IMs for all the sites as needed
  6. Update the GMPE. Sites that are close to places with observations will have very small sigma and mean will be close to the observed value. As verification: if you do this for SMS sites, then mean is exactly the observed IM and sigma is numerically very close to 0.

TODO:

  • The results provided are the same as the ones for the spatially correlated GMPE, but it is probably not needed. The within-event and intra-event data that is returned by the code does not make sense, because of the way the random IMs are generated.
  • If within-event and intra-event are important, then there is a commented out algorithm that uses the same procedure as before.
  • The plotting is still somewhat manual! I have added 2 scripts that I use to extract xyz values and then use plot_items.py directly. Add that to the code.

Physics-based simulations

For the case of the simulated correlations, we have explored two types of prototypes. The first one to analyse one simulation and the GMPE to compare the simulated spatial correlation with the Jayaram et al. model. The second type of computation is applied to a set of simulations for a given rupture, to obtain an estimation of the correlation. In the following, both will be explained, including what needs to be done going further.

GMPE and simulations

This is the case presented in the NZ correlation study paper by Chen et al. 2019. This paper uses the process to compute the within-event correlations for observed IMs. In this case, we have adapted the calculations to take a single simulation. 

The workflow for a site j and a rupture i:

  • We use the GMM (lognormal assumption) to compute the median value for a site Mu_lnIM(rup_i, site_j).
  • We compute the residual as being Epsilon_ij = ln(IM_ij) - Mu_lnIM(rup_i, site_j).
  • The total residual is used to compute the between-event part, using approximate approach. 
  • Finally, using the between-event part above, we get the within-event value. 
  • Applying the Pearson correlation, we can find the values of the covariance matrix for the conditional distribution.


On the paper this is compared to the stationary approach for the spatial correlation. We still need to decide what to do forward, as this could be used for CS.

TODO: 

  • Present the correlation values on a map.
  • Do the actual comparison with the spatially correlated values from GMPE.

Large number of simulations

This part emulates what is being done in the PSHA textbook for a set of simulations performed by SCEC. The idea here is to have a large number of simulations for the same fault. The calculations can be found on Brendon's PSHA book, 2020.

The only trick here is to store the IM values in a table where rows are station data and columns with the lnIM for each simulation. With this trick, quantities like the median across all simulations (average of all columns for a given row) or the total residual on the equations are easily calculated.

Once we have the within-event values, we calculate the Pearson correlation to obtain the covariance matrix for the within-event part.

TODO:

  • Find the code, which I don't remember where it is. Once that is done, proper debugging will be needed.
  • Put stuff on a map again, as there should be spatial patterns etc.
  • Brendon to decide if this will be applied to some CS simulations to analyse some of the spatial effects.

Stochastic event set

The stochastic event set is a subset of a large number of simulations which is representative. This is useful as the subset is easier to analyze.

So far, we implemented a simple Monte Carlo method to select random simulations and we have tested that. 

TODO:

  • Add smarter selection, so that large events are selected more often
  • Re-instate the code that was doing all this: it is currently missing but is available on the repo of course.


References

Bradley, B.A. (2014) Site-specific and spatially-distributed ground-motion intensity estimation in the 2010–2011 Canterbury earthquakes. Soil Dynamics and Earthquake Eng. Volumes 61–62, June–July 2014, Pages 83-91.

Loth, C. and Baker, J.W. (2013), A spatial cross‐correlation model of spectral accelerations at multiple periods. Earthquake Engng Struct. Dyn., 42: 397-417. https://doi.org/10.1002/eqe.2212

Jayaram, N. (2010) Probabilistic seismic lifeline risk assessment using efficient sampling and data reduction techniques. Stanford University.

Stafford PJ. (2012) Evaluation of structural performance in the immediate aftermath of an earthquake: a case study of the 2011Christchurche Earthquake. Int J Foren Eng;1(1):58–77.


  • No labels