SLBM  3.0
Regional Seismic Travel Time
Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
slbm::CrustalProfile Class Reference

A profile through the Earth model that stores interface radius, and interval P or S wave velocity information about the crustal stack below either the source or the receiver. More...

#include <CrustalProfile.h>

Inherits slbm::InterpolatedProfile.

Public Member Functions

 CrustalProfile ()
 Default constructor. More...
 
 CrustalProfile (const CrustalProfile &CrustalProfile)
 Copy constructor. More...
 
virtual ~CrustalProfile ()
 
CrustalProfileoperator= (const CrustalProfile &other)
 Equal operator. More...
 
bool operator== (const CrustalProfile &other)
 Equality operator. More...
 
bool operator!= (const CrustalProfile &other)
 Inequality operator. More...
 
void setup (Grid &grid, const int &phase, const double &lat, const double &lon, const double &depth)
 Parameterized constructor. More...
 
const LocationgetLocation () const
 Retrieve a const reference to the Location associated with this Profile. More...
 
double getEarthRadius ()
 
int getNIntervals ()
 Retrieve the number of intervals associated with this Profile. More...
 
void getData (vector< double > &depths, vector< double > &velocities)
 Retrieve all the interval depth and velocity information contained in this CrustalProfile object. More...
 
double getInterfaceRadius (const int &k)
 Retrieve the radius of the top of the k'th interval, in km. More...
 
void getDepths (double *depths)
 Retrieve the depths of the top of each intervals, in km. More...
 
double * getVelocities ()
 Retrieve the P or S wave velocity of each interval, in km/sec. More...
 
double getDepth (const int &k)
 Retrieve the depth of the top of the k'th interval, in km. More...
 
double getVelocity (const int &k)
 Retrieve the P or S wave velocity of the k'th interval, in km/sec. More...
 
double getPCrit (GreatCircle *greatCircle)
 Retrieve the critical spherical ray parameter for this profile, in radians/seconds. More...
 
void xtCrust (GreatCircle *greatCircle, const double &rayParameter, double &xTotal, double &tTotal)
 Compute the horizontal offset (radians) and the travel time (sec) of the ray through the crust. More...
 
void xtCrust (GreatCircle *greatCircle, const double &rayParameter, int layid[], double x[], double r[], double v[], double t[], int &npoints)
 Compute the horizontal offset (radians) and the travel time (sec) of the ray through the crust. More...
 
const int * getLayid ()
 
int getNLayid ()
 
int getTopLayid ()
 
string toString (GreatCircle *greatCircle, double rayParameter)
 Returns a formatted string containing detailed information about this Profile. More...
 
string toString ()
 
size_t memSize ()
 
void setTauPSite (taup::TauPSite *tps)
 Set the input TauPSite into this CrustalProfile;. More...
 
taup::TauPSitegetTauPSite ()
 Return this CrustalProfiles TauPSite object;. More...
 
bool isInCrust ()
 true location radius > moho radius. More...
 
- Public Member Functions inherited from slbm::InterpolatedProfile
 InterpolatedProfile ()
 Default constructor. More...
 
 InterpolatedProfile (Grid &grid, Location &location)
 Parameterized constructor. More...
 
 InterpolatedProfile (const InterpolatedProfile &other)
 Copy constructor. More...
 
virtual ~InterpolatedProfile ()
 Destructor. More...
 
InterpolatedProfileoperator= (const InterpolatedProfile &other)
 Equal operator. More...
 
bool operator== (const InterpolatedProfile &other)
 Equality operator. More...
 
bool operator!= (const InterpolatedProfile &other)
 Inequality operator. More...
 
int getNCoefficients ()
 
vector< GridProfile * > & getNodes ()
 Retrieve a list of pointers to the GridProfile objects upon which this InterpolatedProfile is dependent. More...
 
GridProfilegetNode (const int &i)
 
vector< int > & getNodeIds ()
 
int getNodeId (const int &i)
 
vector< double > & getCoefficients ()
 Retrieve the interpolation coefficients that define the dependency of this InterpolatedProfile on its neighbors. More...
 
double getCoefficient (const int &i)
 
void getNodeIds (int *nodeIds, int &size)
 Retrieve the ID numbers of the GridProfiles that contributed to the interpolated values at this InterpolatedProfile object. More...
 
void getCoefficients (double *coeff, int &size)
 Retrieve the interpolation coefficients that were applied to the neighboring GridProfiles that contributed to the interpolated values at this InterpolatedProfile object. More...
 
