org.opensha.sha.imr.attenRelImpl
Class CB_2008_AttenRel

java.lang.Object
  extended by org.opensha.sha.imr.AbstractIMR
      extended by org.opensha.sha.imr.AttenuationRelationship
          extended by org.opensha.sha.imr.attenRelImpl.CB_2008_AttenRel
All Implemented Interfaces:
Serializable, Comparable<IntensityMeasureRelationship>, EventListener, Named, ShortNamed, XMLSaveable, ParameterChangeListener, IntensityMeasureRelationship, ScalarIMR
Direct Known Subclasses:
NSHMP08_WUS.NSHMP_CB_2008

public class CB_2008_AttenRel
extends AttenuationRelationship
implements ParameterChangeListener

Implementation of the Campbell & Bozorgnia (2008) next generation attenuation relationship. See: NGA Ground Motion Model for the Geometric Mean Horizontal Component of PGA, PGV, PGD and 5% Damped Linear Elastic Response Spectra for Periods Ranging from 0.01 to 10 s", Earthquake Spectra, Volume 24, Number 1, pp. 139-171.

Supported Intensity-Measure Parameters:

Other Independent Parameters: NOTES: distRupMinusJB_OverRupParam is used rather than distancJBParameter because the latter should not be held constant when distanceRupParameter is changed (e.g., in the AttenuationRelationshipApplet). This includes the stipulation that the mean of 0.2-sec (or less) SA should not be less than that of PGA (the latter being given if so). If depthTo2pt5kmPerSec is null (unknown), it is set as 2 km if vs30 <= 2500, and zero otherwise.

Verification - This model has been tested against: 1) a verification file generated independently by Ken Campbell, implemented in the JUnit test class CB_2008_test; and 2) by the test class NGA08_Site_EqkRup_Tests, which makes sure parameters are set properly when Site and EqkRupture objects are passed in.

Version:
$Id: CB_2008_AttenRel.java 9377 2012-09-05 19:04:42Z pmpowers $
Author:
Ned Field
See Also:
Serialized Form

Field Summary
static double c
           
protected  double[] c0
           
protected  double[] c1
           
protected  double[] c10
           
protected  double[] c11
           
protected  double[] c12
           
protected  double[] c2
           
protected  double[] c3
           
protected  double[] c4
           
protected  double[] c5
           
protected  double[] c6
           
protected  double[] c7
           
protected  double[] c8
           
protected  double[] c9
           
protected static Double DEPTH_2pt5_WARN_MAX
           
protected static Double DEPTH_2pt5_WARN_MIN
           
protected static Double DIP_WARN_MAX
           
protected static Double DIP_WARN_MIN
           
protected static Double DISTANCE_MINUS_WARN_MAX
           
protected static Double DISTANCE_MINUS_WARN_MIN
           
protected static Double DISTANCE_RUP_WARN_MAX
           
protected static Double DISTANCE_RUP_WARN_MIN
           
static String FLT_TYPE_NORMAL
           
static String FLT_TYPE_REVERSE
           
static String FLT_TYPE_STRIKE_SLIP
           
protected  double[] k1
           
protected  double[] k2
           
protected  double[] k3
           
protected static Double MAG_WARN_MAX
           
protected static Double MAG_WARN_MIN
           
static double n
           
static String NAME
           
protected  double[] per
           
protected  double[] rho
           
protected static Double RUP_TOP_WARN_MAX
           
protected static Double RUP_TOP_WARN_MIN
           
protected  double[] s_c
           
static double s_lnAF
           
protected  double[] s_lny
           
static String SHORT_NAME
           
protected  double[] t_lny
           
protected static Double VS30_WARN_MAX
           
protected static Double VS30_WARN_MIN
           
 
Fields inherited from class org.opensha.sha.imr.AttenuationRelationship
aftershockParam, cavParam, componentParam, depthTo1pt0kmPerSecParam, depthTo2pt5kmPerSecParam, dipParam, distanceJBParam, distanceRupParam, distanceSeisParam, distRupMinusDistX_OverRupParam, distRupMinusJB_OverRupParam, ds575Param, ds595Param, ERR, exceedProbIndependentParams, fltTypeParam, focalDepthParam, hangingWallFlagParam, imlAtExceedProbIndependentParams, magParam, meanIndependentParams, pgaParam, pgdParam, pgvParam, rakeParam, rupTopDepthParam, rupWidthParam, saDampingParam, saParam, saPeriodParam, sigmaTruncLevelParam, sigmaTruncTypeParam, stdDevIndependentParams, stdDevTypeParam, tectonicRegionTypeParam, USER_MAX_DISTANCE, VERY_SMALL_MEAN, vs30_TypeParam, vs30Param
 
