# Hyp2000_mgr Configuration File Commands

(last revised 13 June 2013)
Page Index:
1. Example configuration file
2. Hypo_mgr command line arguments
3. Functional command listing
4. Alphabetic command listing & description

IMPORTANT NOTE ON LOCATION CODES (EW v7.0 or greater):

Here is a very important change for hyp2000 for Earthworm v7.0 and greater. With Location codes, you need to provide 5 values for the LET command!. If you only provide 3 in windows, the program will crash:

    Here's what hyp2000 does now with LET:

    ncss3> hyp2000
     HYPOINVERSE 2000 STARTING
     9/2005 VERSION (DUAL LOCATION CODES)
     COMMAND? let
     NUMBER OF LETTERS TO CHECK IN STATION SITE CODE (2-5) [cr = 4]?
     NUMBER OF LETTERS TO CHECK IN STATION NET CODE (0-2) [cr = 0]?
     NO. OF LETTERS TO CHECK IN STATION COMPONENT CODE (0-3) [cr = 0]?
     NO. OF LETS TO CHECK IN LOCATION CODE IN PHASE FILES (0-2) [cr = 0]?
     NO. OF LETS TO CHECK IN LOCATION CODE IN OTHER FILES (0-2) [cr = 0]?

    So some good LET commands would be:
    LET 5 2 3 2 2    # if you're using location codes
    LET 5 2 3 0 0    # if you're NOT using location codes

## 1. EXAMPLE CONFIGURATION FILE

    #
    #               hypo_mgr's Configuration File
    #
    MyModuleId MOD_EQPROC   # module id to label outgoing messages with.
                            # Note: hypo_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 & hypocenters
    SourceCode W            # character to label summary cards with to
                            # identify them as coming from Earthworm

## 2. HYPO_MGR COMMAND LINE ARGUMENTS

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

    	hypo_mgr hypo_mgr.d ncal.hyp
    	argv[0]  argv[1]    argv[2]

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

- argv[1] is the name of hypo_mgr's own configuration file which it reads on startup. In this file, lines may begin with a valid hypo_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!).

- argv[2] is the name of Hypoinverse's startup command file. hyp2000_mgr passes this file name to hyp2000, the fortran program which encapsulates the subroutine version of Hypoinverse. For a description of valid commands for this file, please see the following Hypoinverse documentation:

       Klein, F.W., 1989, User's guide to HYPOINVERSE, a program for VAX
      	computers to solve for earthquake locations and magnitudes,
      	U.S. Geological Survey Open-File Report 89-314, 58 pp.

## 3. FUNCTIONAL COMMAND LISTING

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

    	Earthworm system setup:
     		MyModuleId	required
    		RingName	required

    	Output Control:
    		LogFile		required
    		SeparatePRTdir		optional

    	Miscellaneous:
    		SourceCode	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				hypo_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, hypo_mgr will write daily log file(s) called hypo_mgrxx.log_yymmdd where xx is hypo_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			hypo_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: hypo_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

    RingName ring				hypo_mgr_config		Earthworm setup

> Tells hypo_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

    Directory ring				hypo_mgr_config		output control

> Tells hypo_mgr where to write individual PRT files per event. The Directory specified must be created in advance.

>     Default:  none				optional setting

    SourceCode label			hypo_mgr_config		miscellaneous

> Reads in a single character label to write in column 80 of the hypo71-format summary messages output by hypo_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 | Hypo_mgr Overview