Skip to content

Commit

Permalink
Merge pull request #459 from pmpowers-usgs/wong-site-effects
Browse files Browse the repository at this point in the history
Wong et al. (2015) update to Vs30 specific coefficients
  • Loading branch information
pmpowers-usgs authored Nov 16, 2020
2 parents 4b79f05 + 7a2554c commit 57b173a
Show file tree
Hide file tree
Showing 12 changed files with 361 additions and 93 deletions.
8 changes: 4 additions & 4 deletions src/gov/usgs/earthquake/nshmp/gmm/Gmm.java
Original file line number Diff line number Diff line change
Expand Up @@ -580,9 +580,9 @@ public enum Gmm {
WongEtAl_2015.CONSTRAINTS),

/** @see WongEtAl_2015 */
WONG_15_760(
WongEtAl_2015.Site760.class,
WongEtAl_2015.Site760.NAME,
WONG_15(
WongEtAl_2015.Site.class,
WongEtAl_2015.Site.NAME,
WongEtAl_2015.COEFFS_760,
WongEtAl_2015.CONSTRAINTS),

Expand Down Expand Up @@ -1296,7 +1296,7 @@ public enum Group {
"2020 Active Volcanic (HI)",
ImmutableList.of(
WONG_15_428,
WONG_15_760,
WONG_15,
ATKINSON_10,
ATKINSON_10_CALDERA,
ASK_14,
Expand Down
158 changes: 117 additions & 41 deletions src/gov/usgs/earthquake/nshmp/gmm/WongEtAl_2015.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@
import static java.lang.Math.exp;
import static java.lang.Math.log;

import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

import com.google.common.annotations.Beta;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import com.google.common.collect.Range;
import com.google.common.primitives.Ints;

import gov.usgs.earthquake.nshmp.data.Interpolator;
import gov.usgs.earthquake.nshmp.gmm.GmmInput.Constraints;

/**
Expand All @@ -39,13 +43,13 @@
* coefficients for 0.075 s. Spectral periods 4 s and 7.5 s are missing
* coefficients and are also interpolated using adjacent periods.
*
* <p><b>Implementation update:</b> (October, 2020) Wong et al. provided the
* USGS with new coefficients for VS30=760 m/s. These have been implemented as
* separate model; the original model is now referenced as
* {@link Gmm#WONG_15_428} and the updated version {@link Gmm#WONG_15_760}. In
* addition, following discussion with the model devlopers, {@code WONG_15_760}
* uses a fixed sigma of 0.8. The {@code WONG_15_760} model continues to use
* {@link BooreEtAl_2014} site effect scaling for Vs30 values other than 760.
* <p><b>Implementation update:</b> (November, 2020) Wong et al. provided the
* USGS with new Vs30-specific coefficients for values of 150, 185, 260, 365,
* 428 ,530, 760, 1080, and 1500 m/s. These have been implemented as the primary
* model for use in the 2021 Hawaii NSHM update and is referenced as
* {@link Gmm#WONG_15}. The original model is now referenced as
* {@link Gmm#WONG_15_428}. In addition, following discussion with the model
* devlopers, {@code WONG_15} uses a fixed sigma of 0.8.
*
* <p><b>Note:</b> Direct instantiation of {@code GroundMotionModel}s is
* prohibited. Use {@link Gmm#instance(Imt)} to retrieve an instance for a
Expand All @@ -61,8 +65,8 @@
* <p><b>Component:</b> average horizontal
*
* @author Peter Powers
* @see Gmm#WONG_15
* @see Gmm#WONG_15_428
* @see Gmm#WONG_15_760
*/
@Beta
public abstract class WongEtAl_2015 implements GroundMotionModel {
Expand All @@ -86,39 +90,49 @@ public abstract class WongEtAl_2015 implements GroundMotionModel {
* Developer note: c6 @ 1.995Hz (0.5s) missing negative sign per email from
* Ivan on 07/23/2019.
*/
static final CoefficientContainer COEFFS_PUB = new CoefficientContainer("Wong15.csv");

static final CoefficientContainer COEFFS_150 = new CoefficientContainer("Wong15-150.csv");
static final CoefficientContainer COEFFS_185 = new CoefficientContainer("Wong15-185.csv");
static final CoefficientContainer COEFFS_260 = new CoefficientContainer("Wong15-260.csv");
static final CoefficientContainer COEFFS_365 = new CoefficientContainer("Wong15-365.csv");
static final CoefficientContainer COEFFS_428 = new CoefficientContainer("Wong15-428.csv");
static final CoefficientContainer COEFFS_530 = new CoefficientContainer("Wong15-530.csv");
static final CoefficientContainer COEFFS_760 = new CoefficientContainer("Wong15-760.csv");
static final CoefficientContainer COEFFS_1080 = new CoefficientContainer("Wong15-1080.csv");
static final CoefficientContainer COEFFS_1500 = new CoefficientContainer("Wong15-1500.csv");

private static final class Coefficients {
private static class Coefficients {

final Imt imt;
final double vRef;
final double c1, c2, c3, c4, c5, c6, σ;
final double c1, c2, c3, c4, c5, c6;

Coefficients(Imt imt, double vRef, CoefficientContainer cc) {
Coefficients(Imt imt, CoefficientContainer cc) {
this.imt = imt;
this.vRef = vRef;
Map<String, Double> coeffs = cc.get(imt);
c1 = coeffs.get("C1");
c2 = coeffs.get("C2");
c3 = coeffs.get("C3");
c4 = coeffs.get("C4");
c5 = coeffs.get("C5");
c6 = coeffs.get("C6");
σ = coeffs.get("sigma");
}
}

private final Coefficients coeffs;
private final BooreEtAl_2014 siteDelegate;
private static final class Coefficients428 extends Coefficients {

final double σ;

Coefficients428(Imt imt, CoefficientContainer cc) {
super(imt, cc);
σ = cc.get(imt).get("sigma");
}
}

private final boolean interpolated;
private final GroundMotionModel interpolatedGmm;

WongEtAl_2015(Coefficients coeffs, Gmm subtype) {
this.coeffs = coeffs;
Imt imt = coeffs.imt;
siteDelegate = (BooreEtAl_2014) Gmm.BSSA_14.instance(imt);
WongEtAl_2015(Imt imt, Gmm subtype) {
interpolated = INTERPOLATED_IMTS.containsKey(imt);
interpolatedGmm = interpolated
? new InterpolatedGmm(subtype, imt, INTERPOLATED_IMTS.get(imt))
Expand All @@ -127,45 +141,107 @@ private static final class Coefficients {

@Override
public final ScalarGroundMotion calc(final GmmInput in) {

if (interpolated) {
return interpolatedGmm.calc(in);
}

double μ = calcMean(coeffs, in);
double site = 0.0;
if (in.vs30 != coeffs.vRef) {
GmmInput inVsRef = GmmInput.builder().fromCopy(in)
.vs30(coeffs.vRef)
.build();
site = siteDelegate.calc(in).mean() - siteDelegate.calc(inVsRef).mean();
}

return DefaultScalarGroundMotion.create(
μ + site,
coeffs.σ);
return calcImplementation(in);
}

private static final double calcMean(final Coefficients c, final GmmInput in) {
abstract ScalarGroundMotion calcImplementation(GmmInput in);

private static double calcMean(final Coefficients c, final GmmInput in) {
double Mw = in.Mw;
return c.c1 + c.c2 * Mw +
(c.c4 + c.c5 * Mw) * log(in.rJB + exp(c.c3)) +
c.c6 * (Mw - 6.0) * (Mw - 6.0);
}

static final class Site428 extends WongEtAl_2015 {
static final String NAME = WongEtAl_2015.NAME + " : 428 m/s";
static final String NAME = WongEtAl_2015.NAME + " (BSSA site)";

private static final double VS30_REF = 428.0;
private final Coefficients428 coeffs;
private final BooreEtAl_2014 siteDelegate;

Site428(Imt imt) {
super(new Coefficients(imt, 428.0, COEFFS_428), Gmm.WONG_15_428);
super(imt, Gmm.WONG_15_428);
coeffs = new Coefficients428(imt, COEFFS_PUB);
siteDelegate = (BooreEtAl_2014) Gmm.BSSA_14.instance(imt);
}

@Override
ScalarGroundMotion calcImplementation(GmmInput in) {
double μ = calcMean(coeffs, in);
double site = 0.0;
if (in.vs30 != VS30_REF) {
GmmInput inVsRef = GmmInput.builder().fromCopy(in)
.vs30(VS30_REF)
.build();
site = siteDelegate.calc(in).mean() - siteDelegate.calc(inVsRef).mean();
}

return DefaultScalarGroundMotion.create(
μ + site,
coeffs.σ);
}
}

static final class Site760 extends WongEtAl_2015 {
static final String NAME = WongEtAl_2015.NAME + " : 760 m/s";
static final class Site extends WongEtAl_2015 {

private final Map<Integer, Coefficients> coeffsMap;
private final List<Integer> vsKeys;
private static final double SIGMA = 0.8;

Site(Imt imt) {
super(imt, Gmm.WONG_15);
coeffsMap = ImmutableMap.<Integer, Coefficients> builder()
.put(150, new Coefficients(imt, COEFFS_150))
.put(185, new Coefficients(imt, COEFFS_185))
.put(260, new Coefficients(imt, COEFFS_260))
.put(365, new Coefficients(imt, COEFFS_365))
.put(428, new Coefficients(imt, COEFFS_428))
.put(530, new Coefficients(imt, COEFFS_530))
.put(760, new Coefficients(imt, COEFFS_760))
.put(1080, new Coefficients(imt, COEFFS_1080))
.put(1500, new Coefficients(imt, COEFFS_1500))
.build();

vsKeys = coeffsMap.keySet().stream()
.sorted()
.collect(Collectors.toList());
}

@Override
ScalarGroundMotion calcImplementation(GmmInput in) {
/* clamp vs30 < 150 and vs30 > 1500 */
int vsKey = Ints.constrainToRange((int) in.vs30, 150, 1500);

if (coeffsMap.containsKey(vsKey)) {
double μ = calcMean(coeffsMap.get(vsKey), in);
return DefaultScalarGroundMotion.create(μ, SIGMA);
}

int vsLoIndex = vsLoIndex(vsKey);
int vsLo = vsKeys.get(vsLoIndex);
int vsHi = vsKeys.get(vsLoIndex + 1);

Coefficients coeffsLo = coeffsMap.get(vsLo);
Coefficients coeffsHi = coeffsMap.get(vsHi);

double μLo = calcMean(coeffsLo, in);
double μHi = calcMean(coeffsHi, in);
double μ = Interpolator.findX(μLo, vsLo, μHi, vsHi, in.vs30);

return DefaultScalarGroundMotion.create(μ, SIGMA);
}

Site760(Imt imt) {
super(new Coefficients(imt, 760.0, COEFFS_760), Gmm.WONG_15_760);
private int vsLoIndex(int vsKey) {
for (int i = 1; i < vsKeys.size(); i++) {
if (vsKey < vsKeys.get(i)) {
return i - 1;
}
}
return vsKeys.size() - 1;
}
}
}
24 changes: 24 additions & 0 deletions src/gov/usgs/earthquake/nshmp/gmm/coeffs/Wong15-1080.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
T, C1, C2, C3, C4, C5, C6
10.0, -9.94467, 2.03274, 5.4, -2.58611, 0.13184, -0.16348
7.5, 0, 0, 0, 0, 0, 0
5.0, -2.85757, 1.96038, 5.7, -3.15687, 0.10616, -0.24948
4.0, 0, 0, 0, 0, 0, 0
3.0, 9.50447, 1.37435, 6.0, -4.65042, 0.16201, -0.29654
2.0, 19.42515, 0.78887, 6.1, -5.88408, 0.22405, -0.31785
1.5, 27.22984, 0.39421, 6.2, -6.87085, 0.26668, -0.32407
1.0, 37.72668, -0.41228, 6.2, -8.24274, 0.36012, -0.31850
0.75, 44.39633, -0.89301, 6.2, -9.11520, 0.41483, -0.30422
0.5, 48.02106, -1.37182, 6.1, -9.61985, 0.47167, -0.27523
0.4, 53.04999, -1.76242, 6.1, -10.31090, 0.51995, -0.25320
0.3, 59.63075, -2.36002, 6.1, -11.25182, 0.60028, -0.22461
0.25, 58.88488, -2.54016, 6.0, -11.20858, 0.62655, -0.20009
0.2, 63.04949, -2.93622, 6.0, -11.82560, 0.68261, -0.18061
0.15, 69.46798, -3.57603, 6.0, -12.79463, 0.77593, -0.15330
0.10, 71.67037, -4.09398, 5.9, -13.25869, 0.86044, -0.12008
0.075, 0, 0, 0, 0, 0, 0
0.05, 63.57597, -4.17060, 5.6, -12.39880, 0.90097, -0.09330
0.03, 54.89888, -3.83474, 5.4, -11.25994, 0.86786, -0.09258
0.02, 49.10114, -3.52464, 5.3, -10.44304, 0.82905, -0.10110
0.01, 49.50914, -3.58029, 5.4, -10.45222, 0.83490, -0.11428
PGA, 49.01306, -3.53963, 5.4, -10.36996, 0.82790, -0.11490
PGV, 35.32381, -2.50490, 5.2, -8.04105, 0.76843, -0.14424
24 changes: 24 additions & 0 deletions src/gov/usgs/earthquake/nshmp/gmm/coeffs/Wong15-150.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
T, C1, C2, C3, C4, C5, C6
10.0, 4.37553, 0.77975, 5.8, -4.59986, 0.30767, -0.14658
7.5, 0, 0, 0, 0, 0, 0
5.0, 6.55163, 1.33405, 5.9, -4.46379, 0.19195, -0.22300
4.0, 0, 0, 0, 0, 0, 0
3.0, 11.38311, 1.68224, 6.0, -4.85417, 0.10946, -0.26454
2.0, 30.98126, 0.54258, 6.3, -7.39710, 0.25264, -0.30809
1.5, 49.92847, -1.04082, 6.5, -9.86362, 0.46506, -0.33988
1.0, 84.68634, -4.87454, 6.7, -14.29627, 0.96980, -0.37189
0.75, 119.73380, -8.69895, 6.9, -18.67737, 1.45506, -0.35283
0.5, 135.07390, -10.27271, 6.9, -20.71831, 1.65558, -0.32696
0.4, 153.20490, -12.41574, 6.9, -23.23709, 1.95012, -0.32053
0.3, 233.34520, -20.53758, 7.2, -33.22908, 2.97031, -0.28776
0.25, 301.79760, -27.35859, 7.4, -41.47969, 3.79423, -0.24674
0.2, 284.11340, -26.06946, 7.3, -39.59374, 3.66270, -0.21950
0.15, 223.87440, -21.03829, 7.0, -32.65327, 3.09331, -0.18668
0.10, 220.67960, -21.50187, 6.9, -32.60587, 3.19304, -0.13747
0.075, 0, 0, 0, 0, 0, 0
0.05, 138.46650, -13.70573, 6.4, -22.37661, 2.23038, -0.11380
0.03, 109.66910, -10.69246, 6.2, -18.53750, 1.82857, -0.13173
0.02, 104.03920, -9.92014, 6.2, -17.70504, 1.71552, -0.15300
0.01, 101.61770, -9.58564, 6.2, -17.34384, 1.66611, -0.16184
PGA, 101.44280, -9.55060, 6.2, -17.31475, 1.66075, -0.16232
PGV, 52.29073, -3.78249, 5.7, -10.07493, 0.90801, -0.18440
24 changes: 24 additions & 0 deletions src/gov/usgs/earthquake/nshmp/gmm/coeffs/Wong15-1500.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
T, C1, C2, C3, C4, C5, C6
10.0, -10.49826, 2.09582, 5.4, -2.51426, 0.12288, -0.16307
7.5, 0, 0, 0, 0, 0, 0
5.0, -3.07494, 1.97375, 5.7, -3.14119, 0.10461, -0.24902
4.0, 0, 0, 0, 0, 0, 0
3.0, 9.83182, 1.28979, 6.0, -4.73407, 0.17553, -0.29387
2.0, 19.75484, 0.70839, 6.1, -5.96460, 0.23664, -0.31617
1.5, 27.73978, 0.29543, 6.2, -6.97664, 0.28134, -0.32269
1.0, 37.47560, -0.37858, 6.2, -8.21498, 0.35451, -0.31819
0.75, 44.11293, -0.87037, 6.2, -9.08773, 0.41153, -0.30435
0.5, 47.47013, -1.27662, 6.1, -9.53965, 0.45639, -0.27493
0.4, 53.04236, -1.78513, 6.1, -10.32908, 0.52354, -0.25306
0.3, 59.67915, -2.38283, 6.1, -11.27705, 0.60363, -0.22401
0.25, 58.74831, -2.51538, 6.0, -11.19996, 0.62220, -0.19957
0.2, 63.04345, -2.93681, 6.0, -11.83945, 0.68231, -0.18005
0.15, 69.59005, -3.60960, 6.0, -12.83070, 0.78093, -0.15297
0.10, 72.01244, -4.18625, 5.9, -13.33419, 0.87497, -0.12009
0.075, 0, 0, 0, 0, 0, 0
0.05, 64.05569, -4.18264, 5.6, -12.48718, 0.90190, -0.09087
0.03, 51.68260, -3.48432, 5.3, -10.81647, 0.81431, -0.08616
0.02, 47.17186, -3.34137, 5.2, -10.20652, 0.80257, -0.09145
0.01, 51.14855, -3.75480, 5.4, -10.73373, 0.86222, -0.10771
PGA, 50.38409, -3.69514, 5.4, -10.60943, 0.85235, -0.10911
PGV, 35.63970, -2.57346, 5.2, -8.12670, 0.78163, -0.13717
24 changes: 24 additions & 0 deletions src/gov/usgs/earthquake/nshmp/gmm/coeffs/Wong15-185.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
T, C1, C2, C3, C4, C5, C6
10.0, 2.23924, 0.88904, 5.7, -4.32670, 0.29496, -0.14503
7.5, 0, 0, 0, 0, 0, 0
5.0, 4.97610, 1.26923, 5.8, -4.27010, 0.20407, -0.22666
4.0, 0, 0, 0, 0, 0, 0
3.0, 10.39555, 1.40754, 5.9, -4.75552, 0.15144, -0.26862
2.0, 17.88831, 1.30809, 6.0, -5.63213, 0.14066, -0.28729
1.5, 29.04721, 0.80828, 6.2, -7.06492, 0.20046, -0.30768
1.0, 70.86868, -2.72757, 6.6, -12.54106, 0.67623, -0.35302
0.75, 106.11160, -6.43004, 6.8, -17.05878, 1.16334, -0.35750
0.5, 167.80150, -12.39433, 7.1, -24.73777, 1.91219, -0.32696
0.4, 162.43070, -12.23821, 7.0, -24.23815, 1.90310, -0.30798
0.3, 182.14450, -14.54356, 7.0, -26.93524, 2.21379, -0.28892
0.25, 218.53920, -18.39985, 7.1, -31.56796, 2.70736, -0.26152
0.2, 229.63580, -19.84729, 7.1, -33.07245, 2.90063, -0.23693
0.15, 221.03660, -19.64746, 7.0, -32.25693, 2.90152, -0.19915
0.10, 199.45500, -18.55872, 6.8, -29.97464, 2.81452, -0.15835
0.075, 0, 0, 0, 0, 0, 0
0.05, 127.56000, -12.18776, 6.3, -20.98351, 2.02746, -0.12309
0.03, 101.24280, -9.51463, 6.1, -17.44776, 1.66844, -0.13768
0.02, 104.96560, -9.60834, 6.2, -17.85769, 1.66995, -0.15902
0.01, 102.08580, -9.21284, 6.2, -17.42784, 1.61145, -0.16875
PGA, 101.74880, -9.15899, 6.2, -17.37388, 1.60314, -0.16908
PGV, 49.26893, -3.53262, 5.6, -9.70275, 0.87669, -0.18271
24 changes: 24 additions & 0 deletions src/gov/usgs/earthquake/nshmp/gmm/coeffs/Wong15-260.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
T, C1, C2, C3, C4, C5, C6
10.0, -4.06428, 1.34282, 5.4, -3.45320, 0.23289, -0.14270
7.5, 0, 0, 0, 0, 0, 0
5.0, 2.52438, 1.35767, 5.7, -3.94546, 0.19376, -0.22802
4.0, 0, 0, 0, 0, 0, 0
3.0, 11.21896, 1.12792, 5.9, -4.89811, 0.19535, -0.27638
2.0, 16.13302, 1.01694, 5.9, -5.42645, 0.18666, -0.29415
1.5, 21.10197, 1.01206, 6.0, -6.00444, 0.17189, -0.29984
1.0, 30.96416, 0.74999, 6.1, -7.18627, 0.18324, -0.30587
0.75, 43.71734, -0.26484, 6.2, -8.88793, 0.31740, -0.30885
0.5, 80.53577, -3.34020, 6.5, -13.82011, 0.73594, -0.31268
0.4, 112.43970, -6.21106, 6.7, -17.97597, 1.11532, -0.29580
0.3, 139.22570, -8.85118, 6.8, -21.49511, 1.46421, -0.27930
0.25, 168.33290, -11.62806, 6.9, -25.29347, 1.82776, -0.25550
0.2, 197.68610, -14.40394, 7.0, -29.04471, 2.18513, -0.23960
0.15, 175.79600, -13.42590, 6.8, -26.60735, 2.09247, -0.21223
0.10, 177.03360, -14.59615, 6.7, -27.09436, 2.27932, -0.16581
0.075, 0, 0, 0, 0, 0, 0
0.05, 105.56700, -9.10250, 6.1, -18.07121, 1.59993, -0.12999
0.03, 91.89919, -7.77002, 6.0, -16.20113, 1.41794, -0.13896
0.02, 86.55507, -7.07048, 6.0, -15.40218, 1.31405, -0.15396
0.01, 83.82279, -6.70478, 6.0, -14.98769, 1.25899, -0.16222
PGA, 83.41772, -6.63195, 6.0, -14.92092, 1.24728, -0.16212
PGV, 43.61100, -3.09358, 5.4, -9.00818, 0.82445, -0.16302
Loading

0 comments on commit 57b173a

Please sign in to comment.