Source code for openquake.hazardlib.gsim.somerville_2009
# -*- coding: utf-8 -*-# vim: tabstop=4 shiftwidth=4 softtabstop=4## Copyright (C) 2013-2023 GEM Foundation## OpenQuake is free software: you can redistribute it and/or modify it# under the terms of the GNU Affero General Public License as published# by the Free Software Foundation, either version 3 of the License, or# (at your option) any later version.## OpenQuake is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the# GNU Affero General Public License for more details.## You should have received a copy of the GNU Affero General Public License# along with OpenQuake. If not, see <http://www.gnu.org/licenses/>."""Module exports :class:`SomervilleEtAl2009NonCratonic`,:class:`SomervilleEtAl2009YilgarnCraton`:class:`SomervilleEtAl2009NonCratonic_SS14`:class:`SomervilleEtAl2009YilgarnCraton_SS14`"""importnumpyasnpfromopenquake.hazardlib.gsim.baseimportGMPE,CoeffsTablefromopenquake.hazardlibimportconstfromopenquake.hazardlib.imtimportPGA,PGV,SAfromopenquake.hazardlib.gsimimportboore_2014def_compute_mean(C,mag,rjb):""" Compute mean value, see table 2. """m1=6.4r1=50.h=6.R=np.sqrt(rjb**2+h**2)R1=np.sqrt(r1**2+h**2)less_r1=rjb<r1ge_r1=rjb>=r1mean=(C['c1']+C['c4']*(mag-m1)*np.log(R)+C['c5']*rjb+C['c8']*(8.5-mag)**2)mean[less_r1]+=C['c3']*np.log(R[less_r1])mean[ge_r1]+=(C['c3']*np.log(R1)+C['c6']*(np.log(R[ge_r1])-np.log(R1)))mean+=np.where(mag<m1,C['c2']*(mag-m1),C['c7']*(mag-m1))returnmean
[docs]classSomervilleEtAl2009NonCratonic(GMPE):""" Implements GMPE developed by P. Somerville, R. Graves, N. Collins, S. G. Song, S. Ni, and P. Cummins for Non-Cratonic Australia published in "Source and Ground Motion Models for Australian Earthquakes", Report to Geoscience Australia (2009). Document available at: http://www.ga.gov.au/cedda/publications/193?yp=2009 """#: The supported tectonic region type is stable continental regionDEFINED_FOR_TECTONIC_REGION_TYPE=const.TRT.STABLE_CONTINENTAL#: The supported intensity measure types are PGA, PGV, and SA, see table#: 3DEFINED_FOR_INTENSITY_MEASURE_TYPES={PGA,PGV,SA}#: The supported intensity measure component is set to 'average#: horizontal', however the original paper does not report this informationDEFINED_FOR_INTENSITY_MEASURE_COMPONENT=const.IMC.GEOMETRIC_MEAN#: The supported standard deviations is total, see tables 3DEFINED_FOR_STANDARD_DEVIATION_TYPES={const.StdDev.TOTAL}#: no site parameters are defined, the GMPE is calibrated for Vs30 = 865#: m/s (provisionally set to 800 for compatibility with SiteTerm class)REQUIRES_SITES_PARAMETERS=set()DEFINED_FOR_REFERENCE_VELOCITY=800.#: The required rupture parameter is magnitude, see table 2REQUIRES_RUPTURE_PARAMETERS={'mag'}#: The required distance parameter is 'Joyner-Boore' distance, see table 2REQUIRES_DISTANCES={'rjb'}
[docs]defcompute(self,ctx:np.recarray,imts,mean,sig,tau,phi):""" See :meth:`superclass method <.base.GroundShakingIntensityModel.compute>` for spec of input and result values. Implement equations as defined in table 2. """form,imtinenumerate(imts):C=self.COEFFS[imt]mean[m]=_compute_mean(C,ctx.mag,ctx.rjb)sig[m]=C['sigma']
[docs]classSomervilleEtAl2009NonCratonic_SS14(SomervilleEtAl2009NonCratonic):""" SomervilleEtAl2009NonCratonic model updated to apply the linear and non-linear amplification factors of Sayhan & Stewart (2014) as applied in the Boore et al (2014) NGE-West 2 GMMfor use in Geoscience Australia ShakeMap """#: Required site parameters is Vs30REQUIRES_SITES_PARAMETERS={'vs30'}
[docs]defcompute(self,ctx:np.recarray,imts,mean,sig,tau,phi):""" See :meth:`superclass method <.base.GroundShakingIntensityModel.compute>` for spec of input and result values. """# get coefficients for rock PGAC_PGA=self.COEFFS[PGA()]BEA14_C_PGA=boore_2014.BooreEtAl2014.COEFFS[PGA()]# get rock PGA - correct from PGA(865 m/s) to PGA(760 m/s)pga_rock=_compute_mean(C_PGA,ctx.mag,ctx.rjb)# make array like ctx.vs30 of 865 m/ssites_865=865.*np.ones_like(ctx.vs30)# use Boore et al (2014) amplification factorsflin_865_760=boore_2014._get_linear_site_term(BEA14_C_PGA,sites_865)fnl_865_760=boore_2014._get_nonlinear_site_term(BEA14_C_PGA,sites_865,np.exp(pga_rock))# apply correction to get PGA(760 m/s)pga_rock_760=pga_rock-flin_865_760-fnl_865_760form,imtinenumerate(imts):C=self.COEFFS[imt]# get amplification model coefficients from Boore et al, 2014BEA14_C=boore_2014.BooreEtAl2014.COEFFS[imt]# correction from 865 m/s to 760 m/sflin_865_760=boore_2014._get_linear_site_term(BEA14_C,sites_865)fnl_865_760=boore_2014._get_nonlinear_site_term(BEA14_C,sites_865,np.exp(pga_rock))# correction from 760 m/s to target vs30flin=boore_2014._get_linear_site_term(BEA14_C,ctx.vs30)fnl=boore_2014._get_nonlinear_site_term(BEA14_C,ctx.vs30,np.exp(pga_rock_760))mean[m]=_compute_mean(C,ctx.mag,ctx.rjb)-flin_865_760-fnl_865_760+flin+fnlsig[m]=C['sigma']
[docs]classSomervilleEtAl2009YilgarnCraton_SS14(SomervilleEtAl2009YilgarnCraton):""" SomervilleEtAl2009YilgarnCraton model updated to apply the linear and non-linear amplification factors of Sayhan & Stewart (2014) as applied in the Boore et al (2014) NGE-West 2 GMM for use in Geoscience Australia ShakeMap """#: Required site parameters is Vs30REQUIRES_SITES_PARAMETERS={'vs30'}
[docs]defcompute(self,ctx:np.recarray,imts,mean,sig,tau,phi):""" See :meth:`superclass method <.base.GroundShakingIntensityModel.compute>` for spec of input and result values. """# get coefficients for rock PGAC_PGA=self.COEFFS[PGA()]BEA14_C_PGA=boore_2014.BooreEtAl2014.COEFFS[PGA()]# get rock PGA - correct from PGA(865 m/s) to PGA(760 m/s)pga_rock=_compute_mean(C_PGA,ctx.mag,ctx.rjb)# make array like ctx.vs30 of 865 m/ssites_865=865.*np.ones_like(ctx.vs30)# use Boore et al (2014) amplification factorsflin_865_760=boore_2014._get_linear_site_term(BEA14_C_PGA,sites_865)fnl_865_760=boore_2014._get_nonlinear_site_term(BEA14_C_PGA,sites_865,np.exp(pga_rock))# apply correction to get PGA(760 m/s)pga_rock_760=pga_rock-flin_865_760-fnl_865_760form,imtinenumerate(imts):C=self.COEFFS[imt]# get amplification model coefficients from Boore et al, 2014BEA14_C=boore_2014.BooreEtAl2014.COEFFS[imt]# correction from 865 m/s to 760 m/sflin_865_760=boore_2014._get_linear_site_term(BEA14_C,sites_865)fnl_865_760=boore_2014._get_nonlinear_site_term(BEA14_C,sites_865,np.exp(pga_rock))# correction from 760 m/s to target vs30flin=boore_2014._get_linear_site_term(BEA14_C,ctx.vs30)fnl=boore_2014._get_nonlinear_site_term(BEA14_C,ctx.vs30,np.exp(pga_rock_760))mean[m]=_compute_mean(C,ctx.mag,ctx.rjb)-flin_865_760-fnl_865_760+flin+fnlsig[m]=C['sigma']