From 38274bff5beb88d2e84d2d25949634d1aa37788b Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 16 Nov 2024 09:36:42 +0100 Subject: [PATCH] some edits --- openquake/hazardlib/gsim/kuehn_2020.py | 11 ++++++++--- .../hazardlib/gsim/mgmpe/m9_basin_term.py | 3 ++- openquake/hazardlib/gsim/parker_2020.py | 19 ++++++++++++------- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/openquake/hazardlib/gsim/kuehn_2020.py b/openquake/hazardlib/gsim/kuehn_2020.py index 2ecf61a4598..cd8989d58b3 100644 --- a/openquake/hazardlib/gsim/kuehn_2020.py +++ b/openquake/hazardlib/gsim/kuehn_2020.py @@ -472,10 +472,15 @@ def get_mean_values(C, region, imt, trt, m_b, ctx, a1100=None, else: usgs_baf = 1.0 - if m9_basin_term: + # For KuehnEtAl2020 in US 2023 either the M9 basin term OR the GMM's + # basin term is applied (i.e. it is not additive to GMM basin term here + # as can be seen in the code - line 457 to 499 of KuehnEtAl_2020.java) + if m9_basin_term and imt != PGV: + # Apply + np.log(2.0) for long period motions at deep basin sites mean = _apply_m9_basin_term(ctx, imt, mean, usgs_baf) - - mean += get_basin_term(C, ctx, region) * usgs_baf + else: + # Use the GMM's own basin term + mean += get_basin_term(C, ctx, region) * usgs_baf return mean diff --git a/openquake/hazardlib/gsim/mgmpe/m9_basin_term.py b/openquake/hazardlib/gsim/mgmpe/m9_basin_term.py index 0f1fbfe9f44..2d10ac00879 100644 --- a/openquake/hazardlib/gsim/mgmpe/m9_basin_term.py +++ b/openquake/hazardlib/gsim/mgmpe/m9_basin_term.py @@ -36,7 +36,8 @@ def _apply_m9_basin_term(ctx, imt, mean, usgs_baf=1.0): class M9BasinTerm(GMPE): """ Implements a modified GMPE class that can be used to implement the "M9" - US 2023 NSHM basin amplification adjustment. + US 2023 NSHM basin amplification adjustment (an additive factor for long + period ground-motions in the Seattle Basin region). This implementation is based on the description of the M9 adjustment within the Moschetti et al. (2024) EQ Spectra article on the conterminous diff --git a/openquake/hazardlib/gsim/parker_2020.py b/openquake/hazardlib/gsim/parker_2020.py index e4ecfa526cf..3313dadd920 100644 --- a/openquake/hazardlib/gsim/parker_2020.py +++ b/openquake/hazardlib/gsim/parker_2020.py @@ -46,7 +46,7 @@ def _get_adjusted_m9_basin_term(C, z2pt5): """ - Return the adjusted version of the m9 basin term as detailed within the + Return the adjusted version of the M9 basin term as detailed within the USGS NSHM java code for the Abrahamson and Gulerce 2020 subduction GMM. """ delta_z2pt5_adj = np.log(z2pt5 * 1000.) - np.log(1179.) @@ -59,6 +59,7 @@ def _get_adjusted_m9_basin_term(C, z2pt5): fb_adj[fb_adj == 0.] = C['C_e3'] * delta_z2pt5_adj return np.log(2.0) - fb_adj + def _get_sigma_mu_adjustment(sat_region, trt, imt, epi_adjs_table): """ Get the sigma_mu_adjustment (epistemic uncertainty) factor to be applied @@ -463,7 +464,7 @@ def compute(self, ctx: np.recarray, imts, mean, sig, tau, phi): C, C_PGA, ctx.mag, ctx.rrup, m_b) fd = _depth_scaling(trt, C, ctx) fd_pga = _depth_scaling(trt, C_PGA, ctx) - fb = _get_basin_term(C, ctx, self.region, self.basin) * usgs_baf + fb = _get_basin_term(C, ctx, self.region, self.basin) flin = _linear_amplification(self.region, C, ctx.vs30) fnl = _non_linear_term(C, imt, ctx.vs30, fp_pga, fm_pga, c0_pga, fd_pga) @@ -471,11 +472,15 @@ def compute(self, ctx: np.recarray, imts, mean, sig, tau, phi): # The output is the desired median model prediction in LN units # Take the exponential to get PGA, PSA in g or the PGV in cm/s pre_baf_mean = fp + fnl + flin + fm + c0 + fd - if self.m9_basin_term: - m9_adj = _get_adjusted_m9_basin_term(C, ctx.z2pt5) - mean[m] = pre_baf_mean + m9_adj - else: - mean[m] = pre_baf_mean + fb + + # Get the m9 basin adjustment if long period SA for deep basin sites + if self.m9_basin_term and imt != PGV: + if imt.period >= 1.9: + m9_adj = _get_adjusted_m9_basin_term(C, ctx.z2pt5) + fb[ctx.z2pt5 >= 6.0] += m9_adj[ctx.z2pt5 >= 6.0] + + # Now get the mean with basin term added + mean[m] = pre_baf_mean + (fb * usgs_baf) if self.sigma_mu_epsilon and imt != PGV: # Assume don't apply to PGV # Apply epistemic uncertainty scaling