# NLL_mgr Configuration File Commands

(last revised 25 November 2010)
Page Index:
1. Example configuration file
2. NLL_mgr command line arguments
3. Functional command listing
4. Alphabetic command listing & description

## 1. EXAMPLE CONFIGURATION FILE

    #
    #               nll_mgr's Configuration File
    #
    MyModuleId MOD_EQPRELIM_NLL   # module id to label outgoing messages with.
                                  # Note: nll_mgr is part of a mega-module which is
                                  # ultimately started by the program eqproc.  All
                                  # child processes of this mega-module need to use the
                                  # same module id (thus use eqproc's module id).
    RingName   HYPO_RING          # The transport ring to write output to,
    LogFile    2                  # 0=no log; 1=errors; 2=errors and hypocenters
    SourceCode W                  # character to label summary cards with to
                                  # identify them as coming from Earthworm
    NllCtrlFile /ew/nll/earthworm.in
                                  # NLL control file name with full path (see www.alomax.net/nlloc -> Control File)
                                  # This files must exist.
                                  # (The NLL LOCFILES statement will be overwritten by nll_mgr)
    NllStaFile  /ew/nll/sta_list.in
                                  # NLL file containing station coordinates in NLL GTSRCE format
                                  # This file must exist.
                                  # Use an existing, empty file if station GTSRCE statements
                                  # are inside NllCtrlFile
    NllTimePath /ew/nll/taup/ak135/ak135
                                  # NLL travel-time grid files path/root (see NLL LOCFILES statement)
                                  # These files must exist.
    NllTimeSwap 1                 # iSwapBytesOnInput value from NLL LOCFILES statement
                                  # (0 = NO, 1 = YES) flag to indicate if hi and low
                                  # bytes of input time grid files should be swapped. Allows reading of travel time
                                  # grids generated with a different binary, floating point byte order than on the
                                  # computer running EW.
    NllOutPath  /ew/nll/out/nll_mgr0
                                  # NLL output file path without NLL "root name"
                                  # This directory must exist.
                                  # IMPORTANT! - this path should be different from
                                  # the path used by any other
                                  # instances of modules containing nll_mgr.
                                  # NLL output to this path will only be overwritten
                                  # by output from subsequent events with same output name
                                  # (i.e. same first phase time).

## 2. NLL_MGR COMMAND LINE ARGUMENTS

An example command line to start nll_mgr may look like this:

    	nll_mgr nll_mgr.d
    	argv[0]  argv[1]

- argv[0] is the name of the executable.

- argv[1] is the name of nll_mgr's own configuration file which it reads on startup. In this file, lines may begin with a valid nll_mgr command, described later in this document, or with one of 2 special characters:

  >     #  marks the line as a comment (example: # This is a comment).

  >     @  allows control files to be nested; one control file can be
  >        accessed from another with the command "@" followed by
  >        a string representing the path name of the next control file
  >        (example: @model.d).

  Command names must be typed in the control file exactly as shown in this document (upper/lower case matters!).

## 3. FUNCTIONAL COMMAND LISTING

Below are the commands recognized by nll_mgr, grouped by the function they influence. All of the commands are required; they must be specified in the configuration file in order for nll_mgr to operate.

    	Earthworm system setup:
     		MyModuleId	required
    		RingName	required

    	Output Control:
    		LogFile		required

    	Miscellaneous:
    		SourceCode	required

    	NonLinLoc specific:
    		NllCtrlFile	required
    		NllStaFile	required
    		NllTimePath	required
    		NllTimeSwap	required
    		NllOutPath	required

## 4. ALPHABETIC COMMAND LISTING & DESCRIPTION

In the following section, all configuration file commands are listed in alphabetical order. Listed along with the command (bold-type) are its arguments (in red), the name of the subroutine that processes the command, and the function within the module that the command influences. A detailed description of the command and is also given. Default values and the values used by Calnet are listed after each command description.

    command arg1				processed by		function

    LogFile switch				nll_mgr_config		output

