User Tools

Site Tools


postproc:ampexc

Amplitude Exchange within NCSS

Amplitude exchange refers to packets of data containing the peak amplitudes of several types of ground motion. Typically these include acceleration, velocity, displacement, and spectral response. This latter is the response of a simple one-degree-of-freedom oscillator of specified resonant period and damping to ground motion; for now 0.3, 1.0 and 3.0 second periods and 0.8 damping factor. These values are computed from waveforms produced at each station.

The main user of the ground motion amplitudes is ShakeMap; they are also of great importance to engineers and strong-motion seismologist.

Within the NCSS are several components that are involved in amplitude exchange. For this discussion we are concerned with waveforms or amplitudes from broadband and strong motion accelerometer sensors.

RT System Waveform Processing

On the Network Services systems, raw waveforms are processed by rad2 to estimate acceleration, velocity, displacement, and spectral response. The output of rad2 is a time series with one sample every 5 seconds for each SNCL being processed. Each sample includes each of the amplitude values, the time of the start of the sample, the time offset of each of the peaks, and some quality measures. Rad2 writes these time series to the ADA on the network service systems. They get forwarded to the RT systems using adadup_master and adadup_slave.

The amp time series are read from the ADA on the RT systems by ampgen. Ampgen listens for a CMS signal containing an event ID. It queries the local database for the event time, location and magnitude. If the magnitude is 3.0 or larger, ampgen prepares to collect amp values from the ADA. For each configured station, ampgen computes a time window in which it expects the peak amplitudes to be found.

The NCSS RT systems run two instances of ampgen. The first, ag_early, is configured to handle stations within 310 km of the hypocenter. It waits 130 seconds after origin time to allow the waveforms (including the peak values) to propagate out to stations at the maximum allowed distance. The second instance is ag_late; it works on stations between 310 and 800 km distance, and waits 280 seconds after origin time. These two instances allow the relatively rapid collection of amps from close-in stations, while collecting amps from the remain stations likely to be of interest when they become available.

Ampgen collects and examines all the amp samples available in the ADA for the time window it chose for each station. Out of these time series, it searches for the peak amplitude of each type for each channel. In cases where there are data from both broadband and accelerometer channels of the same station, ampgen selects which ever of these is “on scale”. For strong shaking, the broadband sensors could be clipped or distorted; for weak shaking, the accelerometer sensors may not detect the signal above background noise. See the CISN ampgen page for details about this algorithm. Ampgen writes these amplitude values to the local database, including information to associate them with the event ID. Finally, ampgen publishes a CMS signal to indicate it has completed work on the event, regardless of whether amps were collected or not.

Because ampgen's decisions about amplitude collection (station selection and time windows) are based on the RT system's information about the earthquake, they should provide a good view of ground motion values for earthquakes in Northern California for the waveforms being processed by the RT system. The earthquake parameters for a Northern California earthquake are likely to be less accurate in the (for example) Southern California AQMS system at Caltech because they have fewer stations near the earthquake providing waveforms to that system. That means that if the NC AQMS system is interested in ground motion amplitudes for a Northern California earthquake from Caltech stations, it would be best to import those waveforms (either raw or as processed amplitude time series) into the NC ADA where it can select amps based on its own time windows.

As soon as ampgen has written amps to the database, they are immediately available for use by NCSS ShakeMap.

RT System Export of Amps in NSMP XML Format

The NCSS RT systems run db2nsmp_xml to produce amplitude files in NSMP XML format (no known documentation for this). Db2nsmp_xml is run for each earthquake upon the receipt of the CMS signal from ag_late. It queries the database for any amps associated with the event. All amps that are found are written into XML files, one per station. This collection of files is sent into PDL as an unassociated-amplitude product. The known user of these PDL products is the Global ShakeMap system, operated by USGS EHP in Colorado.

