org.opensha.sha.imr.attenRelImpl
Class CY_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.CY_2008_AttenRel
All Implemented Interfaces:
Serializable, Comparable<IntensityMeasureRelationship>, EventListener, Named, ShortNamed, XMLSaveable, ParameterChangeListener, IntensityMeasureRelationship, ScalarIMR
Direct Known Subclasses:
NSHMP08_WUS.NSHMP_CY_2008

public class CY_2008_AttenRel
extends AttenuationRelationship
implements ParameterChangeListener

Implementation of the Chiou & Youngs (2008) next generation attenuation relationship (NGA). See: Earthquake Spectra, Volume 24, No. 1, pages 173???215.

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). The same is true for distRupMinusDistX_OverRupParam.

When setting parameters from a passed-in EqkRupture, aftershockParam is always set to false (we could change this if aftershock info is added to an EqkRupture, but it's not clear this is justified).

If depthTo1pt0kmPerSecParam is null, it is set from Vs30 using their equation (1).

Verification - This model has been tested against: 1) a verification file generated independently by Ken Campbell, implemented in the JUnit test class CY_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: CY_2008_AttenRel.java 8360 2011-11-17 20:36:39Z pmpowers $
Author:
Edward H. Field
See Also:
Serialized Form

Field Summary
protected static double[] c1
           
protected static double[] c10
           
protected static double[] c1a
           
protected static double[] c1b
           
protected static double c2
           
protected static double c3
           
protected static double c4
           
protected static double c4a
           
protected static double[] c5
           
protected static double[] c6
           
protected static double[] c7
           
protected static double[] c7a
           
protected static double[] c9
           
protected static double[] c9a
           
protected static double[] cg1
           
protected static double[] cg2
           
protected static double cg3
           
protected static double chm
           
protected static double[] cm
           
protected static double[] cn
           
protected static double crb
           
protected static double DEPTH_1pt0_WARN_MAX
           
protected static double DEPTH_1pt0_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
           
protected static double DISTANCE_X_WARN_MAX
           
protected static double DISTANCE_X_WARN_MIN
           
static String FLT_TYPE_NORMAL
           
static String FLT_TYPE_REVERSE
           
static String FLT_TYPE_STRIKE_SLIP
           
protected  double lnYref
           
protected  boolean lnYref_is_not_fresh
           
protected static double MAG_WARN_MAX
           
protected static double MAG_WARN_MIN
           
static String NAME
           
protected static double[] period
           
protected static Double PERIOD_DEFAULT
           
protected static double[] phi1
           
protected static double[] phi2
           
protected static double[] phi3
           
protected static double[] phi4
           
protected static double[] phi5
           
protected static double[] phi6
           
protected static double[] phi7
           
protected static double[] phi8
           
protected static double RUP_TOP_WARN_MAX
           
protected static double RUP_TOP_WARN_MIN
           
static String SHORT_NAME
           
protected static double[] sig1
           
protected static double[] sig2
           
protected static double[] sig3
           
protected static double[] sig4
           
protected static double[] tau1
           
protected static double[] tau2
           
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
CY_2008_AttenRel(ParameterChangeWarningListener listener)
          Constructs a new instance of this attenuation relationship.
 
Method Summary
protected  void compute_lnYref(int iper, double f_rv, double f_nm, double rRup, double distRupMinusJB_OverRup, double distRupMinusDistX_OverRup, double f_hw, double dip, double mag, double depthTop, double aftershock)
          This method returns lnYref (equation 13a in their paper).
 URL getInfoURL()
          This provides a URL where more info on this model can be obtained
 double getMean()
          Calculates the mean value.
 double getMean(int iper, double vs30, double f_rv, double f_nm, double rRup, double distRupMinusJB_OverRup, double depthTo1pt0kmPerSec, double distRupMinusDistX_OverRup, double f_hw, double dip, double mag, double depthTop, double aftershock)
          This gets the mean for specific parameter settings.
 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, double vs30, double f_rv, double f_nm, double rRup, double distRupMinusJB_OverRup, double distRupMinusDistX_OverRup, double f_hw, double dip, double mag, double depthTop, double aftershock, String stdDevType, double f_meas)
          This gets the standard deviation for specific parameter settings.
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.
 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

NAME

public static final String NAME
See Also:
Constant Field Values

SHORT_NAME

public static final String SHORT_NAME
See Also:
Constant Field Values

period

protected static final double[] period

c1

protected static final double[] c1

c1a

protected static final double[] c1a

c1b

protected static final double[] c1b

cn

protected static final double[] cn

cm

protected static final double[] cm

c5

protected static final double[] c5

c6

protected static final double[] c6

c7

protected static final double[] c7

c7a

protected static final double[] c7a

c9

protected static final double[] c9

c9a

protected static final double[] c9a

c10

protected static final double[] c10

cg1

protected static final double[] cg1

cg2

protected static final double[] cg2

phi1

protected static final double[] phi1

phi2

protected static final double[] phi2

phi3

protected static final double[] phi3

phi4

