org.opensha.sha.earthquake.rupForecastImpl.WGCEP_UCERF_2_Final
Class UnsegmentedSource

java.lang.Object
  extended by org.opensha.sha.earthquake.ProbEqkSource
      extended by org.opensha.sha.earthquake.rupForecastImpl.WGCEP_UCERF_2_Final.UnsegmentedSource
All Implemented Interfaces:
Serializable, Iterable<ProbEqkRupture>, Named, EqkSource

public class UnsegmentedSource
extends ProbEqkSource

Title: UnsegmentedSource

Description: The EmpricalModel option only influence what's returned by the getRupture() method (it doesn't influence any other diagnostics included what's returned by getMagFreqDist). Need to add floating in down-dip direction since NGAs will use this If Asismicity is applied as a reduction of area, then effective all down-dip widths (DDW) are reduced, and given a single value applied to all segments (DDW = the total reduced area divided by total length).

Copyright: Copyright (c) 2002

Company:

Version:
1.0
Author:
Ned Field
See Also:
Serialized Form

Field Summary
static int CENTERED_DOWNDIP_FLOATER
           
static double DEFAULT_DURATION
           
protected  double duration
           
static int FULL_DDW_FLOATER
           
protected  String NAME
           
protected  ArbitrarilyDiscretizedFunc origSlipRateFunc
           
protected  ArbitrarilyDiscretizedFunc predSlipRateFunc
           
static int STRIKE_AND_DOWNDIP_FLOATER
           
protected  LocationList surfaceLocList
           
 
Fields inherited from class org.opensha.sha.earthquake.ProbEqkSource
isPoissonian, name
 
Constructor Summary
UnsegmentedSource(FaultSegmentData segmentData, EmpiricalModel empiricalModel, double rupOffset, double weight, double empiricalModelWeight, double duration, boolean applyCyberShakeDDW_Corr, int floaterType, double fixMag)
          Description: The constructs the source for the average UCERF2 logic tree branch, where param values have been hard coded.
UnsegmentedSource(FaultSegmentData segmentData, EmpiricalModel empiricalModel, double rupOffset, double b_valueGR_1, double b_valueGR_2, double weight, double empiricalModelWeight, double duration, double moRate, double fractCharVsGR, boolean applyCyberShakeDDW_Corr, int floaterType, double fixMag)
          this is used for making A-Faults sources for Average UCERF2 Description: The constructs the source for the average UCERF2 logic tree branch, where param values have been hard coded.
UnsegmentedSource(FaultSegmentData segmentData, MagAreaRelationship magAreaRel, double fractCharVsGR, double min_mag, double max_mag, int num_mag, double charMagSigma, double charMagTruncLevel, double mag_lowerGR, double b_valueGR, double moRateReduction, double fixMag, double fixRate, double meanMagCorrection, EmpiricalModel empiricalModel, int floaterType)
          Description: The constructs the source as a fraction of charateristic (Gaussian) and GR
 
