MLOC MNF Utility Codes

MNF Utility Codes

Several types of utility programs are essential to the efficient use of mloc. These include programs for converting arrival time datasets to mloc’s native data format (MNF) and a program for extracting event files from MNF-formatted bulletins (concatenations of event files). The source codes for these utilities are contained in the mloc distribution in the directory /mloc_distribution/mnf_utilities/. See MLOC Utility Codes for some other important utility programs.

Data Format Conversion Codes

These programs convert files written in two of the most commonly encountered data formats for arrival times. In most cases the input files are bulletins, containing data for multiple events, and the conversion process will include a choice of having the output be a converted bulletin or a set of individual event files. Contact me if you need help with conversion from other formats.

isc_ims2mnf

isc_ims2mnf handles conversion to MNF format from the version of the IMS format returned by the bulletin search function of the ISC website. The process for acquiring data from the ISC Bulletin is described here. This will usually be a bulletin, i.e., many events in a single file. To convert the bulletin to MNF, copy the executable of isc_ims2mnf into the same directory and run it. The only input is the name of the IMS-formatted file. The output will have the same name with “.mnf” appended.

The source code for isc_ims2mnf and an executable for macOS will be found in /mloc_distribution/mnf_utilities/mnf_search/.

Warning! If the search of the ISC Bulletin has used a condition on magnitude there will be a line near the top of the file listing that condition. The conversion program will try to process that line as being part of an event and crash. The solution is simple: add an “#” to the beginning of that magnitude condition line.

Once the bulletin is converted to MNF format, use the program mnf_search to extract individual events for relocation in mloc.

seisan2mnf

This program handles conversion to MNF from the “nordic” format produced by SEISAN. SEISAN is widely used by local and regional seismograph networks around the world. Unfortunately, the formats of event data files produced by these many installations do not always agree in detail, causing errors in conversion or outright crashes. In such cases it is necessary to edit the code of seisan2mnf (and rename it appropriately) for use with data files from specific networks. In any case it is always advisable to do a careful examination of the converted data files afterward.

The source code for seisan2mnf and an executable for macOS will be found in /mloc_distribution/mnf_utilities/mnf_search/.

Once the bulletin is converted to MNF format, use the program mnf_search to extract individual events for relocation in mloc.

Codes to Manipulate Event and Bulletin Files

mnf_search is a program for searching an MNF-formatted bulletin and extracting individual event files for input (using the inpu command, usually in a command file) to mloc. It can also create the event definition section of a command file for the selected events. The source code and an executable for macOS will be found in /mloc_distribution/mnf_utilities/mnf_search/.

To use mnf_search, copy the executable into the directory containing the MNF-formatted bulletin. The user is first asked for the file name of the bulletin, followed by the choice:

Create a new bulletin (1) or individual event files (2)?

Response is “1” or “2”. Input to mloc requires individual event files, but in some cases, such as dealing with a bulletin covering a very large area, it may be desirable to first create a new, smaller bulletin with events that are most suitable for the relocation analysis and then select individual events for mloc in a second run. If individual events (2) is chosen, the next question will be:

Create mloc command file?

The response can be “y” or “n”. If “y”, only the event definition section (commands memb, even and inpu) will be created, with the basename specified in the answer to the next question:

Enter command file basename:
salmas1.0

Next comes a set of “filter” questions that help narrow the selection process in useful ways:

Use lat-lon limits?
n
Use focal depth limit?
n
Use nearest station distance?
n
Use magnitude?
n

