gem / oq-engine

OpenQuake Engine: a software for Seismic Hazard and Risk Analysis
https://github.com/gem/oq-engine/#openquake-engine
GNU Affero General Public License v3.0
380 stars 276 forks source link

New spatial correlation model #3886

Closed pheresi closed 6 years ago

pheresi commented 6 years ago

A new model of intra-event spatial correlation was implemented. This model has one parameter, which is the uncertainty_multiplier. If uncertainty_multiplier = 0, no event-to-event variability of the model is considered. If uncertainty_multiplier > 1, then event-to-event variability is included. The total dispersion used for the correlation model parameter is the product of the original dispersion and uncertainty_multiplier. In general, uncertainty_multiplier = 1 is recommended, but other values might be used to test the effect of the event-to-event variability.

This new model changes the following files:

  1. openquake/hazardlib/correlation.py : The new model is included. Also, I changed in the input variables of the function apply_correlation, in order to include the vector of intra-event standard deviations corresponding to each site ('stddev_intra'). As the new model includes event-to-event variability, every simulation of gmf has a different correlation. Thus, we cannot compute the correlated gmf with the Cholesky decomposition method. Instead of that, we have to sample every simulation from a multivariate normal distribution with the corresponding correlation (which changes on every simulation). This is not as efficient as the Cholesky decomposition, but I can't imagine a better way of sampling the correlated gmf.
  2. openquake/hazardlib/calc/gmf.py : The function _compute uses the function apply_correlation of correlation.py. Thus, lines where apply_correlation is used were changed to include the new input 'stddev_intra'.
  3. openquake/hazardlib/tests/correlation_test.py : New tests for correlation.py are included for the new model.
  4. openquake/commonlib/oqvalidation.py : A change in order to validate the new correlation model is included. Now openquake accepts JB2009 (previous model) and HM2018 (new model).
pheresi commented 6 years ago

Already merged