From bfa2ee8f4f6f984e73956987875022448b261c73 Mon Sep 17 00:00:00 2001 From: Peter Powers <pmpowers@usgs.gov> Date: Mon, 25 Jan 2021 13:11:56 -0700 Subject: [PATCH] add NehrpSiteClass; delete Vs30 --- .../gov/usgs/earthquake/nshmp/calc/Vs30.java | 63 ------------------- .../earthquake/nshmp/gmm/NehrpSiteClass.java | 49 +++++++++++++++ 2 files changed, 49 insertions(+), 63 deletions(-) delete mode 100644 src/main/java/gov/usgs/earthquake/nshmp/calc/Vs30.java create mode 100644 src/main/java/gov/usgs/earthquake/nshmp/gmm/NehrpSiteClass.java diff --git a/src/main/java/gov/usgs/earthquake/nshmp/calc/Vs30.java b/src/main/java/gov/usgs/earthquake/nshmp/calc/Vs30.java deleted file mode 100644 index b2c5e542..00000000 --- a/src/main/java/gov/usgs/earthquake/nshmp/calc/Vs30.java +++ /dev/null @@ -1,63 +0,0 @@ -package gov.usgs.earthquake.nshmp.calc; - -/** - * Identifiers for commonly used values of Vs30. These correspond to the NEHERP - * site classes that have histroically been supported by the NSHMp in hazard - * calculations. - * - * @author U.S. Geological Survey - */ -@Deprecated -public enum Vs30 { - - /** NEHRP site class A. */ - VS_2000("Site class A"), - - /** NEHRP site class B. */ - VS_1150("Site class B"), - - /** NEHRP B/C boundary site class. */ - VS_760("B/C boundary"), - - /** NEHRP site class C. */ - VS_537("Site class C"), - - /** NEHRP C/D boundary site class. */ - VS_360("C/D boundary"), - - /** NEHRP site class D. */ - VS_259("Site class D"), - - /** NEHRP D/E boundary site class. */ - VS_180("D/E boundary"); - - private String label; - private double value; - - private Vs30(String label) { - this.label = label; - this.value = Double.valueOf(name().substring(3)); - } - - @Override - public String toString() { - return this.name().substring(3) + " m/s (" + label + ")"; - } - - /** - * Return the Vs30 value for this identifier. - */ - public double value() { - return value; - } - - /** - * Create a Vs30 constant from a Vs30 {@code value}. - * @param value to process - */ - public static Vs30 fromValue(double value) { - String name = "VS_" + (int) value; - return Enum.valueOf(Vs30.class, name); - } - -} diff --git a/src/main/java/gov/usgs/earthquake/nshmp/gmm/NehrpSiteClass.java b/src/main/java/gov/usgs/earthquake/nshmp/gmm/NehrpSiteClass.java new file mode 100644 index 00000000..43b5e36c --- /dev/null +++ b/src/main/java/gov/usgs/earthquake/nshmp/gmm/NehrpSiteClass.java @@ -0,0 +1,49 @@ +package gov.usgs.earthquake.nshmp.gmm; + +/** + * NEHRP site class identifier. + * + * <p>Over time, the equivalent Vs30 values for each site class have changed + * slightly and are documented with each NSHM. + * + * @author U.S. Geological Survey + */ +enum NehrpSiteClass { + + /** Site class A, very hard rock. */ + A("very hard rock"), + + /** Site class A/B boundary, hard rock. */ + AB("hard rock"), + + /** Site class B, medium hard rock. */ + B("medium hard rock"), + + /** Site class B/C boundary, soft rock. */ + BC("soft rock"), + + /** Site class C, very dense soil or hard clay. */ + C("very dense soil or hard clay"), + + /** Site class C/D boundary, dense sand or very stiff clay. */ + CD("dense sand or very stiff clay"), + + /** Site class D, medium dense sand or stiff clay. */ + D("medium dense sand or stiff clay"), + + /** Site class D/E boundary, loose sand or medium stiff clay. */ + DE("loose sand or medium stiff clay"), + + /** Site class E, very loose sand or soft clay. */ + E("very loose sand or soft clay"); + + private final String condition; + + private NehrpSiteClass(String condition) { + this.condition = condition; + } + + public String condition() { + return condition; + } +} -- GitLab