Various bug fixes.
Replaced the grid used in SLBM Version 2 with GeoTess, a general-purpose Earth model parameterization for 2D and 3D Earth models. For more information about GeoTess, visit the website at www.sandia.gov/geotess.
The change to GeoTess introduced a couple of new model storage formats which are described in SLBM_Design.pdf
Made modifications to the makefile and minor mods to code in order to get code to compile on Windows (Brian Kraus). Can now build and run the C++, C and Fortran interfaces on Windows using Visual Studio compiler. Java interface does not currently work on windows
No code changes. Added new model while in Vienna delivering to the IDC.
Changed compiler flags for Mac builds so that now SLBM can be built on Macs with the gcc 4.2.1 compiler, which is the version delivered with Mac Xcode. All 4 SLBM interfaces (C++, C, Fortran and Java) now run on Mac, Linux, and Sun.
Changes to the main make file to facilitate building on Sun using gmake. To build on SunOS computers, users must use gmake, not make.
Renamed the SLBM_User_Guide to SLBM_Installation_Guide.
This release involved no changes to the SLBM code or to the RSTT model.
Overhauled the makefiles to make them easier to use and more consistent with each other.
Rewrote the User_Manual to bring it up to date. Copied the content of the User_Manual, which is in the doc directory, to a readme.txt file in the main SLBM_Root directory. Readme.txt is a simple ascii text file that is very easy to access from the command line.
Removed parameter 'delta' from createGreatCircle() in all interfaces, which will break existing code (sorry). This parameter proved to be very confusing to new users.
Added methods getPathIncrement() and setPathIncrement() which allow applications to get/set the step size of nodes along the headwave interface used to integrate travel time. This replaces the 'delta' parameter described above.
Changed the default value of MAX_DISTANCE from 180 to 15 degrees and the default value of MAX_DEPTH from 9999 to 200 km. SlbmInterface has getters and setters for these parameters if users wish to change the default values.
In the C and Fortran interfaces, but not C++ or Java, there were some inconsistencies in the method calls for getTravelTimeUncertainty() and getSlownessUncertainty(). These have been resolved but may cause issues for C and fortran applications. If old code does not work, see the html documentation for the affected method calls.
Fixed an extremely minor memory leak that occurred only as the program was terminating execution.
Other minor changes to get the code to compile on Mac computers.
The test applications for C++, C and Java, but not Fortran, were expanded with additional functionality. Formerly, these test applications performed only one test, a regression test. They now have an option to accept a model, phase, source position and receiver position and will print out basic information about the travel time, slowness, derivatives, etc. For more information, execute SLBM_Root/bin/slbmtestcc with no parameters.
Fixed some inaccuracies in the documentation.
Made minor code changes to address compiler warnings observed when the compiling the Linux version of the code.
Removed all derivatives of slowness from all interfaces.
Fixed bug related to computing derivative of tt with respect to depth that happened when depth step spanned the moho.
Changed default step size used to compute horizontal derivatives from .01 to .001 radians. Changed default step size used to compute depth derivatives from 0.01 km to 0.1 km. Added getters and setters for del_distance and del_depth, which are the step sizes for calculating horizontal and depth derivatives.
Added methods:
In the c and fortran interfaces, error codes returned by all the methods have been changed. The methods used to return 0 indicating no error, or 1 indicating an error occurred. The methods still return 0 when no error, but now return positive, non-zero error codes for error conditions.
Replaced all the test programs with new ones that perform a simple regression test. These new test programs are better examples of how to use slbm.
Modified SlbmInterface methods setGridData() and setActiveNodeData() so that they now include depth as an argument. This means that it is now possible to change the depths of the tops of the interfaces in a model.
In the fortran interface, all methods used to be mixed case but have all been changed to lower case. This was required for the port to Linux.
Modified method GreatCircle_Xn::mnbrak() to hopefully prevent infinite loop condition.
Code changes to remove the discontinuitites from the derivatives of tt with respect to source position and spikes from second derivatives of tt with respect to source position. All derivatives are now smooth.
Sandia now holds the copyright to the code and it has been approved by Sandia for public release under the BSD open source license. There are now copyright notices, license agreements and disclaimers at the top of every source code file.
Also fixed a bug that generated segmentation faults when source depth was exactly equal to moho depth (to double precision).
Added a software disclaimer at the top of every source code file
Renamed method getUncertainty() to getTravelTimeUncertainty().
I also added methods to compute derivatives of slowness with respect to lat, lon and depth:
All the files specifying travel time uncertainty as a function of distance were renamed. In previous versions, these files were named Uncertainty_[Pn|Sn|Pg|Lg].txt. They have been renamed Uncertainty_[Pn|Sn|Pg|Lg]_TT.txt in this release. Files containing slowness uncertainty were added to the same directories with names Uncertainty_[Pn|Sn|Pg|Lg]_Sh.txt. These files were populated with slowness uncertainty values suggested by Steve Myers in an email to me (SB) on 1-22-2009.
Note: It has been discovered that the compiler option to turn off name mangling required for use of C++ libraries within C and FORTRAN code prevents the compiler from correctly finding the rand() function in FORTRAN. At this point, this is the only function we have discovered to work this way -but others may be found in the future. At present, the work-around is to manually "decorate" the function call within the FORTRAN code. For example: rand() function calls would change to rand_() and rand(seed) function calls would change to rand_(seed).
Note: SNL_Tool_Root only uses the core SLBM units (not any other language interfaces) and builds only the libslbm.so library in 64-Bit mode.
This version contains bug fix to handle cases when the activenode range spans the dateline correctly. Also, includes Jim Hipp's changes to the uncertainty units for compatibility w/PGL/UtilLib.
Made ch_max (in SLBMInterface) a static variable and renamed it to CH_MAX defaulting to .2.
Made the function calls
all static functions. This was done to allow the locator (LoCOO) to be able to set the control parameters remotely.
Added defaulted depth dependence (defaults to 0.0 km) for the functions
double getUncertainty(double distance, double depth = 0.0); double getVariance(double distance, double depth = 0.0);
Added new privated functions to evaluate uncertainty and variance given a depth index, distance index and distance weight.
double getUncertainty(double wdist, int idist, int idepth); double getVariance(double wdist, int idist, int idepth);
Modified the getIndex(...) function to return both the index and the weight given the input independent parameter position, x, and the vector containing the independent parameter positions. The input vector can by distance or depth.
void getIndex(double x, const vector Added the parameter vector Modified the parameter vector Modified the function readFile(const string& filename) to look on the first
line for both the distance count and the new depth count. If the new depth
count is not present it defaults to 1. Modified the remainder of the function
to handle depths if found.
Modified getBufferSize(), serialize(...), and deserialize(...) functions to
output / input the new depth information.
This version contains bug fixes for segmentation faults for events
in which the source and receiver coincide with each other, and for
Pg events where source-receiver distance is greater than ~13 degrees.
The slbmtestc and slbmtestcc test scripts were enhanced to include
a stress test of the Pg calculations.
The major change in this release is that the travel time
calculations for Pg/Lg phases have been modified to implement
the algorithm described by Steve Myers in a memo which is also available
on the secure server in Documents/SLBM_PgLgFix_Doc.pdf.
Added new functions to Grid including
The first function retrieves the approximate size required of a DataBuffer
object to store the contents of the Grid object. The next two functions read
a Grid object from an input DataBuffer and save the contents of the Grid into
an input DataBuffer object. These functions are required by PGL to be able to
store the SLBM model into an FDB.
Since PGL really saves the an SLBMInterface object these same functions were
provided in SlbmInterface to pass-through the request to the Grid object. In
SlbmInterface they are called by the same name. A new function to retreive the
model path variable
const string& getModelPath() const;
was also added to the SlbmInterface object.
I modified the Grid object file base read function to extract the DataBuffer
read/write information into separate functions. This avoided duplicating the
functionality in the new calls above. The calls separate out the input of geo
stacks, layer connectivity and grid connectivity as well as initialization
functionality. They are divided into the 4 functions below:
Finally, the Uncertainty class was modified so that it could be read from and
written to by a DataBuffer object. This included adding a constructor to
serialize from a DataBuffer, a function to retrieve the necessary buffer size,
a function to serialize, and a function to deserialize. These functions are
defined by
Also, I fixed a bug in the Uncertainty file read class where a pth "/"
descriptor was missing. And I replaced the getUncertainty(...) functionality
with a new implementation that uses a fast binary search to find the bracket
values from then input distance.
Modified the way travel time for Pg/Lg phases is calculated.
Previously, Pg/Lg travel times were computed with the
Headwave method. Starting with this release, Pg/Lg travel
times are computed with both the Headwave and TauP methods
and the reported travel time is the lesser of the travel
times calculated with the two methods. See SLBM_design.pdf
for more details. The SlbmInterface method
getPgLgComponents(double* tTotal, double* tTaup,
double* tHeadwave, double* rBottom);
has been added to all interfaces to facilitate evaluation of
this new capability.
Added following methods to the interface(s):
Added a section labeld "test_2_3_0_BETA_Changes()" in each testscript
(programming language) to exercise each new method.
Due to function name length limitations in some FORTRAN compilers, renamed
all functions calls from "slbm_shell_xxx()" to "slbm_xxx()" in the FORTRAN
interface. Additionally, further renamed functions:
slbm_getActiveNodeWeightsReceiver() -> slbm_getActiveNodeWeightsRcvr()
Modified the way CrustalProfile objects are stored. Previously, all
CrustalProfile objects were stored in memory so that if they were
called for again they would not have to be recomputed. This was
a problem since the number of objects could grow until all available
memory was consumed. Starting with this release, the number of
source CrustalProfile objects saved is limited to 10 and the number
of receiver CrustalProfile objects saved is limited to 1000. When
these limits are reached, the least-recently used objects are
deleted from memory. These limits are hard-coded in the software
but can be modified in the Grid constructor in Grid.cc.
Fixed the constructor in GreatCircle_Xg.cc during the TauPSite initialization
to set the TauPSite planet radius before setting the receiver depth.
Modified PGL TauP and SLBM code to utilize identical object definitions. This
included: a) modifications to SLBM to wrap all of its objects into the single
namespace "slbm"; b) modifications to PGL/SLBM to wrap all TauP objects into a
new namespace "taup"; c) modifications to PGL/SLBM to wrap all utility objects
used by both applications into a new namespace "util"; d) renaming of the
SLBM BaseObject.h include file in SLBM to BaseGlobals.h; e) splitting of the
BaseGlobals.h class into a non-namespaced basic definition which keeps the
BaseGlobals name and a new SLBMGlobals.h file containing the specific
definitions required by SLBM; f) the renaming of the PGL StandardDefines.h
file to PGLGlobals.h; g) the removal of base definitions from PGLGlobals.h
and the inclusion of BaseGlobals.h in PGL; h) a new TauPGlobals.h file used by
the "taup" namespace; i) and a new UtilGlobals.h used by the "util" namespace.
Each specific XXGlobal.h file contains a windows definition for the DLL
import/export tag along with any specific defintions (beyond BaseGlobals.h)
required by the namespace.
The "taup" namespace now includes the objects TPVelocityModels,
TauPSiteFunctionals, TauPSite, and TauPModel (used by PGL only). The "util"
namespace now includes MD50, Brents, and IntegrateFunction objects. Once
the DataBuffer object in PGL is split into a new DataBufferDB object and
the base functionality included in the SLBM DataBuffer object, then the
low level DataBuffer object will also become part of the "util" namespace.
Converted the model files from ascii to binary format. The
binary format is the one specified by AFTAC/QTSI. This
change has resulted in a dramatic reduction in the time
required to load the velocity models into memory.
The ascii format is still supported but support for ascii will
be removed in the next release.
Added setters and getters for CHMax and average mantle velocities.
Added getTessId() to retrieve tesselation ID of the model in memory.
Refer to HTML documentation for further details.
Sandy Ballard, SNL
Added several methods to all the slbm interfaces to facilitate
interaction with active nodes. Active nodes are nodes that
fall within a user-specified latitud, longitude range. This
functionality is really only useful to the tomographers.
Changed the grid from the deformed grid to the global tessellated
grid.
Added method getVersion() to all the interfaces.
Added the following methods to SlbmInterface to support regularization
for tomography applications. See html documentation for more information.
void getNodeNeighbors(const int& nid, int neighbors[], int& nNeighbors);
void getNodeNeighbors(const int& nid, vector void getNodeNeighborInfo(const int& nid, int neighbors[], double distance[],
double azimuth[], int& nNeighbors);
void getNodeSeparation(const int& node1, const int& node2, double& distance);
void getNodeAzimuth(const int& node1, const int& node2, double& azimuth);
void initializeActiveNodes(const double& latmin, const double& lonmin,
const double& latmax, const double& lonmax);
void nextActiveNode(int& nodeId);
void getNodeHitCount(const int& nodeId, int& hitCount);
Fixed a bug in the part of the code that computes Pn/Sn travel
times for mantle events. The bug caused the code to hang
for events just below the Moho and close to the receiver.
The test events seemed to return very similar travel times
for very small differences in ray parameter.
The bug was fixed by simply adding a counter that caused
the loop to quit after a specified number of iterations.
Removed a spurious debug print statement that was inadvertently
left in the fortran shell interface.
Added tests for ellipticity corrections and elevation corrections.
The results of these tests had been distributed previously, but
are now part of the official release.
Modified the method where Pn/Sn travel times are computed for mantle
events. Basically made the convergence behavior more robust and
imposed a criterion that C * H < 0.2 where C is the Zhao C parameter
and H is the depth of the ray turning point below the Moho.
Removed criterion that mantle gradients had to be >= 0 and replaced
it with criterion that C and Cm have to be greater than 1e-6.
Added 5 accessor methods to SlbmInterface (in all 4 languages):
Fixed a very subtle bug in QueryProfile. It used to be that interpolation
was done on the basis of depth of surrounding grid nodes. Changed so that
interpolation is done on the basis of radius, which makes a small difference
when the GRS80 ellipsoid is used and Earth radius depends on latitude.
(1) Fixed some bugs having to do with the valid range of the Pn travel
time for mantle events.
(2) Changed the algorithm for computing Pg/Lg travel times. Code now
returns Pg/Lg travel times for events at any depth in the crust, even
events below the top of the middle crust. The algorithm implemented
is exactly as described in the requirement document.
(3) Added new SLBMInterface constructors that take an earth radius in km.
When the constructors with no parameters are called, the radius of the earth
is assumed to vary as a function of latitude, as described by a GRS80 ellipsoid.
When the earth radius is specified in the SLBMInterface constructor, then
earth radius is assumed constant at the specified value. Geographic latitudes
are still converted to geocentric latitudes, using GRS80 ellipsoid.
(4) Modified the IASPI91_slbm.txt model file to have 9 layers instead of 8.
(1)Changed the model input file (unified_slbm.txt) in two ways:
(a) the constraint that gradients cannot be negative has been
removed from the model input file and is now being imposed in
the code. There can now be substantial negative gradients in
the input file.
(b) There are now 9 layers in the model where there were previously
only 8. The 9 layers are:
The change is that there are now two versions of the MIDDLE_CRUST.
MIDDLE_CRUST_N is the same as the previous MIDDLE_CRUST.
MIDDLE_CRUST_G is a new layer that has the same depth as
MIDDLE_CRUST_N but with P wave velocity 6.2 km/sec and S wave
velocity of 3.5 km/sec. There are if statements in the code
that select MIDDLE_CRUST_N for phases Pn and Sn and select
MIDDLE_CRUST_G for Pg and Lg.
(2) Implemented the LANL modification to the Zhao method that calculates
travel times for mantle events.
Changed InterpolatedProfile and all derived classes so that they no
longer have to call new to create the data arrays. This involved
changing from vector Fixed bug that prevented slbm from exiting gracefully when invalid file
specified in Grid::loadVelocityModel().
Added the following methods to all interfaces:
getReceiverDistance() - returns horizontal offset below the receiver.
getWeightsSource() - Retrieve the node IDs and the interpolation
coefficients for the source CrustalProfile.
Fixed many issues with the fortran interface.
Updated all of the html documentation files.
Added a mode of operation to SLBM_test_java wherein two parameters
are specified on the command line. The first is interpreted as the
name of the file containing the earth model and the second is
interpreted to be the name of a file containing a bunch of source
and receiver locations. SLBM_test_java will compute the total
travel time and spew the results to standard out. The input file
should contain the following information on each record, separated
by spaces:
02/13/2008 Version 2.4.1
02/05/2008 Version 2.4.0
Jan 25, 2008, 7:59 am
10/29/2007 Version 2.3.0 Beta
slbm_getActiveNodeWeightsSource() -> slbm_getActiveNodeWgtsSrc()
Oct 9, 2007, 1:02 am
Oct 2, 2007, 8:15 am
8/14/2007 Version 2.2.0 Beta
7/25/2007 Version 2.1.0 Beta
6/25/2007 Version 2.0.0 Beta
6/5/2007
5/23/2007
4/18/2007
4/16/2007
2/14/2007