Users should be aware of the following disclaimer: Although these programs have been used by the U.S. Geological Survey, no warranty, expressed or implied, is made by the USGS as to the accuracy and functioning of the programs and related program material, nor shall the fact of distribution constitute any such warranty, and no responsibility is assumed by the USGS in connection therewith.
The disclaimer applies even more than usual to these programs. The programs are part of evolving packages and are provided solely for the convenience of the user. I would like to hear about bugs, but please do not ask me for software support.
Revised version: 06 March 2018
Click here for notes concerning the program including sample input and output. Click here for a zip file containing all necessary program files, coefficient files, and sample input and output files. This version corrects a bug in computing the AS08 equations for reverse slip faults (Fnm was set to 1.0 rather than to 0.0); I thank John Douglas for finding this bug.
Click here for a zip file containing all necessary program files, coefficient files, and sample input and output files to evaluate the Boore et al. (2014) (aka "BSSA14") GMPEs (click here for a copy of the paper).
SMSIM: A revision on 03 March 2023
Note that I am not always consistent in changing the version number. To avoid possible confusion in knowing what is the most recent version, I have changed the naming of the zip files by substituting the date of the revision for the version number.
The following comments on earlier versions still apply: The main changes in version 6.2 (2016) are the inclusion of a new program (ratios_of_loop_program) that computes ratios of the output of some of the "loop" programs that produce output for loops over such things as period, magnitude, distance, stress, and κ0. In addition, the program tmrsk_loop_rv_drvr, added in the 15 January 2016 update of SMSIM, has been modified to allow the output to be ordered in various ways for period, magnitude, distance, stress, and κ0 (T, M, R, S, and K). This is for convenience in plotting the output. For example, the order KTMRS (specified in the control file tmrsk_loop_rv_drvr.ctl) would be used if the output was to be plotted as a function of the stress parameter. In this case, the initials indicate the loop order, from outer (κ0) to inner (S).
Here are some of the comments accompanying the 15 January 2016 update. They are important, for they describe what I consider to be the most useful programs in doing SMSIM calculations. The program names are tmrsk_loop_rv_drvr, tmrsk_loop_td_drvr, and fmrsk_loop_fas_drvr. These programs replace tmrs_rv_drvr, tmrs_loop_rv_drvr, tmrs_td_drvr, tmrs_loop_td_drvr, fmrs_fas_drvr, and fmrs_loop_fas_drvr. The new tmrsk programs combine output with units of velocity and acceleration into single columns, one for which the acceleration has units of cm/s/s, and the other where the acceleration has units of g. The programs can produce output for loops over the predictor variables (as implied by the program names) or can produce output for an arbitrary sequence of predictor variables, thus making the tmrs_rv_drvr and tmrs_td_drvr programs obsolete. In any case, it is easy to open the output in programs such as Excel and CoStat and sort as desired. This is especially useful in making plots.
The programs gm_rv_drvr and gm_td_drvr are included for historical reasons (they are the programs mentioned in the manual, which has not been updated). They obtain input interactively rather than through a control file, which I find cumbersome. I recommend against using them. The programs to use are tmrsk_loop_rv_drvr, tmrsk_loop_td_drvr, and fmrsk_loop_fas_drvr.
The params file for the stochastic method programs now include the names of the files containing the coefficients for the Boore and Thompson (2015, BSSA, 1029--1041) (BT15) modification of RV simulation results. These files have extensions "pars". Note that these params files were developed for the Der Kiureghian (1980) rms-to-peak factor (DK80 R2PF) and the 2014 Boore and Thompson path durations (two papers). In a change as of 16 November, the programs gm_rv_drvr, gm_td_drvr, tmrsk_loop_rv_drvr, and tmrsk_loop_td_drvr writes out results only for the DK80 R2PF; they no longer write the results for the Cartwright and Longuet-Higgins R2PF. In the params files the folder "\smsim\" is included as part of the file names. If these files are to be used in your simulations, be sure that the program can find the files. There are several options to make sure that the program can find the pars files: 1) put the BT15 files in a folder named "smsim"; 2) put the files into your working folder and remove the folder designation from the file names in the params file; 3) specify the folder in which the files are located.
Note the addition of a new 2-corner source model (source 12) that is a generalization of the additive model used by Atkinson and Boore (1995) and Atkinson and Silva (2000), among others. This change required a change to the params files used by the SMSIM programs. The new model allows the high-frequency spectral level to be the same as that for the standard one-corner source model, with a specified stress parameter. The two generalized 2-corner models (sources 11 and 12) in SMSIM allow considerable flexibility in modeling data (both observed and simulated). A paper describing the model and giving examples is available on the online publications page (click here for a copy of the paper. If the link is dead (as may happen if I place a newer version on the online publications page), look for the paper by Boore, Di Alessandro, and Abrahamson.
CAVEAT EMPTOR:
Because I do not keep a careful record of changes from one version to the next of the distribution files, I will make no effort to describe what has changed. The best way of doing that is to carefully compare a new params file (and control file, if used) with a previous one. Note that the params files (and control files) have a date indicating when the file was modified. The programs check this date to make sure that the proper version is being used.
***A warning***. After making revisions and compiling all programs, I do not test each program. Usually my changes involve only one or two programs, and I do test those programs. Please contact me if something seems not to be working.
OBTAINING THE SMSIM PROGRAMS:
Download the Read Me File (19 Kb), which contains revision information up to 2011-04-16, Manual (1.1 Mb), which is very out of date (see comments in next paragraph), the zip file containing the SMSIM source code and associated files (7.2 Mb), and the zip file containing the SMSIM executables (3.6 Mb). (some files might be missing. If so, contact me.).
The manual has not been updated to incorporate the latest changes, but the existing manual does explain the meaning of a number of input parameters related to such things as the geometrical spreading, Q, and specification of the time series envelope in the time-domain simulations. One important change: the files containing parameters for a run have the extension "params" rather than "dat". For example, the file used to create the examples in the manual is "ofr.params", where "ofr" stands for "Open-File Report" and "params" stands for "parameters". There are often extensive comment lines in the params files explaining the meaning of the parameters. These comments should be read carefully. I also recommend looking at the comment lines at the beginning of the Fortran source code for each program for more up-to-date information. New since the manual was written are a suite of "driver" programs that do not require user input from the screen. These make it much easier to generate motions for any combination of period, magnitude, distance, and stress parameter for response spectra and frequency, magnitude, distance, and stress parameter for Fourier spectra. Two versions of these programs are provided, the most general of which compute motions for values of the period, magnitude, distance, and stress parameter given in individual lines in the control files tmrs_rv_drvr.ctl (for random-vibration calculations) and tmrs_td_drvr.ctl (for time-domain calculations). Any combination of period, magnitude, distance, and stress parameter can be used. More useful in many cases are the programs tmrsk_loop_rv_drvr and tmrsk_loop_td_drvr, which allow loops over a series of periods, magnitude, distances, stress parameters, and κ0 to be easily specified. There are comparable programs for computing the Fourier amplitude spectra of the ground-motion models.
I make heavy use of include statements to append necessary subroutines into the main program source code at compile time. For ease of use, I have made collections of subroutines that are in different folders on my computer. By putting all of the source code in the SMSIM zip file into a single folder and compiling the programs from within that folder, there should be no problems with the include statements finding the subroutines. There may still be a few cases, however, where the include statements specify a different folder (usually "forprogs", the folder in which I keep my non-SMSIM programs), in which case the source code needs to be edited to remove that different folder.
I am using a new method for keeping track of which files to include in the distribution zip file. If some source code is missing, please contact me. Be aware that some of the Fortran files, such as rv_subs.for, td_subs.for, rv_td_subs.for, smsim_util_subs.for, ff_subprograms.for, and recipes.for are collections of subprograms used by the SMSIM programs; these collections of subprograms are added to the source code of the main programs by use of INCLUDE statements.
SiteAmp was updated 18 August 2024.
This version also contains a new program, vel2constant_velocity_model, that might be more convenient than site_amp_batch for generating an equivalent constant velocity model from a general velocity model for a desired set of depths to the bottom of each layer (these must be provided as input to the program).
The output for site_amp_batch has been changed, so that earlier versions of utility programs such as layr2plt, site_amp_ratios, and f4nrattle will not work with the new site_amp_batch output. It works the other was as well: the new utility programs in this distribution will not work with older site_amp output.
Note that the program site_amp is no longer supported; site_amp_batch should be used instead.
Example control, model, and output files for site_amp_batch have been added. There are three models: (1) the model used in the SMSIM manual (this is NOT intended to represent a real model, but it is used to illustrate how the velocity profile can be made up of linear gradients and constant velocity layers); (2) the Boore and Joyner (1997) (BJ97) generic rock model (BJ97gr), and(3) the Boore (2016) (B16) revision of BJ97gr that has VS30=760 m/s (BJ97gr760). The BJ97gr760 model uses the velocity model in Table 1 of B16; this is a decimated verions of the original BJ97gr760 velocity model. For the two versions of the BJ97 model, there are two outputs, one with frequencies corresponding to the interfaces (and because one interface is at 30 m depth, the average velocity to that depth [aka VS30] can be read from the output--618 m/s for BJ97gr and 759 m/s for BJgr760); the other output is for 25 log-spaced frequencies, for ease of comparison with Table 2 of B16 (the output for this model is not exactly the same as that in Table 2, probably because of roundoff or slight differences in the velocity models, but the differences are less than 1%).
Examples files for other Site_Amp programs (e.g., site_amp_ratios, layr2plt, pwr2lyr, impulse_response_from_nrattle_output, f4nrattle, nrattle, roll) will be added at a later date.
Also included are some incomplete notes (Notes_on_Using_Site_Amp_Programs.v01.pdf) on using Site_Amp programs (mainly site_amp_batch); these will be expanded into an updated version of the instructions now included in the long-out-of-date SMSIM user's manual
Note for an earlier version (but still relevant for the current version): The nrattle output file with the model and the complex transfer function has been changed to include the number of layers in the model before the model parameters, for ease of use in reading the file. In addition, a program (impulse_response_from_nrattle_output) was added in an earlier version that computes the impulse response time series for the transfer function.
OBTAINING THE SiteAmp PROGRAMS:
Site Amplification software (5.1 Mb) (some files might be missing. If so, contact me.).
A revision was uploaded on 25 September 2024; see text below for information about revisions
For EXSIM_DMB, download a zip file containing the source code, site and crustal amplification input files, the parameter file, and the output files produced by running the program with the parameter file. Also included is my paper published in Bull. Seismol. Soc. Am. describing the modifications I have made to D. Motazedian's program EXSIM, as well as some figures illustrating the geometry. The executable (made using the LF95 compiler on a Windows machine) is contained in this zip file.
Some comments on updates:
Because I do not keep a careful record of changes from one version to the next of the distribution files, I will make no effort to describe what has changed. The best way of doing that is to carefully compare a new params file with a previous one. Note that the params files have a date indicating when the file was modified. The programs check this date to make sure that the proper version is being used.
An update on 23 December 2019 (included the missing subroutine locate_d.for). The dist_3d control file was changed, and there is now an option to specify the reference and station locations in Cartesian coordinates rather than geographic coordinates (latitude and longitude). In addition, the quantity Ry0_nga was added. This is a distance along strike, used by Abrahamson et al. (2014) to taper their hanging wall effect. It can only be greater than or equal to 0.0. See p. 1040 of Abrahamson et al. (2014), EqSpectra 30, 1025-1055. Note that the output first shows distance measures that are the minimums over all the fault segments for a particular distance measure. This might be meaningful for Rjb and Rrup, but it is not clear that that is true for rx_nga and ry0_nga. The summary distances are followed by distances for each fault segment.
Click here for a zip files containing programs for computing various distance measures between a station and a finite fault; also included are programs to compute the distance between two points specified by their latitudes and longitudes, as well as other useful programs, such as those for converting between kilometers and degrees (useful when the vertices of a fault's surface projection are in terms of kilometers on a cartesian grid, rather than latitude and longitude, and vice versa).
Note that the reference coordinates in the control file are a point on the fault surface. For this reason, a different reference point is needed for each fault segment for a multi-fault situation.
This one of a series of occasional updates to capture small revisions that have been made to the programs. In the 10 January 2019 version the users manual was been updated, and programs that compute response spectra, such as blpadflt and smc2rs, were modified to allow for sinc interpolation of the time series used in computing response spectra. This required changes to control files of a number of programs. The control files of some of the filtering programs (e.g., blpadflt and filt_plot_gen) were also changed to allow for more options in the filters. The following comments apply to this as well as the previous version of the filtering programs: an additional parameter in the control files was added to specify if the filter when flc and fhc are both greater than 0.0 should be treated as a low-cut followed by a high-cut filter, or as a bandpass filter. My limited experiments indicate little difference when flc and fhc are widely separated, but there can be a difference between a band and a combination of low-cut and high-cut filters when the filter period are close to one another. The revision also makes it possible to combine an acausal LC filter (which I recommend) with a causal HC filter in one run. In the previous versions it was not possible to mix causal and acausal filters in one run; the only way to do this was to do one run with either the LC or HC filter, and then a second run using the time-series output from the first run with the desired HC or LC filter. This was cumbersome and resulted in unwanted intermediate files being saved to the hard drive.
In earlier versions a program (smc_hicut_fd_cosine_taper) was added that simulates an anti-aliasing filter by applying a raised half-cycle of a cosine in the frequency; this program was used in the Boore and Goulet (2014) paper. The July, 2016 version included a new program (smc_apply_site_response) that does what its name describes: it applies the complex site response from the site_amp program nrattle to an input time series to produce a time series that includes the site response. Note the comments in the header lines of both the source code and control file to see important constraints on the nrattle output and the input time series. Also included is a version of the subroutine get_path_from_system_call that should be used if compiling and running the programs on a machine using a Linux operating system; this subroutine is given in the file get_path_from_system_call.4linux_os.for. The existing subroutine in filt_plot_util_subs.for (which is a collection of subroutines used in the filt_plot programs) should be replaced with the subroutine in get_path_from_system_call.4linux_os.for.
The major change relative to v4.1 is that the computations in smc2psa_gmrot_rot program are much faster, thanks to a suggestion by Norm Abrahamson. In addition, the new program allows resampling of the input time series [smc2psa_gmrot_rot has now been replaced with the more general program smc2psa_rot_gmrot_interp_acc_rot_osc_ts]. Here are the notes on the 14 September revision (v.4.1): added a potentially useful driver (smc_interpolate_time_series_using_fft) [now replaced with smc_interpolate_time_series_using_fork] and associated subroutine (interpolate_time_series_using_fft) [now replaced with interpolate_time_series_using_fork] that uses the FFT [as computed using the subroutine fork] to interpolate a time series to a finer time spacing (increased number of samples per second). This was done after Norm Abrahamson found that response spectra computed using the Nigam and Jennings algorithm, which assumes straight line interpolation between sample points, could be different than those computed if the interpolation were based on the fundamentally more correct sampling theorem (convolution in the time domain with a sinc function). The difference in response spectra can be an issue if the FAS has little reduction in amplitude as the Nyquist frequency is approached, as can happen in low-sample-rate recordings on hard rock sites. In the future I will incorporate an option in the response spectral drivers (e.g., smc2rs, smc2rs2) to resample before computing the response spectra, but for now, the program smc_interpolate_time_series_using_fork can be used (it creates resampled smc-formatted files for a list of input smc-formatted files). [As of the 27feb18 version this has now been done in smc2rs, while smc2rs2 is no longer supported and is not provided in the distribution; it is still possible to create resampled time series files using smc_interpolate_time_series_using_fork if desired, but the resampling can now be done directly in smc2rs without saving the resampled time series as a new file.]
The zip files accompanying the Open-File Report 2008-1111 can be obtained from the links below.
Note that these programs keep evolving, and I often find that changes are needed as I use particular programs in various projects. For my convenience, and to make sure that the latest versions of the programs are on my web site, I use a batch command file to create new zip files for all of the programs, even if only a few have been modified (e.g., on 20 December 2010 I modified only the smc_detrend processing program, but I created v.2.38 of all the files). It is too hard for me to keep a change log for all of the programs in a single file, so I recommend that users download the latest zip files and simply overwrite the previous files. If a file is missing, please let me know.