wiki:hyp2000_mgr

Version 4 (modified by branden, 8 years ago) (diff)

--

Earthworm Module: hyp2000_mgr

Contributed by:

Function

Relocates earthquakes using Hypoinverse (tail of mega-module)

Details

Hyp2000_mgr is an Earthworm program which calls an encapsulated version of hypoinverse (hyp2000), written by Fred Klein, at USGS Menlo Park. Hyp2000_mgr gets "arc messages", containing associated picks, via a pipe from another program. Hyp2000_mgr call hyp2000 with the contents of the "arc message". Hyp2000 locates the event. Hyp2000_mgr then creates a new "arc message" with the location results from hyp2000 and sends that arc message to an Earthworm transport ring.

Hyp2000_mgr is written in C, but most calculations are performed in FORTRAN subroutines, taken from the standard release of hypoinverse. Minor changes to the source code are required for the program to run on different operating systems.

Be sure and look at the command web page for details about how Location codes are now used.

Hypoinverse Documentation is available in draft form at the ftp site: swave.wr.usgs.gov in /ftp/pub/outgoing/klein/hyp2000/docs as a WORD document and a postscript file.

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

Configuration File Commands

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

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.

Helpful Hints