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

updated precedence; removed config site defaults

parent 359c9894
No related branches found
No related tags found
1 merge request!245Site defaults cleanup
......@@ -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);
......
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