Skip to content

Commit

Permalink
Merge pull request #428 from pmpowers-usgs/sub-basin-term-update
Browse files Browse the repository at this point in the history
Sub basin term update
  • Loading branch information
pmpowers-usgs committed Jun 4, 2019
2 parents 82d4fee + 26794f3 commit cfda5b6
Show file tree
Hide file tree
Showing 6 changed files with 360 additions and 422 deletions.
29 changes: 14 additions & 15 deletions src/gov/usgs/earthquake/nshmp/gmm/AtkinsonMacias_2009.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ private static final class Coefficients {
private final Coefficients coeffs;
private final Coefficients coeffsPGA;
private final BooreAtkinson_2008 siteAmp;
private final CampbellBozorgnia_2014.BasinAmp cb14basinAmp;
private final CampbellBozorgnia_2014 cb14;

// interpolatedGmm = null if !interpolated
private final boolean interpolated;
Expand All @@ -128,7 +128,7 @@ private static final class Coefficients {
coeffs = new Coefficients(imt, COEFFS);
coeffsPGA = new Coefficients(PGA, COEFFS);
siteAmp = new BooreAtkinson_2008(imt);
cb14basinAmp = new CampbellBozorgnia_2014.BasinAmp(imt);
cb14 = new CampbellBozorgnia_2014(imt);
interpolated = INTERPOLATED_IMTS.containsKey(imt);
interpolatedGmm = interpolated
? new InterpolatedGmm(subtype, imt, INTERPOLATED_IMTS.get(imt))
Expand All @@ -147,21 +147,20 @@ public final ScalarGroundMotion calc(final GmmInput in) {
double site = siteAmp.siteAmp(μPga, in.vs30);
double μAm = μRef + site;

if (!Double.isNaN(in.z2p5) && basinEffect()) {

double cbSite = cb14basinAmp.basinDelta(in, VS30_REF);
double μCb = μRef + cbSite;

/* Short-circuit lower values and short periods. */
int imtId = coeffs.imt.ordinal();
if ((μCb < μAm) || (imtId < Imt.SA0P75.ordinal())) {
return DefaultScalarGroundMotion.create(μAm, σ);
} else if (imtId < Imt.SA1P0.ordinal()) {
double μScaled = GmmUtils.scaleSubductionSiteAmp(coeffs.imt, μAm, μCb);
return DefaultScalarGroundMotion.create(μScaled, σ);
/*
* Add CB14 deep basin amplification term if (1) z2p5 is non-NaN, (2) this
* instance is basin amplifying and (3) T>0.5s
*/
if (!Double.isNaN(in.z2p5) &&
basinEffect() &&
coeffs.imt.ordinal() > Imt.SA0P5.ordinal()) {
double cbBasinTerm = cb14.deepBasinAmplification(in.z2p5);
if (coeffs.imt == Imt.SA0P75) {
cbBasinTerm *= 0.585; // log T scaling at 0.75s
}
return DefaultScalarGroundMotion.create(μCb, σ);
μAm += cbBasinTerm;
}

return DefaultScalarGroundMotion.create(μAm, σ);
}

Expand Down
31 changes: 14 additions & 17 deletions src/gov/usgs/earthquake/nshmp/gmm/BcHydro_2012.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ public abstract class BcHydro_2012 implements GroundMotionModel {
private static final double SIGMA = 0.74;
private static final double ΔC1_SLAB = -0.3;
private static final double VS30_ROCK = 1000.0;
private static final double VS30_REF = 760.0; // refrence vs30 for CB basin Δ

private static final Map<Imt, Range<Imt>> INTERPOLATED_IMTS = Maps.immutableEnumMap(
ImmutableMap.of(SA0P03, Range.closed(SA0P02, SA0P05)));
Expand Down Expand Up @@ -141,7 +140,7 @@ private static final class Coefficients {

private final Coefficients coeffs;
private final Coefficients coeffsPGA;
private final CampbellBozorgnia_2014.BasinAmp cb14basinAmp;
private final CampbellBozorgnia_2014 cb14;

// interpolatedGmm = null if !interpolated
private final boolean interpolated;
Expand All @@ -150,7 +149,7 @@ private static final class Coefficients {
BcHydro_2012(final Imt imt, Gmm subtype) {
coeffs = new Coefficients(imt, COEFFS);
coeffsPGA = new Coefficients(PGA, COEFFS);
cb14basinAmp = new CampbellBozorgnia_2014.BasinAmp(imt);
cb14 = new CampbellBozorgnia_2014(imt);
interpolated = INTERPOLATED_IMTS.containsKey(imt);
interpolatedGmm = interpolated
? new InterpolatedGmm(subtype, imt, INTERPOLATED_IMTS.get(imt))
Expand All @@ -166,22 +165,20 @@ public final ScalarGroundMotion calc(final GmmInput in) {
double pgaRock = exp(calcMean(coeffsPGA, isSlab(), 0.0, in.Mw, in.rRup, in.zTop, VS30_ROCK));
double μAsk = calcMean(coeffs, isSlab(), pgaRock, in.Mw, in.rRup, in.zTop, in.vs30);

if (!Double.isNaN(in.z2p5) && basinEffect()) {

double μRef = calcMean(coeffs, isSlab(), pgaRock, in.Mw, in.rRup, in.zTop, VS30_REF);
double cbBasin = cb14basinAmp.basinDelta(in, VS30_REF);
double μCb = μRef + cbBasin;

/* Short-circuit lower values and short periods. */
int imtId = coeffs.imt.ordinal();
if ((μCb < μAsk) || (imtId < Imt.SA0P75.ordinal())) {
return DefaultScalarGroundMotion.create(μAsk, SIGMA);
} else if (imtId < Imt.SA1P0.ordinal()) {
double μScaled = GmmUtils.scaleSubductionSiteAmp(coeffs.imt, μAsk, μCb);
return DefaultScalarGroundMotion.create(μScaled, SIGMA);
/*
* Add CB14 deep basin amplification term if (1) z2p5 is non-NaN, (2) this
* instance is basin amplifying and (3) T>0.5s
*/
if (!Double.isNaN(in.z2p5) &&
basinEffect() &&
coeffs.imt.ordinal() > Imt.SA0P5.ordinal()) {
double cbBasinTerm = cb14.deepBasinAmplification(in.z2p5);
if (coeffs.imt == Imt.SA0P75) {
cbBasinTerm *= 0.585;// log T scaling at 0.75s
}
return DefaultScalarGroundMotion.create(μCb, SIGMA);
μAsk += cbBasinTerm;
}

return DefaultScalarGroundMotion.create(μAsk, SIGMA);
}

Expand Down
24 changes: 4 additions & 20 deletions src/gov/usgs/earthquake/nshmp/gmm/CampbellBozorgnia_2014.java
Original file line number Diff line number Diff line change
Expand Up @@ -179,27 +179,11 @@ private static ScalarGroundMotion calc(
}

/*
* Convenience method for Campbell site/basin delta relative to a reference
* site condition, vs30ref, which may be different than Campbell's reference
* rock site condition of Vs30=1100 m/s.
* Return the CB14 basin amplification term for deep basins only, z2.5 > 3km
* and Fsed > 0.
*/
double basinDelta(GmmInput in, double vs30ref) {
FaultStyle style = GmmUtils.rakeToFaultStyle_NSHMP(in.rake);
boolean basinAmp = basinAmpOnly();

/* Rock reference value with default basin term. */
double pgaRock = (vs30ref < coeffs.k1)
? exp(calcMean(coeffsPGA, style, 1100.0, 0.398, 0.0, in, basinAmp))
: 0.0;
double μRock = calcMean(coeffs, style, vs30ref, Double.NaN, pgaRock, in, basinAmp);

/* Now with site/basin effect. */
pgaRock = (in.vs30 < coeffs.k1)
? exp(calcMean(coeffsPGA, style, 1100.0, 0.398, 0.0, in, basinAmp))
: 0.0;
double μBasin = calcMean(coeffs, style, in.vs30, in.z2p5, pgaRock, in, basinAmp);

return μBasin - μRock;
double deepBasinAmplification(double z2p5) {
return Math.max(calcBasinTerm(coeffs, z2p5), 0.0);
}

// Mean ground motion model -- we use supplied vs30 and z2p5 rather than
Expand Down
38 changes: 0 additions & 38 deletions src/gov/usgs/earthquake/nshmp/gmm/GmmUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -309,42 +309,4 @@ static double atkinsonTableValue(final GroundMotionTable table, final Imt imt,
}
return μ;
}

/* */
static double scaleSubductionSiteAmp(Imt imt, double lo, double hi) {
double scale = subductionBasinPeriodScale(imt);
return lo + (hi - lo) * scale;
}

/* natural log scaling for periods between 0.2s and 1.0s */
static double subductionBasinPeriodScale(Imt imt) {
switch (imt) {

// scaling from 0.5s to 1.0s
case SA0P75:
return 0.585;

// scaling from 0.4s to 1.0s
// case SA0P5:
// return 0.243;
// case SA0P75:
// return 0.686;

// scaling from 0.2s to 1.0s
// case SA0P25:
// return 0.139;
// case SA0P3:
// return 0.252;
// case SA0P4:
// return 0.431;
// case SA0P5:
// return 0.569;
// case SA0P75:
// return 0.821;

default:
return 1.0;
}
}

}
32 changes: 14 additions & 18 deletions src/gov/usgs/earthquake/nshmp/gmm/ZhaoEtAl_2006.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ public abstract class ZhaoEtAl_2006 implements GroundMotionModel {
private static final double MC_I = 6.3;
private static final double MAX_SLAB_DEPTH = 125.0;
private static final double INTERFACE_DEPTH = 20.0;
private static final double VS30_REF = 760.0;

private static final Map<Imt, Range<Imt>> INTERPOLATED_IMTS = Maps.immutableEnumMap(
ImmutableMap.of(
Expand Down Expand Up @@ -184,7 +183,7 @@ private static final class Coefficients {
}

private final Coefficients coeffs;
private final CampbellBozorgnia_2014.BasinAmp cb14basinAmp;
private final CampbellBozorgnia_2014 cb14;

/* gmms = null if !flag */
private final boolean interpolated;
Expand All @@ -194,7 +193,7 @@ private static final class Coefficients {

ZhaoEtAl_2006(final Imt imt, Gmm subtype) {
coeffs = new Coefficients(imt, COEFFS);
cb14basinAmp = new CampbellBozorgnia_2014.BasinAmp(imt);
cb14 = new CampbellBozorgnia_2014(imt);
interpolated = INTERPOLATED_IMTS.containsKey(imt);
interpolatedGmm = interpolated
? new InterpolatedGmm(subtype, imt, INTERPOLATED_IMTS.get(imt))
Expand All @@ -220,23 +219,20 @@ public final ScalarGroundMotion calc(GmmInput in) {
double zSiteVs30 = siteTermStep(coeffs, in.vs30);
double μZhao = calcMean(coeffs, isSlab(), zSiteVs30, in);

if (!Double.isNaN(in.z2p5) && basinEffect()) {

double cbSite = cb14basinAmp.basinDelta(in, VS30_REF);
double zSiteRock = siteTermStep(coeffs, VS30_REF);
double μRock = calcMean(coeffs, isSlab(), zSiteRock, in);
double μCb = μRock + cbSite;

/* Short-circuit lower values and short periods. */
int imtId = coeffs.imt.ordinal();
if ((μCb < μZhao) || (imtId < Imt.SA0P75.ordinal())) {
return DefaultScalarGroundMotion.create(μZhao, σ);
} else if (imtId < Imt.SA1P0.ordinal()) {
double μScaled = GmmUtils.scaleSubductionSiteAmp(coeffs.imt, μZhao, μCb);
return DefaultScalarGroundMotion.create(μScaled, σ);
/*
* Add CB14 deep basin amplification term if (1) z2p5 is non-NaN, (2) this
* instance is basin amplifying and (3) T>0.5s
*/
if (!Double.isNaN(in.z2p5) &&
basinEffect() &&
coeffs.imt.ordinal() > Imt.SA0P5.ordinal()) {
double cbBasinTerm = cb14.deepBasinAmplification(in.z2p5);
if (coeffs.imt == Imt.SA0P75) {
cbBasinTerm *= 0.585;// log T scaling at 0.75s
}
return DefaultScalarGroundMotion.create(μCb, σ);
μZhao += cbBasinTerm;
}

return DefaultScalarGroundMotion.create(μZhao, σ);
}

Expand Down
Loading

0 comments on commit cfda5b6

Please sign in to comment.