-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnga_east_amplification_2020.py
251 lines (212 loc) · 10.8 KB
/
nga_east_amplification_2020.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
from numpy import log, exp
'''
Implements linear site amplification model for eastern US sites using:
Stewart, J. P., G. A. Parker, G. M. Atkinson, D. M. Boore,
Y. M. A. Hashash, and W. J. Silva (2020). Ergodic site amplification
model for central and eastern North America, Earthq. Spectra,
doi: 10.1177/8755293019878185.
And non-linear amplification for eastern US sites using:
Hashash, Y. M., O. Ilhan, J. A. Harmon, G. A. Parker, J. P. Stewart,
E. M. Rathje, K. W. Campbell, and W. J. Silva (2020). Nonlinear site
amplification model for ergodic seismic hazard analysis in Central and
Eastern North America, Earthq. Spectra, doi: 10.1177/8755293019878193.
Inputs require:
imt = intensity measure type, PGA (0.0), PGV (-1.0) or SA period
vs30 = time-averaged shear-wave velocity in the upper 30 m
ln_pga_ref3k = natural log of reference PGA on rock (vs30 = 3000 m/s)
'''
def get_lin_coeffs(T):
from openquake.hazardlib.gsim.base import CoeffsTable
from openquake.hazardlib import imt
'''
Coefficients copied from:
https://journals.sagepub.com/doi/suppl/10.1177/8755293019878185
'''
LIN_COEFFS = CoeffsTable(sa_damping=5, table="""\
imt c vref v1 v2 vf vl vu svc s su f760imp f760gr s760imp s760gr
PGV -0.449 760 331 760 314 200 2000 0.251 0.306 0.334 0.3753 0.297 0.313 0.117
PGA -0.290 760 319 760 345 200 2000 0.300 0.345 0.480 0.185 0.121 0.434 0.248
0.001 -0.290 760 319 760 345 200 2000 0.300 0.345 0.480 0.185 0.121 0.434 0.248
0.01 -0.290 760 319 760 345 200 2000 0.300 0.345 0.480 0.185 0.121 0.434 0.248
0.02 -0.303 760 319 760 343 200 2000 0.290 0.336 0.479 0.185 0.031 0.434 0.270
0.03 -0.315 760 319 810 342 200 2000 0.282 0.327 0.478 0.224 0.000 0.404 0.229
0.04 -0.331 760 319 900 340 200 2000 0.275 0.317 0.477 0.283 0.012 0.390 0.139
0.05 -0.344 760 319 1010 338 200 2000 0.271 0.308 0.476 0.337 0.062 0.363 0.093
0.075 -0.348 760 319 1380 334 200 2000 0.269 0.285 0.473 0.475 0.211 0.322 0.102
0.08 -0.358 760 318.38 1450 333 200 2000 0.268 0.281 0.472 0.512 0.237 0.335 0.103
0.1 -0.372 760 317.13 1900 319 200 2000 0.270 0.263 0.470 0.674 0.338 0.366 0.088
0.11 -0.37410 760 315.27 2000 318.41 200 2000 0.26959 0.26794 0.46303 0.72998 0.377 0.352 0.076
0.112 -0.37456 760 314.78 2000 318.30 200 2000 0.26933 0.26887 0.46106 0.74137 0.384 0.348 0.075
0.113 -0.37479 760 314.52 2000 318.25 200 2000 0.26918 0.26933 0.46002 0.74742 0.388 0.345 0.075
0.114 -0.37503 760 314.25 2000 318.19 200 2000 0.26903 0.26979 0.45894 0.75300 0.391 0.343 0.075
0.115 -0.37526 760 313.98 2000 318.14 200 2000 0.26886 0.27024 0.45782 0.75759 0.394 0.340 0.074
0.116 -0.37549 760 313.70 2000 318.08 200 2000 0.26868 0.27069 0.45666 0.76065 0.397 0.338 0.073
0.117 -0.37573 760 313.41 2000 318.03 200 2000 0.26850 0.27113 0.45547 0.76178 0.400 0.335 0.072
0.118 -0.37597 760 313.12 2000 317.98 200 2000 0.26831 0.27157 0.45425 0.76110 0.403 0.333 0.072
0.119 -0.37621 760 312.82 2000 317.93 200 2000 0.26811 0.27201 0.45300 0.75894 0.406 0.330 0.071
0.12 -0.37645 760 312.51 2000 317.88 200 2000 0.26791 0.27244 0.45171 0.75562 0.409 0.327 0.071
0.125 -0.37768 760 310.90 2000 317.62 200 2000 0.26682 0.27456 0.44483 0.73234 0.422 0.313 0.070
0.13 -0.37898 760 309.19 2000 317.38 200 2000 0.26565 0.27659 0.43729 0.71641 0.434 0.299 0.070
0.135 -0.38036 760 307.38 1800 317.15 200 2000 0.26445 0.27854 0.42916 0.66870 0.444 0.286 0.071
0.14 -0.38182 760 305.51 1775 316.93 200 2000 0.26325 0.28043 0.42053 0.66026 0.454 0.273 0.070
0.15 -0.385 760 301.63 1500 316.5 200 2000 0.261 0.284 0.402 0.586 0.470 0.253 0.066
0.2 -0.403 760 279.00 1072.91 314 200 2000 0.251 0.306 0.334 0.419 0.509 0.214 0.053
0.25 -0.417 760 249.88 944.81 282 200 2000 0.238 0.291 0.357 0.332 0.509 0.177 0.052
0.3 -0.426 760 224.50 867.45 250 200 2000 0.225 0.276 0.381 0.27 0.498 0.131 0.055
0.4 -0.452 760 216.50 842.72 250 200 2000 0.225 0.275 0.381 0.209 0.473 0.112 0.060
0.5 -0.480 760 216.88 822.12 280 200 2000 0.225 0.311 0.323 0.175 0.447 0.105 0.067
0.75 -0.510 760 226.88 814.21 280 200 2000 0.225 0.330 0.310 0.127 0.386 0.138 0.077
0.8 -0.523 760 235.00 810 280 200 2000 0.225 0.334 0.308 0.12 0.378 0.133 0.077
1 -0.557 760 254.75 790 300 200 2000 0.225 0.377 0.361 0.095 0.344 0.124 0.078
1.5 -0.574 760 275.50 805 300 200 2000 0.242 0.405 0.375 0.083 0.289 0.112 0.081
2 -0.584 760 296.00 810 300 200 2000 0.259 0.413 0.388 0.079 0.258 0.118 0.088
3 -0.588 760 311.50 819.94 313 200 2000 0.306 0.410 0.551 0.073 0.233 0.111 0.100
4 -0.579 760 321.25 821.33 322 200 2000 0.340 0.405 0.585 0.066 0.224 0.120 0.109
5 -0.558 760 324.25 825 325 200 2000 0.340 0.409 0.587 0.064 0.220 0.108 0.115
7.5 -0.544 760 325.00 819.76 328 200 2000 0.345 0.420 0.594 0.056 0.216 0.082 0.130
10 -0.507 760 325.00 820 330 200 2000 0.350 0.440 0.600 0.053 0.218 0.069 0.137
""")
if T == 0.0:
ct = LIN_COEFFS[imt.PGA()]
elif T == -1.0:
ct = LIN_COEFFS[imt.PGV()]
else:
ct = LIN_COEFFS[imt.SA(damping=5, period=T)]
return ct
def get_nonlin_coeffs(T):
from openquake.hazardlib.gsim.base import CoeffsTable
from openquake.hazardlib import imt
'''
Coefficients copied from Table 1 in:
Hashash, Y. M., O. Ilhan, J. A. Harmon, G. A. Parker, J. P. Stewart, E. M. Rathje, K. W. Campbell,
and W. J. Silva (2020). Nonlinear site amplification model for ergodic seismic hazard analysis in
Central and Eastern North America, Earthq. Spectra, doi: 10.1177/8755293019878193.
'''
NONLIN_COEFFS = CoeffsTable(sa_damping=5, table="""\
imt f3 f4 f5 vc sc
PGV 0.06089 -0.08344 -0.00667 2260 0.12
PGA 0.089417 -0.44895 -0.00175 2990 0.12
0.001 0.075204 -0.43755 -0.00131 2990 0.12
0.01 0.075204 -0.43755 -0.00131 2990 0.12
0.02 0.056603 -0.41511 -0.00098 2990 0.12
0.03 0.103599 -0.49871 -0.00127 2990 0.12
0.04 0.118356 -0.48734 -0.00169 2990 0.12
0.05 0.16781 -0.58073 -0.00187 2990 0.12
0.075 0.173858 -0.53646 -0.00259 2990 0.12
0.08 0.162486 -0.50667 -0.00273 2990 0.12
0.1 0.150834 -0.44661 -0.00335 2990 0.12
0.11 0.14360 -0.42607 -0.00359 2990 0.12
0.112 0.14122 -0.41883 -0.00364 2990 0.12
0.113 0.14004 -0.41525 -0.00367 2990 0.12
0.114 0.13887 -0.41171 -0.00369 2990 0.12
0.115 0.13772 -0.40820 -0.00372 2990 0.12
0.116 0.13657 -0.40472 -0.00374 2990 0.12
0.117 0.13543 -0.40126 -0.00377 2990 0.12
0.118 0.13431 -0.39784 -0.00379 2990 0.12
0.119 0.13319 -0.39445 -0.00382 2990 0.12
0.12 0.132082 -0.39108 -0.00384 2990 0.12
0.125 0.131419 -0.38483 -0.00387 2990 0.12
0.13 0.130782 -0.37882 -0.0039 2990 0.12
0.135 0.13309 -0.37777 -0.00392 2990 0.12
0.14 0.135578 -0.37864 -0.00396 2990 0.12
0.15 0.142721 -0.38264 -0.0041 2335.376 0.12
0.2 0.128154 -0.30481 -0.00488 1532.801 0.12
0.25 0.132857 -0.27506 -0.00564 1317.97 0.135
0.3 0.130701 -0.22825 -0.00655 1151.791 0.15
0.4 0.094143 -0.11591 -0.00872 1018.069 0.15
0.5 0.09888 -0.07793 -0.01028 938.516 0.15
0.75 0.061011 -0.0178 -0.01456 834.7709 0.125
0.8 0.073572 -0.01592 -0.01515 832.4085 0.1
1 0.043672 -0.00478 -0.01823 950.9678 0.06
1.5 0.004796 -0.00086 -0.02 882.2115 0.05
2 0.00164 -0.00236 -0.01296 878.8883 0.04
3 0.007458 -0.00626 -0.01043 894.3879 0.04
4 0.002694 -0.00331 -0.01215 874.8681 0.03
5 0.002417 -0.00256 -0.01325 856.1077 0.02
7.5 0.042192 -0.00536 -0.01418 831.6034 0.02
10 0.053289 -0.00631 -0.01403 837.0494 0.02
""")
if T == 0.0:
ct = NONLIN_COEFFS[imt.PGA()]
elif T == -1.0:
ct = NONLIN_COEFFS[imt.PGV()]
else:
ct = NONLIN_COEFFS[imt.SA(damping=5, period=T)]
return ct
###############################################################################
# start main
###############################################################################
def nga_east_siteamp(vs30, imt, ln_pga_ref3k, impedance=False):
# set constants
vl = 200.
vu = 2000.
vref = 760.
vref3k = 3000.
w1 = 0.9
w2 = 0.1
vw1 = 600.
vw2 = 400.
pga_ref3k = exp(ln_pga_ref3k)
'''
# testing params
imt = .1
vs30 = 760.
#
pga_ref3k = 0.001 # in g
'''
# get coeffs for imt
LC = get_lin_coeffs(imt) # linear coeffs
NLC = get_nonlin_coeffs(imt) # non-linear coeffs
###############################################################################
# get f760 - adjusts 3000 -> 760 m/s
###############################################################################
# get weights for impedance/gradient models
if impedance == True:
if vs30 >= vw1:
wimp = w1
elif vs30 >= vw2 and vs30 < vw1:
wimp = (w1 - w2) * (log(vs30 / vw2) / log(vw1 / vw2))
elif vs30 < vw2:
wimp = w2
wgr = 1. - wimp
else:
wimp = 0.
wgr = 1.
f760 = wimp * LC['f760imp'] + wgr * LC['f760gr']
###############################################################################
# get fv
###############################################################################
# set min vs30 to 200
if vs30 < vl:
vs30 = vl
if vs30 >= vl and vs30 <= LC['v1']:
fv = LC['c'] * log(LC['v1'] / vref)
elif vs30 > LC['v1'] and vs30 <= LC['v2']:
fv = LC['c'] * log(vs30 / vref)
elif vs30 > LC['v2'] and vs30 <= vu:
fv = LC['c'] * log(LC['v2'] / vref)
elif vs30 > vu:
fv = LC['c'] * log(LC['v2'] / vref) \
- (LC['c'] * log(LC['v2'] / vref) + f760) \
* (log(vs30 / vu) / log(3000. / vu))
###############################################################################
# start getting non-linear terms
###############################################################################
f2 = NLC['f4'] * (exp(NLC['f5'] * (min([vs30, vref]) - 360.)) - exp(NLC['f5'] * (vref - 360.)))
#C760_3000 = 2.275
if vs30 < NLC['vc']:
fnl = f2 * log((pga_ref3k + NLC['f3']) / NLC['f3'])
else:
fnl = 0.
###############################################################################
# get total amplification (fs)
###############################################################################
flin = fv + f760
fs = flin + fnl
'''
print(fs)
print(exp(fs))
print(exp(fnl))
print(fv, f760)
'''
return exp(fs), exp(f760)