Source code for openquake.hazardlib.gsim.munson_thurber_1997
# -*- coding: utf-8 -*-# vim: tabstop=4 shiftwidth=4 softtabstop=4## Copyright (C) 2017-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:`MunsonThurber1997` :class:`MunsonThurber1997Hawaii` :class:`MunsonThurber1997Vector`."""importnumpyasnpfromopenquake.hazardlib.gsim.baseimportGMPEfromopenquake.hazardlibimportconstfromopenquake.hazardlib.imtimportPGA,SA# assign constantLOG10E=np.log10(np.e)
[docs]classMunsonThurber1997(GMPE):""" Implements GMPE developed by Clifford G. Munson and Clifford H. Thurber and published as "Analysis of the Attenuation of Strong Ground Motion on the Island of Hawaii" (1997, Bulletin of the Seismological Society of America, Vol. 87, No. 4, pp. 954-960). """#: Supported tectonic region type is volcanic,#: see paragraph 'Introduction', page 99.DEFINED_FOR_TECTONIC_REGION_TYPE=const.TRT.VOLCANIC#: Supported intensity measure types is spectral acceleration,#: see table 3, pag. 110DEFINED_FOR_INTENSITY_MEASURE_TYPES={PGA}#: Supported intensity measure component is maximum horizontal#: :attr:`~openquake.hazardlib.const.IMC.VECTORIAL`,DEFINED_FOR_INTENSITY_MEASURE_COMPONENT=const.IMC.HORIZONTAL#: Supported standard deviation type is totalDEFINED_FOR_STANDARD_DEVIATION_TYPES={const.StdDev.TOTAL}#: Required site parameters is Vs30.#: See paragraph 'Predictor Variables', pag 103REQUIRES_SITES_PARAMETERS={'vs30'}#: Required rupture parameter is magnitudeREQUIRES_RUPTURE_PARAMETERS={'mag'}#: Required distance measure is hypocentral distance#: see page 18 in Atkinson and Boore's manuscriptREQUIRES_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. """# Distance termR=np.sqrt(ctx.rjb**2+11.29**2)# Magnitude termM=ctx.mag-6# Site term only distinguishes between lava and ash;# since ash sites have Vs30 in the range 60-200m/s,# we use this upper value as class separatorS=np.zeros_like(R)S[ctx.vs30<=200]=1form,imtinenumerate(imts):# Mean ground motion (log10)mean[m]=(0.518+0.387*M-np.log10(R)-0.00256*R+0.335*S)# Converting to natural logmean[m]/=np.log10(np.e)# Constant (total) standard deviationsig[m]=0.237/LOG10E
[docs]classMunsonThurber1997Hawaii(MunsonThurber1997):""" Modifies :class:`MunsonThurber1997` for use with the USGS Hawaii seismic hazard map of Klein FW, Frankel AD,Mueller CS, Wesson RL, Okubo PG. Seismic-hazard maps for Hawaii. US Geological Survey; 2000. """DEFINED_FOR_INTENSITY_MEASURE_TYPES={PGA,SA}
[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. """super().compute(ctx,imts,mean,sig,tau,phi)# Magnitude termM=ctx.mag-6right=ctx.mag>7.7center=(ctx.mag>7.)&(ctx.mag<=7.7)mean[:,center]+=(0.171*(1-M[center]))/LOG10Emean[:,right]+=(0.1512+0.387*(1-M[right]))/LOG10Eform,imtinenumerate(imts):# define natural log of SA 0.3 sec and 0.2 secifimt.period==0.3:mean[m]+=np.log(2.2)elifimt.period==0.2:mean[m]+=np.log(2.5)if(self.DEFINED_FOR_INTENSITY_MEASURE_COMPONENT==const.IMC.VECTORIAL):# Conversion to geometric mean of horizontal components# using the coefficient in Beyer and Bommer, 2006mean[m]+=np.log(1.1)
[docs]classMunsonThurber1997Vector(MunsonThurber1997):""" Modification of the original base class to correct mean ground motion to geometric mean of horizontal components (Beyer and Bommer, 2006) """#: Supported intensity measure component is geometric mean of horizontal#: :attr:`~openquake.hazardlib.const.IMC.VECTORIAL`,DEFINED_FOR_INTENSITY_MEASURE_COMPONENT=const.IMC.VECTORIAL