Method Summary
protected  void computeSlipRateAlongFault(ArbitrarilyDiscretizedFunc slipRateFunc, ArrayList<ArbitrarilyDiscretizedFunc> magBasedFuncs, boolean isSlipRateCorrection)
          Compute the slip rate along fault.
 LocationList getAllSourceLocs()
          It returns a list of all the locations which make up the surface for this source.
 IncrementalMagFreqDist getCharMagFreqDist()
          The returns the characteristic mag freq dist if it exists (i.e., the constructor that specifies a fraction of char vs GR was used)
 FaultSegmentData getFaultSegmentData()
          Get fault segment data
 double getFinalAveSegSlipRate(int ithSegment)
          Final, implied average, slip rate on the segment
 ArbitrarilyDiscretizedFunc getFinalSlipRateAlongFault()
          Get final slip Rate along fault
 double getFixMag()
          Get B Fault Mag Fix (Some B faults have Mag fix which is specified in a text file)
 double getFixRate()
          Get B Fault Rate Fix (Some B faults have Rate fix which is specified in a text file)
 IncrementalMagFreqDist getGR_MagFreqDist()
          The returns the GR mag freq dist if it exists (i.e., the constructor that specifies a fraction of char vs GR was used)
 ArrayList<ArbitrarilyDiscretizedFunc> getMagBasedFinalSlipRateListAlongFault()
          Get Mag Based slip rate func list along the fault.
 IncrementalMagFreqDist getMagFreqDist()
          Get the Mag Freq Dist for the source
 double getMinDistance(Site site)
          This returns the shortest dist to either end of the fault trace, or to the mid point of the fault trace.
 double getMomentRate()
          Get the reduced moment rate
 double getMoRateReduction()
          Moment rate reduction
 String getName()
          get the name of this class
 double[] getNormModSlipRateResids()
          Compute Normalized Segment Slip-Rate Residuals (where orig slip-rate and stddev are reduces by the fraction of moment rate removed)
 String getNSHMP_Char_SrcFileString()
          Get NSHMP Char Source File String.
 String getNSHMP_GR_SrcFileString()
          Get NSHMP GR Source File String.
 int getNumRuptures()
          Get the number of ruptures for this source
 ArbitrarilyDiscretizedFunc getOrigSlipRateAlongFault()
          Get Original Slip Rate along fault (e.g., w/ step functions at segment boundaries)
 double getPredEventRate(Location loc)
          Get rate at a particular location on the fault trace.
 double getPredObsEventRate(Location loc)
          Get the "observed" rate at a particular location on the fault trace.
 double getPredSlipRate(Location loc)
          Get rate at a particular location on the fault trace.
 ProbEqkRupture getRupture(int nthRupture)
          This gets the ProbEqkRupture object for the nth Rupture
 ArbDiscrEmpiricalDistFunc getSegmentSlipDist(int ithSegment)
          Get Slip Distribution for this segment
 ArbDiscrEmpiricalDistFunc getSegmentVisibleSlipDist(int ithSegment)
          Get Visible Slip Distribution for this segment
 double getSourceGain()
          This returns the source gain
 double getSourceMag()
          This returns of magnitude computed for the characteristic earthquake (and upper mag of the GR) if that constructor was used (no mag PDF given)
 AbstractEvenlyGriddedSurfaceWithSubsets getSourceSurface()
          This gives the entire surface of the source
 IncrementalMagFreqDist getVisibleSourceMagFreqDist()
          Get the Mag Freq Dist for "visible" source ruptures
static void main(String[] args)
          this is to test the code
 void setDuration(double yrs)
          Set the time span in years
 
Methods inherited from class org.opensha.sha.earthquake.ProbEqkSource
computeApproxTotalProbAbove, computeEquivTotalMomentRate, computeTotalEquivMeanAnnualRate, computeTotalProb, computeTotalProbAbove, computeTotalProbAbove, drawRandomEqkRuptureIndices, drawRandomEqkRuptures, drawSingleRandomEqkRuptureIndex, getInfo, getRuptureClone, getRuptureList, getRupturesIterator, getSourceMetadata, getTectonicRegionType, isPoissonianSource, isSourcePoissonian, iterator, setInfo, setTectonicRegionType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

duration

protected double duration

DEFAULT_DURATION

public static final double DEFAULT_DURATION
See Also:
Constant Field Values

NAME

protected String NAME

surfaceLocList

protected LocationList surfaceLocList

origSlipRateFunc

protected ArbitrarilyDiscretizedFunc origSlipRateFunc

predSlipRateFunc

protected ArbitrarilyDiscretizedFunc predSlipRateFunc

FULL_DDW_FLOATER

public static final int FULL_DDW_FLOATER
See Also:
Constant Field Values

STRIKE_AND_DOWNDIP_FLOATER

public static final int STRIKE_AND_DOWNDIP_FLOATER
See Also:
Constant Field Values

CENTERED_DOWNDIP_FLOATER

public static final int CENTERED_DOWNDIP_FLOATER
See Also:
Constant Field Values
Constructor Detail

UnsegmentedSource

public UnsegmentedSource(FaultSegmentData segmentData,
                         EmpiricalModel empiricalModel,
                         double rupOffset,
                         double weight,
                         double empiricalModelWeight,
                         double duration,
                         boolean applyCyberShakeDDW_Corr,
                         int floaterType,
                         double fixMag)
Description: The constructs the source for the average UCERF2 logic tree branch, where param values have been hard coded. Note that not all derivative info is generate here (such as segSlipDist[]) this is used for making B-Faults sources for Average UCERF2

