Source code for openquake.hazardlib.gsim.arroyo_2010
# -*- coding: utf-8 -*-# vim: tabstop=4 shiftwidth=4 softtabstop=4## Copyright (C) 2014-2025 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:'ArroyoEtAl2010SInter'"""importnumpyasnpfromscipy.constantsimportgfromscipy.specialimportexp1fromopenquake.hazardlib.gsim.baseimportGMPE,CoeffsTablefromopenquake.hazardlibimportconstfromopenquake.hazardlib.imtimportPGA,SAdef_compute_mean(C,g,ctx):""" Compute mean according to equation 8a, page 773. """mag=ctx.magdis=ctx.rrup# computing r02 parameter and the average distance to the fault surfacero2=1.4447e-5*np.exp(2.3026*mag)avg=np.sqrt(dis**2+ro2)# computing fourth term of Eq. 8a, page 773.trm4=(exp1(C['c4']*dis)-exp1(C['c4']*avg))/ro2# computing the meanmean=C['c1']+C['c2']*mag+C['c3']*np.log(trm4)# convert from cm/s**2 to 'g'mean=np.log(np.exp(mean)*1e-2/g)returnmeandef_get_stddevs(C):""" Return standard deviations as defined in table 2, page 776. """stds=np.array([C['s_t'],C['s_e'],C['s_r']])returnstds
[docs]classArroyoEtAl2010SInter(GMPE):""" Implements GMPE developed by Arroyo et al. (2010) for Mexican subduction interface events and published as: Arroyo D., García D., Ordaz M., Mora M. A., and Singh S. K. (2010) "Strong ground-motion relations for Mexican interplate earhquakes", J. Seismol., 14:769-785. The original formulation predict peak ground acceleration (PGA), in cm/s**2, and 5% damped pseudo-acceleration response spectra (PSA) in cm/s**2 for the geometric average of the maximum component of the two horizontal component of ground motion. The GMPE predicted values for Mexican interplate events at rock sites (NEHRP B site condition) in the forearc region. """#: Supported tectonic region type is subduction interface,#: given that the equations have been derived using Mexican interface#: events.DEFINED_FOR_TECTONIC_REGION_TYPE=const.TRT.SUBDUCTION_INTERFACE#: Supported intensity measure types are spectral acceleration,#: and peak ground acceleration. See Table 2 in page 776.DEFINED_FOR_INTENSITY_MEASURE_TYPES={PGA,SA}#: Supported intensity measure component is the geometric average of# the maximum of the two horizontal components.DEFINED_FOR_INTENSITY_MEASURE_COMPONENT=const.IMC.GEOMETRIC_MEAN#: Supported standard deviation types are inter-event, intra-event#: and total. See Table 2, page 776.DEFINED_FOR_STANDARD_DEVIATION_TYPES={const.StdDev.TOTAL,const.StdDev.INTER_EVENT,const.StdDev.INTRA_EVENT}#: No site parameters requiredREQUIRES_SITES_PARAMETERS={'vs30'}#: Required rupture parameter is the magnitudeREQUIRES_RUPTURE_PARAMETERS={'mag'}#: Required distance measure is Rrup (closest distance to fault surface)REQUIRES_DISTANCES={'rrup'}
[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. """form,imtinenumerate(imts):C=self.COEFFS[imt]mean[m]=_compute_mean(C,g,ctx)sig[m],tau[m],phi[m]=_get_stddevs(C)