protected static final double[] phi4

phi5

protected static final double[] phi5

phi6

protected static final double[] phi6

phi7

protected static final double[] phi7

phi8

protected static final double[] phi8

tau1

protected static final double[] tau1

tau2

protected static final double[] tau2

sig1

protected static final double[] sig1

sig2

protected static final double[] sig2

sig3

protected static final double[] sig3

sig4

protected static final double[] sig4

c2

protected static final double c2
See Also:
Constant Field Values

c3

protected static final double c3
See Also:
Constant Field Values

c4

protected static final double c4
See Also:
Constant Field Values

c4a

protected static final double c4a
See Also:
Constant Field Values

crb

protected static final double crb
See Also:
Constant Field Values

chm

protected static final double chm
See Also:
Constant Field Values

cg3

protected static final double cg3
See Also:
Constant Field Values

PERIOD_DEFAULT

protected static final Double PERIOD_DEFAULT

lnYref

protected double lnYref

lnYref_is_not_fresh

protected boolean lnYref_is_not_fresh

MAG_WARN_MIN

protected static final double MAG_WARN_MIN
See Also:
Constant Field Values

MAG_WARN_MAX

protected static final double MAG_WARN_MAX
See Also:
Constant Field Values

DISTANCE_RUP_WARN_MIN

protected static final double DISTANCE_RUP_WARN_MIN
See Also:
Constant Field Values

DISTANCE_RUP_WARN_MAX

protected static final double DISTANCE_RUP_WARN_MAX
See Also:
Constant Field Values

DISTANCE_MINUS_WARN_MIN

protected static final double DISTANCE_MINUS_WARN_MIN
See Also:
Constant Field Values

DISTANCE_MINUS_WARN_MAX

protected static final double DISTANCE_MINUS_WARN_MAX
See Also:
Constant Field Values

DISTANCE_X_WARN_MIN

protected static final double DISTANCE_X_WARN_MIN
See Also:
Constant Field Values

DISTANCE_X_WARN_MAX

protected static final double DISTANCE_X_WARN_MAX
See Also:
Constant Field Values

VS30_WARN_MIN

protected static final double VS30_WARN_MIN
See Also:
Constant Field Values

VS30_WARN_MAX

protected static final double VS30_WARN_MAX
See Also:
Constant Field Values

RUP_TOP_WARN_MIN

protected static final double RUP_TOP_WARN_MIN
See Also:
Constant Field Values

RUP_TOP_WARN_MAX

protected static final double RUP_TOP_WARN_MAX
See Also:
Constant Field Values

DEPTH_1pt0_WARN_MIN

protected static final double DEPTH_1pt0_WARN_MIN
See Also:
Constant Field Values

DEPTH_1pt0_WARN_MAX

protected static final double DEPTH_1pt0_WARN_MAX
See Also:
Constant Field Values

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
Constructor Detail

CY_2008_AttenRel

public CY_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 Chiou and Youngs 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 value.

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 f_rv,
                      double f_nm,
                      double rRup,
                      double distRupMinusJB_OverRup,
                      double depthTo1pt0kmPerSec,
                      double distRupMinusDistX_OverRup,
                      double f_hw,
                      double dip,
                      double mag,
                      double depthTop,
                      double aftershock)
This gets the mean for specific parameter settings. We might want another version that takes the actual SA period rather than the period index.

Parameters:
iper -
vs30 -
f_rv -
f_nm -
rRup -
distRupMinusJB_OverRup -
depthTo1pt0kmPerSec -
distRupMinusDistX_OverRup -
f_hw -
dip -
mag -
depthTop -
aftershock -
Returns:

compute_lnYref

protected void compute_lnYref(int iper,
                              double f_rv,
                              double f_nm,
                              double rRup,
                              double distRupMinusJB_OverRup,
                              double distRupMinusDistX_OverRup,
                              double f_hw,
                              double dip,
                              double mag,
                              double depthTop,
                              double aftershock)
This method returns lnYref (equation 13a in their paper). This could test whether parameters have changed, and only update lnYref if so (more efficient since it's compute for both mean and stddev)

Parameters:
iper -
f_rv -
f_nm -
rRup -
distRupMinusJB_OverRup -
distRupMinusDistX_OverRup -
f_hw -
dip -
mag -
depthTop -
aftershock -

getStdDev

public double getStdDev(int iper,
                        double vs30,
                        double f_rv,
                        double f_nm,
                        double rRup,
                        double distRupMinusJB_OverRup,
                        double distRupMinusDistX_OverRup,
                        double f_hw,
                        double dip,
                        double mag,
                        double depthTop,
                        double aftershock,
                        String stdDevType,
                        double f_meas)
This gets the standard deviation for specific parameter settings. We might want another version that takes the actual SA period rather than the period index.

Parameters:
iper -
vs30 -
f_rv -
f_nm -
rRup -
distRupMinusJB_OverRup -
distRupMinusDistX_OverRup -
f_hw -
dip -
mag -
depthTop -
aftershock -
stdDevType -
f_meas -
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.