Parameters:
floaterType - - FULL_DDW_FLOATER (0) = only along strike ( rupture full DDW); STRIKE_AND_DOWNDIP_FLOATER (1) = float along strike and down dip; CENTERED_DOWNDIP_FLOATER (2) = float along strike & centered down dip

UnsegmentedSource

public UnsegmentedSource(FaultSegmentData segmentData,
                         EmpiricalModel empiricalModel,
                         double rupOffset,
                         double b_valueGR_1,
                         double b_valueGR_2,
                         double weight,
                         double empiricalModelWeight,
                         double duration,
                         double moRate,
                         double fractCharVsGR,
                         boolean applyCyberShakeDDW_Corr,
                         int floaterType,
                         double fixMag)
this is used for making A-Faults sources for Average UCERF2 Description: The constructs the source for the average UCERF2 logic tree branch, where param values have been hard coded. Note that not all derivative info is generate here (such as segSlipDist[]).

Parameters:
floaterType - - FULL_DDW_FLOATER (0) = only along strike ( rupture full DDW); STRIKE_AND_DOWNDIP_FLOATER (1) = float along strike and down dip; CENTERED_DOWNDIP_FLOATER (2) = float along strike & centered down dip

UnsegmentedSource

public UnsegmentedSource(FaultSegmentData segmentData,
                         MagAreaRelationship magAreaRel,
                         double fractCharVsGR,
                         double min_mag,
                         double max_mag,
                         int num_mag,
                         double charMagSigma,
                         double charMagTruncLevel,
                         double mag_lowerGR,
                         double b_valueGR,
                         double moRateReduction,
                         double fixMag,
                         double fixRate,
                         double meanMagCorrection,
                         EmpiricalModel empiricalModel,
                         int floaterType)
Description: The constructs the source as a fraction of charateristic (Gaussian) and GR

Parameters:
floaterType - - FULL_DDW_FLOATER (0) = only along strike ( rupture full DDW); STRIKE_AND_DOWNDIP_FLOATER (1) = float along strike and down dip; CENTERED_DOWNDIP_FLOATER (2) = float along strike & centered down dip
Method Detail

getMagBasedFinalSlipRateListAlongFault

public ArrayList<ArbitrarilyDiscretizedFunc> getMagBasedFinalSlipRateListAlongFault()
Get Mag Based slip rate func list along the fault. These are for uncorrected slip rates

Returns:

computeSlipRateAlongFault

protected void computeSlipRateAlongFault(ArbitrarilyDiscretizedFunc slipRateFunc,
                                         ArrayList<ArbitrarilyDiscretizedFunc> magBasedFuncs,
                                         boolean isSlipRateCorrection)
Compute the slip rate along fault. For Uncorrected slip rate, it gets rupture from parent class For corrected slip rate, it gets rupture from this class.

Parameters:
slipRateFunc -
isSlipRateCorrection -

getFinalSlipRateAlongFault

public ArbitrarilyDiscretizedFunc getFinalSlipRateAlongFault()
Get final slip Rate along fault

Returns:

getOrigSlipRateAlongFault

public ArbitrarilyDiscretizedFunc getOrigSlipRateAlongFault()
Get Original Slip Rate along fault (e.g., w/ step functions at segment boundaries)

Returns:

getMoRateReduction

public double getMoRateReduction()
Moment rate reduction

Returns:

getMomentRate

public double getMomentRate()
Get the reduced moment rate

Returns:

getNormModSlipRateResids

public double[] getNormModSlipRateResids()
Compute Normalized Segment Slip-Rate Residuals (where orig slip-rate and stddev are reduces by the fraction of moment rate removed)


getSourceMag

public double getSourceMag()
This returns of magnitude computed for the characteristic earthquake (and upper mag of the GR) if that constructor was used (no mag PDF given)

Returns:

getFixMag

public double getFixMag()
Get B Fault Mag Fix (Some B faults have Mag fix which is specified in a text file)

Returns:

getFixRate

public double getFixRate()
Get B Fault Rate Fix (Some B faults have Rate fix which is specified in a text file)

Returns:

getFaultSegmentData

public FaultSegmentData getFaultSegmentData()
Get fault segment data

Returns:

getFinalAveSegSlipRate

