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

added useSiteData flag to config

parent cef48952
No related branches found
No related tags found
1 merge request!253Gulf coast margin zSed handlers and config updates
......@@ -203,6 +203,14 @@ public final class CalcConfig {
*/
public final Set<Double> vs30s;
/**
* Whether or not consider site-specific data that may accompany a model.
* Set to false to turn off deep basin scaling effects, for example.
*
* <p><b>Default:</b> true
*/
public final boolean useSiteData;
/**
* Viscous damping ratio. The default value is consistent with that used in
* {@link GroundMotionModel} most (GMM) development. Values other than 5%
......@@ -225,6 +233,8 @@ public final class CalcConfig {
* Whether or not {@link GroundMotionModel} (GMM) sigmas are also modified
* according to the Rezaeian et al. (2014) model when applying damping
* scaling factors (DSF).
*
* <p><b>Default:</b> false
*/
public final boolean gmmDampingSigma;
......@@ -257,6 +267,7 @@ public final class CalcConfig {
this.tectonicSettings = b.tectonicSettings;
this.sourceTypes = b.sourceTypes;
this.vs30s = b.vs30s;
this.useSiteData = b.useSiteData;
this.gmmDampingRatio = b.gmmDampingRatio;
this.gmmDampingSigma = b.gmmDampingSigma;
this.gmmSigmaScale = b.gmmSigmaScale;
......@@ -300,6 +311,7 @@ public final class CalcConfig {
Set<TectonicSetting> tectonicSettings;
Set<SourceType> sourceTypes;
Set<Double> vs30s;
Boolean useSiteData;
Double gmmDampingRatio;
Boolean gmmDampingSigma;
Double gmmSigmaScale;
......@@ -316,6 +328,7 @@ public final class CalcConfig {
checkNotNull(tectonicSettings);
checkNotNull(sourceTypes);
checkNotNull(vs30s);
checkNotNull(useSiteData);
checkNotNull(gmmDampingRatio);
checkInRange(
RezaeianDamping_2014.DAMPING_RATIO_RANGE,
......@@ -339,6 +352,7 @@ public final class CalcConfig {
this.tectonicSettings = that.tectonicSettings;
this.sourceTypes = that.sourceTypes;
this.vs30s = that.vs30s;
this.useSiteData = that.useSiteData;
this.gmmDampingRatio = that.gmmDampingRatio;
this.gmmDampingSigma = that.gmmDampingSigma;
this.gmmSigmaScale = that.gmmSigmaScale;
......@@ -365,6 +379,9 @@ public final class CalcConfig {
if (that.vs30s != null) {
this.vs30s = that.vs30s;
}
if (that.useSiteData != null) {
this.useSiteData = that.useSiteData;
}
if (that.gmmDampingRatio != null) {
this.gmmDampingRatio = that.gmmDampingRatio;
}
......
......@@ -12,6 +12,7 @@
"tectonicSettings": [],
"sourceTypes": [],
"vs30s": [],
"useSiteData": true,
"gmmDampingRatio": 0.05,
"gmmDampingSigma": false,
"gmmSigmaScale": 1.0,
......
......@@ -134,7 +134,8 @@ class CalcConfigTests {
assertEquals(3.0, def.truncationLevel);
assertEquals(IMTS, def.imts);
assertEquals(EnumSet.noneOf(TectonicSetting.class), def.tectonicSettings);
assertEquals(EnumSet.noneOf(SourceType.class), def.tectonicSettings);
assertEquals(EnumSet.noneOf(SourceType.class), def.sourceTypes);
assertEquals(true, def.useSiteData);
assertEquals(0.05, def.gmmDampingRatio);
assertEquals(false, def.gmmDampingSigma);
assertEquals(ValueFormat.ANNUAL_RATE, def.valueFormat);
......@@ -257,6 +258,7 @@ class CalcConfigTests {
assertEquals(EnumSet.of(ACTIVE_CRUST, SUBDUCTION), def.tectonicSettings);
assertEquals(EnumSet.of(FAULT, ZONE, SLAB), def.sourceTypes);
assertEquals(Set.of(260.0, 760.0), def.vs30s);
assertEquals(false, def.useSiteData);
assertEquals(0.03, def.gmmDampingRatio);
assertEquals(true, def.gmmDampingSigma);
assertEquals(0.85, def.gmmSigmaScale);
......@@ -273,6 +275,7 @@ class CalcConfigTests {
assertEquals(EnumSet.noneOf(TectonicSetting.class), def.tectonicSettings);
assertEquals(EnumSet.noneOf(SourceType.class), def.tectonicSettings);
assertEquals(Set.of(), def.vs30s);
assertEquals(true, def.useSiteData);
assertEquals(0.05, def.gmmDampingRatio);
assertEquals(false, def.gmmDampingSigma);
assertEquals(1.0, def.gmmSigmaScale);
......
......@@ -8,6 +8,7 @@
"tectonicSettings": [ "ACTIVE_CRUST", "SUBDUCTION" ],
"sourceTypes": [ "FAULT", "ZONE", "SLAB" ],
"vs30s": [ 260, 760 ],
"useSiteData": false,
"gmmDampingRatio": 0.03,
"gmmDampingSigma": true,
"gmmSigmaScale": 0.85,
......
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