Skip to content
Snippets Groups Projects
Commit 05c5ff4d authored by Powers, Peter M.'s avatar Powers, Peter M.
Browse files

docs and class renaming

parent e7c3322e
No related branches found
No related tags found
1 merge request!268NGA-East updates
......@@ -14,18 +14,16 @@ import java.util.Map;
import com.google.common.io.Resources;
/**
* Implementation support for Guo & Chapman (2019) gulf coastal plain
* Implementation support for Chapman & Guo (2021) Gulf coastal plain
* spectral ratio amplification model. This class is not a GMM, it provides
* utility methods lookup spectral ratios based on sediment depth, source
* utility methods to lookup spectral ratios based on sediment depth, source
* magnitude, and epicentral distance.
*
* <p><b>Reference:</b> Chapman, M.C. and Guo, Z., 2021, A response spectral
* ratio model to account for amplification and attenuation effects in the
* Atlantic and Gulf coastal plain: Bulletin of the Seismological Society of
* America, v. 111, n. 4, p. 1849-1867. doi: https://doi.org/10.1785/0120200322
*
* <p><b>doi:</b><a href="https://doi.org/10.1785/0120200322">
* 10.1785/0120200322</a>
* America, v. 111, n. 4, p. 1849-1867, doi: <a
* href="https://doi.org/10.1785/0120200322"> 10.1785/0120200322</a>.
*
* @author U.S. Geological Survey
*/
......
......@@ -14,6 +14,7 @@ import static java.lang.Math.sqrt;
import static java.util.stream.Collectors.toMap;
import java.io.IOException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.EnumSet;
......@@ -97,6 +98,12 @@ import gov.usgs.earthquake.nshmp.tree.LogicTree;
* href="https://escholarship.org/uc/item/2sc5g220">
* https://escholarship.org/uc/item/2sc5g220</a> (accessed 18 November 2019).
*
* <p><b>Reference:</b> Chapman, M.C. and Guo, Z., 2021, A response spectral
* ratio model to account for amplification and attenuation effects in the
* Atlantic and Gulf coastal plain: Bulletin of the Seismological Society of
* America, v. 111, n. 4, p. 1849-1867, doi: <a
* href="https://doi.org/10.1785/0120200322"> 10.1785/0120200322</a>.
*
* <p><b>Component:</b> average horizontal (RotD50)
*
* @author U.S. Geological Survey
......@@ -185,16 +192,14 @@ public abstract class NgaEast_2018 implements GroundMotionModel {
private static Map<String, Double> initSeedWeights() {
try {
Map<String, Double> wtMap = readLines(
getResource(TABLE_DIR + "nga-east-seed-weights.dat"),
StandardCharsets.UTF_8)
.stream()
.skip(1)
.map(line -> Text.splitToList(line, Delimiter.COMMA))
.collect(toMap(
entry -> entry.get(0),
entry -> Double.valueOf(entry.get(1))));
URL wtsUrl = getResource(TABLE_DIR + "nga-east-seed-weights.dat");
Map<String, Double> wtMap = readLines(wtsUrl, StandardCharsets.UTF_8)
.stream()
.skip(1)
.map(line -> Text.splitToList(line, Delimiter.COMMA))
.collect(toMap(
entry -> entry.get(0),
entry -> Double.valueOf(entry.get(1))));
checkWeights(wtMap.values());
return Map.copyOf(wtMap);
......@@ -403,6 +408,7 @@ public abstract class NgaEast_2018 implements GroundMotionModel {
}
/* Guo and Chapman Gulf Coastal Plain Amplification (CPA) model. */
@Deprecated
static class Usgs17Cpa extends NgaEastBase {
// static final String NAME = "NGA-East (2023)";
......@@ -432,6 +438,40 @@ public abstract class NgaEast_2018 implements GroundMotionModel {
}
}
/*
* Updated NGA-East for use in the 2023 nshm-conus update. This model includes
* (1) the final published nonlinear site amplification model of Hshash et al.
* (2020) and (2) the Gulf and Atlantic coastal plain effects model of Chapman
* & Guo (2021).
*/
static class NgaEast_2023 extends NgaEastBase {
static final String NAME = "NGA-East (2023)";
NgaEast_2023(Imt imt) {
super(imt);
}
@Override
public LogicTree<GroundMotion> calc(GmmInput in) {
double cpa = Double.isNaN(in.zSed)
? 0.0
: log(ChapmanGuo_2021.cpaPsaRatio(imt, in.zSed, in.Mw, in.rJB));
Position p = tables[0].position(in.rRup, in.Mw);
double[] μs = new double[MODEL_COUNT];
for (int i = 0; i < MODEL_COUNT; i++) {
double μ = tables[i].get(p);
μs[i] = μ + cpa;
}
double[] σs = new double[] {
sigmaEpri(in.Mw),
sigmaPanel(in.Mw, 3000.0) };
return GroundMotions.createTree(
MEAN_IDS, μs, μWts,
SIGMA_IDS, σs, SIGMA_WTS);
}
}
/*
* Implementation of USGS Seed model logic tree. All models but SP16 are table
* based; SP16 is added to the median ground motion array last. NOTE that the
......@@ -536,6 +576,7 @@ public abstract class NgaEast_2018 implements GroundMotionModel {
}
/* Guo and Chapman Gulf Coastal Plain Amplification (CPA) model. */
@Deprecated
static class UsgsSeedsCpa extends UsgsSeeds {
// static final String NAME = "NGA-East Seed Tree (2023)";
......@@ -573,6 +614,44 @@ public abstract class NgaEast_2018 implements GroundMotionModel {
}
}
/* Guo and Chapman Gulf Coastal Plain Amplification (CPA) model. */
static class UsgsSeeds_2023 extends UsgsSeeds {
// static final String NAME = "NGA-East Seed Tree (2023)";
static final String NAME = UsgsSeeds.NAME + " (Gulf Coast)";
UsgsSeeds_2023(Imt imt) {
super(imt);
}
@Override
public LogicTree<GroundMotion> calc(GmmInput in) {
GmmInput inRock = GmmInput.builder().fromCopy(in).vs30(3000).build();
double cpa = Double.isNaN(in.zSed)
? 0.0
: log(ChapmanGuo_2021.cpaPsaRatio(imt, in.zSed, in.Mw, in.rJB));
Position p = tables.values().iterator().next().position(in.rRup, in.Mw);
double[] μs = new double[GMMS.size()];
for (int i = 0; i < GMMS.size(); i++) {
Gmm seed = GMMS.get(i);
if (seed == Gmm.NGA_EAST_SEED_SP16) {
μs[i] = GroundMotions.combine(sp16.calc(inRock)).mean() + cpa;
} else if (imt == Imt.PGV && noPgvSeeds.contains(seed)) {
// use custom input to ensure hard rock from seeds
μs[i] = UsgsPgvSupport.calcAB20Pgv(seed, inRock).mean() + cpa;
} else {
μs[i] = tables.get(seed).get(p) + cpa;
}
}
double[] σs = new double[] {
sigmaEpri(in.Mw),
sigmaPanel(in.Mw, 3000) };
return GroundMotions.createTree(
MEAN_IDS, μs, MEAN_WTS,
SIGMA_IDS, σs, SIGMA_WTS);
}
}
static abstract class Seed extends NgaEast_2018 {
static final String NAME = NgaEast_2018.NAME + " : Seed : ";
......@@ -829,17 +908,14 @@ public abstract class NgaEast_2018 implements GroundMotionModel {
}
}
/**
/*
* Stewart et al. site amplification model.
*
* The model is applicable to 200 ≤ vs30 ≤ 2000 m/s. In the current
* implementation, for vs30 < 200, vs30 = 200 m/s; for vs30 > 2000, vs30 =
* 3000 m/s.
* The model is applicable to 200 ≤ vs30 ≤ 2000 m/s and smoothly scales from
* 200 m/s up to 3000 m;s and reasonably extrapolates down to 150 m/s.
*/
static final class SiteAmp {
static final String NAME = NgaEast_2018.NAME + " : Site Amplification";
private static final CoefficientContainer COEFFS = new CoefficientContainer(
"nga-east-usgs-siteamp.csv");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment