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

Merge branch 'site-ngae-edits' into 'main'

Site and NGA-East edits

See merge request !272
parents cdc0f093 c2aaecde
No related branches found
No related tags found
1 merge request!272Site and NGA-East edits
Pipeline #142848 passed
......@@ -34,7 +34,7 @@ class ChapmanGuo_2021 {
Imt.mprsImts().toArray(new Imt[0]));
static final double VS_REF = 1000.0;
static final double Z_CUT = 0.5;
static final double Z_CUT = 0.2;
private static final double[] Z = {
0.0, 0.1, 0.2, 0.3, 0.4, 0.6, 0.8,
......@@ -81,12 +81,12 @@ class ChapmanGuo_2021 {
/**
* Return the depth scaling factor for application of reference site scaling.
* Curently set to 0.0 at z = 0.0 km and 1.0 at z = 0.5 km.
*
* @param z sediment depth (in km)
*/
static double zSiteScale(double z) {
return Math.min(1.0, z / Z_CUT);
double s = 1.0 - Math.exp(-z / Z_CUT);
return s * s * s * s;
}
/**
......
......@@ -423,19 +423,19 @@ public abstract class NgaEast implements GroundMotionModel {
double fCpa = cpa
? log(ChapmanGuo_2021.cpaPsaRatio(imt, in.zSed, in.Mw, in.rJB))
: 0.0;
double zScale = cpa
? ChapmanGuo_2021.zSiteScale(in.zSed)
: 0.0;
Position p = tables[0].position(in.rRup, in.Mw);
double[] μs = new double[MODEL_COUNT];
for (int i = 0; i < MODEL_COUNT; i++) {
double μ = tables[i].get(p);
double μPga = exp(pgaTables[i].get(p));
SiteAmp.Value fSite = siteAmp.calc(μPga, in.vs30);
if (cpa) {
double zScale = ChapmanGuo_2021.zSiteScale(in.zSed);
SiteAmp.Value fCpaRef = siteAmp.calc(μPga, ChapmanGuo_2021.VS_REF);
double cpaSiteΔ = zScale * (fSite.siteAmp - fCpaRef.siteAmp);
fSite = new SiteAmp.Value(fSite.siteAmp - cpaSiteΔ, fSite.σ);
}
μs[i] = fSite.apply(μ) + fCpa;
double cpaSiteCorr = cpa
? siteAmp.calc(μPga, ChapmanGuo_2021.VS_REF).siteAmp * zScale
: 0.0;
μs[i] = fSite.apply(μ) + fCpa - cpaSiteCorr;
}
double[] σs = new double[] {
sigmaEpri(in.Mw),
......@@ -579,6 +579,9 @@ public abstract class NgaEast implements GroundMotionModel {
double fCpa = cpa
? log(ChapmanGuo_2021.cpaPsaRatio(imt, in.zSed, in.Mw, in.rJB))
: 0.0;
double zScale = cpa
? ChapmanGuo_2021.zSiteScale(in.zSed)
: 0.0;
Position p = tables.values().iterator().next().position(in.rRup, in.Mw);
double[] μs = new double[GMMS.size()];
for (int i = 0; i < GMMS.size(); i++) {
......@@ -600,14 +603,10 @@ public abstract class NgaEast implements GroundMotionModel {
μPga = exp(pgaTables.get(seed).get(p));
}
SiteAmp.Value fSite = siteAmp.calc(μPga, in.vs30);
if (cpa) {
double zScale = ChapmanGuo_2021.zSiteScale(in.zSed);
SiteAmp.Value fCpaRef = siteAmp.calc(μPga, ChapmanGuo_2021.VS_REF);
double cpaSiteΔ = zScale * (fSite.siteAmp - fCpaRef.siteAmp);
fSite = new SiteAmp.Value(fSite.siteAmp - cpaSiteΔ, fSite.σ);
}
μs[i] = fSite.apply(μ) + fCpa;
double cpaSiteCorr = cpa
? siteAmp.calc(μPga, ChapmanGuo_2021.VS_REF).siteAmp * zScale
: 0.0;
μs[i] = fSite.apply(μ) + fCpa - cpaSiteCorr;
}
double[] σs = new double[] {
......
......@@ -87,7 +87,8 @@ public class SiteData {
}
for (Margin margin : margins) {
Location snapped = snapToGrid(location, margin.spacing, margin.scale);
if (margin.contains(snapped)) {
// check map because margin data is sparse within polygon
if (margin.contains(snapped) && margin.data.containsKey(snapped)) {
builder.marginValues(margin.data.get(snapped));
break;
}
......
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