Source code for openquake.hazardlib.gsim.atkinson_2015
# -*- coding: utf-8 -*-# vim: tabstop=4 shiftwidth=4 softtabstop=4## Copyright (C) 2015-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:'Atkinson2015' :class:`Atkinson2015AltDistSat`"""importnumpyasnpfromscipy.constantsimportgfromopenquake.baselib.generalimportCallableDictfromopenquake.hazardlib.gsim.baseimportGMPE,CoeffsTablefromopenquake.hazardlibimportconstfromopenquake.hazardlib.imtimportPGA,PGV,SAdef_get_magnitude_term(C,mag):""" Returns the magnitude scaling term """returnC["c0"]+C["c1"]*mag+C["c2"]*mag**2.0def_get_distance_term(C,rhypo,mag,rsat):""" Returns the distance scaling term including the apparent anelastic attenuation term (C4 * R) """h_eff=get_effective_depth(rsat,mag)r_val=np.sqrt(rhypo**2.0+h_eff**2.0)returnC["c3"]*np.log10(r_val)+C["c4"]*r_valget_effective_depth=CallableDict()@get_effective_depth.add('default')def_get_effective_depth(rsat,mag):""" Returns the effective distance term in equation 3. This may be overwritten in sub-classes """h_eff=10.0**(-1.72+0.43*mag)returnnp.where(h_eff>1.0,h_eff,1.0)@get_effective_depth.add('alternative')def_get_effective_depth_alt(rsat,mag):""" Alternative effective distance term provided in Atkinson (2015) (page 986) for use of stronger distance-saturation effects than within default model """h_eff=10.0**(-0.28+0.19*mag)returnnp.where(h_eff>1.0,h_eff,1.0)def_get_stddevs(C):""" Return standard deviations, converting from log10 to log """return[np.log(10.0**C["sigma"]),np.log(10.0**C["tau"]),np.log(10.0**C["phi"])]
[docs]classAtkinson2015(GMPE):""" Implements the Induced Seismicity GMPE of Atkinson (2015) Atkinson, G. A. (2015) Ground-Motion Prediction Equation for Small-to- Moderate Events at Short Hypocentral Distances, with Application to Induced-Seismicity Hazards. Bulletin of the Seismological Society of America. 105(2). """#: The GMPE is derived from induced earthquakesDEFINED_FOR_TECTONIC_REGION_TYPE=const.TRT.INDUCED#: Supported intensity measure types are peak ground accelerationDEFINED_FOR_INTENSITY_MEASURE_TYPES={PGA,PGV,SA}#: Supported intensity measure component is the larger of two componentsDEFINED_FOR_INTENSITY_MEASURE_COMPONENT=const.IMC.RotD50#: Supported standard deviation types is total.DEFINED_FOR_STANDARD_DEVIATION_TYPES={const.StdDev.TOTAL,const.StdDev.INTER_EVENT,const.StdDev.INTRA_EVENT}#: No required site parameters, the GMPE is derived for B/C site#: amplification factorsREQUIRES_SITES_PARAMETERS=set()#: Required rupture parameters are magnitudeREQUIRES_RUPTURE_PARAMETERS={'mag'}#: Required distance measure is hypocentral distanceREQUIRES_DISTANCES={'rhypo'}# Default distance-saturation scalingrsat='default'
[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. """rsat=self.rsatform,imtinenumerate(imts):C=self.COEFFS[imt]imean=(_get_magnitude_term(C,ctx.mag)+_get_distance_term(C,ctx.rhypo,ctx.mag,rsat))# Convert mean from cm/s and cm/s/sifimt.string.startswith(('PGA','SA')):mean[m]=np.log((10.0**(imean-2.0))/g)else:mean[m]=np.log(10.0**imean)sig[m],tau[m],phi[m]=_get_stddevs(C)
[docs]classAtkinson2015AltDistSat(Atkinson2015):""" This class implements the alternative effective depth term provided on page 986 of Atkinson (2015) for the use of stronger distance-saturation effects than implemented within the default model. It should be noted that this class uses the coefficients obtained using the Yenier and Atkinson (2014) effective depth term i.e. those used within the base gsim class too, with modification only to the effective depth term """# Alternative (stronger) distance-saturation scalingrsat='alternative'