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: openquake.hazardlib.gsim.base.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 PGA>, <function PGV>, <function SA>})

Set of intensity measure types this GSIM can calculate. A set should contain classes from module openquake.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 the SitesContext 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']
this_module = '/Users/cbworden/Unix/python/shakemap/shakelib/gmpe'
NGA_BASE_PATH = '/Users/cbworden/Unix/python/shakemap/shakelib/gmpe/../../shakemap/data/nga_east_tables'
NGA_EAST_USGS_WEIGHT = 0.667
NGA_EAST_SEED_WEIGHT = 0.333
NGA_EAST_USGS = model\imt  SA10P0   SA7P5   SA5P0  ...  SA0P02  SA0P01     PGA     PGV 0           1  0.0955  0.0941  0.1030  ...  0.0949  0.0935  0.1009  0.0976 1           2  0.0833  0.0930  0.0846  ...  0.1176  0.1462  0.1606  0.0678 2           3  0.0837  0.0790  0.0914  ...  0.0985  0.1230  0.1151  0.0738 3           4  0.0904  0.0787  0.1071  ...  0.0704  0.0981  0.0970  0.0756 4           5  0.0666  0.0617  0.0638  ...  0.0407  0.0472  0.0548  0.0702 5           6  0.0914  0.0898  0.0658  ...  0.0666  0.0330  0.0376  0.0916 6           7  0.0969  0.0993  0.0828  ...  0.0643  0.0522  0.0507  0.0980 7           8  0.0778  0.0822  0.0873  ...  0.0984  0.0629  0.0497  0.1054 8           9  0.0924  0.0991  0.1056  ...  0.1064  0.1092  0.0986  0.0956 9          10  0.0204  0.0111  0.0047  ...  0.0246  0.0372  0.0372  0.0108 10         11  0.0086  0.0072  0.0075  ...  0.0147  0.0123  0.0100  0.0197 11         12  0.0233  0.0224  0.0438  ...  0.0174  0.0271  0.0167  0.0274 12         13  0.0196  0.0181  0.0183  ...  0.0098  0.0076  0.0119  0.0117 13         14  0.0516  0.0562  0.0395  ...  0.0512  0.0368  0.0436  0.0257 14         15  0.0464  0.0514  0.0416  ...  0.0466  0.0418  0.0504  0.0365 15         16  0.0202  0.0267  0.0263  ...  0.0419  0.0266  0.0282  0.0567 16         17  0.0319  0.0300  0.0269  ...  0.0360  0.0453  0.0370  0.0359  [17 rows x 26 columns]
NGA_EAST_SEEDS = model          weight 0      B_bca10d        0.066330 1        B_ab95        0.022110 2        B_bs11        0.022110 3         2CCSP        0.055275 4         2CVSP        0.055275 5     Graizer16        0.054450 6     Graizer17        0.054450 7   PZCT15_M1SS        0.054450 8   PZCT15_M2ES        0.054450 9          SP15        0.108900 10         YA15        0.112200 11         HA15        0.112200 12      Frankel        0.112200 13      PEER_GP        0.115600
SIGMA_MODS = ['EPRI', 'PANEL']
SIGMA_WEIGHTS = [0.8, 0.2]
PATH = '/Users/cbworden/Unix/python/shakemap/shakelib/gmpe/nga_east_small_mag'
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.   ])
per_idx_start = 1
per_idx_end = -2
per_list_str = ['SA10P0', 'SA7P5', 'SA5P0', 'SA4P0', 'SA3P0', 'SA2P0', 'SA1P5', 'SA1P0', 'SA0P75', 'SA0P5', 'SA0P4', 'SA0P3', 'SA0P25', 'SA0P2', 'SA0P15', 'SA0P1', 'SA0P075', 'SA0P05', 'SA0P04', 'SA0P03', 'SA0P025', 'SA0P02', 'SA0P01']
per_array = array([10.   ,  7.5  ,  5.   ,  4.   ,  3.   ,  2.   ,  1.5  ,  1.   ,         0.75 ,  0.5  ,  0.4  ,  0.3  ,  0.25 ,  0.2  ,  0.15 ,  0.1  ,         0.075,  0.05 ,  0.04 ,  0.03 ,  0.025,  0.02 ,  0.01 ])
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).