diff --git a/src/main/java/gov/usgs/earthquake/nshmp/gmm/ChapmanGuo_2021.java b/src/main/java/gov/usgs/earthquake/nshmp/gmm/ChapmanGuo_2021.java index 1ad3e040fa76df06303f99315c473f04f6309cda..60c9b6a3e7782cc893fb6bd1ceed6e27e51b2aee 100644 --- a/src/main/java/gov/usgs/earthquake/nshmp/gmm/ChapmanGuo_2021.java +++ b/src/main/java/gov/usgs/earthquake/nshmp/gmm/ChapmanGuo_2021.java @@ -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 */ diff --git a/src/main/java/gov/usgs/earthquake/nshmp/gmm/NgaEast_2018.java b/src/main/java/gov/usgs/earthquake/nshmp/gmm/NgaEast_2018.java index 0c057d2cd686ed8be4bd68c6978c44204905155a..c51c21c38992a88478208fa17938034fde9eb36a 100644 --- a/src/main/java/gov/usgs/earthquake/nshmp/gmm/NgaEast_2018.java +++ b/src/main/java/gov/usgs/earthquake/nshmp/gmm/NgaEast_2018.java @@ -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");