Opened 10 years ago

Closed 10 years ago

#476 closed task (fixed)

Create Attenuation Relationship Modification classes

Reported by: Kevin Milner Owned by:
Priority: major Milestone: OpenSHA 1.4
Component: sha Version:
Keywords: Cc: goulet@…

Description

Christine has requested a wrapper attenuation relationship which can modify values from an underlying relationship. Original request from Christine below:

I want to reach out again with something I ask you almost every year… And I originally harassed Ned on this since 2006. Now I am SERIOUS and I would really appreciate your help with a “wrapper” type of IMR implementation. This should sound familiar and you said you knew how to do that:

  1. Goal is to allow site-specific site effects integration based on various reference (e.g. rock or stiff site) GMPEs. That would be done in the hazard curve and hazard spectrum apps.
  2. What I envision is a single "Site-Specific GMPE".
    • When people select that GMPE, THE GUI would allow the user to select from a list of existing GMPEs (e.g. AS08)
    • Then the user can select a method for modification: one of them is Gouletetal2006, another one is BazzurroAndCornell2004 (these are existing IMRs) and I would have the option to add others.
  3. What needs to happen “under the hood” is that the code retrieves the mean and standard deviation from the selected existing GMPE (using their model-specific parameters), then I would write the equations to modify those following the selected methodology from above (Goulet or BazzurroAndCornell?).

Attachments (1)

mod_demo.png (131.0 KB) - added by Kevin Milner 10 years ago.
demo

Download all attachments as: .zip

Change History (2)

Changed 10 years ago by Kevin Milner

Attachment: mod_demo.png added

demo

comment:1 Changed 10 years ago by Kevin Milner

Resolution: fixed
Status: newclosed

Done in [10802].

New package org.opensha.sha.imr.mod added.

Modifiers should go in org.opensha.sha.imr.mod.impl and extend org.opensha.sha.imr.mod.AbstractAttenRelMod?. This abstract class requires that each module implement the following methods:

  • void setIMRParams(ScalarIMR imr)
    • sets any parameters needed in the IMR. Will be called whenever a new module is loaded, or the IMR is changed.
  • double getModMean(ScalarIMR imr)
    • Should return the modified log mean, or imr.getMean() if no modification necessary
  • double getModStdDev(ScalarIMR imr)
    • Should return the modified standard deviation, or imr.getStdDev() if no modification necessary
  • ParameterList? getModParams()
    • Return any parameters needed for this modifier, or null for no params

There are also the following methods with default implementations which can be overridden if needed. Site specific modifiers will definitely need to override setIMRSiteParams(...) below.

  • void setIMRSiteParams(ScalarIMR imr, Site site)
    • Will be called whenever the site is changed. Default implementation just calls imr.setSite(site) but can be overridden to modify individual site parameters. Site specific IMRs should override this to just set the site location and default site types, then retrieve the actual site parameters from the passed in site object
  • void setIMRRupParams(ScalarIMR imr, EqkRupture? rup)
    • Will be called whenever the rupture is changed. Default implementation just calls imr.setEqkRupture(rup) but can be overridden to modify individual rupture parameters.
  • void setIMT_IMT(ScalarIMR imr, Parameter<Double> imt)
    • Will be called whenever the IMT is changed to set the IMT in the underlying IMR. Default implementation just calls imr.setIntensityMeasure(imt) but can be overridden if desired.
  • DiscretizedFunc? getModExceedProbabilities(ScalarIMR imr, DiscretizedFunc? intensityMeasureLevels)
    • Calculates exceedance probabilities from the mod mean/std dev. Uses the default implementation from AttenutationRelationship? including truncation but can be overridden for customized behavior

I added a demo modifier at org.opensha.sha.imr.mod.impl.SimpleScaleMod? which allows the user to scale the mean/std dev by constant scaling factors. The GUI is shown in the attached image:

demo

Colors in the demo are:

  • Red: original curve
  • Blue: double mean (in linear space)
  • Green: half mean (in linear space)
  • Gray: double std. dev.
  • Magenta: half std. dev.

One caveat: Supported site parameters/IMTs are hardcoded, and may not be applicable to each underlying IMR. For example, if you select CB 2008 then Z1.0 and Vs30 type will be listed, although ignored by the underlying IMR. It is also possible to select an IMT/IMR combination which is not supported, in which case an exception will be thrown.

Note: See TracTickets for help on using tickets.