RSTT  3.1.0
Regional Seismic Travel Time
slbm_F_shell.h
Go to the documentation of this file.
1 //- ****************************************************************************
2 //-
3 //- Copyright 2009 National Technology & Engineering Solutions of Sandia, LLC
4 //- (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S.
5 //- Government retains certain rights in this software.
6 //-
7 //- BSD Open Source License
8 //- All rights reserved.
9 //-
10 //- Redistribution and use in source and binary forms, with or without
11 //- modification, are permitted provided that the following conditions are met:
12 //-
13 //- 1. Redistributions of source code must retain the above copyright notice,
14 //- this list of conditions and the following disclaimer.
15 //-
16 //- 2. Redistributions in binary form must reproduce the above copyright
17 //- notice, this list of conditions and the following disclaimer in the
18 //- documentation and/or other materials provided with the distribution.
19 //-
20 //- 3. Neither the name of the copyright holder nor the names of its
21 //- contributors may be used to endorse or promote products derived from
22 //- this software without specific prior written permission.
23 //-
24 //- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 //- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 //- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 //- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
28 //- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 //- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 //- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 //- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 //- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 //- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 //- POSSIBILITY OF SUCH DAMAGE.
35 //-
36 //- ****************************************************************************
37 
38 //- Unauthorized reproduction or distribution of this program, or any
39 //- portion of it, may result in civil and criminal penalties, and will be
40 //- prosecuted to the maximum extent possible under the law.
41 //-
42 
110 
111 #ifndef SLBM_F_SHELL_H
112 #define SLBM_F_SHELL_H
113 
114 #include "SLBMGlobals.h"
115 
120 static const int MAX_POINTS = 1000;
121 
129 static const int MAX_NODES = 5;
130 
131 #ifdef __cplusplus
132 extern "C"
133 {
134 #endif
135 
136  // Definition of dllimport and dllexport here for Windows only
137 //--------------------------
138 #if defined(_WIN32) || defined(WIN32)
139 
140  // exports when building SLBM dll, imports when linking to header files in
141  // SLBM (Note that SLBM_EXPORTS should be defined when building a SLBM
142  // DLL, and should not be defined when linking with the SLBM DLL)
143  #ifdef SLBM_FORT_SHELL_EXPORTS
144  #define SLBM_FORT_SHELL_EXP_IMP __declspec(dllexport)
145  #else
146  #define SLBM_FORT_SHELL_EXP_IMP __declspec(dllimport)
147  #endif
148 
149  // exports DLL for classes and functions that ONLY export
150  // (Note that this is mainly used for templated classes that are not imported)
151  #define SLBM_FORT_SHELL_EXP __declspec(dllexport)
152 
153 #else // Sun does not need these
154 
155  #define SLBM_FORT_SHELL_EXP_IMP
156  #define SLBM_FORT_SHELL_EXP
157 
158 #endif
159 
166 SLBM_FORT_SHELL_EXP_IMP void slbm_get_version(char* version, int* size, int* err);
167 
177 SLBM_FORT_SHELL_EXP_IMP void slbm_get_error_message( char* errorMessage, int* size);
178 
184 
192 
206 SLBM_FORT_SHELL_EXP_IMP void slbm_load_velocity_model(const char* modelFileName, int* nameLength, int* err);
207 
218 SLBM_FORT_SHELL_EXP_IMP void slbm_save_velocity_model(const char* modelFileName, int* nameLength, int* err);
219 
266 SLBM_FORT_SHELL_EXP_IMP void slbm_save_velocity_model_f(const char* modelFileName, int* nameLength, int* format, int* err);
267 
275 
293 SLBM_FORT_SHELL_EXP_IMP void slbm_load_velocity_model_binary(const char* modelDirectory, int* nameLength, int* err );
294 
313 SLBM_FORT_SHELL_EXP_IMP void slbm_specify_output_directory(const char* directoryName, int* dirNameLength, int* err );
314 
326 
343 SLBM_FORT_SHELL_EXP_IMP void slbm_create_great_circle (int* phase, double* sourceLat, double* sourceLon, double* sourceDepth,
344  double* receiverLat, double* receiverLon, double* receiverDepth, int* err);
345 
353 
375 
383 SLBM_FORT_SHELL_EXP_IMP void slbm_get_distance (double* dist, int* err);
384 
394 
404 
418 
442 SLBM_FORT_SHELL_EXP_IMP void slbm_get_travel_time (double* travelTime, int* err);
443 
459 SLBM_FORT_SHELL_EXP_IMP void slbm_get_travel_time_components (double* tTotal, double* tSource, double* tReceiver, double* tHeadwave, double* tGradient, int* err);
460 
499 SLBM_FORT_SHELL_EXP_IMP void slbm_get_weights (int nodeId[], double weight[], int* nWeights, int* err);
500 
514 SLBM_FORT_SHELL_EXP_IMP void slbm_get_weights_source(int nodeids[], double weights[], int* nWeights, int* err);
515 
529 SLBM_FORT_SHELL_EXP_IMP void slbm_get_weights_receiver(int nodeids[], double weights[], int* nWeights, int* err);
530 
536 SLBM_FORT_SHELL_EXP_IMP void slbm_get_n_grid_nodes(int* numGridNodes, int* err);
537 
549 SLBM_FORT_SHELL_EXP_IMP void slbm_get_n_head_wave_points(int* nHeadWavePoints, int* err);
550 
571 SLBM_FORT_SHELL_EXP_IMP void slbm_get_grid_data(int* nodeId, double* latitude, double* longitude, double* depth, double* pvelocity, double* svelocity, double* gradient, int* err);
572 
589 SLBM_FORT_SHELL_EXP_IMP void slbm_set_grid_data(int* nodeId, double* depth, double* pvelocity, double* svelocity, double* gradient, int* err);
590 
640  int* phase,
641  double* path_increment,
642  double sourceDepth[slbm::NLAYERS],
643  double sourceVelocity[slbm::NLAYERS],
644  double receiverDepth[slbm::NLAYERS],
645  double receiverVelocity[slbm::NLAYERS],
646  double headWaveVelocity[MAX_POINTS],
647  double gradient[MAX_POINTS],
648  //int neighbors[MAX_POINTS][slbm::nCoefficients],
649  //double coefficients[MAX_POINTS][slbm::nCoefficients],
650  int* npoints,
651  int* err);
652 
654  int nodes[MAX_POINTS][MAX_NODES],
655  double coefficients[MAX_POINTS][MAX_NODES],
656  int* npoints, int nnodes[MAX_POINTS], int* err);
657 
683  int* nodeId, double* coefficients, int* nnodes, double* depth, double* pvelocity,
684  double* svelocity, double* pgradient, double* sgradient, int* err);
685 
699 SLBM_FORT_SHELL_EXP_IMP void slbm_initialize_active_nodes(double* latmin, double* lonmin, double* latmax, double* lonmax, int* err);
700 
707 
716 SLBM_FORT_SHELL_EXP_IMP void slbm_get_grid_node_id(int* activeNodeId, int* gridNodeId, int* err); //+
717 
725 SLBM_FORT_SHELL_EXP_IMP void slbm_get_active_node_id(int* gridNodeId, int* activeNodeId, int* err); //+
726 
735 SLBM_FORT_SHELL_EXP_IMP void slbm_get_node_hit_count(int* nodeId, int* hitCount, int* err); //+
736 
748 SLBM_FORT_SHELL_EXP_IMP void slbm_get_node_neighbors(int* nid, int neighbors[], int* nNeighbors, int* err);
749 
763 SLBM_FORT_SHELL_EXP_IMP void slbm_get_node_neighbor_info(int* nid, int neighbors[], double distance[], double azimuth[],
764  int* nNeighbors, int* err);
765 
773 SLBM_FORT_SHELL_EXP_IMP void slbm_get_node_separation(int* node1, int* node2, double* distance, int* err); //+
774 
782 SLBM_FORT_SHELL_EXP_IMP void slbm_get_node_azimuth(int* node1, int* node2, double* azimuth, int* err); //+
783 
793 SLBM_FORT_SHELL_EXP_IMP void slbm_get_traveltime_uncertainty( int* phase, double* distance, double* uncertainty, int* err );
794 
802 SLBM_FORT_SHELL_EXP_IMP void slbm_get_tt_uncertainty(double* tt_uncertainty, int* err );
803 
813 SLBM_FORT_SHELL_EXP_IMP void slbm_get_tt_uncertainty_randerr(double* tt_uncertainty, int* err );
814 
825 SLBM_FORT_SHELL_EXP_IMP void slbm_get_tt_uncertainty1d(double* tt_uncertainty, int* err );
826 
849 SLBM_FORT_SHELL_EXP_IMP void slbm_get_zhao_parameters(double* Vm, double* Gm, double* H, double* C, double* Cm, int* udSign, int* err );
850 
890 SLBM_FORT_SHELL_EXP_IMP void slbm_get_active_node_weights(int nodeId[], double weight[], int* nWeights, int* err );
891 
903 SLBM_FORT_SHELL_EXP_IMP void slbm_get_active_node_weights_src(int nodeids[], double weights[], int* nweights, int* err );
904 
916 SLBM_FORT_SHELL_EXP_IMP void slbm_get_active_node_weights_rcvr(int nodeids[], double weights[], int* nweights, int* err );
917 
918 
926 SLBM_FORT_SHELL_EXP_IMP void slbm_get_active_node_neighbors( int* nid, int neighbors[], int* nNeighbors, int* err );
927 
941 SLBM_FORT_SHELL_EXP_IMP void slbm_get_active_node_neighbor_info(int* nid, int neighbors[], double distance[],
942  double azimuth[], int* nNeighbors, int* err );
943 
965  double* latitude,
966  double* longitude,
967  double depth[slbm::NLAYERS],
968  double pvelocity[slbm::NLAYERS],
969  double svelocity[slbm::NLAYERS],
970  double gradient[2], int* err );
971 
991  double depth[slbm::NLAYERS],
992  double pvelocity[slbm::NLAYERS],
993  double svelocity[slbm::NLAYERS],
994  double gradient[2], int* err );
995 
1006 SLBM_FORT_SHELL_EXP_IMP void slbm_set_ch_max( double* chMax, int* err );
1007 
1018 SLBM_FORT_SHELL_EXP_IMP void slbm_get_ch_max( double* chMax, int* err );
1019 
1030 SLBM_FORT_SHELL_EXP_IMP void slbm_get_average_mantle_velocity( int* type, double* velocity, int* err );
1031 
1044 SLBM_FORT_SHELL_EXP_IMP void slbm_set_average_mantle_velocity( int* type, double* velocity, int* err );
1045 
1052 SLBM_FORT_SHELL_EXP_IMP void slbm_get_tess_id( char* tessId, int* size, int* err );
1053 
1061 SLBM_FORT_SHELL_EXP_IMP void slbm_get_fraction_active ( double* fractionActive, int* err );
1062 
1072 SLBM_FORT_SHELL_EXP_IMP void slbm_set_max_distance ( const double* maxDistance, int* err );
1073 
1081 SLBM_FORT_SHELL_EXP_IMP void slbm_get_max_distance ( double* maxDistance, int* err );
1082 
1092 SLBM_FORT_SHELL_EXP_IMP void slbm_set_max_depth ( const double* maxDepth, int* err );
1093 
1099 SLBM_FORT_SHELL_EXP_IMP void slbm_get_max_depth ( double* maxDepth, int* err );
1100 
1118 SLBM_FORT_SHELL_EXP_IMP void slbm_get_pg_lg_components ( double* tTotal, double* tTaup,
1119  double* tHeadwave, double* pTaup, double* pHeadwave,
1120  double* trTaup, double* trHeadwave, int* err );
1121 
1122 // new gtb 16Jan2009
1123 //-------------------------------------------------------------------------
1131 SLBM_FORT_SHELL_EXP_IMP void slbm_get_dtt_dlat(double* dtt_dlat, int* err );
1132 
1140 SLBM_FORT_SHELL_EXP_IMP void slbm_get_dtt_dlon(double* dtt_dlon, int* err );
1141 
1149 SLBM_FORT_SHELL_EXP_IMP void slbm_get_dtt_ddepth(double* dtt_ddepth, int* err );
1150 
1159 //SLBM_FORT_SHELL_EXP_IMP void slbm_get_dsh_ddist(double* dsh_ddist, int* err );
1160 //
1168 //SLBM_FORT_SHELL_EXP_IMP void slbm_get_dsh_dlat(double* dsh_dlat, int* err );
1169 //
1177 //SLBM_FORT_SHELL_EXP_IMP void slbm_get_dsh_dlon(double* dsh_dlon, int* err );
1178 //
1186 //SLBM_FORT_SHELL_EXP_IMP void slbm_get_dsh_ddepth(double* dsh_ddepth, int* err );
1187 
1194 SLBM_FORT_SHELL_EXP_IMP void slbm_get_slowness(double* slowness, int* err );
1195 
1205 SLBM_FORT_SHELL_EXP_IMP void slbm_get_slowness_uncertainty( int* phase, double* distance, double* uncertainty, int* err );
1206 
1214 SLBM_FORT_SHELL_EXP_IMP void slbm_get_sh_uncertainty(double* slowness_uncertainty, int* err );
1215 
1216 // new sb 8/2011 version 2.7.0
1217 //-------------------------------------------------------------------------
1218 
1228 SLBM_FORT_SHELL_EXP_IMP void slbm_get_pierce_point_source(double* lat, double* lon, double* depth, int* err);
1229 
1239 SLBM_FORT_SHELL_EXP_IMP void slbm_get_pierce_point_receiver(double* lat, double* lon, double* depth, int* err);
1240 
1256  double lat[MAX_POINTS], double lon[MAX_POINTS], double depth[MAX_POINTS], int* npoints, int* err);
1257 
1276  double* bLat, double* bLon, int* npoints,
1277  double latitude[MAX_POINTS], double longitude[MAX_POINTS], int* err);
1278 
1296  double* bLat, double* bLon, int* npoints,
1297  double latitude[MAX_POINTS], double longitude[MAX_POINTS], int* err);
1298 
1315 SLBM_FORT_SHELL_EXP_IMP void slbm_get_dist_az(double* aLat, double* aLon,
1316  double* bLat, double* bLon,
1317  double* distance, double* azimuth,
1318  double* naValue, int* err );
1319 
1332 SLBM_FORT_SHELL_EXP_IMP void slbm_move_point(double* aLat, double* aLon,
1333  double* distance, double* azimuth, double* bLat, double* bLon, int* err );
1334 
1342 SLBM_FORT_SHELL_EXP_IMP void slbm_get_del_distance(double* delDistance, int* err );
1343 
1351 SLBM_FORT_SHELL_EXP_IMP void slbm_set_del_distance( double* delDistance, int* err );
1352 
1359 SLBM_FORT_SHELL_EXP_IMP void slbm_get_del_depth(double* delDepth, int* err );
1360 
1367 SLBM_FORT_SHELL_EXP_IMP void slbm_set_del_depth( double* delDepth, int* err );
1368 
1374 SLBM_FORT_SHELL_EXP_IMP void slbm_get_rayparameter(double* rayParameter, int* err );
1375 
1381 SLBM_FORT_SHELL_EXP_IMP void slbm_get_turningradius(double* turningRadius, int* err );
1382 
1397 SLBM_FORT_SHELL_EXP_IMP void slbm_set_path_increment(double* pathIncrement, int* err);
1398 
1412 SLBM_FORT_SHELL_EXP_IMP void slbm_get_path_increment(double* pathIncrement, int* err);
1413 
1423 SLBM_FORT_SHELL_EXP_IMP void slbm_set_interpolator_type(const char* interpolatorType, int* size, int* err);
1424 
1430 SLBM_FORT_SHELL_EXP_IMP void slbm_get_interpolator_type(char* interpolatorType, int* size, int* err);
1431 
1432 SLBM_FORT_SHELL_EXP_IMP void slbm_tostring(char* tostring, int* verbosity, int* size, int* err);
1433 
1434 //-------------------------------------------------------------------------
1435 #ifdef __cplusplus
1436 }
1437 #endif
1438 
1439 #endif /* _SLBM_F_SHELL_H */
slbm_set_active_node_data
SLBM_FORT_SHELL_EXP_IMP void slbm_set_active_node_data(int *nodeId, double depth[slbm::NLAYERS], double pvelocity[slbm::NLAYERS], double svelocity[slbm::NLAYERS], double gradient[2], int *err)
Modify the velocity and gradient information associated with a specified active node in the Grid.
slbm_get_tess_id
SLBM_FORT_SHELL_EXP_IMP void slbm_get_tess_id(char *tessId, int *size, int *err)
Retrieve the tessellation ID of the model currently in memory.
slbm_get_dtt_dlat
SLBM_FORT_SHELL_EXP_IMP void slbm_get_dtt_dlat(double *dtt_dlat, int *err)
Retrieve the derivative of travel time wrt to source latitude, in seconds/radian.
slbm_get_path_increment
SLBM_FORT_SHELL_EXP_IMP void slbm_get_path_increment(double *pathIncrement, int *err)
Retrieve the current value of the spacing of great circle nodes along the head wave interface,...
slbm_load_velocity_model_binary
SLBM_FORT_SHELL_EXP_IMP void slbm_load_velocity_model_binary(const char *modelDirectory, int *nameLength, int *err)
Load the velocity model into memory from the specified file or directory. This method automatically d...
slbm_get_pg_lg_components
SLBM_FORT_SHELL_EXP_IMP void slbm_get_pg_lg_components(double *tTotal, double *tTaup, double *tHeadwave, double *pTaup, double *pHeadwave, double *trTaup, double *trHeadwave, int *err)
Retrieve information about Pg/Lg travel time calculations.
slbm_specify_output_directory
SLBM_FORT_SHELL_EXP_IMP void slbm_specify_output_directory(const char *directoryName, int *dirNameLength, int *err)
Deprecated. Use saveVelocityModel() instead. Specify the directory into which the model that is curre...
slbm_get_dtt_dlon
SLBM_FORT_SHELL_EXP_IMP void slbm_get_dtt_dlon(double *dtt_dlon, int *err)
Retrieve the derivative of travel time wrt to source longitude, in seconds/radian.
slbm_get_grid_node_id
SLBM_FORT_SHELL_EXP_IMP void slbm_get_grid_node_id(int *activeNodeId, int *gridNodeId, int *err)
Retrieve the grid node ID that corresponds to a specified active node ID.
slbm_get_weights
SLBM_FORT_SHELL_EXP_IMP void slbm_get_weights(int nodeId[], double weight[], int *nWeights, int *err)
Retrieve the weight assigned to each grid node that was touched by the GreatCircle.
slbm_get_travel_time
SLBM_FORT_SHELL_EXP_IMP void slbm_get_travel_time(double *travelTime, int *err)
Retrieve the total travel time for the GreatCircle, in seconds.
slbm_get_rayparameter
SLBM_FORT_SHELL_EXP_IMP void slbm_get_rayparameter(double *rayParameter, int *err)
Retrieve rayParameter in sec/km.
slbm_get_tt_uncertainty
SLBM_FORT_SHELL_EXP_IMP void slbm_get_tt_uncertainty(double *tt_uncertainty, int *err)
Retrieve travel time uncertainty in sec. This function will call either the path-dependent or 1D unce...
slbm_get_active_node_weights
SLBM_FORT_SHELL_EXP_IMP void slbm_get_active_node_weights(int nodeId[], double weight[], int *nWeights, int *err)
Retrieve the weight assigned to each active node that was touched by the GreatCircle.
slbm_get_n_grid_nodes
SLBM_FORT_SHELL_EXP_IMP void slbm_get_n_grid_nodes(int *numGridNodes, int *err)
Retrieve the number of Grid nodes in the Earth model.
slbm_get_receiver_distance
SLBM_FORT_SHELL_EXP_IMP void slbm_get_receiver_distance(double *dist, int *err)
Retrieve horizontal offset below the receiver, in radians.
slbm_get_traveltime_uncertainty
SLBM_FORT_SHELL_EXP_IMP void slbm_get_traveltime_uncertainty(int *phase, double *distance, double *uncertainty, int *err)
Calculate a traveltime uncertainty value (seconds) as a function of distance in radians for a support...
slbm_get_great_circle_node_info
SLBM_FORT_SHELL_EXP_IMP void slbm_get_great_circle_node_info(int nodes[MAX_POINTS][MAX_NODES], double coefficients[MAX_POINTS][MAX_NODES], int *npoints, int nnodes[MAX_POINTS], int *err)
slbm_get_n_active_nodes
SLBM_FORT_SHELL_EXP_IMP void slbm_get_n_active_nodes(int *nNodes, int *err)
Retrieve the number of active nodes in the Grid.
slbm_get_distance
SLBM_FORT_SHELL_EXP_IMP void slbm_get_distance(double *dist, int *err)
Retrieve the source-receiver separation, in radians.
slbm_get_error_message
SLBM_FORT_SHELL_EXP_IMP void slbm_get_error_message(char *errorMessage, int *size)
Retrieve error message.
slbm_get_max_depth
SLBM_FORT_SHELL_EXP_IMP void slbm_get_max_depth(double *maxDepth, int *err)
Retrieve the current value for the maximum source depth, in km.
slbm_get_great_circle_locations
SLBM_FORT_SHELL_EXP_IMP void slbm_get_great_circle_locations(double lat[MAX_POINTS], double lon[MAX_POINTS], double depth[MAX_POINTS], int *npoints, int *err)
Retrieve the latitudes, longitudes and depths of all the profile positions along the moho.
SLBM_FORT_SHELL_EXP_IMP
#define SLBM_FORT_SHELL_EXP_IMP
Definition: slbm_F_shell.h:155
slbm_save_velocity_model_binary
SLBM_FORT_SHELL_EXP_IMP void slbm_save_velocity_model_binary(int *err)
Deprecated. Use saveVelocityModel() instead. Write the model in format 3 to directory previously spec...
slbm_get_node_separation
SLBM_FORT_SHELL_EXP_IMP void slbm_get_node_separation(int *node1, int *node2, double *distance, int *err)
Retrieve the angular separation of two grid nodes, in radians.
slbm_get_active_node_neighbors
SLBM_FORT_SHELL_EXP_IMP void slbm_get_active_node_neighbors(int *nid, int neighbors[], int *nNeighbors, int *err)
Retrieve the node IDs of the nodes that surround the specified node.
slbm_get_tt_uncertainty1d
SLBM_FORT_SHELL_EXP_IMP void slbm_get_tt_uncertainty1d(double *tt_uncertainty, int *err)
Retrieve travel time uncertainty in sec. This function will return the non-path-dependent 1D uncertai...
slbm_set_ch_max
SLBM_FORT_SHELL_EXP_IMP void slbm_set_ch_max(double *chMax, int *err)
Set the value of chMax. c is the zhao c parameter and h is the turning depth of the ray below the moh...
slbm_get_weights_source
SLBM_FORT_SHELL_EXP_IMP void slbm_get_weights_source(int nodeids[], double weights[], int *nWeights, int *err)
Retrieve the node IDs and the interpolation coefficients for the source CrustalProfile.
slbm_get_n_head_wave_points
SLBM_FORT_SHELL_EXP_IMP void slbm_get_n_head_wave_points(int *nHeadWavePoints, int *err)
Retrieve the number of LayerProfile objects positioned along the head wave interface.
slbm_get_del_depth
SLBM_FORT_SHELL_EXP_IMP void slbm_get_del_depth(double *delDepth, int *err)
Retrieve del_depth in km.
slbm_set_del_distance
SLBM_FORT_SHELL_EXP_IMP void slbm_set_del_distance(double *delDistance, int *err)
Set the value of del_distance, radians.
slbm_get_ch_max
SLBM_FORT_SHELL_EXP_IMP void slbm_get_ch_max(double *chMax, int *err)
Retrieve the current value of chMax. c is the zhao c parameter and h is the turning depth of the ray ...
slbm_load_velocity_model
SLBM_FORT_SHELL_EXP_IMP void slbm_load_velocity_model(const char *modelFileName, int *nameLength, int *err)
Load the velocity model into memory from the specified file or directory. This method automatically d...
slbm_set_max_distance
SLBM_FORT_SHELL_EXP_IMP void slbm_set_max_distance(const double *maxDistance, int *err)
Set the maximum source-receiver separation for Pn/Sn phase, in radians.
slbm_get_fraction_active
SLBM_FORT_SHELL_EXP_IMP void slbm_get_fraction_active(double *fractionActive, int *err)
Retrieve the fraction of the path length of the current GreatCircle object that is within the current...
slbm_is_valid
SLBM_FORT_SHELL_EXP_IMP void slbm_is_valid(int *err)
Returns true if the current GreatCirlce object has been instantiated and is ready to be interrogated.
slbm_get_zhao_parameters
SLBM_FORT_SHELL_EXP_IMP void slbm_get_zhao_parameters(double *Vm, double *Gm, double *H, double *C, double *Cm, int *udSign, int *err)
Retrieve some of the parameters that contribute to the calculation of of total travel time using the ...
slbm_delete
SLBM_FORT_SHELL_EXP_IMP void slbm_delete(int *err)
Deletes the SlbmInterface object instantiated with the call slbm_create().
slbm_move_point
SLBM_FORT_SHELL_EXP_IMP void slbm_move_point(double *aLat, double *aLon, double *distance, double *azimuth, double *bLat, double *bLon, int *err)
Find point B that is the specified distance and azimuth from point A. All quantities are in radians.
slbm_get_node_neighbors
SLBM_FORT_SHELL_EXP_IMP void slbm_get_node_neighbors(int *nid, int neighbors[], int *nNeighbors, int *err)
Retrieve the node IDs of the nodes that surround the specified node.
slbm_get_active_node_data
SLBM_FORT_SHELL_EXP_IMP void slbm_get_active_node_data(int *nodeId, double *latitude, double *longitude, double depth[slbm::NLAYERS], double pvelocity[slbm::NLAYERS], double svelocity[slbm::NLAYERS], double gradient[2], int *err)
Retrieve the lat (radians), lon (radians), interface depths (km), P and S wave interval velocities (k...
slbm_get_average_mantle_velocity
SLBM_FORT_SHELL_EXP_IMP void slbm_get_average_mantle_velocity(int *type, double *velocity, int *err)
Retrieve the average P or S wave mantle velocity that is specified in the model input file,...
slbm_get_max_distance
SLBM_FORT_SHELL_EXP_IMP void slbm_get_max_distance(double *maxDistance, int *err)
Retrieve the current value for the maximum source-receiver separation, in radians.
slbm_get_node_neighbor_info
SLBM_FORT_SHELL_EXP_IMP void slbm_get_node_neighbor_info(int *nid, int neighbors[], double distance[], double azimuth[], int *nNeighbors, int *err)
Retrieve the node IDs of the nodes that surround the specified node.
slbm_get_tt_uncertainty_randerr
SLBM_FORT_SHELL_EXP_IMP void slbm_get_tt_uncertainty_randerr(double *tt_uncertainty, int *err)
Retrieve travel time uncertainty in sec. This function will call either the path-dependent or 1D unce...
slbm_set_average_mantle_velocity
SLBM_FORT_SHELL_EXP_IMP void slbm_set_average_mantle_velocity(int *type, double *velocity, int *err)
Set the average P or S wave mantle velocity that is recorded in the model input file,...
slbm_tostring
SLBM_FORT_SHELL_EXP_IMP void slbm_tostring(char *tostring, int *verbosity, int *size, int *err)
slbm_get_node_azimuth
SLBM_FORT_SHELL_EXP_IMP void slbm_get_node_azimuth(int *node1, int *node2, double *azimuth, int *err)
Retrieve the azimuth from grid node1 to grid node2, radians.
slbm_set_max_depth
SLBM_FORT_SHELL_EXP_IMP void slbm_set_max_depth(const double *maxDepth, int *err)
Set the maximum source depth for Pn/Sn phase, in km.
slbm_save_velocity_model_f
SLBM_FORT_SHELL_EXP_IMP void slbm_save_velocity_model_f(const char *modelFileName, int *nameLength, int *format, int *err)
Save the velocity model currently in memory to the specified file.
slbm_get_grid_data
SLBM_FORT_SHELL_EXP_IMP void slbm_get_grid_data(int *nodeId, double *latitude, double *longitude, double *depth, double *pvelocity, double *svelocity, double *gradient, int *err)
Retrieve the lat (radians), lon (radians), interface depths (km), P and S wave interval velocities (k...
slbm_initialize_active_nodes
SLBM_FORT_SHELL_EXP_IMP void slbm_initialize_active_nodes(double *latmin, double *lonmin, double *latmax, double *lonmax, int *err)
Specify the latitude and longitude range in radians for active nodes.
slbm_create_fixed_earth_radius
SLBM_FORT_SHELL_EXP_IMP void slbm_create_fixed_earth_radius(double *radius, int *err)
Instantiate a SLBM Interface object with fixed earth radius.
slbm_get_head_wave_distance_km
SLBM_FORT_SHELL_EXP_IMP void slbm_get_head_wave_distance_km(double *dist, int *err)
Retrieve horizontal distance traveled by the ray below the headwave interface, in radians.
slbm_get_del_distance
SLBM_FORT_SHELL_EXP_IMP void slbm_get_del_distance(double *delDistance, int *err)
Retrieve del_distance in radians.
slbm_get_active_node_weights_rcvr
SLBM_FORT_SHELL_EXP_IMP void slbm_get_active_node_weights_rcvr(int nodeids[], double weights[], int *nweights, int *err)
Retrieve the active node IDs and the interpolation coefficients for the receiver CrustalProfile.
slbm_get_active_node_neighbor_info
SLBM_FORT_SHELL_EXP_IMP void slbm_get_active_node_neighbor_info(int *nid, int neighbors[], double distance[], double azimuth[], int *nNeighbors, int *err)
Retrieve the node IDs of the nodes that surround the specified node.
slbm_set_grid_data
SLBM_FORT_SHELL_EXP_IMP void slbm_set_grid_data(int *nodeId, double *depth, double *pvelocity, double *svelocity, double *gradient, int *err)
Modify the velocity and gradient information associated with a specified node in the Grid.
slbm_set_interpolator_type
SLBM_FORT_SHELL_EXP_IMP void slbm_set_interpolator_type(const char *interpolatorType, int *size, int *err)
Specify the interpolation type to use, either 'linear' or 'natural_neighbor'.
slbm_get_node_hit_count
SLBM_FORT_SHELL_EXP_IMP void slbm_get_node_hit_count(int *nodeId, int *hitCount, int *err)
Retrieve the number of times that node has been 'touched' by a GreatCircle object.
slbm_get_sh_uncertainty
SLBM_FORT_SHELL_EXP_IMP void slbm_get_sh_uncertainty(double *slowness_uncertainty, int *err)
Retrieve uncertainty of the slowness, in seconds/radian using the phase and distance specified in las...
slbm_create
SLBM_FORT_SHELL_EXP_IMP void slbm_create(int *err)
Instantiate a SLBM Interface object.
slbm_get_great_circle_data
SLBM_FORT_SHELL_EXP_IMP void slbm_get_great_circle_data(int *phase, double *path_increment, double sourceDepth[slbm::NLAYERS], double sourceVelocity[slbm::NLAYERS], double receiverDepth[slbm::NLAYERS], double receiverVelocity[slbm::NLAYERS], double headWaveVelocity[MAX_POINTS], double gradient[MAX_POINTS], int *npoints, int *err)
Retrieve the data required for input to the travel time calculation, for the current GreatCircle obje...
slbm_get_great_circle_points
SLBM_FORT_SHELL_EXP_IMP void slbm_get_great_circle_points(double *aLat, double *aLon, double *bLat, double *bLon, int *npoints, double latitude[MAX_POINTS], double longitude[MAX_POINTS], int *err)
Retrieve an array of lat, lon points along a great circle path between two specified points,...
slbm_get_interpolated_point
SLBM_FORT_SHELL_EXP_IMP void slbm_get_interpolated_point(double *lat, double *lon, int *nodeId, double *coefficients, int *nnodes, double *depth, double *pvelocity, double *svelocity, double *pgradient, double *sgradient, int *err)
Retrieve interpolated data from the earth model at a single specified latitude, longitude.
slbm_get_active_node_weights_src
SLBM_FORT_SHELL_EXP_IMP void slbm_get_active_node_weights_src(int nodeids[], double weights[], int *nweights, int *err)
Retrieve the active node IDs and the interpolation coefficients for the source CrustalProfile.
slbm_get_dtt_ddepth
SLBM_FORT_SHELL_EXP_IMP void slbm_get_dtt_ddepth(double *dtt_ddepth, int *err)
Retrieve the derivative of travel time wrt to source depth, in seconds/km.
slbm_set_del_depth
SLBM_FORT_SHELL_EXP_IMP void slbm_set_del_depth(double *delDepth, int *err)
Set the value of del_depth, in km.
slbm_get_weights_receiver
SLBM_FORT_SHELL_EXP_IMP void slbm_get_weights_receiver(int nodeids[], double weights[], int *nWeights, int *err)
Retrieve the node IDs and the interpolation coefficients for the receiver CrustalProfile.
slbm_get_pierce_point_source
SLBM_FORT_SHELL_EXP_IMP void slbm_get_pierce_point_source(double *lat, double *lon, double *depth, int *err)
Retrieve the latitude and longitude of the moho pierce point below the source, in radians.
slbm_get_slowness_uncertainty
SLBM_FORT_SHELL_EXP_IMP void slbm_get_slowness_uncertainty(int *phase, double *distance, double *uncertainty, int *err)
Retrieve uncertainty of the slowness, in seconds/radian for specified phase, distance in radians.
slbm_get_interpolator_type
SLBM_FORT_SHELL_EXP_IMP void slbm_get_interpolator_type(char *interpolatorType, int *size, int *err)
Retrieve the type of interpolator currently in use; either "LINEAR" or "NATUTAL_NEIGHBOR".
slbm_set_path_increment
SLBM_FORT_SHELL_EXP_IMP void slbm_set_path_increment(double *pathIncrement, int *err)
Set the desired spacing of great circle nodes along the head wave interface, in radians.
slbm_get_source_distance
SLBM_FORT_SHELL_EXP_IMP void slbm_get_source_distance(double *dist, int *err)
Retrieve horizontal offset below the source, in radians.
slbm_get_turningradius
SLBM_FORT_SHELL_EXP_IMP void slbm_get_turningradius(double *turningRadius, int *err)
Retrieve turning radius in km.
slbm_get_pierce_point_receiver
SLBM_FORT_SHELL_EXP_IMP void slbm_get_pierce_point_receiver(double *lat, double *lon, double *depth, int *err)
Retrieve the latitude and longitude of the moho pierce point below the receiver, in radians.
slbm_get_slowness
SLBM_FORT_SHELL_EXP_IMP void slbm_get_slowness(double *slowness, int *err)
Retrieve the horizontal slowness, i.e., the derivative of travel time wrt to receiver-source distance...
slbm_get_travel_time_components
SLBM_FORT_SHELL_EXP_IMP void slbm_get_travel_time_components(double *tTotal, double *tSource, double *tReceiver, double *tHeadwave, double *tGradient, int *err)
Retrieve the total travel time and the 4 components that contribute to it for the current GreatCircle...
slbm_save_velocity_model
SLBM_FORT_SHELL_EXP_IMP void slbm_save_velocity_model(const char *modelFileName, int *nameLength, int *err)
Save the velocity model currently in memory to the specified file in format 4.
slbm_get_head_wave_distance
SLBM_FORT_SHELL_EXP_IMP void slbm_get_head_wave_distance(double *dist, int *err)
Retrieve angular distance traveled by the ray below the headwave interface, in radians.
slbm_get_dist_az
SLBM_FORT_SHELL_EXP_IMP void slbm_get_dist_az(double *aLat, double *aLon, double *bLat, double *bLon, double *distance, double *azimuth, double *naValue, int *err)
compute distance and azimuth between two points, A and B (all quantities are in radians).
slbm_get_great_circle_points_on_centers
SLBM_FORT_SHELL_EXP_IMP void slbm_get_great_circle_points_on_centers(double *aLat, double *aLon, double *bLat, double *bLon, int *npoints, double latitude[MAX_POINTS], double longitude[MAX_POINTS], int *err)
Retrieve an array of lat, lon points along a great circle path between two specified points,...
slbm_create_great_circle
SLBM_FORT_SHELL_EXP_IMP void slbm_create_great_circle(int *phase, double *sourceLat, double *sourceLon, double *sourceDepth, double *receiverLat, double *receiverLon, double *receiverDepth, int *err)
Instantiate a new GreatCircle object between two locations.
slbm_get_version
SLBM_FORT_SHELL_EXP_IMP void slbm_get_version(char *version, int *size, int *err)
Retrieve the SLBM Version number.
slbm_clear
SLBM_FORT_SHELL_EXP_IMP void slbm_clear(int *err)
Delete the current GreatCircle object from memory and clear the pool of stored CrustalProfile objects...
slbm_get_active_node_id
SLBM_FORT_SHELL_EXP_IMP void slbm_get_active_node_id(int *gridNodeId, int *activeNodeId, int *err)
Retrieve the active node ID that corresponds to a specified grid node ID.