RSTT
3.1.0
Regional Seismic Travel Time
|
Go to the documentation of this file.
120 #ifndef SLBM_C_SHELL_H
121 #define SLBM_C_SHELL_H
123 #if defined(_WIN32) || defined(WIN32)
125 #ifndef SLBM_C_EXPORT
126 #define SLBM_LIB __declspec(dllimport)
128 #define SLBM_LIB __declspec(dllexport)
159 static const int PWAVE = 0;
164 static const int SWAVE = 1;
169 static const int Pn = 0;
174 static const int Sn = 1;
179 static const int Pg = 2;
184 static const int Lg = 3;
190 #define UPPER_CRUST 4
191 #define MIDDLE_CRUST_N 5
192 #define MIDDLE_CRUST_G 6
193 #define LOWER_CRUST 7
216 static const int TOP_LAYER = 1;
398 double* receiverLat,
double* receiverLon,
double* receiverDepth );
647 double* pvelocity,
double* svelocity,
double* gradient );
698 double receiverDepth[],
double receiverVelocity[],
int* npoints,
double headWaveVelocity[],
double gradient[]);
730 const int* maxnodes,
int* npoints,
int* nnodes );
757 int* nodeIds,
double* coefficients,
int* nnodes,
double* depth,
double* pvelocity,
758 double* svelocity,
double* pgradient,
double* sgradient );
788 double** coefficients,
int* nNodes,
double depth[][
NLAYERS],
double pvelocity[][
NLAYERS],
1069 double azimuth[],
int* nNeighbors );
1097 double gradient[2] );
1119 double gradient[2] );
1235 double* tHeadwave,
double* pTaup,
double* pHeadwave,
double* trTaup,
double* trHeadwave );
1331 double* distance,
double* azimuth,
double naValue);
1346 double* bLat,
double* bLon);
1362 double depth[],
int* npoints);
1382 int npoints,
double latitude[],
double longitude[]);
1400 int npoints,
double latitude[],
double longitude[]);
1538 int* allocatedSize);
1554 int* allocatedSize);
SLBM_LIB int slbm_shell_getTTUncertainty1D(double *uncertainty)
Retrieve travel time uncertainty in sec. This function will return the non-path-dependent 1D uncertai...
SLBM_LIB int slbm_shell_getWeightsReceiver(int nodeids[], double weights[], int *nWeights)
Retrieve the node IDs and the interpolation coefficients for the receiver CrustalProfile.
SLBM_LIB int slbm_shell_getSourceDistance(double *dist)
Retrieve horizontal offset below the source, in radians.
SLBM_LIB int slbm_shell_getTravelTime(double *travelTime)
Retrieve the total travel time for the GreatCircle, in seconds.
SLBM_LIB int slbm_shell_getDistance(double *dist)
Retrieve the source-receiver separation, in radians.
SLBM_LIB int slbm_shell_getUncertaintyTableFileFormat(int *phaseIndex, int *attributeIndex, char *uncertaintyTable, int *allocatedSize)
Retrieve an inconveniently formated table of the uncertainty values for the specified phaseIndex and ...
SLBM_LIB int slbm_shell_getZhaoParameters(double *Vm, double *Gm, double *H, double *C, double *Cm, int *udSign)
Retrieve some of the parameters that contribute to the calculation of of total travel time using the ...
SLBM_LIB int slbm_shell_getRayParameter(double *rayParameter)
Retrieve the ray parameter in sec/km.
SLBM_LIB int slbm_shell_getNActiveNodes(int *nNodes)
Retrieve the number of active nodes in the Grid.
SLBM_LIB int slbm_shell_getTravelTimeUncertainty(int *phase, double *distance, double *uncertainty)
Retrieve the travel time uncertainty in sec for specified phase, distance.
SLBM_LIB int slbm_shell_getActiveNodeWeightsSource(int nodeids[], double weights[], int *nWeights)
Retrieve the active node IDs and the interpolation coefficients for the source CrustalProfile.
SLBM_LIB int slbm_shell_getDelDepth(double *delDepth)
Retrieve del_depth in km.
SLBM_LIB int slbm_shell_getActiveNodeNeighbors(int *nid, int neighbors[], int *nNeighbors)
Retrieve the node IDs of the nodes that surround the specified node.
SLBM_LIB int slbm_shell_setActiveNodeData(int *nodeId, double depth[NLAYERS], double pvelocity[NLAYERS], double svelocity[NLAYERS], double gradient[2])
Modify the velocity and gradient information associated with a specified active node in the Grid.
SLBM_LIB int slbm_shell_getGreatCirclePointsOnCenters(double aLat, double aLon, double bLat, double bLon, int npoints, double latitude[], double longitude[])
Retrieve an array of lat, lon points along a great circle path between two specified points,...
SLBM_LIB int slbm_shell_getSHUncertainty(double *slownessUncertainty)
Retrieve uncertainty of the horizontal slowness, in seconds/radian using the phase and distance speci...
SLBM_LIB int slbm_shell_setMaxDistance(const double *maxDistance)
Set the maximum source-receiver separation for Pn/Sn phase, in radians.
SLBM_LIB int slbm_shell_getInterpolatedTransect(double lat[], double lon[], int *nLatLon, int **nodeId, double **coefficients, int *nNodes, double depth[][NLAYERS], double pvelocity[][NLAYERS], double svelocity[][NLAYERS], double pgradient[NLAYERS], double sgradient[NLAYERS], int *nInvalid)
Retrieve interpolated data from the earth model along a transect defined by equal sized,...
SLBM_LIB int slbm_shell_setMaxDepth(const double *maxDepth)
Set the maximum source depth for Pn/Sn phase, in km.
SLBM_LIB int slbm_shell_initActiveNodesFile(char *polygonFileName)
Specify the name of a file that contains a list of points that define a polygon that enclose the set ...
SLBM_LIB int slbm_shell_getDelDistance(double *delDistance)
Retrieve del_distance in radians.
SLBM_LIB int slbm_shell_getPgLgComponents(double *tTotal, double *tTaup, double *tHeadwave, double *pTaup, double *pHeadwave, double *trTaup, double *trHeadwave)
Retrieve information about Pg/Lg travel time calculations.
SLBM_LIB int slbm_shell_getModelString(char *modelString, int *allocatedSize)
Retrieve a string describing the contents of the model. Retrieve a string describing the contents of ...
SLBM_LIB int slbm_shell_getFractionActive(double *fractionActive)
Retrieve the fraction of the path length of the current GreatCircle object that is within the current...
SLBM_LIB int slbm_shell_getUncertaintyTable(int *phaseIndex, int *attributeIndex, char *uncertaintyTable, int *allocatedSize)
Retrieve a conveniently formated table of the uncertainty values for the specified phaseIndex and att...
SLBM_LIB int slbm_shell_getMaxDistance(double *maxDistance)
Retrieve the current value for the maximum source-receiver separation, in radians.
SLBM_LIB int slbm_shell_setPathIncrement(double pathIncrement)
Set the desired spacing of great circle nodes along the head wave interface, in radians.
SLBM_LIB int slbm_shell_getSlownessUncertainty(int *phase, double *distance, double *uncert)
Retrieve the slowness uncertainty in sec/radian for specified phase, distance.
SLBM_LIB int slbm_shell_getAverageMantleVelocity(int *type, double *velocity)
Retrieve the average P or S wave mantle velocity that is specified in the model input file,...
SLBM_LIB int slbm_shell_getNodeNeighborInfo(int *nid, int neighbors[], double distance[], double azimuth[], int *nNeighbors)
Retrieve the node IDs of the nodes that surround the specified node.
SLBM_LIB int slbm_shell_getNHeadWavePoints(int *npoints)
Retrieve the number of LayerProfile objects positioned along the head wave interface.
SLBM_LIB int slbm_shell_getMaxDepth(double *maxDepth)
Retrieve the current value for the maximum source depth, in km.
SLBM_LIB int slbm_shell_getTessId(char *tessId)
Retrieve the tessellation ID of the model currently in memory.
SLBM_LIB int slbm_shell_loadVelocityModel(const char *modelPath)
Load the velocity model into memory from the specified file or directory. This method automatically d...
SLBM_LIB int slbm_shell_getWeights(int nodeId[], double weight[], int *nWeights)
Retrieve the weight assigned to each grid node that was touched by the GreatCircle.
SLBM_LIB int slbm_shell_setGridData(int *nodeId, double *depth, double *pvelocity, double *svelocity, double *gradient)
Modify the velocity and gradient information associated with a specified node in the Grid.
SLBM_LIB int slbm_shell_setInterpolatorType(char *interpolatorType)
Specify the interpolation type to use, either 'linear' or 'natural_neighbor'.
SLBM_LIB int slbm_shell_setDelDepth(double delDepth)
Set the value of del_depth, in km.
SLBM_LIB int slbm_shell_clearActiveNodes()
Clear all active nodes. Clear all active nodes.
SLBM_LIB int slbm_shell_movePoint(double aLat, double aLon, double distance, double azimuth, double *bLat, double *bLon)
Find point B that is the specified distance and azimuth from point A. All quantities are in radians.
SLBM_LIB int slbm_shell_getCHMax(double *chMax)
Retrieve the current value of chMax. c is the zhao c parameter and h is the turning depth of the ray ...
SLBM_LIB int slbm_shell_getGridData(int *nodeId, double *latitude, double *longitude, double *depth, double *pvelocity, double *svelocity, double *gradient)
Retrieve the lat (radians), lon (radians), interface depths (km), P and S wave interval velocities (k...
SLBM_LIB int slbm_shell_getTravelTimeComponents(double *tTotal, double *tSource, double *tReceiver, double *tHeadwave, double *tGradient)
Retrieve the total travel time and the 4 components that contribute to it for the current GreatCircle...
SLBM_LIB int slbm_shell_getErrorMessage(char *str)
Retrieve last error message.
SLBM_LIB int slbm_shell_getActiveNodeWeights(int nodeId[], double weight[], int *nWeights)
Retrieve the weight assigned to each active node that was touched by the GreatCircle.
SLBM_LIB int slbm_shell_getGreatCircleLocations(double latitude[], double longitude[], double depth[], int *npoints)
Retrieve the latitudes, longitudes and depths of all the profile positions along the moho.
SLBM_LIB int slbm_shell_isValid()
Returns true if the current GreatCirlce object has been instantiated and is ready to be interrogated.
SLBM_LIB int slbm_shell_getActiveNodeData(int *nodeId, double *latitude, double *longitude, double depth[NLAYERS], double pvelocity[NLAYERS], double svelocity[NLAYERS], double gradient[2])
Retrieve the lat (radians), lon (radians), interface depths (km), P and S wave interval velocities (k...
SLBM_LIB int slbm_shell_toString(char *str, int verbosity)
Returns a human-readable string representation of the GreatCircle object.
SLBM_LIB int slbm_shell_saveVelocityModelFormat(const char *modelFileName, int format)
Save the velocity model currently in memory to the specified file or directory.
SLBM_LIB int slbm_shell_getDistAz(double aLat, double aLon, double bLat, double bLon, double *distance, double *azimuth, double naValue)
compute distance and azimuth between two points, A and B (all quantities are in radians).
SLBM_LIB int slbm_shell_initializeActiveNodes(double *latmin, double *lonmin, double *latmax, double *lonmax)
Specify the latitude and longitude range in radians for active nodes.
SLBM_LIB int slbm_shell_setCHMax(double *chMax)
Set the value of chMax. c is the zhao c parameter and h is the turning depth of the ray below the moh...
SLBM_LIB int slbm_shell_getTTUncertainty(double *uncertainty)
Retrieve travel time uncertainty in sec. This function will call either the path-dependent or 1D unce...
SLBM_LIB int slbm_shell_loadVelocityModelBinary(const char *modelDirectory)
Load the velocity model into memory from the specified file or directory. This method automatically d...
SLBM_LIB int slbm_shell_getHeadwaveDistanceKm(double *dist)
Retrieve horizontal distance traveled by the ray below the headwave interface, in radians.
SLBM_LIB int slbm_shell_saveVelocityModel(const char *modelFileName)
Save the velocity model currently in memory to the specified file.
SLBM_LIB int slbm_shell_getReceiverDistance(double *dist)
Retrieve horizontal offset below the receiver, in radians.
SLBM_LIB int slbm_shell_get_dtt_dlon(double *dtt_dlon)
Retrieve the derivative of travel time wrt to source longitude, in seconds/radian.
SLBM_LIB int slbm_shell_create_fixedEarthRadius(double *radius)
Instantiate a SLBM Interface object with fixed earth radius.
SLBM_LIB int slbm_shell_getWeightsSource(int nodeids[], double weights[], int *nWeights)
Retrieve the node IDs and the interpolation coefficients for the source CrustalProfile.
SLBM_LIB int slbm_shell_getInterpolatorType(char *interpolatorType)
Retrieve the type of interpolator currently in use; either "LINEAR" or "NATUTAL_NEIGHBOR".
SLBM_LIB int slbm_shell_getNodeSeparation(int *node1, int *node2, double *distance)
Retrieve the angular separation of two grid nodes, in radians.
SLBM_LIB int slbm_shell_getNodeNeighbors(int *nid, int neighbors[], int *nNeighbors)
Retrieve the node IDs of the nodes that surround the specified node.
SLBM_LIB int slbm_shell_getGreatCircleData(char *phase, double *path_increment, double sourceDepth[], double sourceVelocity[], double receiverDepth[], double receiverVelocity[], int *npoints, double headWaveVelocity[], double gradient[])
Retrieve the data required for input to the travel time calculation, for the current GreatCircle obje...
SLBM_LIB int slbm_shell_getActiveNodeId(int gridNodeId)
Retrieve the active node ID that corresponds to a specified grid node ID.
SLBM_LIB int slbm_shell_getGreatCircleNodeInfo(int **neighbors, double **coefficients, const int *maxpoints, const int *maxnodes, int *npoints, int *nnodes)
Retrieve information about the interpolated points along the headwave path, including the number of p...
SLBM_LIB int slbm_shell_getGridNodeId(int activeNodeId, int *gridNodeId)
Retrieve the grid node ID that corresponds to a specified active node ID.
SLBM_LIB int slbm_shell_setDelDistance(double delDistance)
Set the value of del_distance, radians.
SLBM_LIB int slbm_shell_get_dtt_dlat(double *dtt_dlat)
Retrieve the derivative of travel time wrt to source latitude, in seconds/radian.
SLBM_LIB int slbm_shell_getVersion(char *str)
Retrieve the SLBM Version number.
SLBM_LIB int slbm_shell_getPiercePointSource(double *lat, double *lon, double *depth)
Retrieve the latitude and longitude of the moho pierce point below the source, in radians.
SLBM_LIB int slbm_shell_get_dtt_ddepth(double *dtt_ddepth)
Retrieve the derivative of travel time wrt to source depth, in seconds/km.
SLBM_LIB int slbm_shell_getNodeAzimuth(int *node1, int *node2, double *azimuth)
Retrieve the azimuth from grid node1 to grid node2, radians.
SLBM_LIB int slbm_shell_specifyOutputDirectory(const char *directoryName)
Deprecated. Use saveVelocityModel() instead. Specify the directory into which the model that is curre...
SLBM_LIB int slbm_shell_getTurningRadius(double *turningRadius)
Retrieve turning radius in km.
SLBM_LIB int slbm_shell_getGreatCirclePoints(double aLat, double aLon, double bLat, double bLon, int npoints, double latitude[], double longitude[])
Retrieve an array of lat, lon points along a great circle path between two specified points,...
SLBM_LIB int slbm_shell_getActiveNodeNeighborInfo(int *nid, int neighbors[], double distance[], double azimuth[], int *nNeighbors)
Retrieve the node IDs of the nodes that surround the specified node.
SLBM_LIB int slbm_shell_getPathIncrement(double *pathIncrement)
Retrieve the current value of the spacing of great circle nodes along the head wave interface,...
SLBM_LIB int slbm_shell_getNGridNodes(int *numGridNodes)
Retrieve the number of Grid nodes in the Earth model.
SLBM_LIB int slbm_shell_getInterpolatedPoint(double *lat, double *lon, int *nodeIds, double *coefficients, int *nnodes, double *depth, double *pvelocity, double *svelocity, double *pgradient, double *sgradient)
Retrieve interpolated data from the earth model at a single specified latitude, longitude.
SLBM_LIB int slbm_shell_getTTUncertainty_useRandErr(double *uncertainty)
Retrieve travel time uncertainty in sec. This function will call either the path-dependent or 1D unce...
SLBM_LIB int slbm_shell_getHeadwaveDistance(double *dist)
Retrieve angular distance traveled by the ray below the headwave interface, in radians.
SLBM_LIB int slbm_shell_getPiercePointReceiver(double *lat, double *lon, double *depth)
Retrieve the latitude and longitude of the moho pierce point below the receiver, in radians.
SLBM_LIB int slbm_shell_getActiveNodeWeightsReceiver(int nodeids[], double weights[], int *nWeights)
Retrieve the active node IDs and the interpolation coefficients for the receiver CrustalProfile.
SLBM_LIB int slbm_shell_saveVelocityModelBinary()
Deprecated. Use saveVelocityModel() instead. Write the model in format 3 to directory previously spec...
SLBM_LIB int slbm_shell_create()
Instantiate a SLBM Interface object.
SLBM_LIB int slbm_shell_clear()
Delete the current GreatCircle object from memory and clear the pool of stored CrustalProfile objects...
SLBM_LIB int slbm_shell_getSlowness(double *slowness)
Retrieve the horizontal slowness, i.e., the derivative of travel time wrt to receiver-source distance...
SLBM_LIB int slbm_shell_getNodeHitCount(int *nodeId, int *hitCount)
Retrieve the number of times that node has been 'touched' by a GreatCircle object.
SLBM_LIB int slbm_shell_initActiveNodesPoints(double *lat, double *lon, int *npoints, int *inDegrees)
Specify a list of points that define a polygon that enclose the set of grid nodes that are to be cons...
SLBM_LIB int slbm_shell_delete()
Deletes the SlbmInterface object instantiated with the call slbm_shell_create().
SLBM_LIB int slbm_shell_createGreatCircle(char *phase, double *sourceLat, double *sourceLon, double *sourceDepth, double *receiverLat, double *receiverLon, double *receiverDepth)
Instantiate a new GreatCircle object between two locations.
SLBM_LIB int slbm_shell_setAverageMantleVelocity(int *type, double *velocity)
Set the average P or S wave mantle velocity that is recorded in the model input file,...