Source code for openquake.hazardlib.gsim.geomatrix_1993
# -*- 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:`Geomatrix1993SSlabNSHMP2008`."""importnumpyasnpfromopenquake.hazardlib.gsim.baseimportCoeffsTable,GMPEfromopenquake.hazardlibimportconstfromopenquake.hazardlib.imtimportPGA,SAdef_compute_mean(C,mag,ztor,rrup):""" Compute mean value as in ``subroutine getGeom`` in ``hazgridXnga2.f`` """gc0=0.2418ci=0.3846gch=0.00607g4=1.7818ge=0.554gm=1.414mean=(gc0+ci+ztor*gch+C['gc1']+gm*mag+C['gc2']*(10-mag)**3+C['gc3']*np.log(rrup+g4*np.exp(ge*mag)))returnmean
[docs]classGeomatrix1993SSlabNSHMP2008(GMPE):""" Implements GMPE for subduction intraslab events developed by Geomatrix Consultants, Inc., 1993, "Seismic margin earthquake for the Trojan site: Final unpublished report prepared for Portland General Electric Trojan Nuclear Plant", Ranier, Oregon. This class implements the equation as coded in the subroutine ``getGeom`` in the ``hazgridXnga2.f`` Fortran code available at: http://earthquake.usgs.gov/hazards/products/conterminous/2008/software/ Coefficients are given for the B/C site conditions. """#: Supported tectonic region type is subduction intraslabDEFINED_FOR_TECTONIC_REGION_TYPE=const.TRT.SUBDUCTION_INTRASLAB#: Supported intensity measure types are spectral acceleration,#: and peak ground accelerationDEFINED_FOR_INTENSITY_MEASURE_TYPES={PGA,SA}#: Supported intensity measure component is the geometric mean of#: two horizontal componentsDEFINED_FOR_INTENSITY_MEASURE_COMPONENT=const.IMC.GEOMETRIC_MEAN#: Supported standard deviation type is only total.DEFINED_FOR_STANDARD_DEVIATION_TYPES={const.StdDev.TOTAL}#: No site parameters requiredREQUIRES_SITES_PARAMETERS=set()#: Required rupture parameters are magnitude and top of rupture depthREQUIRES_RUPTURE_PARAMETERS={'mag','ztor'}#: Required distance measure is rrup (closest distance to rupture)REQUIRES_DISTANCES={'rrup'}# Shear-wave velocity for reference soil conditions in [m s-1])REQUIRES_SITES_PARAMETERS=set()DEFINED_FOR_REFERENCE_VELOCITY=760.
[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,ctx.mag,ctx.ztor,ctx.rrup)sig[m]=C['gc4']+C['gc5']*np.clip(ctx.mag,None,8.)