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: |
Description
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); imr.setParamDefaults(); MeanUCERF2 ucerf = new MeanUCERF2(); ucerf.updateForecast(); ProbEqkSource src = ucerf.getSource(3337); ProbEqkRupture theRup = src.getRupture(77); imr.setEqkRupture(theRup); imr.setIntensityMeasure(PGA_Param.NAME); Site site = new Site(new Location(34.10688, -118.22060)); site.addParameterList(imr.getSiteParams()); 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)
Exception:
java.lang.IllegalArgumentException: Internally computed Area is empty at com.google.common.base.Preconditions.checkArgument(Preconditions.java:88) at org.opensha.commons.geo.Region.createArea(Region.java:616) at org.opensha.commons.geo.Region.initBorderedRegion(Region.java:662) at org.opensha.commons.geo.Region.<init>(Region.java:185) at org.opensha.sha.faultSurface.utils.GriddedSurfaceUtils.getPropagationDistances(GriddedSurfaceUtils.java:116) at org.opensha.sha.faultSurface.AbstractEvenlyGriddedSurface.setPropagationDistances(AbstractEvenlyGriddedSurface.java:198) at org.opensha.sha.faultSurface.AbstractEvenlyGriddedSurface.getDistanceRup(AbstractEvenlyGriddedSurface.java:214) at org.opensha.sha.imr.param.PropagationEffectParams.DistanceRupParameter.calcValueFromSiteAndEqkRup(DistanceRupParameter.java:130) at org.opensha.sha.imr.param.PropagationEffectParams.PropagationEffectParameter.setValue(PropagationEffectParameter.java:103) at org.opensha.sha.imr.attenRelImpl.CB_2008_AttenRel.propEffectUpdate(CB_2008_AttenRel.java:230) at org.opensha.sha.imr.attenRelImpl.CB_2008_AttenRel.setPropagationEffectParams(CB_2008_AttenRel.java:222) at org.opensha.sha.imr.attenRelImpl.CB_2008_AttenRel.setEqkRupture(CB_2008_AttenRel.java:206) at org.opensha.sha.calc.HazardCurveCalculator.getHazardCurve(HazardCurveCalculator.java:363) at org.opensha.sha.gui.HazardCurveApplication.computeHazardCurve(HazardCurveApplication.java:1337) at org.opensha.sha.gui.HazardCurveApplication.run(HazardCurveApplication.java:928) at java.lang.Thread.run(Thread.java:662)
Metadata:
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
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?:
look fine and dandy except that the 'else' pairs with the second if, not the first. Reformatted to: