Source code for openquake.hazardlib.gsim.boore_1993
# -*- coding: utf-8 -*-# vim: tabstop=4 shiftwidth=4 softtabstop=4## Copyright (C) 2013-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:`BooreEtAl1993GSCBest`,:class:`BooreEtAl1993GSCUpperLimit`, :class:`BooreEtAl1993GSCLowerLimit`."""importnumpyasnpfromscipy.constantsimportgfromopenquake.hazardlib.gsim.baseimportGMPE,CoeffsTablefromopenquake.hazardlibimportconstfromopenquake.hazardlib.imtimportPGA,SA
[docs]classBooreEtAl1993GSCBest(GMPE):""" Implement equation used by the Geological Survey of Canada (GSC) for the 2010 Western Canada National Seismic Hazard Model. The class implements the model of David M. Boore, William B. Joyner, and Thomas E. Fumal ("Estimation of Response Spectra and Peak Accelerations from Western North American Earthquakes: An Interim Report", 1993, U.S. Geological Survey, Open File Report 93-509). Equation coefficients provided by GSC for the random horizontal component and corresponding to the 'Best' case (that is mean unaffected) """#: Supported tectonic region type is active shallow crust, given#: that the equations have been derived for Western North AmericaDEFINED_FOR_TECTONIC_REGION_TYPE=const.TRT.ACTIVE_SHALLOW_CRUST#: Supported intensity measure types are spectral acceleration,#: and peak ground accelerationDEFINED_FOR_INTENSITY_MEASURE_TYPES={PGA,SA}#: Supported intensity measure component is random horizontal#: :attr:`~openquake.hazardlib.const.IMC.RANDOM_HORIZONTAL`,DEFINED_FOR_INTENSITY_MEASURE_COMPONENT=const.IMC.RANDOM_HORIZONTAL#: Supported standard deviation type is totalDEFINED_FOR_STANDARD_DEVIATION_TYPES={const.StdDev.TOTAL}#: site params are not requiredREQUIRES_SITES_PARAMETERS=set()#: Required rupture parameter is magnitudeREQUIRES_RUPTURE_PARAMETERS={'mag'}#: Required distance measure is Rjb distance#: see paragraph 'Predictor Variables', page 6.REQUIRES_DISTANCES={'rjb'}
[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]mag=ctx.mag-6d=np.sqrt(ctx.rjb**2+C['c7']**2)mean[m]+=C['c1']+C['c2']*mag+C['c3']*mag**2+C['c6']idx=d<=100.mean[m,idx]+=C['c5']*np.log10(d[idx])idx=d>100.mean[m,idx]+=(C['c5']*np.log10(100.)-np.log10(d[idx]/100.)+C['c4']*(d[idx]-100.))# convert from log10 to ln and from cm/s**2 to gmean[m]=np.log((10.0**(mean[m]-2.0))/g)sig[m]=C['sigma']
[docs]classBooreEtAl1993GSCUpperLimit(BooreEtAl1993GSCBest):""" Implement equation used by the Geological Survey of Canada (GSC) for the 2010 Western Canada National Seismic Hazard Model. The class implements the model of David M. Boore, William B. Joyner, and Thomas E. Fumal ("Estimation of Response Spectra and Peak Accelerations from Western North American Earthquakes: An Interim Report", 1993, U.S. Geological Survey, Open File Report 93-509). Equation coefficients provided by GSC for the random horizontal component and corresponding to the 'Upper Limit' case (that is mean value + 0.7 nat log) """#: coefficient table provided by GSCCOEFFS=CoeffsTable(sa_damping=5,table="""\ IMT c1 c2 c3 c4 c5 c6 c7 sigma pga 3.187 0.229 0.0 -0.00326 -0.778 0.162 5.57 0.529 0.1 3.751 0.327 -0.098 -0.00395 -0.934 0.046 6.27 0.479 0.2 3.764 0.309 -0.090 -0.00259 -0.924 0.190 7.02 0.495 0.3 3.595 0.334 -0.070 -0.00202 -0.893 0.239 5.94 0.520 0.5 3.280 0.384 -0.039 -0.00148 -0.846 0.279 4.13 0.562 1.0 2.822 0.450 -0.014 -0.00097 -0.798 0.314 2.90 0.622 2.0 2.534 0.471 -0.037 -0.00064 -0.812 0.360 5.85 0.675 """)
[docs]classBooreEtAl1993GSCLowerLimit(BooreEtAl1993GSCBest):""" Implement equation used by the Geological Survey of Canada (GSC) for the 2010 Western Canada National Seismic Hazard Model. The class implements the model of David M. Boore, William B. Joyner, and Thomas E. Fumal ("Estimation of Response Spectra and Peak Accelerations from Western North American Earthquakes: An Interim Report", 1993, U.S. Geological Survey, Open File Report 93-509). Equation coefficients provided by GSC for the random horizontal component and corresponding to the 'Lower Limit' case (that is mean value - 0.7 nat log) """#: coefficient table provided by GSCCOEFFS=CoeffsTable(sa_damping=5,table="""\ IMT c1 c2 c3 c4 c5 c6 c7 sigma pga 2.587 0.229 0.0 -0.00326 -0.778 0.162 5.57 0.529 0.1 3.151 0.327 -0.098 -0.00395 -0.934 0.046 6.27 0.479 0.2 3.164 0.309 -0.090 -0.00259 -0.924 0.190 7.02 0.495 0.3 2.995 0.334 -0.070 -0.00202 -0.893 0.239 5.94 0.520 0.5 2.680 0.384 -0.039 -0.00148 -0.846 0.279 4.13 0.562 1.0 2.222 0.450 -0.014 -0.00097 -0.798 0.314 2.90 0.622 2.0 1.934 0.471 -0.037 -0.00064 -0.812 0.360 5.85 0.675 """)