Source code for openquake.hazardlib.gsim.arteta_2023
# -*- coding: utf-8 -*-# vim: tabstop=4 shiftwidth=4 softtabstop=4## Copyright (C) 2015-2018 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:`ArtetaEtAl2023_Vs30` :class:`ArtetaEtAl2023`"""importnumpyasnpfromopenquake.hazardlib.gsim.baseimportGMPE,CoeffsTablefromopenquake.hazardlibimportconstfromopenquake.hazardlib.imtimportPGA,SACONSTS={"C1Slab":6.5}def_get_stddevs(C):""" Return standard deviations as defined in Table 3 """Sigma=C['Sigma']phi=C['Phi']tau=C['Tau']return[Sigma,tau,phi]def_compute_base_term(C):""" Returns the base coefficient of the GMPE, which for interface events is just the coefficient a1 (adjusted regionally) """returnC["Tetha1"]def_compute_magnitude_term(C,mag):""" Returns the magnitude scaling term adding the equations for global and regional terms (eq 5. and 6.) """f_mag=C["Tetha3"]*((8.5-mag)**2.)idx=mag<=C["M1"]f_mag[idx]=C["Tetha2"]*(mag[idx]-C["M1"])+f_mag[idx]returnf_magdef_compute_distance_term(C,rhypo,mag):""" Returns the distance attenuation adding the equations for global and regional terms (eq 7. and 8.) """scale=C["Tetha4"]+0.275*(mag-C["M1"])fdist=scale*np.log((rhypo**2+4.5**2)**0.5)returnfdist+C["Tetha5"]*rhypodef_compute_RVolc_term(C,rvolc):""" Computes the term of attenuation by the path portion crossing the volcanic region """f_RVolc=C["Tetha6"]*rvolcreturnf_RVolcdef_compute_site_term(C_SITE,vs30):""" Returns the site amplification from P and type list (Eq. 10) """f_sites=np.zeros_like(vs30)f_sites[vs30>=600]=C_SITE["s2"]*np.log(3.29)f_sites[(vs30>=370)&(vs30<600)]=C_SITE["s3"]*np.log(4.48)f_sites[(vs30>=230)&(vs30<370)]=C_SITE["s4"]*np.log(4.24)f_sites[(vs30>=0.0)&(vs30<230)]=C_SITE["s5"]*np.log(3.47)returnf_sitesdef_compute_Depth_term(C,hypo_depth):""" Returns the depth term """returnC["Tetha7"]*hypo_depth
[docs]classArtetaEtAl2023_Vs30(GMPE):""" Implements the model of Arteta et al (2021) as described in "Ground‐Motion Model (GMM) for Crustal Earthquakes in Northern South America (NoSAm Crustal GMM)" published on the Bulletin of the Seismological Society of America 2023 ( doi: https://doi.org/10.1785/0120220168) by Carlos A. Arteta, Cesar A. Pajaro, Vicente Mercado, Julián Montejo, Mónica Arcila, Norman A. Abrahamson; Soil term is associated with Vs30 using the simplification given in terms of natural period of HVRSR and mean value of P* """#: Supported tectonic region type is subduction interfaceDEFINED_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 the geometric mean componentDEFINED_FOR_INTENSITY_MEASURE_COMPONENT=const.IMC.RotD50#: Supported standard deviation types are inter-event, intra-event#: and total, see section 4.5DEFINED_FOR_STANDARD_DEVIATION_TYPES=set([const.StdDev.TOTAL,const.StdDev.INTER_EVENT,const.StdDev.INTRA_EVENT])#: Site amplification is dependent only upon Vs30REQUIRES_SITES_PARAMETERS={'vs30'}#: Required rupture parameters are only magnitude for the interface modelREQUIRES_RUPTURE_PARAMETERS={'mag','hypo_depth'}#: Required distance measure is closest distance to rupture, for#: interface eventsREQUIRES_DISTANCES={'rhypo','rvolc'}
[docs]defcompute(self,ctx:np.recarray,imts,mean,sig,tau,phi):""" See :meth:`superclass method <.base.GMPE.compute>` for spec of input and result values. """form,imtinenumerate(imts):# extract dictionaries of coefficients specific to required# intensity measure type and for PGAC=self.COEFFS[imt]C_SITE=self.COEFFS_SITE[imt]# Get full modelmean[m]=(_compute_base_term(C)+_compute_magnitude_term(C,ctx.mag)+_compute_distance_term(C,ctx.rhypo,ctx.mag)+_compute_site_term(C_SITE,ctx.vs30)+_compute_RVolc_term(C,ctx.rvolc)+_compute_Depth_term(C,ctx.hypo_depth))sig[m],tau[m],phi[m]=_get_stddevs(C)
def_compute_site_term_Period(C_SITE,Periods,Amplitudes):""" Returns the site amplification from periods and P* list """f_sites=np.zeros_like(Periods)f_sites[Periods<=0.2]=C_SITE["s2"]*np.log(Amplitudes[Periods<=0.2])f_sites[(Periods>0.2)&(Periods<=0.4)]=C_SITE["s3"]*np.log(Amplitudes[(Periods>0.2)&(Periods<=0.4)])f_sites[(Periods>0.4)&(Periods<=0.8)]=C_SITE["s4"]*np.log(Amplitudes[(Periods>0.4)&(Periods<=0.8)])f_sites[Periods>0.8]=C_SITE["s5"]*np.log(Amplitudes[Periods>0.8])f_sites[Amplitudes<2]=0returnf_sites
[docs]classArtetaEtAl2023(ArtetaEtAl2023_Vs30):""" Implements the model of Arteta et al (2021) as described in "Ground‐Motion Model (GMM) for Crustal Earthquakes in Northern South America (NoSAm Crustal GMM)" published on the Bulletin of the Seismological Society of America 2023 ( doi: https://doi.org/10.1785/0120220168) by Carlos A. Arteta, Cesar A. Pajaro, Vicente Mercado, Julián Montejo, Mónica Arcila, Norman A. Abrahamson; Soil term depends of natural perod and peak value of HVRSR spectra """#: Supported tectonic region type is subduction interfaceDEFINED_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 the geometric mean componentDEFINED_FOR_INTENSITY_MEASURE_COMPONENT=const.IMC.RotD50#: Supported standard deviation types are inter-event, intra-event#: and total, see section 4.5DEFINED_FOR_STANDARD_DEVIATION_TYPES=set([const.StdDev.TOTAL,const.StdDev.INTER_EVENT,const.StdDev.INTRA_EVENT])#: Site amplification is dependent on the period and amplitude of HVRSR spectraREQUIRES_SITES_PARAMETERS={'THV','PHV'}#: Required rupture parameters are only magnitude for the interface modelREQUIRES_RUPTURE_PARAMETERS={'mag','hypo_depth'}#: Required distance measure is closest distance to rupture, for#: interface eventsREQUIRES_DISTANCES={'rhypo','rvolc'}
[docs]defcompute(self,ctx:np.recarray,imts,mean,sig,tau,phi):""" See :meth:`superclass method <.base.GMPE.compute>` for spec of input and result values. """form,imtinenumerate(imts):# extract dictionaries of coefficients specific to required# intensity measure type and for PGAC=self.COEFFS[imt]C_SITE=self.COEFFS_SITE[imt]# Get full modelmean[m]=(_compute_base_term(C)+_compute_magnitude_term(C,ctx.mag)+_compute_distance_term(C,ctx.rrup,ctx.mag)+_compute_site_term_Period(C_SITE,ctx.THV,ctx.PHV)+_compute_RVolc_term(C,ctx.rvolc)+_compute_Depth_term(C,ctx.hypo_depth))sig[m],tau[m],phi[m]=_get_stddevs(C)