Source code for openquake.hazardlib.gsim.pankow_pechmann_2004
# -*- 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:`PankowPechmann2004`."""importnumpyasnpfromscipy.constantsimportgasgravityfromopenquake.hazardlib.gsim.baseimportGMPE,CoeffsTablefromopenquake.hazardlibimportconstfromopenquake.hazardlib.imtimportPGA,PGV,SA
[docs]classPankowPechmann2004(GMPE):""" Implements GMPE developed by Kris L. Pankow and James C. Pechmann and published as "The SEA99 Ground-Motion Predictive Relations for Extensional Tectonic Regimes: Revisions and a New Peak Ground Velocity Relation" Bulletin of the Seismological Society of America, Vol. 94, No. 1, pp. 341–348, February 2004 """#: Supported tectonic region type is active shallow crust,DEFINED_FOR_TECTONIC_REGION_TYPE=const.TRT.ACTIVE_SHALLOW_CRUST#: TO CHECK PSV!DEFINED_FOR_INTENSITY_MEASURE_TYPES={PGA,PGV,SA}#: Supported intensity measure component is VECTORIAL#: :attr:`~openquake.hazardlib.const.IMC.VECTORIAL`,#: NOTE: The paper indicates it as Geometric meanDEFINED_FOR_INTENSITY_MEASURE_COMPONENT=const.IMC.GEOMETRIC_MEAN#: Supported standard deviation type is totalDEFINED_FOR_STANDARD_DEVIATION_TYPES={const.StdDev.TOTAL}#: Required site parameter is only Vs30REQUIRES_SITES_PARAMETERS={'vs30'}#: Required rupture parameter is magnitudeREQUIRES_RUPTURE_PARAMETERS={'mag'}#: Required distance measure is Rjb distance#: see paragraph 'Predictor Variables', page 6.REQUIRES_DISTANCES={'rjb'}#: No independent tests - verification against paper for PGA and PGV,#: but not for SA and Standard Deviationsnon_verified=True
[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]M=ctx.mag-6R=np.sqrt(ctx.rjb**2+C['h']**2)# In the original formulation of the GMPE, distinction is only made# between rock and soil ctx, which I assumed separated by the Vs30# value of 910m/s (see equation 5 of the paper)gamma=np.array([0ifv>910.else1forvinctx.vs30])mean[m]=(C['b1']+C['b2']*M+C['b3']*M**2+C['b5']*np.log10(R)+C['b6']*gamma)# Convert from base 10 to base emean[m]/=np.log10(np.e)# Converting PSV to PSAifimt!=PGA()andimt!=PGV():omega=2.*np.pi/imt.periodmean[m]+=np.log(omega/(gravity*100))# Computing standard deviationif(self.DEFINED_FOR_INTENSITY_MEASURE_COMPONENT=='Random horizontal'):# Using equation 8 of the paper,# corrected as indicated in the erratumSr=np.sqrt(C['SlZ']**2+(C['S3']/np.sqrt(2))**2)else:Sr=C['SlZ']# Convert from base 10 to base esig[m]=Sr/np.log10(np.e)