MLOC Configuration

MLOC Configuration

The distribution package of mloc contains the necessary directory structure and supporting files, as well as an executable for mloc (compiled under macOS v10.15 Catalina). Source codes and a makefile are included if the user needs to recompile for a different architecture. However, even if the executable in the distribution is functional, some critical environmental variables need to be set before mloc can be run. 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.

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 /mloc_working/tables/stn subdirectory. 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 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 allowable values are “5” and “6”. The default is ‘6’, i.e., GMT v6 is the expected GMT environment; GMT5 is deprecated. For now, a standard installation of mloc will still work with GMT5 for all plotting except topography in base maps, and there is a work-around by which that can still be made to work.


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.