Opened 12 years ago

Closed 12 years ago

#375 closed defect (fixed)

Bug in HazardCurveLocal

Reported by: Kevin Milner Owned by:
Priority: major Milestone: OpenSHA 1.3
Component: sha Version: 1.2.3
Keywords: HazardCurveLocal Cc:


Steps to reproduce: run Hazard Curve Application, select Mean UCERF2, set Location to "34.10688, -118.22060", hit compute. Interesting this problem isn't present with the default site.

Other info: The problem is with UCERF2 source 3337, rup 77, which is a Point2Vert_SS_FaultPoisSource source with 99 points. Can also be reproduced with the following code:

CB_2008_AttenRel imr = new CB_2008_AttenRel(null);
MeanUCERF2 ucerf = new MeanUCERF2();
ProbEqkSource src = ucerf.getSource(3337);
ProbEqkRupture theRup = src.getRupture(77);
Site site = new Site(new Location(34.10688, -118.22060));
imr.setAll(theRup, site, imr.getIntensityMeasure());

Application: HazardCurveLocal?
Version: 1.2.3
Bulid Type: Development
Java Version: 1.6.0_29 (Sun Microsystems Inc.)
Operating System: Linux (arch: amd64, version: 3.0.0-14-generic)


java.lang.IllegalArgumentException: Internally computed Area is empty
	at org.opensha.commons.geo.Region.createArea(
	at org.opensha.commons.geo.Region.initBorderedRegion(
	at org.opensha.commons.geo.Region.<init>(
	at org.opensha.sha.faultSurface.utils.GriddedSurfaceUtils.getPropagationDistances(
	at org.opensha.sha.faultSurface.AbstractEvenlyGriddedSurface.setPropagationDistances(
	at org.opensha.sha.faultSurface.AbstractEvenlyGriddedSurface.getDistanceRup(
	at org.opensha.sha.imr.param.PropagationEffectParams.DistanceRupParameter.calcValueFromSiteAndEqkRup(
	at org.opensha.sha.imr.param.PropagationEffectParams.PropagationEffectParameter.setValue(
	at org.opensha.sha.imr.attenRelImpl.CB_2008_AttenRel.propEffectUpdate(
	at org.opensha.sha.imr.attenRelImpl.CB_2008_AttenRel.setPropagationEffectParams(
	at org.opensha.sha.imr.attenRelImpl.CB_2008_AttenRel.setEqkRupture(
	at org.opensha.sha.calc.HazardCurveCalculator.getHazardCurve(
	at org.opensha.sha.gui.HazardCurveApplication.computeHazardCurve(


Cacluation Type = Probabilistic

IMR Param List:

IMR = Campbell & Bozorgnia (2008); Gaussian Truncation = None; Tectonic Region = Active Shallow Crust; Component = Average Horizontal (GMRotI50); Std Dev Type = Total

Site Param List:

Longitude = -118.2206; Latitude = 34.10688; Vs30 = 760.0; Depth 2.5 km/sec = 1.0

IMT Param List:

IMT = SA; SA Period = 1.0; SA Damping = 5.0

Forecast Param List:

Eqk Rup Forecast = WGCEP (2007) UCERF2 - Single Branch; Rupture Offset = 5.0; Floater Type = Along strike & centered down dip; Background Seismicity = Include; Treat Background Seismicity As = Two perpendicular faults; Apply CyberShake? DDW Corr = false; Probability Model = WGCEP Preferred Blend

TimeSpan? Param List:

Duration = 30.0; Start Year = 2012

Calculation Settings:

Maximum Distance = 200.0; Num Event Sets = 1; Use Mag-Distance Filter? = false; null; Set TRT From Source? = false; If source TRT not supported by IMR = Use TRT value already set in IMR; Pt Src Dist Corr = None

Change History (1)

comment:1 Changed 12 years ago by Peter Powers

Resolution: fixed
Status: newclosed

Code formatting issue: brackets!

Ned, please confirm that the fixed form below was your original intent. The problem crops up for any locations that are within half the fault discretization distance of a background source. The bg source/surface was being incorrectly having its border/trace converted to a region. Fixed in [8443]

The following lines from GriddedSurfaceUtils?:

else {
	Region reg = new Region(surface.getPerimeter(),BorderType.MERCATOR_LINEAR);

look fine and dandy except that the 'else' pairs with the second if, not the first. Reformatted to:

if (frankelTypeSurface) {
	if (isDistJB_ReallyZero(surface, distJB)) distJB = 0;
} else {
	Region reg = new Region(surface.getPerimeter(),
	if (reg.contains(loc)) distJB = 0;
Note: See TracTickets for help on using tickets.