Source code for openquake.hazardlib.gsim.zhao_2006_swiss
# -*- 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:`ZhaoEtAl2006AscSWISS05`,:class:`ZhaoEtAl2006AscSWISS03`,:class:`ZhaoEtAl2006AscSWISS08`."""importnumpyasnpfromopenquake.hazardlib.gsim.baseimportCoeffsTablefromopenquake.hazardlibimportconstfromopenquake.hazardlib.imtimportPGA,SAfromopenquake.hazardlib.gsim.zhao_2006importZhaoEtAl2006Ascfromopenquake.hazardlib.gsim.zhao_2006_swiss_coeffsimport(COEFFS_FS_ROCK_SWISS05,COEFFS_FS_ROCK_SWISS03,COEFFS_FS_ROCK_SWISS08)fromopenquake.hazardlib.gsim.utils_swiss_gmpeimport_apply_adjustments
[docs]classZhaoEtAl2006AscSWISS05(ZhaoEtAl2006Asc):""" This class extends :class:ZhaoEtAl2006Asc, adjusted to be used for the Swiss Hazard Model [2014]. This GMPE is valid for a fixed value of vs30=700m/s #. kappa value K-adjustments corresponding to model 01 - as prepared by Ben Edwards K-value for PGA were not provided but infered from SA[0.01s] the model applies to a fixed value of vs30=700m/s to match the reference vs30=1100m/s #. small-magnitude correction #. single station sigma - inter-event magnitude/distance adjustment Disclaimer: these equations are modified to be used for the Swiss Seismic Hazard Model [2014]. The hazard modeller is solely responsible for the use of this GMPE in a different tectonic context. Model implemented by laurentiu.danciu@gmail.com """# Supported standard deviation type originally only total, but reported as a# combination of mean and magnitude/distance single station sigma.# updated to return inter and intra event component of st.dev (June 2023) DEFINED_FOR_STANDARD_DEVIATION_TYPES={const.StdDev.TOTAL,const.StdDev.INTER_EVENT,const.StdDev.INTRA_EVENT}DEFINED_FOR_INTENSITY_MEASURE_TYPES={PGA,SA}#: Vs30 value representing typical rock conditions in Switzerland.#: confirmed by the Swiss GMPE groupDEFINED_FOR_REFERENCE_VELOCITY=1105.
[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. """ctx=ctx.copy()ctx.vs30=700*np.ones(len(ctx.vs30))super().compute(ctx,imts,mean,sig,tau,phi)tau_ss='tauC'log_phi_ss=1.00C=ZhaoEtAl2006AscSWISS05.COEFFS_ASCform,imtinenumerate(imts):_apply_adjustments(C,self.COEFFS_FS_ROCK[imt],tau_ss,mean[m],sig[m],tau[m],phi[m],ctx,ctx.rrup,imt,log_phi_ss)
[docs]classZhaoEtAl2006AscSWISS03(ZhaoEtAl2006AscSWISS05):""" This class extends :class:ZhaoEtAl2006Asc,following same strategy as for :class:ZhaoEtAl2006AscSWISS05 """COEFFS_FS_ROCK=COEFFS_FS_ROCK_SWISS03
[docs]classZhaoEtAl2006AscSWISS08(ZhaoEtAl2006AscSWISS05):""" This class extends :class:ZhaoEtAl2006Asc,following same strategy as for :class:ZhaoEtAl2006AscSWISS05 to be used for the Swiss Hazard Model [2014]. """COEFFS_FS_ROCK=COEFFS_FS_ROCK_SWISS08