void getWeights (int *nodeIds, double *coeff, int &size)
 
void interpRadius (const int &k, double &radius)
 Calculate a single radius value based on the neighboring GridProfile objects and the interpolation coefficients. More...
 
void interpDepth (const int &k, double &depth)
 Calculate a single depth value based on the neighboring GridProfile objects and the interpolation coefficients. More...
 
void interpVelocity (const int &type, const int &k, double &velocity)
 Calculate a single velocity value based on the neighboring GridProfile objects and the interpolation coefficients. More...
 
void interpGradient (const int &type, double &gradient)
 Calculate a single gradient value based on the neighboring GridProfile objects and the interpolation coefficients. More...
 
bool isActiveProfile ()
 Returns true if all of the neighboring GridProfile objects. More...
 

Static Public Member Functions

static int getClassCount ()
 
- Static Public Member Functions inherited from slbm::InterpolatedProfile
static int getClassCount ()
 

Private Attributes

Location location
 The Location object that defines this CrustalProfile object. More...
 
bool inCrust
 true location radius > moho radius. More...
 
int phase
 The phase that this CrustalProfile represents. More...
 
double radius [NLAYERS]
 Radius of the top of each interval, in km. More...
 
double velocity [NLAYERS]
 The P or S velocity of each layer, in km/sec. More...
 
int layid [NLAYERS]
 Indexes of non-zero thickness layers. More...
 
int nlay
 Number of entries in layid. More...
 
int topLayid
 Index of entry in layid that represents the layer that contains location radius. More...
 
int nMiddleCrust
 The index of the entry in layid that corresponds to the SLBMGlobals::MIDDLE_CRUST. More...
 
double fudgeFactor
 For Pg/Lg, fudgeFactor is a factor applied to all velocities above the middle crust to ensure that the velocity of the upper crust is less than or equal to the Pg/Lg velocity of the middle crust minus 0.1 km/sec. More...
 
taup::TauPSitecpTPS
 A single TaupSite object used to calculate travel time near a receiver when the SLBM method fails or is inaccurate. More...
 

Static Private Attributes

static int crustalProfileClassCount
 

Additional Inherited Members

- Protected Attributes inherited from slbm::InterpolatedProfile
vector< GridProfile * > nodes
 An array of pointers to the GridProfile objects upon which this InterpolatedProfile is dependent. More...
 
vector< int > nodeIds
 An array of pointers to the GridProfile objects upon which this InterpolatedProfile is dependent. More...
 
vector< double > coefficients
 The interpolation coefficients which should be applied to this InterpolatedProfile's neighbors in order to compute interpolated quantities. More...
 
- Static Protected Attributes inherited from slbm::InterpolatedProfile
static int interpolatedProfileClassCount
 

Detailed Description

The CrustalProfile class represents a Profile based on radius and P or S wave velocity values interpolated from values of nearby GridProfile objects. A CrustalProfile object should be acquired by calling Grid::getCrustalProfile().

CrustalProfile owns a Location object which defines a point in the Earth. For CrustalProfile objects that represent a seismic source, the Location object represents the latitude, longitude and depth of the event. For CrustalProfile objects that represent a seismic receiver, the Location object represents the latitude, longitude and depth (negative elevation) of the receiver.

Each instance of a CrustalProfile is populated with only the information needed to compute crustal travel time for a particular phase. Supported phases are Pn, Sn, Pg and Lg. Since mantle velocity gradient information is not required to compute crustal travel times, CrustalProfile objects do not store mantle gradient information. CrustalProfile objects to support Pn or Pg store only P wave velocities while those instantiated to support Sn or Lg only store S wave velocity information.

The xtCrust() function computes the travel time (in seconds) and the horizontal offset (in radians) of the ray as it traverses the crust from the depth of the Location object down to the head wave interface (Moho or top of middle crust). xtCrust takes a ray parameter as an arguement. The function will always return an offset and travel time because if the ray parameter exceeds the critical ray parameter for any of the velocity interfaces that the ray has to interact with, the function will decrease the ray parameter enough to successfully travel from the Location depth to the deepest interface it knows about, using a constant ray parameter over the distance traveled.

CrustalProfile objects can be members of multiple GreatCircle objects. Grid maintains a map that associates a phase/Location combination with a particular instance of a CruatalProfile. The map can be cleared by calling Grid::clearCrustalProfiles(), which is also accessible from SlbmInterface::clear().

