Source code for openquake.hazardlib.gsim.bradley_2013
# -*- 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 exports :class:`Bradley2013`, :class:`Bradley2013Volc`,:class:`Bradley2013ChchCBD`,:class:`Bradley2013ChchWest`, :class:`Bradley2013ChchEast`,:class:`Bradley2013ChchNorth`,:class:`Bradley2013ChchCBDAdditionalSigma`,:class:`Bradley2013ChchWestAdditionalSigma`,:class:`Bradley2013ChchEastAdditionalSigma`,:class:`Bradley2013ChchNorthAdditionalSigma`.:class:`Bradley2013ChchMaps`.:class:`Bradley2013ChchMapsAdditionalSigma`."""importcopyimportnumpyasnpimportshapelyfromopenquake.baselib.generalimportCallableDictfromopenquake.hazardlib.gsim.baseimportGMPE,CoeffsTablefromopenquake.hazardlib.gsim.abrahamson_2014importget_epistemic_sigmafromopenquake.hazardlibimportconstfromopenquake.hazardlib.imtimportPGA,SAcbd_polygon=shapely.geometry.Polygon([(172.6259,-43.5209),(172.6505,-43.5209),(172.6505,-43.5399),(172.6124,-43.5400),(172.6123,-43.5289),(172.6124,-43.5245),(172.6220,-43.5233)])def_get_basin_term(C,ctx,region=None):z1pt0=ctx.z1pt0fb1=C['phi5']*(1.0-1.0/np.cosh(C['phi6']*(z1pt0-C['phi7']).clip(0,np.inf)))fb2=C['phi8']/np.cosh(0.15*(z1pt0-15).clip(0,np.inf))returnfb1+fb2def_adjust_mean_model(region,in_cshm,in_cbd,imt_per,b13_mean):dL2L=dS2S=np.array(np.zeros(np.shape(b13_mean)))# If the site is in the CBD polygon, get dL2L and dS2S terms# Only apply the dL2L term only to sites located in the CBD.dL2L[in_cbd&in_cshm]=_get_dL2L(imt_per)dS2S[in_cbd&in_cshm]=_get_dS2S(region,imt_per)returnb13_mean+dL2L+dS2Sdef_check_in_cbd_polygon(lons,lats):""" Checks if site is located within the CBD polygon. The boundaries of the polygon implemented here are from the 'Central City' Zoning Map in the Christchurch District Plan. See Figure 4.4 of Van Houtte and Abbott (2019). """points=[shapely.geometry.Point(lons[ind],lats[ind])forindinnp.arange(len(lons))]in_cbd=np.array([cbd_polygon.contains(point)forpointinpoints])returnin_cbddef_get_SRF_phi(imt_per):""" Table 7 and equation 19 of 2013 report. NB change in notation, 2013 report calls this term 'sigma' but it is referred to here as phi. """ifimt_per<0.6:srf=0.8elif0.6<=imt_per<1:srf=_interp_function(0.7,0.8,1,0.6,imt_per)elif1<=imt_per<=10:srf=_interp_function(0.6,0.7,10,1,imt_per)else:srf=1returnsrfdef_get_SRF_sigma(imt_per):""" Table 8 and equation 19 of 2013 report. NB change in notation, 2013 report calls this term 'sigma_t' but it is referred to here as sigma. Note that Table 8 is identical to Table 7 in the 2013 report. """ifimt_per<0.6:srf=0.8elif0.6<=imt_per<1:srf=_interp_function(0.7,0.8,1,0.6,imt_per)elif1<=imt_per<=10:srf=_interp_function(0.6,0.7,10,1,imt_per)else:srf=1returnsrfdef_get_SRF_tau(imt_per):""" Table 6 and equation 19 of 2013 report. """ifimt_per<1:srf=0.87elif1<=imt_per<5:srf=_interp_function(0.58,0.87,5,1,imt_per)elif5<=imt_per<=10:srf=0.58else:srf=1returnsrf
[docs]defset_adjusted_stddevs(clsname,additional_sigma,ctx,C,ln_y_ref,exp1,exp2,in_cshm,in_cbd,imt_per,sig,tau,phi):# aftershock flag is zero, we consider only main shock.AS=0Fmeasured=ctx.vs30measuredFinferred=~ctx.vs30measured# eq. 19 to calculate inter-event standard errormag_test=np.clip(ctx.mag-5.,0.,2.)t=C['tau1']+(C['tau2']-C['tau1'])/2*mag_test# b and c coeffs from eq. 10b=C['phi2']*(exp1-exp2)c=C['phi4']y_ref=np.exp(ln_y_ref)# eq. 20NL=b*y_ref/(y_ref+c)sigma=(# first line of eq. 20(C['sig1']+0.5*(C['sig2']-C['sig1'])*mag_test+C['sig4']*AS)# second line*np.sqrt(C['sig3']*Finferred+0.7*Fmeasured+(1+NL)**2))if"Maps"inclsname:# Get sigma reduction factors if site is in CBD polygon.srf_sigma=np.array(np.ones(np.shape(in_cbd)))srf_phi=np.array(np.ones(np.shape(in_cbd)))srf_tau=np.array(np.ones(np.shape(in_cbd)))srf_sigma[in_cshm&in_cbd]=_get_SRF_sigma(imt_per)srf_phi[in_cshm&in_cbd]=_get_SRF_phi(imt_per)# The tau reduction term is not used in this implementation# srf_tau[in_cbd == True] = _get_SRF_tau(imt_per)# Add 'additional sigma' specified in the Canterbury Seismic# Hazard Model to total sigma, eq. 21scaled_sigma=np.sqrt((1+NL)**2*t**2+sigma**2)*srf_sigmasig[:]=np.sqrt(scaled_sigma**2+additional_sigma**2)scaled_phi=sigma*srf_phiphi[:]=np.sqrt(scaled_phi**2+additional_sigma**2/2)scaled_tau=np.abs((1+NL)*t)*srf_tautau[:]=np.sqrt(scaled_tau**2+additional_sigma**2/2)return# Get sigma reduction factorssrf_sigma=_get_SRF_sigma(imt_per)srf_phi=_get_SRF_phi(imt_per)srf_tau=_get_SRF_tau(imt_per)# Add 'additional sigma' specified in the Canterbury Seismic# Hazard Model to total sigma. This equals zero for the base model.# eq. 21scaled_sigma=np.sqrt((1+NL)**2*t**2+sigma**2)*srf_sigmasig[:]+=np.sqrt(scaled_sigma**2+additional_sigma**2)scaled_phi=sigma*srf_phiphi[:]+=np.sqrt(scaled_phi**2+additional_sigma**2/2)scaled_tau=np.abs((1+NL)*t)*srf_tautau[:]+=np.sqrt(scaled_tau**2+additional_sigma**2/2)
def_get_dL2L(imt_per):""" Table 3 and equation 19 of 2013 report. """ifimt_per<0.18:dL2L=-0.06elif0.18<=imt_per<0.35:dL2L=_interp_function(0.12,-0.06,0.35,0.18,imt_per)elif0.35<=imt_per<=10:dL2L=_interp_function(0.65,0.12,10,0.35,imt_per)else:dL2L=0returndL2L_get_dS2S=CallableDict()@_get_dS2S.add("CBD")def_get_dS2S_1(region,imt_per):""" Table 4 of 2013 report """ifimt_per==0:dS2S=0.05elif0<imt_per<0.15:dS2S=_interp_function(-0.15,0.05,0.15,0,imt_per)elif0.15<=imt_per<0.45:dS2S=_interp_function(0.4,-0.15,0.45,0.15,imt_per)elif0.45<=imt_per<3.2:dS2S=0.4elif3.2<=imt_per<5:dS2S=_interp_function(0.08,0.4,5,3.2,imt_per)elif5<=imt_per<=10:dS2S=0.08else:dS2S=0returndS2S@_get_dS2S.add("West")def_get_dS2S_2(region,imt_per):""" The parameters of this function have been digitised from Figure 8a of the Bradley (2013b) report, as the actual parameters are not provided in the report, and could not be provided by the author (B. Bradley, pers. comm. 01/02/2019). """ifimt_per==0:dS2S=-0.2elif0<imt_per<0.85:dS2S=_interp_function(-0.55,-0.2,0.85,0,imt_per)elif0.85<=imt_per<1.4:dS2S=_interp_function(-0.18,-0.55,1.4,0.85,imt_per)elif1.4<=imt_per<3.2:dS2S=-0.18elif3.2<=imt_per<5:dS2S=_interp_function(0.22,-0.18,5,3.2,imt_per)elif5<=imt_per<=10:dS2S=0.22else:dS2S=0returndS2S@_get_dS2S.add("East")def_get_dS2S_3(region,imt_per):""" The parameters of this function have been digitised from Figure 9a of the Bradley (2013b) report, as the actual parameters are not provided in the report, and could not be provided by the author (B. Bradley, pers. comm. 01/02/2019). """if0<=imt_per<=0.25:dS2S=0.05elif0.25<imt_per<1.5:dS2S=_interp_function(0.15,0.05,1.5,0.25,imt_per)elif1.5<=imt_per<=10:dS2S=_interp_function(0.1,0.15,10,1.5,imt_per)else:dS2S=0returndS2S@_get_dS2S.add("North")def_get_dS2S_4(region,imt_per):""" The parameters of this function have been digitised from Figure 10a of the Bradley (2013b) report, as the actual parameters are not provided in the report, and could not be provided by the author (B. Bradley, pers. comm. 01/02/2019). """ifimt_per==0:dS2S=-0.31elif0<imt_per<0.2:dS2S=_interp_function(-0.4,-0.31,0.2,0,imt_per)elif0.2<=imt_per<0.6:dS2S=_interp_function(0.2,-0.4,0.6,0.2,imt_per)elif0.6<=imt_per<=10:dS2S=0.2else:dS2S=0returndS2Sdef_get_ln_y_ref(trt,ctx,C):""" Get an intensity on a reference soil. Implements eq. 4 in Bradley 2013. This is the same as Chiou and Youngs 2008, with addition of TVZ attentuation term, and addition of c8 which constains the ZTOR. Note that the TVZ scaling is set to 1 (i.e. no TVZ attenuation) """# Taupo Volcanic Zone Path Distance. Set to zero.rtvz=ctx.rrupiftrt==const.TRT.VOLCANICelse0.# reverse faulting flagFrv=np.zeros_like(ctx.rake)Frv[(30<=ctx.rake)&(ctx.rake<=150)]=1.# normal faulting flagFnm=np.zeros_like(ctx.rake)Fnm[(-120<=ctx.rake)&(ctx.rake<=-60)]=1.# hanging wall flagFhw=ctx.rx>=0# aftershock flag. always zero since we only consider main shockAS=0ln_y_ref=(# first line of eq. 4 in Bradley 2013C['c1']+(C['c1a']*Frv+C['c1b']*Fnm+C['c7']*(np.clip(ctx.ztor,-np.inf,C['c8'])-4))*(1-AS)+(C['c10']+C['c7a']*(ctx.ztor-4))*AS# second line+C['c2']*(ctx.mag-6)+((C['c2']-C['c3'])/C['cn'])*np.log(1+np.exp(C['cn']*(C['cm']-ctx.mag)))# third line+C['c4']*np.log(ctx.rrup+C['c5']*np.cosh(C['c6']*np.maximum(ctx.mag-C['chm'],0)))# fourth line+(C['c4a']-C['c4'])*np.log(np.sqrt(ctx.rrup**2+C['crb']**2))# fifth line+(C['cg1']+C['cg2']/(np.cosh(np.maximum(ctx.mag-C['cg3'],0))))# sixth line*((1+C['ctvz']*(rtvz/ctx.rrup))*ctx.rrup)# seventh line+C['c9']*Fhw*np.tanh(ctx.rx*(np.cos(np.radians(ctx.dip))**2)/C['c9a'])*(1-np.sqrt(ctx.rjb**2+ctx.ztor**2)/(ctx.rrup+0.001)))returnln_y_refdef_get_mean(ctx,C,ln_y_ref,exp1,exp2,v1):""" Add site effects to an intensity. Implements eq. 5 """# We consider random variables being zero since we want# to find the exact mean value.eta=epsilon=0ln_y=(# first line of eq. 13bln_y_ref+C['phi1']*np.log(np.clip(ctx.vs30,-np.inf,v1)/1130)# second line+C['phi2']*(exp1-exp2)*np.log((np.exp(ln_y_ref)+C['phi4'])/C['phi4'])# third line+_get_basin_term(C,ctx)# fourth line+eta+epsilon)returnln_y
[docs]defset_stddevs(additional_sigma,ctx,C,ln_y_ref,exp1,exp2,sig,tau,phi):# aftershock flag is zero, we consider only main shock.AS=0Fmeasured=ctx.vs30measuredFinferred=1-ctx.vs30measured# eq. 19 to calculate inter-event standard errormag_test=np.clip(ctx.mag-5.,0.,2.)t=C['tau1']+(C['tau2']-C['tau1'])/2*mag_test# b and c coeffs from eq. 10b=C['phi2']*(exp1-exp2)c=C['phi4']y_ref=np.exp(ln_y_ref)# eq. 20NL=b*y_ref/(y_ref+c)sigma=(# first line of eq. 20(C['sig1']+0.5*(C['sig2']-C['sig1'])*mag_test+C['sig4']*AS)# second line*np.sqrt((C['sig3']*Finferred+0.7*Fmeasured)+(1+NL)**2))# Add 'additional sigma' specified in the Canterbury Seismic# Hazard Model to total sigma# eq. 21unscaled_sigma_tot=np.sqrt((1+NL)**2*t**2+sigma**2)sig[:]=np.sqrt(unscaled_sigma_tot**2+additional_sigma**2)phi[:]=np.sqrt(sigma**2+additional_sigma**2/2)# this is implied in eq. 21unscaled_tau=np.abs((1+NL)*t)tau[:]=np.sqrt(unscaled_tau**2+additional_sigma**2/2)
def_get_v1(imt):""" Calculates Bradley's V1 term. Equation 2 (page 1814) and 6 (page 1816) based on SA period """T=imt.periodifT==0:v1=1800.else:v1a=np.clip((1130*(T/0.75)**-0.11),1130,np.inf)v1=np.clip(v1a,-np.inf,1800.)returnv1def_interp_function(y_ip1,y_i,t_ip1,t_i,imt_per):""" Generic interpolation function used in equation 19 of 2013 report. """returny_i+(y_ip1-y_i)/(t_ip1-t_i)*(imt_per-t_i)
[docs]classBradley2013(GMPE):""" Implements GMPE developed by Brendan Bradley for Active Shallow Crust Earthquakes for New Zealand, and published as "A New Zealand-Specific Pseudospectral Acceleration Ground-Motion Prediction Equation for Active Shallow Crustal Earthquakes Based on Foreign Models" (2013, Bulletin of the Seismological Society of America, Volume 103, No. 3, pages 1801-1822). This model is modified from Chiou and Youngs, 2008 and has been adapted for New Zealand conditions. Specifically, the modifications are related to: 1) small magnitude scaling; 2) scaling of short period ground motion from normal faulting events in volcanic crust; 3) scaling of ground motions on very hard rock sites; 4) anelastic attenuation in the New Zealand crust; 5) consideration of the increates anelastic attenuation in the Taupo Volcanic Zone (not implemented in this model, use Bradley2013Volc) """#: Supported tectonic region type is active shallow crust, see page 1801DEFINED_FOR_TECTONIC_REGION_TYPE=const.TRT.ACTIVE_SHALLOW_CRUST#: Supported intensity measure types are spectral acceleration,#: peak ground velocity and peak ground acceleration. Note that PGV is#: the Chiou & Youngs PGV and has not been modified for New Zealand.DEFINED_FOR_INTENSITY_MEASURE_TYPES={PGA,SA}#: Supported intensity measure component is geometric mean#: of two horizontal components#: attr:`~openquake.hazardlib.const.IMC.GEOMETRIC_MEAN`,#: see abstract page 1801.DEFINED_FOR_INTENSITY_MEASURE_COMPONENT=const.IMC.GEOMETRIC_MEAN#: Supported standard deviation types are inter-event, intra-event#: and total, see chapter "Variance model".DEFINED_FOR_STANDARD_DEVIATION_TYPES={const.StdDev.TOTAL,const.StdDev.INTER_EVENT,const.StdDev.INTRA_EVENT}#: Required site parameters are Vs30 (eq. 13b), Vs30 measured flag (eq. 20)#: and Z1.0 (eq. 13b).REQUIRES_SITES_PARAMETERS={'vs30','vs30measured','z1pt0'}#: Required rupture parameters are magnitude, rake (eq. 13a and 13b),#: dip (eq. 13a) and ztor (eq. 13a).REQUIRES_RUPTURE_PARAMETERS={'dip','rake','mag','ztor'}#: Required distance measures are RRup, Rjb and Rx (all are in eq. 13a).REQUIRES_DISTANCES={'rrup','rjb','rx'}additional_sigma=0.def__init__(self,sigma_mu_epsilon=0.0):self.sigma_mu_epsilon=sigma_mu_epsilon
[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. """trt=self.DEFINED_FOR_TECTONIC_REGION_TYPEform,imtinenumerate(imts):C=self.COEFFS[imt]# intensity on a reference soil is used for both mean# and stddev calculations.ln_y_ref=_get_ln_y_ref(trt,ctx,C)# exp1 and exp2 are parts of eq. 7exp1=np.exp(C['phi3']*(ctx.vs30.clip(-np.inf,1130)-360))exp2=np.exp(C['phi3']*(1130-360))# v1 is the period dependent site term. The Vs30 above which, the# amplification is constantv1=_get_v1(imt)mean[m]=_get_mean(ctx,C,ln_y_ref,exp1,exp2,v1)mean[m]+=(self.sigma_mu_epsilon*get_epistemic_sigma(ctx))set_stddevs(self.additional_sigma,ctx,C,ln_y_ref,exp1,exp2,sig[m],tau[m],phi[m])
[docs]classBradley2013Volc(Bradley2013):""" Extend :class:`Bradley2013` for earthquakes with paths across the Taupo Volcanic Zone (rtvz) that have increased anelastic attenuation. Implements GMPE developed by Brendan Bradley for Active Shallow Crust Earthquakes for New Zealand, and published as "A New Zealand-Specific Pseudospectral Acceleration Ground-Motion Prediction Equation for Active Shallow Crustal Earthquakes Based on Foreign Models" (2013, Bulletin of the Seismological Society of America, Volume 103, No. 3, pages 1801-1822). This model is modified from Chiou and Youngs, 2008 and has been adapted for New Zealand conditions. Specifically, the modifications are related to: 1) small magnitude scaling; 2) scaling of short period ground motion from normal faulting events in volcanic crust; 3) scaling of ground motions on very hard rock sites; 4) anelastic attenuation in the New Zealand crust; 5) consideration of the increates anelastic attenuation in the Taupo Volcanic Zone (rtvz is equal to rrup) """DEFINED_FOR_TECTONIC_REGION_TYPE=const.TRT.VOLCANIC
[docs]classBradley2013LHC(Bradley2013):""" Extend :class:`Bradley2013` to provide the model in terms of the larger of two as-recorded horizontal components. This definition is required by New Zealand building design standards. """DEFINED_FOR_INTENSITY_MEASURE_COMPONENT= \
const.IMC.GREATER_OF_TWO_HORIZONTAL#: This implementation is non-verified because this version of the#: model has not been published, nor is independent code available.non_verified=True
[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)form,imtinenumerate(imts):mean[m]+=convert_to_LHC(imt)
[docs]classBradley2013VolcLHC(Bradley2013LHC):""" Extend :class:`Bradley2013LHC` for earthquakes with paths across the Taupo Volcanic Zone (rtvz) that have increased anelastic attenuation. """DEFINED_FOR_TECTONIC_REGION_TYPE=const.TRT.VOLCANIC
[docs]defconvert_to_LHC(imt):""" Converts from GMRotI50 to Larger of two horizontal components using global equation of: Boore, D and Kishida, T (2016). Relations between some horizontal- component ground-motion intensity measures used in practice. Bulletin of the Seismological Society of America, 107(1), 334-343. doi:10.1785/0120160250 No standard deviation modification required. """# get period tt=imt.periodor0.01T1=0.08T2=0.56T3=4.40T4=8.70R1=1.106R2=1.158R3=1.178R4=1.241R5=1.241min1=min(R1+(R2-R1)/np.log(T2/T1)*np.log(t/T1),R2+(R3-R2)/np.log(T3/T2)*np.log(t/T2))min2=min(R3+(R4-R3)/np.log(T4/T3)*np.log(t/T3),R5)Ratio=max(R1,max(min1,min2))SF=np.log(Ratio)returnSF
[docs]classBradley2013bChchCBD(Bradley2013LHC):""" Implements GMPE developed by Brendon Bradley for Christchurch subregions, and published as: Bradley, B. (2013). "Systematic ground motion observations in the Canterbury earthquakes and region-specific nonergodic empirical ground motion modelling"" (2013), University of Canterbury Research Report 2013-03, Department of Civil Engineering, University of Canterbury, Christchurch, New Zealand." This model was also published as: Bradley, B. (2015). Systematic Ground Motion Observations in the Canterbury Earthquakes And Region-Specific Non-Ergodic Empirical Ground Motion Modeling. Earthquake Spectra: August 2015, Vol. 31, No. 3, pp. 1735-1761. but this implementation has been developed from the information in the 2013 report. The original code by the author could not be made available at the time of development of this code. For this reason, this implementation is untested and marked as non_verified. It appears from the model documentation that the dL2L and dS2S terms are relative to a baseline Vs30 value of 250 m/s and a baseline Z1 value of 330 m, although this is unconfirmed. """region="CBD"non_verified=True
[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. """trt=self.DEFINED_FOR_TECTONIC_REGION_TYPEctx=copy.copy(ctx)# Fix site parameters for consistent dS2S application.ctx.vs30=np.array([250])ctx.z1pt0=np.array([330])form,imtinenumerate(imts):C=self.COEFFS[imt]imt_per=imt.period# intensity on a reference soil is used for both mean# and stddev calculations.ln_y_ref=_get_ln_y_ref(trt,ctx,C)# exp1 and exp2 are parts of eq. 7exp1=np.exp(C['phi3']*(ctx.vs30.clip(-np.inf,1130)-360))exp2=np.exp(C['phi3']*(1130-360))# v1 is the period dependent site term. The Vs30 above which, the# amplification is constantv1=_get_v1(imt)# Get log-mean from regular unadjusted modelb13a_mean=_get_mean(ctx,C,ln_y_ref,exp1,exp2,v1)# Adjust mean and standard deviationmean[m]=b13a_mean+_get_dL2L(imt_per)+_get_dS2S(self.region,imt_per)mean[m]+=convert_to_LHC(imt)set_adjusted_stddevs(self.__class__.__name__,self.additional_sigma,ctx,C,ln_y_ref,exp1,exp2,0,0,imt_per,sig[m],tau[m],phi[m])
[docs]classBradley2013bChchWest(Bradley2013bChchCBD):""" Extend :class:`Bradley2013bChchCBD` to implement the 'extended western suburbs' dS2S model. """region="West"
[docs]classBradley2013bChchEast(Bradley2013bChchCBD):""" Extend :class:`Bradley2013bChchCBD` to implement the 'eastern suburbs' dS2S model. """region="East"
[docs]classBradley2013bChchNorth(Bradley2013bChchCBD):""" Extend :class:`Bradley2013bChchCBD` to implement the 'northern suburbs' dS2S model. """region="North"
[docs]classBradley2013bChchCBDAdditionalSigma(Bradley2013bChchCBD):""" Extend :class:`Bradley2013ChchCBD` to implement the 'additional epistemic uncertainty' version of the model in: Gerstenberger, M., McVerry, G., Rhoades, D., Stirling, M. 2014. "Seismic hazard modelling for the recovery of Christchurch", Earthquake Spectra, 30(1), 17-29. """additional_sigma=.35
[docs]classBradley2013bChchWestAdditionalSigma(Bradley2013bChchWest):""" Extend :class:`Bradley2013ChchWest` to implement the 'additional epistemic uncertainty' version of the model in: Gerstenberger, M., McVerry, G., Rhoades, D., Stirling, M. 2014. "Seismic hazard modelling for the recovery of Christchurch", Earthquake Spectra, 30(1), 17-29. """additional_sigma=.35
[docs]classBradley2013bChchEastAdditionalSigma(Bradley2013bChchEast):""" Extend :class:`Bradley2013ChchEast` to implement the 'additional epistemic uncertainty' version of the model in: Gerstenberger, M., McVerry, G., Rhoades, D., Stirling, M. 2014. "Seismic hazard modelling for the recovery of Christchurch", Earthquake Spectra, 30(1), 17-29. """additional_sigma=.35
[docs]classBradley2013bChchNorthAdditionalSigma(Bradley2013bChchNorth):""" Extend :class:`Bradley2013ChchNorth` to implement the 'additional epistemic uncertainty' version of the model in: Gerstenberger, M., McVerry, G., Rhoades, D., Stirling, M. 2014. "Seismic hazard modelling for the recovery of Christchurch", Earthquake Spectra, 30(1), 17-29. """additional_sigma=.35
[docs]classBradley2013AdditionalSigma(Bradley2013LHC):""" Extend :class:`Bradley2013LHC` to implement the 'additional epistemic uncertainty' version of the model in: Gerstenberger, M., McVerry, G., Rhoades, D., Stirling, M. 2014. "Seismic hazard modelling for the recovery of Christchurch", Earthquake Spectra, 30(1), 17-29. """additional_sigma=.35
[docs]classBradley2013bChchMaps(Bradley2013bChchCBD):""" Implements GMPE developed by Brendon Bradley for Christchurch subregions, and published as ""Systematic ground motion observations in the Canterbury earthquakes and region-specific nonergodic empirical ground motion modelling"" (2013), University of Canterbury Research Report 2013-03, Department of Civil Engineering, University of Canterbury, Christchurch, New Zealand. The original code by the author was not made available at the time of development of this code. For this reason, this implementation is untested. It appears from the model documentation that the CBD dL2L and dS2S are relative to a baseline Vs30 value of 250 m/s and a baseline Z1 value of 330 m, although this is unconfirmed. Only the CBD subregion dS2S term is implemented here, because of difficulties defining the boundaries of other subregions. Full details behind the choices here are detailed in: Van Houtte and Abbott (2019), "Implementation of the GNS Canterbury Seismic Hazard Model in the OpenQuake Engine", Lower Hutt (NZ): GNS Science. 38 p. (GNS Science report; 2019/11). doi:10.21420/1AEM-PZ85. """#: Required site parameters are Vs30 (eq. 13b), Vs30 measured flag (eq. 20)#: and Z1.0 (eq. 13b), longitude and latitude.REQUIRES_SITES_PARAMETERS={'vs30','vs30measured','z1pt0','lon','lat'}#: This implementation is non-verified because the author of the model does#: not have code that can be made available.non_verified=True
[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=copy.copy(ctx)trt=self.DEFINED_FOR_TECTONIC_REGION_TYPEname=self.__class__.__name__# Check if the sites are located in the CBD polygonin_cbd=_check_in_cbd_polygon(ctx.lon,ctx.lat)# Fix CBD site terms before dS2S modification.ctx.vs30[in_cbd]=250ctx.z1pt0[in_cbd]=330form,imtinenumerate(imts):C=self.COEFFS[imt]imt_per=imt.period# intensity on a reference soil is used for both mean# and stddev calculations.ln_y_ref=_get_ln_y_ref(trt,ctx,C)# exp1 and exp2 are parts of eq. 7exp1=np.exp(C['phi3']*(ctx.vs30.clip(-np.inf,1130)-360))exp2=np.exp(C['phi3']*(1130-360))# v1 is the period dependent site term. The Vs30 above which, the# amplification is constantv1=_get_v1(imt)# Get log-mean from regular unadjusted modelb13_mean=_get_mean(ctx,C,ln_y_ref,exp1,exp2,v1)# Adjust mean and standard deviationmean[m]=_adjust_mean_model(self.region,ctx.in_cshm,in_cbd,imt_per,b13_mean)mean[m]+=convert_to_LHC(imt)set_adjusted_stddevs(name,self.additional_sigma,ctx,C,ln_y_ref,exp1,exp2,ctx.in_cshm,in_cbd,imt_per,sig[m],tau[m],phi[m])
[docs]classBradley2013bChchMapsAdditionalSigma(Bradley2013bChchMaps):""" Extend :class:`Bradley2013ChchNorth` to implement the 'additional epistemic uncertainty' version of the model in: Gerstenberger, M., McVerry, G., Rhoades, D., Stirling, M. 2014. "Seismic hazard modelling for the recovery of Christchurch", Earthquake Spectra, 30(1), 17-29. """additional_sigma=.35