The “nearest station distance” criterion is useful in assembling a dataset that is likely to be suitable for direct calibration. The user specifies an epicentral distance and the number of readings an event must have within that distance in order to be selected. After these choices, a list is displayed that is ordered according to the number of readings for each event that passes the search criteria:

   110 events read
   110 events pass the search criteria
 110 events  that pass the search criteria and have  10 or more phase readings
 110 events  that pass the search criteria and have  20 or more phase readings
 109 events  that pass the search criteria and have  30 or more phase readings
 106 events  that pass the search criteria and have  40 or more phase readings
 103 events  that pass the search criteria and have  50 or more phase readings
 103 events  that pass the search criteria and have  60 or more phase readings
 102 events  that pass the search criteria and have  70 or more phase readings
 101 events  that pass the search criteria and have  80 or more phase readings
  94 events  that pass the search criteria and have  90 or more phase readings
  93 events  that pass the search criteria and have 100 or more phase readings
  91 events  that pass the search criteria and have 110 or more phase readings
  84 events  that pass the search criteria and have 120 or more phase readings
  78 events  that pass the search criteria and have 130 or more phase readings
  74 events  that pass the search criteria and have 140 or more phase readings
  73 events  that pass the search criteria and have 150 or more phase readings
  68 events  that pass the search criteria and have 160 or more phase readings
  64 events  that pass the search criteria and have 170 or more phase readings
  63 events  that pass the search criteria and have 180 or more phase readings
  61 events  that pass the search criteria and have 190 or more phase readings
  61 events  that pass the search criteria and have 200 or more phase readings
Minimum number of phase arrivals: 

In general, events with more readings will perform better in an mloc analysis because there are more station-phase instances in common with other events in the cluster. Given that mloc is limited to 200 events in a cluster it makes sense to prefer events with more readings. In fact a number of events around 50-75 is a comfortable compromise between having enough data for a robust inversion but not so much that all aspects of the processing (and runtime) are burdensome. So in many cases the user might decide how many events she wants to work with, find the corresponding number of readings and enter that number in answer to the question.

If a source region has a dense local network one might find that even a request for events with, say, 100 or more readings returns too many events (the example above is borderline in that regard). In that case an easy way to further filter the selection is with the magnitude criterion, asking for events with magnitude greater than 4, for example (same bulletin as above):

Use magnitude?
y
Enter minimum magnitude: 
4.0
   110 events read
    70 events pass the search criteria
  70 events  that pass the search criteria and have  10 or more phase readings
  70 events  that pass the search criteria and have  20 or more phase readings
  69 events  that pass the search criteria and have  30 or more phase readings
  68 events  that pass the search criteria and have  40 or more phase readings
  68 events  that pass the search criteria and have  50 or more phase readings
  68 events  that pass the search criteria and have  60 or more phase readings
  68 events  that pass the search criteria and have  70 or more phase readings
  68 events  that pass the search criteria and have  80 or more phase readings
  65 events  that pass the search criteria and have  90 or more phase readings
  64 events  that pass the search criteria and have 100 or more phase readings
  64 events  that pass the search criteria and have 110 or more phase readings
  62 events  that pass the search criteria and have 120 or more phase readings
  59 events  that pass the search criteria and have 130 or more phase readings
  57 events  that pass the search criteria and have 140 or more phase readings
  56 events  that pass the search criteria and have 150 or more phase readings
  53 events  that pass the search criteria and have 160 or more phase readings
  53 events  that pass the search criteria and have 170 or more phase readings
  53 events  that pass the search criteria and have 180 or more phase readings
  52 events  that pass the search criteria and have 190 or more phase readings
  52 events  that pass the search criteria and have 200 or more phase readings
Minimum number of phase arrivals: 

A good rule of thumb is that events with 30 or more readings usually behave well in a cluster. Events with fewer readings can work, in the sense of being stable, but events with fewer than 10 readings are often unstable and they almost never have acceptable levels of location accuracy. When the user provides the minimum number of readings, mnf_search completes the extraction process:

Minimum number of phase arrivals: 
30
Event number selection: beginning and end numbers: 
1 110
EOF reached after    110 events
  70 events selected

The selection of beginning and end numbers is only relevant if dealing with a very large bulletin that you want to process piece-wise. Otherwise, as in this case, the user just enters “1” and the number of events in the bulletin in order to search the entire bulletin. The event files (and command file, if requested) are written into the same directory as the bulletin. From there they should be copied into a directory (“cluster working directory” or “cluster series directory”, e.g. “salmas1”) under the mloc_working directory for relocation.

The sharp-eyed will notice that 70 events were selected when the listed said 69 would meet the search criteria. Minor discrepancies like this are common with mnf_search and simply reflect weaknesses in the coding. Perhaps the next editing session will correct it, but it has a fairly low priority.