public double getFinalAveSegSlipRate(int ithSegment)
Final, implied average, slip rate on the segment


getSegmentSlipDist

public ArbDiscrEmpiricalDistFunc getSegmentSlipDist(int ithSegment)
Get Slip Distribution for this segment

Parameters:
ithSegment -
Returns:

getSegmentVisibleSlipDist

public ArbDiscrEmpiricalDistFunc getSegmentVisibleSlipDist(int ithSegment)
Get Visible Slip Distribution for this segment

Parameters:
ithSegment -
Returns:

getMagFreqDist

public IncrementalMagFreqDist getMagFreqDist()
Get the Mag Freq Dist for the source

Returns:

getCharMagFreqDist

public IncrementalMagFreqDist getCharMagFreqDist()
The returns the characteristic mag freq dist if it exists (i.e., the constructor that specifies a fraction of char vs GR was used)

Returns:

getGR_MagFreqDist

public IncrementalMagFreqDist getGR_MagFreqDist()
The returns the GR mag freq dist if it exists (i.e., the constructor that specifies a fraction of char vs GR was used)

Returns:

getVisibleSourceMagFreqDist

public IncrementalMagFreqDist getVisibleSourceMagFreqDist()
Get the Mag Freq Dist for "visible" source ruptures

Returns:

getPredSlipRate

public double getPredSlipRate(Location loc)
Get rate at a particular location on the fault trace. It is calculated by adding the rates of all ruptures that include that location.

Parameters:
loc -
distanceCutOff - - rupture included in total if point on surface is within this distance
Returns:

getPredEventRate

public double getPredEventRate(Location loc)
Get rate at a particular location on the fault trace. It is calculated by adding the rates of all ruptures that include that location.

Parameters:
loc -
distanceCutOff - - rupture included in total if point on surface is within this distance
Returns:

getPredObsEventRate

public double getPredObsEventRate(Location loc)
Get the "observed" rate at a particular location on the fault trace. By "observed" we mean reduce the rate according to the probability that each rupture might not be seen in paleoseismic data. It is calculated by adding the rates*prob_obs of all ruptures that include that location.

Parameters:
loc -
distanceCutOff - - rupture included in total if point on surface is within this distance
Returns:

getNSHMP_GR_SrcFileString

public String getNSHMP_GR_SrcFileString()
Get NSHMP GR Source File String. This method is needed to create file for NSHMP. NOTE that the a-value here is the incremental rate between magnitude -delta/2 to delta/2.

Returns:

getNSHMP_Char_SrcFileString

public String getNSHMP_Char_SrcFileString()
Get NSHMP Char Source File String. This method is needed to create file for NSHMP. NOTE that the a-value here is the incremental rate between magnitude -delta/2 to delta/2.

Returns:

getSourceSurface

public AbstractEvenlyGriddedSurfaceWithSubsets getSourceSurface()
Description copied from interface: EqkSource
This gives the entire surface of the source

Returns:

getNumRuptures

public int getNumRuptures()
Description copied from class: ProbEqkSource
Get the number of ruptures for this source

Specified by:
getNumRuptures in interface EqkSource
Specified by:
getNumRuptures in class ProbEqkSource
Returns:
returns an integer value specifying the number of ruptures for this source

getRupture

public ProbEqkRupture getRupture(int nthRupture)
This gets the ProbEqkRupture object for the nth Rupture

Specified by:
getRupture in interface EqkSource
Specified by:
getRupture in class ProbEqkSource

getSourceGain

public double getSourceGain()
This returns the source gain

Returns:

setDuration

public void setDuration(double yrs)
Set the time span in years

Parameters:
yrs - : timeSpan as specified in Number of years

getMinDistance

public double getMinDistance(Site site)
This returns the shortest dist to either end of the fault trace, or to the mid point of the fault trace.

Specified by:
getMinDistance in class ProbEqkSource
Parameters:
site -
Returns:
minimum distance

getName

public String getName()
get the name of this class

Specified by:
getName in interface Named
Overrides:
getName in class ProbEqkSource
Returns:

main

public static void main(String[] args)
this is to test the code

Parameters:
args -

getAllSourceLocs

public LocationList getAllSourceLocs()
It returns a list of all the locations which make up the surface for this source.

Returns:
LocationList - List of all the locations which constitute the surface of this source