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: 23 March 2012
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).
An update of the stochastic method part of the SMSIM software was uploaded on 08 June 2016
The main changes in this version 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. A possible undesirable change in the first versions of the new programs is that there is no longer any control over output in terms of the order of T, M, R, Δσ, and κ0. (This was modified for tmrsk_loop_rv_drvr in the 08 June 2016 update.) It is easy enough to open the output in programs such as Excel and CoStat and sort as desired. This is especially useful in making plots.
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, tmrs_rv_drvr, tmrs_loop_rv_drvr, and tmrsk_loop_rv_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.
The site amplification part of the SMSIM software was updated 12 September 2017 (v6.0, adding some sample files).
A restructuring of site_amp_batch was made, with a subroutine being used to compute the equivalent constant-variable layered model (the variables being velocity, density, and inverse Q). In addition, a non-zero kappa for computation is apportioned into each layer of the equivalent model, so that the total effective kappa is the combination of the contribution from the inverse Q in the input model as well as that from kappa for computation. This also means that the file for nrattle prepared by f4nrattle can include the effect of kappa for computation if desired (but care should be used in doing this, as the kappa for computation might include contributions for material below the bottom of the input model, particularly if that model is only intended to represent shallow soil variations and not the velocity variation to depths as large as a number of kilometers; in that case, attenuation in the shallow layers should only include a fraction of that implied by the kappa observed in records). Speaking of an equivalent constant-variable model, site_amp_batch is a convenient way to derive this for an input model with linear gradients in the parameters. To do this, I recommend first running site_amp_batch with nfreq = 0, and then rerunning it with freqlow set to a value slightly higher (to avoid roundoff problems) than the minimum frequency for the model, given in line 6 of the site_amp_batch output when nfreq=0. The number of layers in the constant-variable model is controlled by nfreq in the control file.
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.
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.
For SMSIM, download the Read Me File file (19 Kb), the Manual (1.1 Mb), the zip file containing the SMSIM source code and associated files (1.8 Mb), the zip file containing the SMSIM executables (4.8 Mb), and Site Amplification software (4.1 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.
A minor revision was uploaded on 13 August 2017. Included in this revision is the SMSIM manual; even though out of date , it is still useful in understanding some of the parameters that are used both by SMSIM and EXSIM_DMB.
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 for previous 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.
A minor update on 12 August 2017. The following comments are for the 10 January 2017 revision: This version enforces the proper order of w1, w2, s1, and s2 (a prime source of confusion in constructing the control file). A figure was added to distance_programs_geometry_definitions.pdf showing the values of w1, w2, s1, and s2 for different reference points on the same fault plane. In addition, the PEER NGA-W2 distance measure Rx was added to the output.
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 will probably need to be specified for a multi-fault situation (I should revise my program some day not to require this).
This one of a series of occasional updates to capture small revisions that have been made to the programs. This version is very similar to the January, 2017 version with one major exception: blpadflt was revised to change the filtering options. This required a change to the control file, with a new date, an extra parameter in the line containing filter information, and an additional parameter 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 I have yet to check the case of a narrow-band filter. 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. Here are the notes on the 14 September revision (v.4.1): added a potentially useful driver (smc_interpolate_time_series_using_fft) and associated subroutine (interpolate_time_series_using_fft) that uses the FFT 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).
The zip files accompanying the Open-File Report 2008-1111 can be obtained from the links below. Note that the revision of the manual is lagging behind the program revisions, and for that reason some of the control files in the examples in the Open-File Report may not correspond exactly to the current control files (e.g., smc2fs2.ctl).
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.