User Tools

Site Tools


postproc:tmts

TMTS Moment Tensors Review Tool

The NCSS has two systems for human review of moment tensors. These are web-based systems running under tomcat. These systems share a lot of code, configuration files and underlying utilities with the tmts used on the real-time systems, but there are many differences too.

The two systems running the TMTS web system are rodgers.geo.berkeley.edu and ucbpp.geo.berkeley.edu. The URLs of their TMTS systems are:

Each of these URLs allow one user at a time to be connected. That's why there are multiple URLs on each system. Currently the systems on rodgers are configured to interact with the database on mnlodb1.wr.usgs.gov, while the systems on ucbpp interact with the dcucb database. This allows one of the two TMTS systems to be used when the corresponding real-time and post-processing systems are in active configuration.

The mtview URLs are tmts configured in a read-only mode. They can compute moment tensors but the results cannot be saved or published. This makes them useful for testing.

After authentication, the web systems presents the user a list of recent earthquakes of magnitude 3.3 and larger for the last 7 days. On the More_Options page, the user can adjust these limits if necessary.

After the user selects an event, the basic operations that the TMTS web interface provides are:

  • Load event: This retrieves basic event information from the database and then tries to compute a moment tensor in a manner similar to that used by the real-time tmts. The main differences are that the StationFilter file is empty, and no SNR test is applied to the waveforms. Whatever solution that is obtained will be displayed to the user, but nothing is automatically written to the database or published.
  • Retrieve event: The retrieves the basic event information from the database as well as the preferred mechanism if any was previously saved and set to be preferred. Waveforms are retrieved from the configured wave servers and processed to make them ready for the moment tensor inversion.
  • Select stations: The web pages provide several ways for the user to add or remove stations from the list of those to be used for inversion. The user is in control of station selection on this system, so there are few limits on what stations can be used, provided waveforms can be obtained for the configured time period.
  • Recalculate the moment tensor: After stations have been added or remove from the selected list, the user can direct tmts to run the inversion again. Unless otherwise constrained this will be done for each of the depths for which Green's Function files are available. The results will be plotted and displayed to the user.
  • If desired, the user can adjust several of the Green's Function parameters for one or all stations: the velocity model, the filter band, the correlation length, etc. The user can also specify a single fixed depth if needed.
  • When the user has achieved a solution to her liking, she can save the results to the database. Then the user can also direct tmts to publish the results. This causes CMS messages to be sent about the new moment magnitude and moment tensor.
TMTS Under Tomcat

Having TMTS run under tomcat has a few advantages for the the developer, but has a lot of disadvantages for the maintainer. Tomcat is a java program, which allows the main web pages to be written as JSP code that call other java code. Since most of TMTS is written in C++, the java code calls C++ code (in shared libraries), through JNI (Java Native Interface). Then there's CSS to make things look pretty, some supporting programs written in Fortran, and so forth.

As mentioned in other places on this wiki, a lot of AMQS C++ code does some of its logging to log files named in the configuration files while the rest goes to stdout and stderr. Under Tomcat, the stdout and stderr get captured by Tomcat's log file named catalina.out. Often the log directory used by Tomcat can read only by root. And of course Tomcat needs to be stopped and started by root.

To make matters even worse, the two systems on which TMTS web pages are running are different versions of Linux, resulting in different directory locations, different start systems, etc.

ucbpp is running Red Hat 6, although eventually it should be upgraded to Red Hat 7. The tomcat home directory is /usr/local/apache-tomcat. Tomcat is started with the script /etc/init.d/tomcat, through the usual symbolic links in /etc/rc?.d/. The TMTS stared libraries are in /home/ncss/run/lib.

rodgers is running Red hat 7, which means that processes like tomcat are controlled with systemd. The tomcat home directory is /home/tomcat, with symbolic links to the standard Red Hat tomcat directories. Tomcat is started with the systemd unit file /etc/systemd/system/tomcat.service. The TMTS shared libraries are in /home/tomcat/shared/lib/.

The source code, and location for building tomcat “war” (web archive) files on both systems is /home/ncss/software/CISN_SOFTWARE/RT/branches/linux-dev-branch/TMTS2/.

postproc/tmts.txt · Last modified: 2020/08/05 11:07 by millpaul