diff --git a/src/main/java/gov/usgs/earthquake/nshmp/calc/CalcConfig.java b/src/main/java/gov/usgs/earthquake/nshmp/calc/CalcConfig.java index 90260a12d31f96041b6d4d593f7d1937c71f5b61..78b49a29bae95c206abb88a067b601ae4f9df83d 100644 --- a/src/main/java/gov/usgs/earthquake/nshmp/calc/CalcConfig.java +++ b/src/main/java/gov/usgs/earthquake/nshmp/calc/CalcConfig.java @@ -197,6 +197,16 @@ public final class CalcConfig { */ public final Set<SourceType> sourceTypes; + /** + * The set of Vs30s (average shear-wave velocity down to 30 meters depth) + * for which calculations should be performed. If empty or {@code null} in a + * config file, then Vs30 will be derived from a users site file or the + * {@link SiteDefaults#vs30} value. + * + * <p><b>Default:</b> [] + */ + public final Set<Double> vs30s; + /** * Viscous damping ratio. The default value is consistent with that used in * {@link GroundMotionModel} most (GMM) development. Values other than 5% @@ -241,6 +251,7 @@ public final class CalcConfig { this.imts = b.imts; this.tectonicSettings = b.tectonicSettings; this.sourceTypes = b.sourceTypes; + this.vs30s = b.vs30s; this.gmmDampingRatio = b.gmmDampingRatio; this.gmmDampingSigma = b.gmmDampingSigma; this.valueFormat = b.valueFormat; @@ -282,6 +293,7 @@ public final class CalcConfig { Set<Imt> imts; Set<TectonicSetting> tectonicSettings; Set<SourceType> sourceTypes; + Set<Double> vs30s; Double gmmDampingRatio; Boolean gmmDampingSigma; ValueFormat valueFormat; @@ -296,6 +308,7 @@ public final class CalcConfig { checkNotNull(imts); checkNotNull(tectonicSettings); checkNotNull(sourceTypes); + checkNotNull(vs30s); checkNotNull(gmmDampingRatio); checkInRange( RezaeianDamping_2014.DAMPING_RATIO_RANGE, @@ -313,6 +326,7 @@ public final class CalcConfig { this.imts = that.imts; this.tectonicSettings = that.tectonicSettings; this.sourceTypes = that.sourceTypes; + this.vs30s = that.vs30s; this.gmmDampingRatio = that.gmmDampingRatio; this.gmmDampingSigma = that.gmmDampingSigma; this.valueFormat = that.valueFormat; @@ -335,6 +349,9 @@ public final class CalcConfig { if (that.sourceTypes != null) { this.sourceTypes = that.sourceTypes; } + if (that.vs30s != null) { + this.vs30s = that.vs30s; + } if (that.gmmDampingSigma != null) { this.gmmDampingSigma = that.gmmDampingSigma; } diff --git a/src/main/java/gov/usgs/earthquake/nshmp/gmm/RezaeianDamping_2014.java b/src/main/java/gov/usgs/earthquake/nshmp/gmm/RezaeianDamping_2014.java index bc12518c60a9fc68d65c66671749c0288da1f123..212c4dfe281fa822a9d595d51f57acbd29937feb 100644 --- a/src/main/java/gov/usgs/earthquake/nshmp/gmm/RezaeianDamping_2014.java +++ b/src/main/java/gov/usgs/earthquake/nshmp/gmm/RezaeianDamping_2014.java @@ -82,11 +82,11 @@ public class RezaeianDamping_2014 { } /** - * The range of damping ratios supported by this model: {@code [0.5..30.0]}. + * The range of damping ratios supported by this model: {@code [0.05..0.3]}. */ public static final Range<Double> DAMPING_RATIO_RANGE = Range.closed( - CORR_COEFF_DSFS.get(0), - CORR_COEFF_DSFS.get(CORR_COEFF_DSFS.size() - 1)); + 0.005, // CORR_COEFF_DSFS.get(0), + 0.3); // CORR_COEFF_DSFS.get(CORR_COEFF_DSFS.size() - 1)); /** * The GMMs supported by this model. Currently the Rezaien et al. (2014) model @@ -144,7 +144,7 @@ public class RezaeianDamping_2014 { private final boolean updateSigma; RezaeianDamping_2014(CalcConfig config) { - dampingRatio = config.hazard.gmmDampingRatio; + dampingRatio = config.hazard.gmmDampingRatio * 100.0; updateSigma = config.hazard.gmmDampingSigma; } diff --git a/src/main/resources/calc/calc-config-defaults.json b/src/main/resources/calc/calc-config-defaults.json index 3e729803a604502d9c7824c73125536c78cdc767..61385f5308fdfd7586801ffebbdec7d83d9861fe 100644 --- a/src/main/resources/calc/calc-config-defaults.json +++ b/src/main/resources/calc/calc-config-defaults.json @@ -11,8 +11,10 @@ ], "tectonicSettings": [], "sourceTypes": [], - "gmmDampingRatio": 5.0, + "vs30s": [], + "gmmDampingRatio": 0.05, "gmmDampingSigma": false, + "gmmSigmaReduction": 0.15, "valueFormat": "ANNUAL_RATE", "customImls": {} }, diff --git a/src/test/java/gov/usgs/earthquake/nshmp/calc/CalcConfigTests.java b/src/test/java/gov/usgs/earthquake/nshmp/calc/CalcConfigTests.java index 079bab5e9cc6fb78352f90037d18f212cf3f5614..72c5e5c0692396a45f8815d0fa7b594b73006ad6 100644 --- a/src/test/java/gov/usgs/earthquake/nshmp/calc/CalcConfigTests.java +++ b/src/test/java/gov/usgs/earthquake/nshmp/calc/CalcConfigTests.java @@ -127,7 +127,7 @@ class CalcConfigTests { assertEquals(IMTS, def.imts); assertEquals(EnumSet.noneOf(TectonicSetting.class), def.tectonicSettings); assertEquals(EnumSet.noneOf(SourceType.class), def.tectonicSettings); - assertEquals(5.0, def.gmmDampingRatio); + assertEquals(0.05, def.gmmDampingRatio); assertEquals(false, def.gmmDampingSigma); assertEquals(ValueFormat.ANNUAL_RATE, def.valueFormat); @@ -248,7 +248,8 @@ class CalcConfigTests { assertEquals(IMTS_EXTENDS, def.imts); assertEquals(EnumSet.of(ACTIVE_CRUST, SUBDUCTION), def.tectonicSettings); assertEquals(EnumSet.of(FAULT, ZONE, SLAB), def.sourceTypes); - assertEquals(3.0, def.gmmDampingRatio); + assertEquals(Set.of(260.0, 760.0), def.vs30s); + assertEquals(0.03, def.gmmDampingRatio); assertEquals(true, def.gmmDampingSigma); assertEquals(ValueFormat.POISSON_PROBABILITY, def.valueFormat); @@ -262,7 +263,8 @@ class CalcConfigTests { assertEquals(IMTS, def.imts); assertEquals(EnumSet.noneOf(TectonicSetting.class), def.tectonicSettings); assertEquals(EnumSet.noneOf(SourceType.class), def.tectonicSettings); - assertEquals(5.0, def.gmmDampingRatio); + assertEquals(Set.of(), def.vs30s); + assertEquals(0.05, def.gmmDampingRatio); assertEquals(false, def.gmmDampingSigma); assertEquals(ValueFormat.ANNUAL_RATE, def.valueFormat); } diff --git a/src/test/resources/calc/calc-config-extends.json b/src/test/resources/calc/calc-config-extends.json index af22fd3d95c59699bd99e1e0a004d1d995a7557c..f0c4be1daaaa0abe56bc93f604ccfda75807f0a3 100644 --- a/src/test/resources/calc/calc-config-extends.json +++ b/src/test/resources/calc/calc-config-extends.json @@ -7,7 +7,8 @@ ], "tectonicSettings": [ "ACTIVE_CRUST", "SUBDUCTION" ], "sourceTypes": [ "FAULT", "ZONE", "SLAB" ], - "gmmDampingRatio": 3.0, + "vs30s": [ 260, 760 ], + "gmmDampingRatio": 0.03, "gmmDampingSigma": true, "valueFormat": "POISSON_PROBABILITY", "customImls": {