Constructor & Destructor Documentation

slbm::CrustalProfile::CrustalProfile ( )

Default constructor.

slbm::CrustalProfile::CrustalProfile ( const CrustalProfile CrustalProfile)

Copy constructor.

virtual slbm::CrustalProfile::~CrustalProfile ( )
virtual

Member Function Documentation

static int slbm::CrustalProfile::getClassCount ( )
static
void slbm::CrustalProfile::getData ( vector< double > &  depths,
vector< double > &  velocities 
)
inline

Retrieve all the interval depth and velocity information contained in this CrustalProfile object.

double slbm::CrustalProfile::getDepth ( const int &  k)
inline

Retrieve the depth of the top of the k'th interval, in km.

void slbm::CrustalProfile::getDepths ( double *  depths)
inline

Retrieve the depths of the top of each intervals, in km.

double slbm::CrustalProfile::getEarthRadius ( )
inline
double slbm::CrustalProfile::getInterfaceRadius ( const int &  k)
inline

Retrieve the radius of the top of the k'th interval, in km.

const int* slbm::CrustalProfile::getLayid ( )
inline
const Location& slbm::CrustalProfile::getLocation ( ) const
inline

Retrieve a const reference to the Location associated with this Profile.

Since the Location retrieved is const, the calling application will not be allowed to modify the position of the Location.

int slbm::CrustalProfile::getNIntervals ( )
inline

Retrieve the number of intervals associated with this Profile.

int slbm::CrustalProfile::getNLayid ( )
inline
double slbm::CrustalProfile::getPCrit ( GreatCircle greatCircle)
inline

Retrieve the critical spherical ray parameter for this profile, in radians/seconds. This is R / V where R is the radius at the top of the bottom interval in this profile and V is the velocity of the bottom interval. For Pn and Sn, R will be the radius of the Moho. For Pg and Lg, R will be the radius of the top of the middle crust. For Pn and Pg, V will be the P wave velocity, for Sn and Lg, V will be the S wave velocity.

Parameters
greatCirclethe GreatCircle object that knows which head wave interface to use to compute the interface radius.
taup::TauPSite* slbm::CrustalProfile::getTauPSite ( )
int slbm::CrustalProfile::getTopLayid ( )
inline
double* slbm::CrustalProfile::getVelocities ( )
inline

Retrieve the P or S wave velocity of each interval, in km/sec.

double slbm::CrustalProfile::getVelocity ( const int &  k)
inline

Retrieve the P or S wave velocity of the k'th interval, in km/sec.

bool slbm::CrustalProfile::isInCrust ( )
inline

true if location radius > moho radius.

size_t slbm::CrustalProfile::memSize ( )
virtual

Reimplemented from slbm::InterpolatedProfile.

bool slbm::CrustalProfile::operator!= ( const CrustalProfile other)
inline

Inequality operator.

CrustalProfile& slbm::CrustalProfile::operator= ( const CrustalProfile other)

Equal operator.

bool slbm::CrustalProfile::operator== ( const CrustalProfile other)

Equality operator.

void slbm::CrustalProfile::setTauPSite ( taup::TauPSite tps)
void slbm::CrustalProfile::setup ( Grid grid,
const int &  phase,
const double &  lat,
const double &  lon,
const double &  depth 
)

Parameterized constructor that builds a CrustalProfile object based on values interpolated from nearby GridProfile objects.

Parameters
grida reference to the Grid object. Grid::findProfile() will be called to retrieve the neighbors and interpolation coefficients.
phasethe seismic phase that this CrustalProfile is to support. Must be one of SLBMGlobals::Pn, SLBMGlobals::Sn, SLBMGlobals::Pg, SLBMGlobals::Lg.
latgeographic latitude of the source or receiver in radians.
longeographic longitude of the source or receiver in radians.
depththe depth of the source or receiver in km.
string slbm::CrustalProfile::toString ( GreatCircle greatCircle,
double  rayParameter 
)

Returns a formatted string containing detailed information about this Profile.

Parameters
greatCirclethe GreatCircle object, of which this CrustalProfile is a member, that is requesting the information.
rayParameterthe ray parameter to use to compute interval horizontal This method calls xtCrust() to compute horizontal offsets and travel times in each crustal layer.
string slbm::CrustalProfile::toString ( )
void slbm::CrustalProfile::xtCrust ( GreatCircle greatCircle,
const double &  rayParameter,
double &  xTotal,
double &  tTotal 
)

