shakelib.gmpe.nga_east¶
Module to simplify importing the OQ implementation of the NGA-East GMPE suite.
- class shakelib.gmpe.nga_east.NGAEast[source]¶
Bases:
GMPE
Returns NGA East GMPE that combines all of the individual NGAEastUSGSGMPE GMPEs.
- DEFINED_FOR_TECTONIC_REGION_TYPE = 'Stable Shallow Crust'¶
Reference to a
tectonic region type
this GSIM is defined for. One GSIM can implement only one tectonic region type.
- DEFINED_FOR_INTENSITY_MEASURE_COMPONENT = 'Average Horizontal (RotD50)'¶
intensity measure component type <openquake.hazardlib.const.IMC> this GSIM can calculate mean and standard deviation for.
- Type:
Reference to a
- Type:
class
- DEFINED_FOR_INTENSITY_MEASURE_TYPES = frozenset({<function SA>, <function PGA>, <function PGV>})¶
Set of
intensity measure types
this GSIM can calculate. A set should contain classes from moduleopenquake.hazardlib.imt
.
- DEFINED_FOR_STANDARD_DEVIATION_TYPES = frozenset({'Inter event', 'Intra event', 'Total'})¶
Set of
standard deviation types
this GSIM can calculate.
- REQUIRES_SITES_PARAMETERS = frozenset({'vs30'})¶
Set of site parameters names this GSIM needs. The set should include strings that match names of the attributes of a
site
object. Those attributes are then available in theSitesContext
object with the same names.
- REQUIRES_RUPTURE_PARAMETERS = frozenset({'mag'})¶
Set of rupture parameters (excluding distance information) required by GSIM. Supported parameters are:
mag
Magnitude of the rupture.
dip
Rupture’s surface dip angle in decimal degrees.
rake
Angle describing the slip propagation on the rupture surface, in decimal degrees. See
nodalplane
for more detailed description of dip and rake.ztor
Depth of rupture’s top edge in km. See
get_top_edge_depth()
.
These parameters are available from the
RuptureContext
object attributes with same names.
- REQUIRES_DISTANCES = frozenset({'rrup'})¶
Set of types of distance measures between rupture and sites. Possible values are:
rrup
Closest distance to rupture surface. See
get_min_distance()
.rjb
Distance to rupture’s surface projection. See
get_joyner_boore_distance()
.rx
Perpendicular distance to rupture top edge projection. See
get_rx_distance()
.ry0
Horizontal distance off the end of the rupture measured parallel to strike. See
get_ry0_distance()
.rcdpp
Direct point parameter for directivity effect centered on the site- and earthquake-specific average DPP used. See
get_dppvalue()
.rvolc
Source to site distance passing through surface projection of volcanic zone.
All the distances are available from the
DistancesContext
object attributes with same names. Values are in kilometers.
- TABLE_PATHS = ['nga_east_SP15.hdf5', 'nga_east_PEER_GP.hdf5', 'nga_east_1CCSP.hdf5', 'nga_east_Graizer.hdf5', 'nga_east_usgs_11.hdf5', 'nga_east_usgs_10.hdf5', 'nga_east_usgs_1.hdf5', 'nga_east_2CVSP.hdf5', 'nga_east_usgs_6.hdf5', 'nga_east_usgs_17.hdf5', 'nga_east_B_ab95.hdf5', 'nga_east_usgs_16.hdf5', 'nga_east_usgs_7.hdf5', 'nga_east_B_sgd02.hdf5', 'nga_east_HA15.hdf5', 'nga_east_usgs_15.hdf5', 'nga_east_usgs_4.hdf5', 'nga_east_PEER_EX.hdf5', 'nga_east_1CVSP.hdf5', 'nga_east_usgs_8.hdf5', 'nga_east_Graizer16.hdf5', 'nga_east_B_a04.hdf5', 'nga_east_B_bs11.hdf5', 'nga_east_2CCSP.hdf5', 'nga_east_Frankel.hdf5', 'nga_east_Graizer17.hdf5', 'nga_east_B_ab14.hdf5', 'nga_east_usgs_9.hdf5', 'nga_east_YA15.hdf5', 'nga_east_usgs_5.hdf5', 'nga_east_usgs_14.hdf5', 'nga_east_usgs_13.hdf5', 'nga_east_usgs_2.hdf5', 'nga_east_B_bca10d.hdf5', 'nga_east_usgs_3.hdf5', 'nga_east_usgs_12.hdf5', 'nga_east_PZCT15_M1SS.hdf5', 'nga_east_PZCT15_M2ES.hdf5']¶
- NGA_EAST_USGS_WEIGHT = 0.667¶
- NGA_EAST_SEED_WEIGHT = 0.333¶
- SIGMA_MODS = ['EPRI', 'PANEL']¶
- SIGMA_WEIGHTS = [0.8, 0.2]¶
- SMALL_M_SLOPE = array([[0.80820245, 0.84387544, 0.89844428, 0.97692668, 1.07516402, 1.32874342, 1.76167362, 2.01346601, 2.15423367, 2.21238314, 2.20295268, 2.22050691, 2.25191013], [0.95653274, 0.96790235, 1.01108721, 1.08816951, 1.18763225, 1.45419079, 1.89868371, 2.15750901, 2.30441411, 2.36816657, 2.35806514, 2.37550121, 2.40780173], [1.10483754, 1.09190415, 1.12371596, 1.19940068, 1.30008723, 1.57962285, 2.03566379, 2.30153038, 2.45458767, 2.52394609, 2.51317545, 2.53049495, 2.56369318], [1.17850132, 1.14838487, 1.17263774, 1.24934993, 1.35169092, 1.6405928 , 2.10355963, 2.37606129, 2.53182287, 2.60649676, 2.59852364, 2.61558555, 2.64930242], [1.22108056, 1.17559486, 1.19344886, 1.27258554, 1.37699699, 1.67441897, 2.14266533, 2.42233453, 2.57926238, 2.65969661, 2.65667064, 2.67337173, 2.70746585], [1.35381786, 1.30459178, 1.32561149, 1.39975683, 1.49046903, 1.77119077, 2.23846121, 2.50918908, 2.65691821, 2.7352025 , 2.73448546, 2.74830612, 2.78569139], [1.48275105, 1.43730912, 1.45516233, 1.515912 , 1.59957524, 1.8715428 , 2.32487117, 2.5977188 , 2.74732913, 2.833214 , 2.84039745, 2.85351663, 2.89294948], [1.55986901, 1.5181802 , 1.52283178, 1.58399155, 1.66520129, 1.92906402, 2.37682591, 2.63795165, 2.79310909, 2.87518285, 2.88725563, 2.91311963, 2.95069222], [1.61234683, 1.57297469, 1.55919177, 1.6125088 , 1.6905367 , 1.95549838, 2.40173746, 2.66968838, 2.81643712, 2.90021973, 2.92540353, 2.94753911, 2.99329066], [1.72966549, 1.68953027, 1.65238375, 1.68511319, 1.74919737, 2.00291473, 2.4502969 , 2.71127476, 2.86219468, 2.97174922, 2.99457045, 3.02700357, 3.0746081 ], [1.89019575, 1.85613426, 1.79916207, 1.79582838, 1.83235122, 2.06567938, 2.49925169, 2.77060683, 2.93523037, 3.05210926, 3.09544244, 3.13961075, 3.19891543], [2.01825192, 2.00848248, 1.96359258, 1.93374392, 1.93342618, 2.1191825 , 2.55160199, 2.81384538, 2.97594782, 3.10423528, 3.1644255 , 3.2232813 , 3.29628048], [2.21072527, 2.21013135, 2.19208808, 2.14288765, 2.09865699, 2.20116805, 2.58612428, 2.84958383, 3.01185276, 3.15571334, 3.24204249, 3.31516207, 3.40858634], [2.35867722, 2.36282466, 2.35886196, 2.31589422, 2.23061991, 2.27654106, 2.62952911, 2.88216365, 3.0457857 , 3.19927514, 3.3078434 , 3.40342774, 3.51632704]])¶
- SMALL_M_SLOPE_PGA = array([0.85797944, 1.00138125, 1.14476104, 1.21349233, 1.25057542, 1.38536656, 1.5187841 , 1.59530119, 1.6451895 , 1.74896685, 1.90817415, 2.0352719 , 2.22078201, 2.36479805])¶
- SMALL_M_SLOPE_PGV = array([1.40175894, 1.56051571, 1.71940479, 1.78302932, 1.80362654, 1.92810638, 2.06796069, 2.15100395, 2.20592499, 2.34320509, 2.52009112, 2.67485147, 2.83826841, 3.00557819])¶
- SMALL_M_DIST = array([1.0e+00, 2.0e+00, 4.0e+00, 6.5e+00, 1.0e+01, 2.0e+01, 4.0e+01, 6.5e+01, 1.0e+02, 2.0e+02, 4.0e+02, 6.5e+02, 1.0e+03, 1.4e+03])¶
- SMALL_M_PER = array([ 0.01 , 0.02 , 0.04 , 0.065, 0.1 , 0.2 , 0.4 , 0.65 , 1. , 2. , 4. , 6.5 , 10. ])¶
- get_mean_and_stddevs(sites, rx, dists, imt, stddev_types)[source]¶
Calculate and return mean value of intensity distribution and it’s standard deviation.
Method must be implemented by subclasses.
- Parameters:
sites – Instance of
openquake.hazardlib.site.SiteCollection
with parameters of sites collection assigned to respective values as numpy arrays. Only those attributes that are listed in class’REQUIRES_SITES_PARAMETERS
set are available.rup – Instance of
openquake.hazardlib.source.rupture.BaseRupture
with parameters of a rupture assigned to respective values. Only those attributes that are listed in class’REQUIRES_RUPTURE_PARAMETERS
set are available.dists – Instance of
DistancesContext
with values of distance measures between the rupture and each site of the collection assigned to respective values as numpy arrays. Only those attributes that are listed in class’REQUIRES_DISTANCES
set are available.imt – An instance (not a class) of intensity measure type. See
openquake.hazardlib.imt
.stddev_types – List of standard deviation types, constants from
openquake.hazardlib.const.StdDev
. Method result value should include standard deviation values for each of types in this list.
- Returns:
Method should return a tuple of two items. First item should be a numpy array of floats – mean values of respective component of a chosen intensity measure type, and the second should be a list of numpy arrays of standard deviation values for the same single component of the same single intensity measure type, one array for each type in
stddev_types
parameter, preserving the order.
Combining interface to mean and standard deviation values in a single method allows to avoid redoing the same intermediate calculations if there are some shared between stddev and mean formulae without resorting to keeping any sort of internal state (and effectively making GSIM not reenterable).
However it is advised to split calculation of mean and stddev values and make
get_mean_and_stddevs()
just combine both (and possibly compute interim steps).