Broadband User Guide
If you find errors in this document or sections to be unclear, please either fix them yourself or contact Scott Callaghan (scottcal@usc.edu) or Philip Maechling (maechlin@usc.edu).
Contents
Installing the Second-Generation Broadband Platform
Installing the Broadband Platform involves obtaining a copy of the code and building the required executables. You can either download the platform from the Broadband web site (http://www.scec.org/research/broadband) or check the code out of SCEC’s Subversion repository. Most users should download the platform.
System Dependencies
The current version of the Broadband Platform is designed to run on standard Linux machines. Testing has been performed on SCEC's development servers running Fedora Core 10 (kernel version 2.6.27.41-170.2.117.fc10.x86_64). In this guide we outline how to install the platform into your own account on a Linux computer using the simplest approach.
Software Dependencies
The Broadband Platform has certain software dependencies.
Required:
- Python 2.5+ with
- PyGTK
- Matplotlib
- Numpy
- Intel compilers
Optional:
- GMT tools (for plots)
- Matlab
Setting Up Your Account
Users should set up their accounts to use a bash shell. The user environment is a common source of problems since certain environment variables must be defined for the platform to work correctly.
To check your account, make sure you can run basic commands like ls and cd before proceeding.
Downloading the Platform
Download 4 files from the Broadband website, the code (bbp_dist_<version>.tgz), the data (bbp_data_<version>.tgz), and their checksum files (bbp_dist_<version>.tgz.md5 and bbp_data_<version>.tgz.md5). The code file is about 100 MB, the data file about 3 GB. After you’ve downloaded the files to your local Linux system, the next step is to calculate the checksums yourself and compare them to the checksums you downloaded.
First, verify that the md5sum command is in your path:
$> which md5sum
You should get something like /usr/bin/md5sum. If you see the message 'no md5sum in …', contact your Linux system administrator and ask to have md5sum added to your path.
Once you can run the md5sum command, run:
$> md5sum -c bbp_dist_<version>.tgz.md5 $> md5sum -c bbp_data_<version>.tgz.md5
You should get the messages “bbp_dist_<version>.tgz.md5: OK” “bbp_data_<version>.tgz.md5: OK”
If you get FAILED instead, re-download the tgz files and try again. When it passes, that means the files were downloaded without error.
Once both files have passed the checksum test, untar the files.
$> tar xzvf <code tgz file>
$> tar xzvf <data tgz file>
If multiple users are planning to use the platform on the same system, you only need one copy of the data files per machine. Each user will still need his or her own copy of the code files.
Alternatively, if you would like access to the latest version of the platform and get frequent but less thoroughly tested improvements, you can check out the platform from SCEC's Subversion repository. Only advanced users should take this approach, outlined in detail in section 1.8.
Platform Setup
After you've obtained a copy of the project, you'll need to make sure the comps directory is on Python's path so Python can find all the project modules. If you're running a Bash shell, add the following line to your .bash_profile with your favorite text editor:
export PYTHONPATH=<path to comps directory>:$PYTHONPATH
If you're running a C-shell, add the following line to your .cshrc with your favorite text editor:
setenv PYTHONPATH <path to comps directory>:$PYTHONPATH
When running elements of the platform over ssh, be sure to enable ssh forwarding (with the -X or -Y options).
After modifying your login script above, log out and log back into the machine so the changes are reflected in your environment.
Directory Structure
The platform consists of two top-level directories, bbp_2g and bbp_2g_gf. bbp_2g contains the source code, executables, scripts, tests, input, working, and output directories. bbp_2g_gf contains the Green’s Functions, input files for the validation events, and other required input files for the various code bases. Note that indata, logs, outdata, and tmpdata are created when the platform is first run, so they will be missing when you first check the platform out.
bbp_2g has the following directories:
checksums: Contains checksums for bbp_2g_gf files
comps: The Python scripts to run the platform
etc: Miscellaneous utility scripts
examples: Contains example input files
indata: An internal directory, used to stage input files
logs: Contains logs from BBP runs
outdata: Contains output files from a run
ref_data: Contains reference files for BBP tests
start: Put input files for an interactive run here
src: Source code for BBP modules
tests: Contains unit and acceptance tests
tmpdata: An internal directory, used during a run
xml: Contains XML files which describe simulations and can be used as input
bbp_2g_gf has the following directories:
compare: Contains observed seismograms for validation events
plot: Data files for GMT plots
sdsu, ucsb, urs: Contains Green’s functions, velocity files, and other required inputs for the codebases.
In general, you will be interacting with the start directory for input files, comps to run the platform, tests to test the platform, and outdata to examine data products.
Building the Platform
Once you have checked out the code, you need to build it. By default, every executable is compiled using the compiler recommended by the code developer. However, if you have limited compiler options or are building the codes on an untested system, you may need to specify non-standard alternative compilers, as described below.
Before you can build the platform, you need to make sure that the Intel compilers are in your path. This is done automatically on intensity.usc.edu, but on other systems you can check by typing:
$>which icc
If you get the message “no icc in …”, then you’ll need to add the Intel compilers to your path. Once the Intel compilers are in your path, you can make the code by cd-ing to the bbp_2g/src directory and typing:
$> make clean
$> make
It takes a minute or two to build the code.
Additionally, you need to tell the platform where it’s installed. Edit the file bbp_2g/comps/install_cfg.py with your favorite text editor, and edit the lines
self.A_INSTALL_ROOT = <bbp_2g directory>
self.A_GF_DIR = <bbp_2g_gf directory>
with the paths to the bbp_2g directory and bbp_2g_gf directory on your system.
By default, every executable is compiled using the compiler recommended by the code developer. Depending on the system, some compilers may not be available to you. You can override the C and Fortran compilers used by editing
src/makefile
Uncomment USER_C and set FC and CC to the compilers you wish. For example:
Before:
#USER_C=1
FC=f77
CC=gcc
After (an example, you may choose different compilers):
USER_C=1
FC=gfortran
CC=gcc
Note that not all compiler combinations have been thoroughly tested. You may encounter build errors.
Once the platform has been successfully built, you can move on to running the tests to verify that all components are working correctly.
Advanced Users
Alternatively, if you would like access to the latest version of the platform, to get frequent but less thoroughly tested improvements, you can check out the platform from SCEC's Subversion version control repository on intensity.usc.edu. Only advanced users should follow this approach. If you are unsure, you should download the code as outlined in section 1.2 and skip this section.
You may need to request access from the SCEC system administrator, John Yu (johnyu@usc.edu). Make sure you have subversion in your path before beginning.
Once you have access, you'll need to decide if you want a stable tagged version, or the latest version in the repository. For a stable version, open a terminal window on the system of your choice and type:
$> svn checkout https://source.usc.edu/svn/broadband/tags/<stable version> bbp_2g
For the latest version, type:
$> svn checkout https://source.usc.edu/svn/broadband/trunk bbp_2g
This will check out the project to your local machine. It contains the source code, tests, and some example files. You also need to obtain a copy of the Broadband Platform data files, containing the Green's tensors. They are too large to be stored in version control. You can obtain a copy from /home/scec-00/scottcal/bband/bbp_2g_gf on intensity. If you are working on intensity as well, you can just create a symbolic link:
$> ln –s /home/scec-00/scottcal/bband/bbp_2g_gf <path to your gf directory>
If you are not working on intensity, or don't have an intensity username, you can get a .tgz file of the Green's functions from the same download site you obtained this guide.
Periodically you should check for updates to the code. To do so, go to your bbp_2g directory and type
$> svn update
This will pull down any code updates that have been made in the repository. After you update, make the code again (detailed in section 1.5) so that any code changes are captured in the executables.
Running the Tests
The broadband platform contains three kinds of tests. The checksum tests verify that the data files were copied correctly and you have all the files that are expected. Unit tests run each module using a set of input files, and compare the results against known outputs. They verify that each module has been built and is working correctly. Acceptance tests verify that the modules are working correctly together. They test the platform end-to-end using different combinations with known inputs and compare the results. All the possible module combinations for both user-defined and validation events are tested as checks against integration errors.
Begin with the checksum tests. Once they past, run the unit tests and finally the acceptance tests.
Running Checksum Tests
To run the checksum tests, change to the checksums directory and run md5sum_check.py.
$> cd checksums
$> ./md5sum_check.py
It takes about 5 minutes to compute the checksums. If a checksum disagrees, that means that the contents of the datafile were not what was expected. Try reinstalling the data files and try again. If you continue to get a checksum error, contact support.
Once the checksums agree, move on to the unit tests.
Running Unit Tests
To run the unit tests, change to the tests directory and run UnitTests.py.
$> cd tests
$> ./UnitTests.py
The unit tests take about 15 minutes to run. When they're complete, the console will either print “OK” or how many tests failed. If a test has failed, first check that you have built the executables. You can rerun just the specific test that failed (test_<module>.py). If the test is still failing, also verify that you have the ref_data directory, since it contains the input and reference files. If you can't determine the reason for the failure, contact support.
Once the unit tests all pass, proceed to the acceptance tests.
Running Acceptance Tests
Make sure the unit tests pass before moving on to the acceptance tests. To run the acceptance tests, change to the tests directory (if you're not there already) and run AcceptTests.py.
$> cd tests
$> ./AcceptTests.py
The acceptance tests take a long time to run, around 12 hours. You may want to background them instead and redirect their output:
$> ./AcceptTests.py &> accept.out &
When they're complete, the console will either print “OK” or how many tests failed. If you system lacks MATLAB, you may find that a number of the acceptance tests are skipped. These are tests which require MATLAB, and skipping them is to be expected. Acceptance test failures indicate that the modules are not integrated correctly. Like with the unit tests, verify that you have the ref_data directory and that everything is built before contacting support.
Since the acceptance tests can take a long time to run, you may wish to resume where you left off. This feature is supported automatically. If you do not wish to resume, delete the resume file in ref_data/accept_inputs/resume.txt.
Performing Simulations
The platform supports two kinds of simulations, validation events and user-defined events. Validation simulations are performed using a historical event, and are directly compared to observed seismograms using goodness-of-fit. User-defined events are run using a rupture description provided by the user which may not necessarily be a historical earthquake.
When you run a simulation, the platform assigns an ID to it. This ID can be used to track the simulation and locate the output data products.
To supply input files to the platform, put them in the start directory. Extensions are important – the platform recognizes station lists (.stl), SRF files (.srf), and simple source descriptions (.src). If there are multiple files of a type, the platform will prompt the user to select one.
To perform a simulation, a user selects between different required and optional modules. Below we present a summary of the various modules.
Modules
The broadband platform consists of a series of modules. There are two main types of modules, science modules and utility modules. Science modules are those for which the platform has multiple implementations, provided by different coding research groups. Utility modules only have 1 implementation. A schematic of the available modules and their flow relationships is shown below:
Science Modules
All simulations must include a low-frequency, high-frequency, and site response science module. Simulations may include an optional rupture generation science module. Users may select between the following different implementations of each of these modules:
Rupture generation:URS, UCSB
Low-frequency:URS, UCSB
High-frequency:URS, UCSB, SDSU
Site response:URS, UCSB, SDSU
Utility Modules
A spectral response utility module is automatically run after the site response module. Additionally, users may select an optional goodness-of-fit utility module to run at the conclusion of the simulation. In the case of a user-defined event, users select a historical event or previously run simulation to use as the comparison for goodness-of-fit.
Validation Simulations
To run a validation simulation, go to the comps directory and run run_bbp_2G.py. The platform will ask you a series of questions. Answer 'y' to “Do you want to perform a validation run?”
$> cd comps
$> ./run_bbp_2G.py
Welcome to the SCEC Broadband Platform.
Please select the modules you want to run.
Do you want to perform a validation run (y/n)? y
Do you want to validate with:
Northridge (1)
Loma Prieta (2)
Landers (3)
?
...
No input files are required by the user. However, you may wish to run with a reduced station list to speed up the computations. You can put your own station list into the start directory (the format is described in section 5.3). Note that any stations which do not have observed seismograms will not be included in the automatically generated goodness-of-fit comparison.
In addition to the low-frequency modules which compute seismograms using 1D Green's Tensors, validation events can also be run using precomputed 3D seismograms to supply the low-frequency.
User-defined Simulations
To run a user-defined simulation, two input files are required, a rupture description and a station list. The rupture description can either be in SRF format or a simplified rupture description (the format is described in section 5.1). To run a user-defined simulation, run run_bbp_2G.py.
$> cd comps
$> ./run_bbp_2G.py
Welcome to the SCEC Broadband Platform.
Please select the modules you want to run.
Do you want to perform a validation run (y/n)? y
Do you want to run a rupture generator (y/n)?
...
You may then choose if you want to run a rupture generator. This is necessary if you're supplying a simple rupture description. If you're supplying an SRF file, you can skip this. Next you can select from different module implementations. Finally, you have the option to run goodness-of-fit against either observed seismograms or another simulation.
...
Do you want to run goodness of fit (y/n)? y
What reference files would you like to compare to? Enter a simulation ID or a scenario name: <comparison>
Enter a label to use for the comparison seismograms: <label>
The label will be used in GoF plots to distinguish one set of results from the other.
The user-defined events must be within one of the regions supported by the platform – Southern California, Northern California, or the Mojave. The platform will automatically select a region based on the event hypocenter. If the event falls outside of these regions, you'll get an error.
Logging
During the run, log files will be produced in logs/<simulation ID>/<simulation ID>.<module name>.log. If the platform fails, this is a good place to look to determine the error. Additionally, any fatal errors will be recorded in fatal_error.log.
Metadata capturing all the executable calls is located in tmpdata/<simulation ID>/metadata.txt for careful tracing of exactly what was called. Both the log files and metadata can be useful if troubleshooting an issue.
Data Products
The platform produces a variety of data products. All data products are located in outdata/<simulation ID>. On most Linux systems, you can show images using display:
$> display <PNG file>
Make sure you have X11 forwarding enabled.
Station map
To help visualize the stations in relationship to the fault, the platform produces a PNG file displaying station locations with red circles and the fault plane with a black line, on an image of California. You can find this file in outdata/<simulation ID>/station_map.png.
Seismograms
When running the platform, you have the option to output velocity and acceleration seismograms, for each station. Plots of these files can be found in outdata/<simulation ID>/<simulation ID>.<station>_<velocity or acceleration>_seis.png.
The raw seismogram data is available in outdata/<simulation ID>/<simulation ID>.<station>.bbp (velocity) and outdata/<simulation ID>.<station>.acc.bbp (acceleration). Its format is described in section 5.4.
To compare seismogram data, you can run comps/plotit.py with two seismograms. It will plot them both for comparison. From the comps directory, run:
$> ./plotit.py <path to seismogram 1> <path to seismogram 2>
Response spectra
The respect code, run at the end of each simulation, calculates the response spectra for each station. The raw respect data is located at outdata/<simulation ID>/<simulation ID>.<station>.rsp, in the format described in section 5.5.
Goodness-of-fit
If you run goodness-of-fit, several additional data products are produced. The goodness-of-fit comparison is performed by comparing the response spectra of a set of calculated seismograms to seismograms from another simulation or observed seismograms. For each station involved in the comparison, a plot comparing the response spectra can be found at outdata/<simulation ID>/<comparison label>_<simulation ID>_<station>_rsp.png. A plot showing the seismograms on top and bottom can be found at outdata/<comparison label>_<simulation ID>_<station>_overlay.png. The goodness-of-fit plot can be found at gof-<comparison label>-<simulation ID>_r0-<cutoff distance>.png.
Note that at least 3 stations must be run for goodness-of-fit to be valid. If fewer than 3 stations are run, no goodness of fit calculation will be performed.
Rupture files
When a user-defined event is simulated, the user has the option to run a rupture generator. This generator produces an SRF file, found in outdata/<simulation ID>/*.srf. This file can be put in the start directory and used in future runs. Additionally, the platform produces a plot of the cumulative slip on the fault surface, outdata/<simulation ID>/<SRF prefix>.png.
Platform Modes
The platform can be run in multiple modes. The default is interactive mode, in which the user is prompted to answer a series of questions. Once all the information has been gathered, the run begins.
For a large number of runs, or if the user is repeating a specific run, this can be tedious. The platform provides two other ways to describe a run, with an option file or an XML description.
An option file provides responses to all the questions that the platform poses. The format is described in section 5.6, but it's basically a text file, 1 entry per line, with support for comments. It can be fed to the platform using the -o option.
The platform will also accept XML files containing a full description of a run. The schema for these files is given in section 5.7. These files are also produced by the platform after every simulation, and placed in xml/<simulation ID>.xml. So if you want to rerun a simulation, you can point the platform to the XML file from that simulation using the -x option. Note that a new simulation ID will be assigned to the run, so there is no risk of overwriting previous simulation results.
Available Options
To get a list of the current available options, run run_bbp_2G.py with the -h flag.
$> ./run_bbp_2G.py -h
Usage: run_bbp_2G.py [options]
Options:
-h, --help show this help message and exit
-x XML_FILE, --xml-file=XML_FILE
Run using XML description of workflow
-s SIM_ID, --simID=SIM_ID
Force a simID
-o OPTFILE, --option-file=OPTFILE
File containing responses to interactive platform
prompts
-v, --version Broadband platform version
-g, --generate-xml Generates the XML description but does not run the
platform
-l LOG_FILE, --log=LOG_FILE
Store all output in a file
-x: The platform will run a simulation from the XML description.
-s: Force the platform to run with a given simID (a nonnegative integer)
-o: Use an option file providing answers to the platform prompts
-v: Prints the version of the platform and exits.
-g: The platform will generate an XML description but not actually run the workflow. Useful if you want to create simulation descriptions and run them later.
-l: After the prompts, all output will be redirected to this file. This can be useful if you decide to background the platform, as multi-station runs for large events can take many hours to run, or if you just want to repress the output. We advise against redirecting it to /dev/null, as it often contains useful information.
Cleanup
After a while, you may find that your indata, tmpdata, outdata, and logs directories are getting cluttered with files from past runs. If you wish to delete these old files, you can use the clean_directories.sh script in the etc directory.
$> cd etc
$> ./clean_directories <days>
Any simulation ID directories in the indata, tmpdata, outdata, and logs directories which were last accessed <days> days or longer ago will be deleted. If you have a few directories you want to keep, either copy them somewhere else, or copy them to a directory name that’s not all digits and they won’t be deleted.
Examples
Below are some examples that you can try using the sample files in the examples directory. Make sure all the tests pass before you try this.
Sample Validation Run
You don't need to move any files for this. Notice that 3D seismograms are a low-frequency option, since you're running a validation event.
$> ./run_bbp_2G.py
Welcome to the SCEC Broadband Platform.
Please select the modules you want to run.
Do you want to perform a validation run (y/n)? y
Do you want to validate with:
Northridge (1)
Loma Prieta (2)
Landers (3)
?1
Do you want to
run all validation stations (1)
select a station list (2)
?1
Choose a source of low frequency seismograms:
URS module (1)
URS 3D seismograms (2)
UCSB module (3)
SDSU module (4)
SDSU 3D seismograms (5)
?2
Choose a high frequency module:
URS (1)
UCSB (2)
SDSU (3)
?1
Choose a site response module:
URS (1)
UCSB (2)
SDSU (3)
?1
Do you want to plot velocity seismograms (y/n)? y
Do you want to plot acceleration seismograms (y/n)? y
This simulation takes about 10 minutes. Once it's complete the platform will tell you:
You can find results in <path to bbp_2g install>/outdata/<simulation ID> .
In that directory you will find:
Velocity seismograms (<simulation ID>.<station>.bbp)
Acceleration seismograms (<simulation ID>.<station>.acc.bbp)
Plots of velocity seismograms (<simulation ID>.<station>_velocity_seis.png)
Plots of acceleration seismograms (<simulation ID>.<station>_acceleration_seis.png)
Response spectra files (<simulation ID>.<station>.rsp)
Plots comparing simulated and observed seismograms (Northridge_<simulation ID>_<station>_overlay.png)
Plots comparing simulated and observed response spectra (Northridge_<simulation ID>_<station>_rsp.png)
Overall goodness-of-fit plots (gof-Northridge-<simulation ID>_r0-25.png)
Sample Validation run, custom stations
If the validation runs aren't performed with 3D low-frequency, it can take a long time, up to 10 minutes per station. Sometimes you might want to run with a reduced station list so the simulation will run faster.
Copy the files in example/valid_custom_stations into the start directory. Take a look at the format of the station file:
$> more valid_test_stat.stl
#Required: lon, lat, station name, distance to fault plane, Vs30
#Optional: low freq corner, high freq corner
#Unused: station information
#lonlatstationdistVs30LF cornHF corn station information
-118.6417 34.5640 cast 20.47 450 0.120 23.0 CSMIP peer.berkeley.edu/nga
-118.4180 34.0628 lacn 22.82 278 0.140 23.0 CSMIP peer.berkeley.edu/nga
-118.8811 34.2886 moor 24.16 405 0.160 23.0 CSMIP peer.berkeley.edu/nga
Now, run the platform, using a station list:
$> ./run_bbp_2G.py
Welcome to the SCEC Broadband Platform.
Please select the modules you want to run.
Do you want to perform a validation run (y/n)? y
Do you want to validate with:
Northridge (1)
Loma Prieta (2)
Landers (3)
?1
Do you want to
run all validation stations (1)
select a station list (2)
?2
If you have multiple station list files in your start directory, you may see the following prompt asking you to select one. If you only have one, the platform will select it automatically
Found multiple BBP station list files in the start directory. Please select one:
nr_one_stat.stl (1)
valid_test_stat.stl (2)
?2
Choose a source of low frequency seismograms:
URS module (1)
URS 3D seismograms (2)
UCSB module (3)
SDSU module (4)
SDSU 3D seismograms (5)
?3
Choose a high frequency module:
URS (1)
UCSB (2)
SDSU (3)
?2
Choose a site response module:
URS (1)
UCSB (2)
SDSU (3)
?2
Do you want to plot velocity seismograms (y/n)? y
Do you want to plot acceleration seismograms (y/n)? y
Again, when the run completes in about 15 minutes you can find results in the output directory. You'll notice far fewer files, as only 3 stations were run instead of 133. The goodness-of-fit plots won't look very good – more stations are really needed to get an accurate plot.
Sample User-defined run with source description
Next let's try running a user-defined event. Copy examples/user_rup_gen/nr_one_stat.stl and examples/user_rup_gen/user_eq.src to the start directory. user_eq.src is a simple source description. Its format is outlined in section 5.1. Since this is a user-defined event, precomputed 3D seismograms aren't a valid option.
$> ./run_bbp_2G.py
Welcome to the SCEC Broadband Platform.
Please select the modules you want to run.
Do you want to perform a validation run (y/n)? n
Do you want to run a rupture generator (y/n)? y
Rupture generators:
URS (1)
UCSB (2)
?1
Using region: Southern California
Choose a low frequency module:
URS (1)
UCSB (2)
?2
Found multiple BBP station list files in the start directory. Please select one:
nr_one_stat.stl (1)
valid_test_stat.stl (2)
?1
Choose a high frequency module:
URS (1)
UCSB (2)
SDSU (3)
?2
Choose a site response module:
URS (1)
UCSB (2)
SDSU (3)
?1
Do you want to plot velocity seismograms (y/n)? y
Do you want to plot acceleration seismograms (y/n)? y
Do you want to run goodness of fit (y/n)? n
Since this run only includes one station, it will run in about 5 minutes. In the output directory you'll notice there are no goodness-of-fit or files, since we didn't run goodness-of-fit. However, there is also a map file (station_map.png), showing the fault plane and the stations, and a plot of the rupture slip (user_eq.png). The SRF generated by the rupture generator is in user_eq.srf; this file could be used in future runs. The filenames of the rupture slip plot and SRF are taken from the rupture description filename.
Sample User-defined run with SRF file and goodness-of-fit
Finally, try a run with an SRF file and run goodness-of-fit on the results. Copy in examples/user_no_rup_gen/ucsb_modSRF_0.srf and examples/user_no_rup_gen/nr_three_stat.stl
$> ./run_bbp_2G.py
Welcome to the SCEC Broadband Platform.
Please select the modules you want to run.
Do you want to perform a validation run (y/n)? n
Do you want to run a rupture generator (y/n)? n
Using region: Southern California
Choose a low frequency module:
URS (1)
UCSB (2)
?1
Found multiple BBP station list files in the start directory. Please select one:
nr_one_stat.stl (1)
valid_test_stat.stl (2)
nr_three_stat.stl (3)
?3
Choose a high frequency module:
URS (1)
UCSB (2)
SDSU (3)
?3
Choose a site response module:
URS (1)
UCSB (2)
SDSU (3)
?1
Do you want to plot velocity seismograms (y/n)? y
Do you want to plot acceleration seismograms (y/n)? y
Do you want to run goodness of fit (y/n)? y
What reference files would you like to compare to? Enter a simulation ID or a scenario name: Northridge
Enter a label to use for the comparison seismograms: nr
The reference files can either be a scenario event or a simulation ID previously run. The label is just for the figures when comparisons are plotted.
This run will take about 15 minutes, and the results can be found in the appropriate outdir. Again, the goodness of fit measures will look poor due to the few stations involved in the comparison. If you had fewer than 3 stations, no goodness-of-fit plots would be produced. However, response spectra comparison plots will still be generated.
File Formats
This section offers descriptions of various file formats in the broadband platform.
Simple source description
This is the format for the simple source description. It is not whitespace sensitive. The filename must end in .src for the platform to identify it as a source description.
MAGNITUDE = <magnitude>
FAULT_LENGTH = <length of fault>
DLEN = <DX, along length>
FAULT_WIDTH = <down-dip fault width>
DWID = <DY, along width>
DEPTH_TO_TOP = <depth of fault below surface>
STRIKE = <strike>
RAKE = <rake>
DIP = <dip>
LAT_TOP_CENTER = <latitude of top center point in fault plane>
LON_TOP_CENTER = <longitude of top center point in fault plane>
HYPO_ALONG_STK = <along strike location of hypocenter (0.0 = middle)>
HYPO_DOWN_DIP = <down dip location of hypocenter (0.0 = top)>
DT = <dt>
SEED = <random seed used in calculations>
CORNER_FREQ = <corner frequency to use>
SRF rupture description
Details of the Standard Rupture Format (SRF) are given in more detail in the accompanying document. The general fault surface is represented by a distribution of point sources, and it can support one or more planes. The platform produces SRFs as output from rupture generators, but a user can also supply an SRF file as input for user-defined simulations. SRF filenames must end with the suffix .srf for the platform to correctly identify them.
Station File List
The user may specify a list of stations, matching the following format:
#optional
%comment
# lines
<lon> <lat> <stat name> <distance to fault trace> <Vs30> <LF corner> <HF corner> <stat info>
…
The station list filename needs to end in .stl for the platform to recognize it as a station list.
BBP seismograms
All intermediate and output seismograms are produced in a 4-column text format, whether velocity or acceleration.
# optional
% comment
# lines
<timestamp> <North/South> <East/West> <Up/Down>
…
Time is in seconds and motion is in cm/s (velocity) or cm/s/s (acceleration) unless otherwise specified in the header. Velocity filenames end in .vel.bbp; accelerations in .acc.bbp.
Response spectra
The response spectra file is in 4-column text format.
# optional
% comment
# lines
<period (sec)> <North/South> <East/West> <Up/Down>
…
The platform samples response spectra at 112 periods, 0.01-20 sec and outputs pseudo spectral acceleration in units of g.
Option File
Option files contain responses to the prompts in the platform. You can use them with the -o option to run_bbp_2G.py. The responses have to match the prompts exactly. For example, if you craft an option file assuming there is only one station list in the start directory (and therefore the user isn't prompted to select one) but then it is run with multiple station lists in the start directory, this will cause the run to abort. Option files are recommended to perform a series of runs with different inputs or different modules. If you have a run you perform regularly, it's better practice to run the platform with the -g option and the option file to produce an XML description, which are more complete descriptions of the workflow.
#optional comments
%using either symbol
n #comments
y % can go
1 # here
…
Use with:
$> ./run_bbp_2G.py -o <option file>
XML workflow description schema
Each time the platform is invoked, an XML file is produced describing the workflow, obeying the following schema:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name= “BBP_Run_Specification” minOccurs= “1” maxOccurs= “1”>
<xs:complexType>
<xs:sequence>
<xs:element name= “Validation_Run” minOccurs= “0” maxOccurs = “1”>
<xs:attribute name= “event” type= “xs:string” use= “required” />
<xs:attribute name= “input_station_file” type = “xs:string” />
<xs:attribute name= “subset” type = “xs:boolean” use = “required” />
</xs:element>
<xs:element name= “BBP_Modules”>
<xs:complexType>
<xs:sequence>
<xs:element name = “BBP_Module” maxOccurs = “unbounded” >
<xs:complexType>
<xs:sequence>
<xs:element name= “name” type=”xs:string” />
<xs:element name= “staged_files” >
<xs:complexType>
<xs:sequence>
<xs:element name=“file” type=“xs:string” maxOccurs= “unbounded”/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name= “arguments” >
<xs:complexType>
<xs:sequence>
<xs:element name=“argument” type=“xs:string” maxOccurs=“unbounded”>
<xs:attribute name= “type” type= “xs:string” user= “required” />
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
These files are difficult to construct by hand, but can be generated using the -g flag when running run_bbp_2G.py.
User Support
If you run into bugs with the platform, you can open a trouble ticket at the Broadband Trac site,
http://northridge.usc.edu/trac/broadband
Check to see if there has already been a ticket opened for the bug. If you are unable to get the platform to run, you can get direct user support by emailing scottcal@usc.edu.
Appendix A: Possible Module Permutations
Validation Events
User-Defined Events