Computes the travel time (in seconds) and the horizontal offset (in radians) of the ray as it traverses the crust from the depth of the Location object down to the head wave interface (Moho for Pn and Sn, top of middle crust for Pg and Lg).

The horizontal offset is the angular separation of the Location object owned by this CrustalProfile and the pierce point of the ray on the head wave interface.

The function will always return an offset and travel time because if the ray parameter exceeds the critical ray parameter for any of the velocity interfaces that the ray has to interact with, the function will decrease the ray parameter enough to successfully travel from the Location depth to the deepest interface it knows about, using a constant ray parameter over the distance traveled.

Parameters
greatCirclethe GreatCircle object, of which this CrustalProfile is a member, that is requesting the information.
rayParameterthe spherical ray parameter, in radians/sec.
xTotalthe total horizontal offset of the ray as it travelled through the crust, in radians.
tTotalthe total travel time of the ray through the crust, in seconds.
void slbm::CrustalProfile::xtCrust ( GreatCircle greatCircle,
const double &  rayParameter,
int  layid[],
double  x[],
double  r[],
double  v[],
double  t[],
int &  npoints 
)

Computes the travel time (in seconds) and the horizontal offset (in radians) of the ray as it traverses the crust from the depth of the Location object down to the head wave interface (Moho for Pn and Sn, top of middle crust for Pg and Lg).

Unlike the other version of xtCrust(), this version returns information about the horizontal offset and travel time at each interface of the crust that the ray interacts with.

The horizontal offset is the angular separation of the Location object owned by this CrustalProfile and the pierce point of the ray on the head wave interface.

The function will always return offset and travel time information because if the ray parameter exceeds the critical ray parameter for any of the velocity interfaces that the ray has to interact with, the function will decrease the ray parameter enough to successfully travel from the Location depth to the deepest interface it knows about, using a constant ray parameter over the distance traveled.

Parameters
greatCirclethe GreatCircle object, of which this CrustalProfile is a member, that is requesting the information.
rayParameterthe spherical ray parameter, in radians/sec.
layidthe layerid number of each interface that the ray interacted with. Only includes layers below the depth of the Location object and excludes the layerids of zero thickness layers.
xthe horizontal offset of the point where the ray intersected each interface, in radians. The first element is zero, and the last element is the same as the value of xTotal returned by the other version of xtCrust().
rthe radii of the interfaces that the ray interacted with, in km.
vthe velocities of the layers that the ray interacted with, in km/sec.
tthe cumulative travel time of the ray across all the preceeding layers. The first element is zero, and the last element is the same as the value of tTotal returned by the other version of xtCrust().
npointsthe number of elements in arrays layid, x, r, v and t.

Member Data Documentation

taup::TauPSite* slbm::CrustalProfile::cpTPS
private

The attribute (tps) is initialized to null and is only assigned for cases where the CrustalProfile objects is created for a receiver.

int slbm::CrustalProfile::crustalProfileClassCount
staticprivate
double slbm::CrustalProfile::fudgeFactor
private

For Pg/Lg, fudgeFactor is a factor applied to all velocities above the middle crust to ensure that the velocity of the upper crust is less than or equal to the Pg/Lg velocity of the middle crust minus 0.1 km/sec. fudgeFactor will be <= 1.0.

bool slbm::CrustalProfile::inCrust
private

true if location radius > moho radius.

int slbm::CrustalProfile::layid[NLAYERS]
private

Indexes of non-zero thickness layers

Location slbm::CrustalProfile::location
private

The Location object that defines this CrustalProfile object. For sources, the radius of this Location reflects the depth of the event. For receivers, the radius of this Location reflects the elevation of the receiver.

int slbm::CrustalProfile::nlay
private

Number of entries in layid.

int slbm::CrustalProfile::nMiddleCrust
private

The index of the entry in layid that corresponds to the SLBMGlobals::MIDDLE_CRUST

int slbm::CrustalProfile::phase
private

The phase that this CrustalProfile represents. Will be one of SLBMGlobals::Pn, SLBMGlobals::Sn, SLBMGlobals::Pg, SLBMGlobals::Lg.

double slbm::CrustalProfile::radius[NLAYERS]
private

Radius of the top of each interval, in km.

int slbm::CrustalProfile::topLayid
private

Index of entry in layid that represents the layer that contains location radius.

double slbm::CrustalProfile::velocity[NLAYERS]
private

The P or S velocity of each layer, in km/sec.


The documentation for this class was generated from the following file: