diff --git a/src/main/java/gov/usgs/earthquake/nshmp/calc/Sites.java b/src/main/java/gov/usgs/earthquake/nshmp/calc/Sites.java index cde75e2aadc6bffddc2345d7e33e8e9a2f96b4a8..c29b0bdf21b0e5665ca99915171f9dfa83bba560 100644 --- a/src/main/java/gov/usgs/earthquake/nshmp/calc/Sites.java +++ b/src/main/java/gov/usgs/earthquake/nshmp/calc/Sites.java @@ -66,12 +66,16 @@ public final class Sites { /* * Site parameter precedence: * - * (3) Defaults from site builder and config (2) site data (1) sites file + * (4) Defaults from Site.java, (3) site-data from model, (2) sites file, + * and (1) Vs30 from config * * If a sites file contains columns for basin depths, a 'null' value string * indicates a GMM should do whatever it defines as default behavior and * will override values that may be included in the site data of a model. If - * the value is empty, then whatever values from (2) or (3) will be used. + * the value is empty, then whatever values from (3) or (4) will be used. If + * the config.hazard.vs30s array is not empty, this indicates we're running + * batch jobs across multiple site classes and the vs30 of the job will + * override all lower precedence vs30 values. */ Location loc = Location.create( @@ -109,13 +113,7 @@ public final class Sites { CalcConfig config, SiteData siteData) { - Site.Builder builder = Site.builder() - .location(loc) - .vs30(config.site.vs30) - .vsInferred(config.site.vsInferred) - .z1p0(config.site.z1p0) - .z2p5(config.site.z2p5); - + Site.Builder builder = Site.builder().location(loc); SiteData.Values sdValues = siteData.get(loc); sdValues.z1p0.ifPresent(builder::z1p0); sdValues.z2p5.ifPresent(builder::z2p5);