Source code for openquake.hazardlib.gsim.jaimes_2020
# -*- coding: utf-8 -*-# vim: tabstop=4 shiftwidth=4 softtabstop=4## Copyright (C) 2014-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:'JaimesEtAl2020SSlab', :class:'JaimesEtAl2020SSlabVert', :class:'JaimesEtAl2020SSlabVHratio'"""importnumpyasnpfromscipy.constantsimportgfromopenquake.hazardlib.gsim.baseimportGMPE,CoeffsTablefromopenquake.hazardlibimportconstfromopenquake.hazardlib.imtimportPGA,PGV,SAdef_compute_mean(C,g,ctx,imt,imc):""" Return the mean value based on the selected intensity measure component """mag=ctx.magdis=np.where(mag>6.5,ctx.rrup,ctx.rhypo)# near-source saturation termdelta=0.0075*10**(0.507*mag)# depth scalingH=np.minimum(ctx.hypo_depth,75)-50# average distance to the fault surfaceR=np.sqrt(dis**2+delta**2)ifimc==const.IMC.VERTICAL_TO_HORIZONTAL_RATIO:# Computes the mean for the 'V/H ratio' according to equation 4,# page 1306. The equation predicts the mean value for PGA, PGV,# and SA in terms of the natural logarithm.mean=C['c1']+C['c2']*mag+C['c3']*Relse:# Computes the mean for the 'horizontal or vertical component'# according to equation 1, page 1304. The equation# predicts the mean value for PGA, PGV, and SA in terms of# the natural logarithm.mean=(C['c1']+C['c2']*mag+C['c3']*np.log(R)+C['c4']*R+C['c5']*H)# For PGA and SA, the values are convert from cm/s**2 to 'g'ifimt!=PGV():mean=np.log(np.exp(mean)*1e-2/g)returnmeandef_get_stddevs(C,imc):""" Returns the standard deviation values based on the selected intensity measure component """ifimc==const.IMC.VERTICAL_TO_HORIZONTAL_RATIO:# Standar deviations for the 'V/H ratio component'# Between-event variability (Eq. 5b, p. 1308)s_b=np.sqrt(C['sv_b']**2.0+C['sh_b']**2.0-2.0*C['rho_b']*C['sv_b']*C['sh_b'])# Within-event variability (Eq. 5c, p. 1308)s_w=np.sqrt(C['sv_w']**2.0+C['sh_w']**2.0-2.0*C['rho_w']*C['sv_w']*C['sh_w'])# Total standard deviation (Eq. 5a, p. 1308)s_t=np.sqrt(s_b**2.0+s_w**2.0)# Return the valuesstds=np.array([s_t,s_b,s_w])else:# Standard deviation for the 'horizontal or vertical component'stds=np.array([C['s_t'],C['s_b'],C['s_w']])returnstds
[docs]classJaimesEtAl2020SSlab(GMPE):""" Implements GMPE developed by Jaimes et al. (2020) for Mexican intermediate-depth intraslab earthquake and published as: Jaimes M. A., García-Soto A. D. (2020) "Updated ground motion prediction model for Mexican intermediate-depth intraslab earthquakes including V/H ratios" Earthq. Spectra, 36(3):1298-1330. doi:10.1177/8755293019899947. The original formulation predict peak ground acceleration, PGA (cm/s**2), peak ground velocity, PGV (cm/s), and 5% damped pseudo-acceleration response spectra, PSA (cm/s**2), for the quadratic mean of the two horizontal component of ground motion (see the 'Regression Analysis' section on page 1304). The GMPE predicted values for Mexican intraslab events at rock sites (NEHRP B site condition). """#: Supported tectonic region type is subduction intraslab,#: given that the equations have been derived using Mexican intraslab#: events.DEFINED_FOR_TECTONIC_REGION_TYPE=const.TRT.SUBDUCTION_INTRASLAB#: Supported intensity measure types are peak ground acceleration,#: peak ground velocity and spectral acceleration. See Table 2 in #: page 1306.DEFINED_FOR_INTENSITY_MEASURE_TYPES={PGA,PGV,SA}#: Supported intensity measure component is the average 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 1306.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 magnitude and focal depth#: See equation 1 in page 1304REQUIRES_RUPTURE_PARAMETERS={'mag','hypo_depth'}#: Required distance measure is Rrup (closest distance to fault surface)#: for large events (Mw>6.5) or Rhypo (hypocentral distance) for the rest,#: both in kilometers, as explained in page 1304REQUIRES_DISTANCES={'rrup','rhypo'}
[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. """# Type of intensity measure componentimc=self.DEFINED_FOR_INTENSITY_MEASURE_COMPONENTform,imtinenumerate(imts):C=self.COEFFS[imt]mean[m]=_compute_mean(C,g,ctx,imt,imc)sig[m],tau[m],phi[m]=_get_stddevs(C,imc)