The db2nsmp_xml command doesn't listen to CMS itself. Instead eqrun configured as eqrun_db2nsmp.cfg runs all the time, listening to CMS for the configured subject. When it gets a CMS message containing an event ID, eqrun queries the database to see if its system is in the active or standby role. If it is the active system, it runs the script /home/ncss/run/bin/run_db2nsmp which calls db2nsmp_xml with the event ID. On the standby system eqrun takes no action other than logging the receipt of the CMS signal.

Post-Processing Export of Amps from RT System

On the post-processing systems, the postproc:pcs]] client exportamps is responsible for reading the amps stored in the database by the RT system and writing them into CISN Ground Motion Packets (GMP). The work for this is performed by java program Db2Gmp, which is distributed as part of the jiggle.jar file. Db2Gmp writes GMP files into two directories. These two directories are the input directories for two instances of Earthworm sendfileII. These send the amps to instances of getfileII at Caltech and CGS, where the GMP packets are imported into their systems.

Post-Processing Import of Amps from Other Sources

Analogous to the case above where NCSS exports amps as GMPs to other CISN agencies, NCSS also imports GMP amps from Caltech, CGS, and Menlo Park. The GMP packets from Caltech are produced using amps from their RT AQMS system. The GMPs from CGS and Menlo Park are produced from waveforms from various types of triggered stations, most of which are strong-motion accelerometers. The GMPs are carried from the various Centers using Earthworm sendfileII/getfileII pairs to the NCSS post-processing systems. The files are placed in /home/ncss/run/get_amps/new/ for access by the import program.

The GMP amps are fed to Gmp2Db. This program parses the amps, checks that it is configured to handle their network code, and then looks up the SNLC on the CISN adhoc list /home/ncss/ncpp/ampexc/import/conf/adhoc.lis. This list provides both the location (latitude and longitude) and the COSMOS Table 6 Site Code. This code is used to determine the suitability of amps from each SNCL in ShakeMap. However, Gmp2Db does not consider the Site code when checking amps for import.

Gmp2Db writes acceptable amp values into the UnassocAmp Database table. A second thread in Gmp2Db tries to associate these amps with known events. If they amps can be associated, they are moved to the Amp table and association records are added to the database. At this point, these amps are now available to NCSS ShakeMap systems.

The GMP packet files from Gmp2Db are placed in /home/ncss/run/get_amps/2xml/ to make them ready for conversion to XML, described next.

Conversion of GMP Amps to NSMP XML Format

After GMP amp packets have been processed by Gmp2Db, they are available for conversion into the NSMP XML format and export into PDL. This is done in two steps on the post-processing systems. gmp2xml does the conversion, as specified in its configuration file /home/ncss/ncpp/ampexc/exportXML/conf/gmp2xml.conf. Currently GMP packets from NC and CE networks are processed here. Caltech processes their own GMP packets, and NSMP does NP packets. gmp2xml uses the adhoc.lis file to obtain the latitude and longitude, and to select SNCLs with COSMOS Table 6 Site code values 1, 2, 3, or 4. This is based on the requirements of Global ShakeMap, the primary consumer of these NSMP XML files. The XML output files are placed in /home/ncss/run/send_amps/neic/ to make them available for export.

The XML files are managed by xmlsend, configured with /home/ncss/ncpp/ampexc/exportXML/conf/xmlsend.conf. Every 60 seconds. xmlsend looks for new XML files from gmp2xml. If there are any, they are moved to a work directory. Then that batch of files are packaged up into an unassociated-amplitude product and submitted into the PDL system. All GMP files, processed or skipped over, and the XML files are moved to /home/ncss/run/get_amps/done/. A small program /home/ncss/run/bin/harvest.pl moves all these files into /home/ncss/run/get_amps/done/OLD/ into directories by year and month. If you are interested in GMP files that may have been handled improperly during import, this is where to find them.

postproc/ampexc.txt · Last modified: 2020/08/05 10:51 by millpaul