Fields inherited from class org.opensha.sha.imr.AbstractIMR
eqkRupture, eqkRuptureParams, EXCEED_PROB_DEFAULT, EXCEED_PROB_INFO, EXCEED_PROB_MAX, EXCEED_PROB_MIN, EXCEED_PROB_NAME, exceedProbParam, im, intensityMeasureChanged, listener, otherParams, propagationEffectParams, site, siteParams, supportedIMParams, url_info_string, XML_METADATA_IMT_NAME, XML_METADATA_NAME, XML_METADATA_SITE_PARAMETERS_NAME
 
Fields inherited from interface org.opensha.commons.metadata.XMLSaveable
XML_METADATA_NAME
 
Constructor Summary
CB_2008_AttenRel(ParameterChangeWarningListener listener)
          /** Constructs a new instance of this attenuation relationship.
 
Method Summary
 URL getInfoURL()
          This provides a URL where more info on this model can be obtained
 double getMean()
          Calculates the mean of the exceedence probability distribution.
 double getMean(int iper, double vs30, double rRup, double distJB, double f_rv, double f_nm, double mag, double dip, double depthTop, double depthTo2pt5kmPerSec, boolean magSaturation, double pga_rock)
           
 String getName()
          get the name of this IMR
 String getShortName()
          Returns the Short Name of each AttenuationRelationship
 double getStdDev()
          This returns the standard deviation (stdDev) of the intensity-measure level for the current set of parameters.
 double getStdDev(int iper, String stdDevType, String component, double vs30, double rock_pga)
           
protected  void initEqkRuptureParams()
          Creates the two Potential Earthquake parameters (magParam and fltTypeParam) and adds them to the eqkRuptureParams list.
protected  void initIndependentParamLists()
          This creates the lists of independent parameters that the various dependent parameters (mean, standard deviation, exceedance probability, and IML at exceedance probability) depend upon.
protected  void initOtherParams()
          Creates other Parameters that the mean or stdDev depends upon, such as the Component or StdDevType parameters.
protected  void initParameterEventListeners()
          Adds the parameter change listeners.
protected  void initPropagationEffectParams()
          Creates the Propagation Effect parameters and adds them to the propagationEffectParams list.
protected  void initSiteParams()
          Creates the Site-Type parameter and adds it to the siteParams list.
protected  void initSupportedIntensityMeasureParams()
          Creates the two supported IM parameters (PGA and SA), as well as the independenParameters of SA (periodParam and dampingParam) and adds them to the supportedIMParams list.
static void main(String[] args)
          This tests DistJB numerical precision with respect to the f_hngR term.
 void parameterChange(ParameterChangeEvent e)
          This listens for parameter changes and updates the primitive parameters accordingly
 void resetParameterEventListeners()
          Allows to reset the change listeners on the parameters
protected  void setCoeffIndex()
          This function returns the array index for the coeffs corresponding to the chosen IMT
 void setEqkRupture(EqkRupture eqkRupture)
          Sets the EqkRupture object in the IMR as a reference to the one passed in.
protected  void setFaultTypeFromRake(double rake)
          Set style of faulting from the rake angle.
 void setParamDefaults()
          Allows the user to set the default parameter values for the selected Attenuation Relationship.
protected  void setPropagationEffectParams()
          Calculates the value of each propagation effect parameter from the current Site and ProbEqkRupture objects.
 void setSite(Site site)
          Sets the Site object as a reference to that passed in.
 
Methods inherited from class org.opensha.sha.imr.AttenuationRelationship
getAllParamMetadata, getEpsilon, getEpsilon, getExceedProbabilities, getExceedProbability, getExceedProbability, getExceedProbability, getExceedProbIndependentParams, getExceedProbIndependentParamsIterator, getIML_AtExceedProb, getIML_AtExceedProb, getIML_AtExceedProbIndependentParams, getIML_AtExceedProbIndependentParamsIterator, getMeanIndependentParams, getMeanIndependentParamsIterator, getSA_ExceedProbSpectrum, getSA_IML_AtExceedProbSpectrum, getStdDevIndependentParams, getStdDevIndependentParamsIterator, getTotExceedProbability, isTectonicRegionSupported, isTectonicRegionSupported, setIntensityMeasureLevel, setIntensityMeasureLevel, setSiteLocation, setUserMaxDistance
 
Methods inherited from class org.opensha.sha.imr.AbstractIMR
compareTo, fromXMLMetadata, getEqkRupture, getEqkRuptureParams, getEqkRuptureParamsIterator, getIntensityMeasure, getIntensityMeasureLevel, getOtherParams, getOtherParamsIterator, getParameter, getPropagationEffectParams, getPropagationEffectParamsIterator, getSite, getSiteParams, getSiteParamsIterator, getSupportedIntensityMeasures, getSupportedIntensityMeasuresIterator, isIntensityMeasureSupported, isIntensityMeasureSupported, setAll, setExceedProb, setIntensityMeasure, setIntensityMeasure, setWarningListener, toXMLMetadata
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opensha.sha.imr.IntensityMeasureRelationship
getEqkRupture, getEqkRuptureParams, getEqkRuptureParamsIterator, getIntensityMeasure, getIntensityMeasureLevel, getOtherParams, getOtherParamsIterator, getParameter, getPropagationEffectParams, getPropagationEffectParamsIterator, getSite, getSiteParams, getSiteParamsIterator, getSupportedIntensityMeasures, getSupportedIntensityMeasuresIterator, isIntensityMeasureSupported, isIntensityMeasureSupported, setAll, setExceedProb, setIntensityMeasure, setIntensityMeasure, toXMLMetadata
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

SHORT_NAME

public static final String SHORT_NAME
See Also:
Constant Field Values

NAME

public static final String NAME
See Also:
Constant Field Values

s_lnAF

public static final double s_lnAF
See Also:
Constant Field Values

n

public static final double n
See Also:
Constant Field Values

c

public static final double c
See Also:
Constant Field Values

MAG_WARN_MIN

protected static final Double MAG_WARN_MIN

MAG_WARN_MAX

protected static final Double MAG_WARN_MAX

DISTANCE_RUP_WARN_MIN

protected static final Double DISTANCE_RUP_WARN_MIN

DISTANCE_RUP_WARN_MAX

protected static final Double DISTANCE_RUP_WARN_MAX

DISTANCE_MINUS_WARN_MIN

protected static final Double DISTANCE_MINUS_WARN_MIN

DISTANCE_MINUS_WARN_MAX

protected static final Double DISTANCE_MINUS_WARN_MAX

VS30_WARN_MIN

protected static final Double VS30_WARN_MIN

VS30_WARN_MAX

protected static final Double VS30_WARN_MAX

DEPTH_2pt5_WARN_MIN

protected static final Double DEPTH_2pt5_WARN_MIN

DEPTH_2pt5_WARN_MAX

protected static final Double DEPTH_2pt5_WARN_MAX

DIP_WARN_MIN

protected static final Double DIP_WARN_MIN

DIP_WARN_MAX

protected static final Double DIP_WARN_MAX

RUP_TOP_WARN_MIN

protected static final Double RUP_TOP_WARN_MIN

RUP_TOP_WARN_MAX

protected static final Double RUP_TOP_WARN_MAX

FLT_TYPE_STRIKE_SLIP

public static final String FLT_TYPE_STRIKE_SLIP
See Also:
Constant Field Values

FLT_TYPE_REVERSE

public static final String FLT_TYPE_REVERSE
See Also:
Constant Field Values

FLT_TYPE_NORMAL

public static final String FLT_TYPE_NORMAL
See Also:
Constant Field Values

per

protected double[] per

c0

protected double[] c0

c1

protected double[] c1

c2

protected double[] c2

c3

protected double[] c3

c4

protected double[] c4

c5

protected double[] c5

c6

protected double[] c6

c7

protected double[] c7

c8

protected double[] c8

c9

protected double[] c9

c10

protected double[] c10

c11

protected double[] c11

c12

protected double[] c12

k1

protected double[] k1

k2

protected double[] k2

k3

protected double[] k3

s_lny

protected double[] s_lny

t_lny

protected double[] t_lny

s_c

protected double[] s_c

rho

protected double[] rho
Constructor Detail

CB_2008_AttenRel

public CB_2008_AttenRel(ParameterChangeWarningListener listener)
/** Constructs a new instance of this attenuation relationship.

Parameters:
listener -
Method Detail

setEqkRupture

public void setEqkRupture(EqkRupture eqkRupture)
                   throws InvalidRangeException
Description copied from class: AbstractIMR
Sets the EqkRupture object in the IMR as a reference to the one passed in.

Specified by:
setEqkRupture in interface IntensityMeasureRelationship
Overrides:
setEqkRupture in class AbstractIMR
Parameters:
eqkRupture - The new EqkRupture object
Throws:
InvalidRangeException

setSite

public void setSite(Site site)
             throws ParameterException
Description copied from class: AbstractIMR
Sets the Site object as a reference to that passed in.

Specified by:
setSite in interface IntensityMeasureRelationship
Overrides:
setSite in class AbstractIMR
Parameters:
site - The new site object
Throws:
ParameterException

setPropagationEffectParams

protected void setPropagationEffectParams()
Description copied from class: AttenuationRelationship
Calculates the value of each propagation effect parameter from the current Site and ProbEqkRupture objects.

Specified by:
setPropagationEffectParams in class AttenuationRelationship

setFaultTypeFromRake

protected void setFaultTypeFromRake(double rake)
Set style of faulting from the rake angle. Values derived from Campbell and Bozorgnia PEER NGA report.

Parameters:
rake - in degrees

setCoeffIndex

protected void setCoeffIndex()
                      throws ParameterException
This function returns the array index for the coeffs corresponding to the chosen IMT

Throws:
ParameterException

getMean

public double getMean()
Calculates the mean of the exceedence probability distribution.

Specified by:
getMean in interface ScalarIMR
Returns:
The mean value

getStdDev

public double getStdDev()
Description copied from interface: ScalarIMR
This returns the standard deviation (stdDev) of the intensity-measure level for the current set of parameters.

Specified by:
getStdDev in interface ScalarIMR
Returns:
The stdDev value

setParamDefaults

public void setParamDefaults()
Allows the user to set the default parameter values for the selected Attenuation Relationship.

Specified by:
setParamDefaults in interface IntensityMeasureRelationship

initIndependentParamLists

protected void initIndependentParamLists()
This creates the lists of independent parameters that the various dependent parameters (mean, standard deviation, exceedance probability, and IML at exceedance probability) depend upon. NOTE: these lists do not include anything about the intensity-measure parameters or any of thier internal independentParamaters.


initSiteParams

protected void initSiteParams()
Creates the Site-Type parameter and adds it to the siteParams list. Makes the parameters noneditable.

Specified by:
initSiteParams in class AttenuationRelationship

initEqkRuptureParams

protected void initEqkRuptureParams()
Creates the two Potential Earthquake parameters (magParam and fltTypeParam) and adds them to the eqkRuptureParams list. Makes the parameters noneditable.

Specified by:
initEqkRuptureParams in class AttenuationRelationship

initPropagationEffectParams

protected void initPropagationEffectParams()
Creates the Propagation Effect parameters and adds them to the propagationEffectParams list. Makes the parameters noneditable.

Specified by:
initPropagationEffectParams in class AttenuationRelationship

initSupportedIntensityMeasureParams

protected void initSupportedIntensityMeasureParams()
Creates the two supported IM parameters (PGA and SA), as well as the independenParameters of SA (periodParam and dampingParam) and adds them to the supportedIMParams list. Makes the parameters noneditable.

Specified by:
initSupportedIntensityMeasureParams in class AttenuationRelationship

initOtherParams

protected void initOtherParams()
Creates other Parameters that the mean or stdDev depends upon, such as the Component or StdDevType parameters.

Overrides:
initOtherParams in class AttenuationRelationship

getName

public String getName()
get the name of this IMR

Specified by:
getName in interface Named
Specified by:
getName in interface IntensityMeasureRelationship
Overrides:
getName in class AbstractIMR
Returns:
the name of this IMR

getShortName

public String getShortName()
Returns the Short Name of each AttenuationRelationship

Specified by:
getShortName in interface ShortNamed
Specified by:
getShortName in interface IntensityMeasureRelationship
Returns:
String

getMean

public double getMean(int iper,
                      double vs30,
                      double rRup,
                      double distJB,
                      double f_rv,
                      double f_nm,
                      double mag,
                      double dip,
                      double depthTop,
                      double depthTo2pt5kmPerSec,
                      boolean magSaturation,
                      double pga_rock)
Parameters:
iper -
vs30 -
rRup -
distJB -
f_rv -
f_nm -
mag -
depthTop -
depthTo2pt5kmPerSec -
magSaturation -
pga_rock -
Returns:

getStdDev

public double getStdDev(int iper,
                        String stdDevType,
                        String component,
                        double vs30,
                        double rock_pga)
Parameters:
iper -
stdDevType -
component -
Returns:

parameterChange

public void parameterChange(ParameterChangeEvent e)
This listens for parameter changes and updates the primitive parameters accordingly

Specified by:
parameterChange in interface ParameterChangeListener
Parameters:
e - ParameterChangeEvent

resetParameterEventListeners

public void resetParameterEventListeners()
Allows to reset the change listeners on the parameters

Specified by:
resetParameterEventListeners in interface ScalarIMR
Overrides:
resetParameterEventListeners in class AttenuationRelationship

initParameterEventListeners

protected void initParameterEventListeners()
Adds the parameter change listeners. This allows to listen to when-ever the parameter is changed.

Overrides:
initParameterEventListeners in class AttenuationRelationship

getInfoURL

public URL getInfoURL()
               throws MalformedURLException
This provides a URL where more info on this model can be obtained

Specified by:
getInfoURL in interface IntensityMeasureRelationship
Overrides:
getInfoURL in class AbstractIMR
Returns:
the URL to the AttenuationRelationship document on the Web.
Throws:
MalformedURLException - if returned URL is not a valid URL.

main

public static void main(String[] args)
This tests DistJB numerical precision with respect to the f_hngR term. Looks OK now.

Parameters:
args -