Source code for openquake.hazardlib.gsim.raghukanth_iyengar_2007
# -*- coding: utf-8 -*-# vim: tabstop=4 shiftwidth=4 softtabstop=4## Copyright (C) 2012-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:mod:`openquake.hazardlib.gsim.raghukanth_iyengar_2007`exports:class:`RaghukanthIyengar2007`:class:`RaghukanthIyengar2007KoynaWarna`:class:`RaghukanthIyengar2007Southern`:class:`RaghukanthIyengar2007WesternCentral`"""importwarningsimportnumpyasnpfromopenquake.hazardlibimportconstfromopenquake.hazardlib.imtimportSA,PGAfromopenquake.hazardlib.gsim.baseimportGMPE,CoeffsTableCONSTS={'ref_mag':6.,'vs_bedrock':3600.}def_compute_distance_terms(dists,coeffs):""" Fourth and fifth terms of equation (8) on p. 203: ``- ln(R) - c4*R`` """return-np.log(dists.rhypo)-coeffs['c4']*dists.rhypodef_compute_magnitude_terms(rup,coeffs):""" First three terms of equation (8) on p. 203: ``c1 + c2*(M - 6) + c3*(M - 6)**2`` """adj_mag=rup.mag-CONSTS['ref_mag']returncoeffs['c1']+coeffs['c2']*adj_mag+coeffs['c3']*adj_mag**2def_compute_site_amplification(ln_mean_bedrock,coeffs):""" Equation (9) on p. 207 gives the site amplification factor: ``ln(F_s) = a1*y_br + a2 + ln(δ_site)`` """returncoeffs['a1']*np.exp(ln_mean_bedrock)+coeffs['a2']def_get_site_coeffs(NEHRP,NEHRP_UPPER,sites,imt):""" Extracts correct coefficients for each site from Table 5 on p. 208 for each site. :raises UserWarning: If vs30 is below limit for site class D, since "E- and F-type sites [...] are susceptible for liquefaction and failure." p. 205. """site_classes=get_nehrp_classes(NEHRP_UPPER,sites)is_rock=is_bedrock(sites)if'E'insite_classes:warnings.warn('Site class E and F not supported',UserWarning)a_1=np.nan*np.ones_like(sites.vs30)a_2=np.nan*np.ones_like(sites.vs30)sigma=np.nan*np.ones_like(sites.vs30)forkeyinNEHRP:indices=(site_classes==key)&~is_rocka_1[indices]=NEHRP[key][imt]['a1']a_2[indices]=NEHRP[key][imt]['a2']sigma[indices]=NEHRP[key][imt]['sigma']a_1[is_rock]=0.a_2[is_rock]=0.sigma[is_rock]=0.returna_1,a_2,sigma
[docs]defget_nehrp_classes(NEHRP_VS30_UPPER_BOUNDS,sites):""" Site classification threshholds from Section 4 "Site correction coefficients" p. 205. Note that site classes E and F are not supported. """classes=sorted(NEHRP_VS30_UPPER_BOUNDS)bounds=[NEHRP_VS30_UPPER_BOUNDS[item]foriteminclasses]bounds=np.reshape(np.array(bounds),(-1,1))vs30s=np.reshape(sites.vs30,(1,-1))site_classes=np.choose((vs30s<bounds).sum(axis=0)-1,classes)returnsite_classes.astype('object')
[docs]defis_bedrock(sites):""" A threshhold is not explicitly defined but the intention can be inferred from the statement that "The above results are valid at the bedrock level, with Vs nearly equal to 3.6 km/s." p. 203 """returnsites.vs30>CONSTS['vs_bedrock']
[docs]classRaghukanthIyengar2007(GMPE):""" Implements GMPE of Raghukanth & Iyengar (2007) for stable continental regions of peninsular India. This model is intended to be used to predict ground motions in peninsular India, a stable continental region with nonetheless significant seismic hazard (see Section 1 "Introduction", p. 199 and Section 2 "Seismological model", p. 200) Page number citations in this documentation refer to: Raghukanth, S. and Iyengar, R. (2007). Estimation of seismic spectral acceleration in peninsular India. Journal of Earth System Science, 116(3):199–214. """#: Supported tectonic region type is 'stable continental' since#: peninsular India "is similar to many other stable continental#: regions (SCR) of the world" (p. 200).DEFINED_FOR_TECTONIC_REGION_TYPE=const.TRT.STABLE_CONTINENTAL#: Set of :mod:`intensity measure types <openquake.hazardlib.imt>`#: this GSIM can calculate. A set should contain classes from#: module :mod:`openquake.hazardlib.imt`.DEFINED_FOR_INTENSITY_MEASURE_TYPES={SA,PGA}#: This is not clear in the paper, but Figure 7 shows the model#: "compared with the average of the response spectrum of#: the two horizontal components" of a particular recording.#: :attr:`~openquake.hazardlib.const.IMC.GEOMETRIC_MEAN`,#: see p. 211.DEFINED_FOR_INTENSITY_MEASURE_COMPONENT=const.IMC.GEOMETRIC_MEAN#: Although "the coefficients of [equation (1)] are obtained#: from the simulated database of SA by a two-step stratified#: regression following Joyner and Boore (1981)" (p. 203), the#: standard deviations of the intermediate steps are not#: reported, so only total standard deviation is supported.DEFINED_FOR_STANDARD_DEVIATION_TYPES={const.StdDev.TOTAL}#: Required site parameter Vs30 is used to determing the NEHRP#: site class, and thus to choose site amplification coefficients#: and site amplification stanard error from Table 5 on p. 208.REQUIRES_SITES_PARAMETERS={'vs30'}#: Sole required rupture parameter is magnitude, since faulting#: style is not addressed.REQUIRES_RUPTURE_PARAMETERS={'mag'}#: Required distance measure is hypocentral distance, see p. 203.REQUIRES_DISTANCES={'rhypo'}#: Verification of mean value data was done by digitizing Figures 3 and#: 5 using http://arohatgi.info/WebPlotDigitizer/ app/. Maximum error#: was relatively high, approximately 10%, but could be reduced to#: approximately 1.5% by making the following changes to what may be#: typographical errors in the published coefficients. In each case the#: value sugstituted is interpolated from neighbouring values.#:#: RaghukanthIyengar2007 COEFFS_BEDROCK (Table 3) at 1.200 s:#:#: * change c1 from 0.2904 to 0.1904#:#: RaghukanthIyengar2007 COEFFS_NEHRP_C (Table 5) at 0.750 s:#:#: * change a1 from 0.36 to -0.30#:#: RaghukanthIyengar2007Southern COEFFS_BEDROCK (Table 2(b)) at 2.000 s:#:#: * change c4 from 0.0001 to 0.0010#:#: Note that these would be in addition to the following more obvious#: correction which was implemented.#:#: RaghukanthIyengar2007Southern COEFFS_BEDROCK (Table 2(b)) at 0.150 s:#:#: * change c1 from .1941 to 2.1941#:#: Note that since test data was dervied from Figures 3 and 5, PGA is#: not covered.non_verified=True
[docs]defcompute(self,ctx:np.recarray,imts,mean,sig,tau,phi):""" Implements the following equations: Equation (8) on p. 203 for the bedrock ground motion: ``ln(y_br) = c1 + c2*(M - 6) + c3*(M - 6)**2 - lnR - c4*R + ln(ε_br)`` Equation (9) on p. 207 gives the site amplification factor: ``ln(F_s) = a1*y_br + a2 + ln(δ_site)`` Equation (10) on p. 207 for the ground motion at a given site: ``y_site = y_br*F_s`` Equation (11) on p. 207 for total standard error at a given site: ``σ{ln(ε_site)} = sqrt(σ{ln(ε_br)}**2 + σ{ln(δ_site)}**2)`` """form,imtinenumerate(imts):# obtain site-class specific coefficientsa_1,a_2,sigma_site=_get_site_coeffs(self.COEFFS_NEHRP,self.NEHRP_VS30_UPPER_BOUNDS,ctx,imt)coeffs={'a1':a_1,'a2':a_2,'sigma_site':sigma_site}# obtain coefficients for required intensity measure typec=self.COEFFS_BEDROCK[imt]forninc.dtype.names:coeffs[n]=c[n]# compute bedrock motion, equation (8)mean[m]=(_compute_magnitude_terms(ctx,coeffs)+_compute_distance_terms(ctx,coeffs))# adjust for site class, equation (10)mean[m]+=_compute_site_amplification(mean[m],coeffs)# No need to convert to g since "In [equation (8)], y_br = (SA/g)"# Equation (11) on p. 207 for total standard error at a given site# σ{ln(ε_site)} = sqrt(σ{ln(ε_br)}**2 + σ{ln(δ_site)}**2)sig[m]=np.sqrt(coeffs['sigma_bedrock']**2+coeffs['sigma_site']**2)