The first steps of an installation of mloc are the creation of the directory structure and the compilation of the source code. Before mloc can be used, however, some critical environmental variables need to be set. This is done with a configuration file, a short text file named mloc.conf, that is read by mloc when it is launched. The configuration is generally installation-specific, so a configuration file copied from another installation would usually need to be edited.
The configuration file uses keywords to define the nature of each line, rather than requiring a specific number and order of lines. All elements have default values defined in the code itself, so it is not necessary to set all possible keywords if the default values are correct for your installation of mloc.
Filename and Path of the Configuration File
The name of the configuration file is mloc.conf and it must be found in the same directory as the executable mloc.
The currently-defined keywords are listed here. The keyword starts in column 1 of the configuration file and is always followed by a colon and a blank, before the argument.
Defines mloc_path: The full pathname of the directory in which the mloc executable and the configuration file reside. I refer to this directory as the working directory. Maximum 100 characters. The default value is ‘ ’, which will almost never be correct, so all configuration files should carry a line with the WORKING_DIR keyword.
Defines mloc_author: a code for the person running mloc. This code will be written into the .datf file as the author of the location (“origin”) in the hypocenter record (MNF v1.3 format), and it will show up in the .summary file and perhaps some other output files. Maximum 8 characters, case-insensitive. The default value is ‘default’; it is highly recommended that all users of mloc set an author code for themselves.
Defines the name of the file that is to be used as the master station file. This is only the name of the file, not the path. The master station file is expected to be found in the tables/stn subdirectory under the mloc working directory (see keyword WORKING_DIR). If necessary, the path can be changed in mloc.f90 and the program will need to be re-compiled. The default name of the master station file is master_stn.dat. The master station file is normally distributed with mloc. Therefore, in a standard installation there is no need to use this keyword.
Station information (i.e., stations codes, coordinates, etc) can be read in several formats that are distinguished by an integer value in the first column of the first line of the file. The integer 0 defines the format used for the master station file so even if the STATION_MASTER keyword is used to select a file other than the standard distribution, it must use the same format. Supplemental station files can use the master station file format.
Defines the version of the Generic Mapping Tools (GMT) that will be used for plots. This keyword is needed during times of transition between major releases of GMT that effect plotting functions used by mloc. At this time the only acceptable argument (and the default) is ‘5’, i.e., GMT v5 is required. When mloc is updated to work with GMT v6 there will probably be a period of time when this keyword becomes relevant again.
Defines the operating system shell to be used in formulating GMT scripts. Supported arguments are csh and bash (default)’.
A Sample Configuration File
The mloc.conf file that I use is distributed with mloc but it must be customized for each new installation. My configuration file consists of only two lines:
WORKING_DIR: /Users/eab/Documents/Seismology/Projects/Software/mloc/mloc_working AUTHOR: EBergman
All other values (master station file, GMT version and shell) that could be set in the configuration file are satisfied by the defaults for my installation.
Last Updated on