> Sets the on-off switch for writing a log file to disk. If switch is 0, no log file will be written. If switch is non-zero, nll_mgr will write daily log file(s) called nll_mgrxx.log_yymmdd where xx is nll_mgr's module id (set with "MyModuleId" command) and yymmdd is the current UTC date (ex: 960123) on the system clock. The file(s) will be written in the EW_LOG directory (environment variable). The level of output written to the file is controlled by the value of switch:

>         switch = 0  no log file is written
>                  1  write errors to log file
>                  2  write errors and hypocenters to log file

>     Default:  none

    MyModuleId mod_id			nll_mgr_config		Earthworm setup

> Sets the module id for labeling all outgoing messages. mod_id is a character string (valid strings are listed in earthworm.d) that relates (in earthworm.d) to a unique single-byte number.
> NOTE: nll_mgr is part of a mega-module which is ultimately started by the program eqproc. All sub-modules of this megamodule should be given the same module id.

>     Default:  none				Calnet:  MyModuleId MOD_EQPROC

    NllCtrlFile filename			nll_mgr_config		NonLinLoc

> NLL control file name with full path. The specified file must exist. This control statements in this file will be used by NLL when called from EW, except for certain control statements (including LOCFILES) which are automatically set or use parameters from the other nll_mgr configuration file NonLinLoc commands. See www.alomax.net/nlloc -> Control File for a complete description of NLL control file format and statements.

>     Default:  none				Example:  NllCtrlFile /ew/nll/earthworm.in

    NllOutPath label			nll_mgr_config		NonLinLoc

> NLL output file path without NLL "root name" (see NLL LOCFILES statement). This directory must exist. IMPORTANT! - this path should be different from the path used by any other instances of modules containing nll_mgr. NLL output to this path will only be overwritten by output from subsequent events with same output name (i.e. same first phase time).

>     Default:  none				Example:  NllOutPath /ew/nll/out/nll_mgr0

    NllStaFile filename			nll_mgr_config		NonLinLoc

> NLL file containing station coordinates in NLL GTSRCE format. This file must exist. Use an existing, empty file if all station GTSRCE statements are in the file specified by NllCtrlFile. NLL will only use stations whose coordinates are specified by a GRSRCE statement (usually NLL GLOBAL mode location) or for which individaul station travel-time grid files exist on the NllTimePath (usually NLL non-GLOBAL mode location).

>     Default:  none				Example:  NllStaFile /ew/nll/sta_list.in

    NllTimePath label			nll_mgr_config		NonLinLoc

> NLL travel-time grid files path/root (see NLL LOCFILES statement). These files must exist. For NLL GLOBAL mode location there will normally be travel-time grid files for each phase type, for NLL non-GLOBAL mode location, there will normally be a travel-time grid file for each station, either P phase only or P and S phase.

>     Default:  none				Example:  NllTimePath /ew/nll/taup/ak135/ak135

    NllTimeSwap label			nll_mgr_config		NonLinLoc

> iSwapBytesOnInput value from NLL LOCFILES statement. (0 = NO, 1 = YES) flag to indicate if hi and low bytes of input time grid files should be swapped. Allows reading of travel time grids generated with a different binary, floating point byte order than on the computer running EW.

>     Default:  none				Example:  NllTimeSwap 0

    RingName ring				nll_mgr_config		Earthworm setup

> Tells nll_mgr which shared memory region to use for output. ring is a character string (valid strings are listed in earthworm.d) that relates (in earthworm.d) to a unique number for the key to the shared memory region.

>     Default:  none				Calnet:  RingName HYPO_RING

    SourceCode label			nll_mgr_config		miscellaneous

> Reads in a single character label to write in column 80 of the hypo71-format summary messages output by nll_mgr. This label identifies the source of the hypocenter as the Earthworm system. These summary messages are placed on the output shared memory region.

>     Default:  none				Calnet:  SourceCode W

Module Index | NLL_mgr Overview