C--COMMON BLOCK INCLUDE FILE FOR HYPOINV

	LOGICAL LSUM,LARC,LPRT,LERR,LEJCT,LREP,DONE
	LOGICAL LTRT,LTRH,LAPP,LH71

C--GENERAL PARAMETERS
	CHARACTER CM*3,INST*80,CTEMP*1,IE*1,IS*1
	COMMON /C/ CM	
C !CURRENT COMMAND NAME
	COMMON /C/ INST	
C !CURRENT COMMAND PARAMETERS OR PHASE CARD
	COMMON /C/ CTEMP	
C !CHARACTER TEMPORARY
	COMMON /C/ IS	
C !CHARACTER TEMPORARY, 'S' FOR SOUTH LAT
	COMMON /C/ IE	
C !CHARACTER TEMPORARY, 'E' FOR EAST LON
	COMMON /D/ PI	
C !PI
	COMMON /D/ RDEG	
C !DEGREES PER RADIAN
	COMMON /D/ LTRT	
C !TRUE IF ANY STATIONS USE TT TABLE & LG MODEL
	COMMON /D/ LTRH	
C !TRUE IF ANY STATIONS USE HOMO LAYER MODEL
	COMMON /D/ MINSTA	
C !MIN NO. OF PHASE CARDS TO ATTEMPT LOC (MIN)
	COMMON /D/ INP		
C !COMMAND INPUT UNIT NUMBER
	COMMON /D/ ISTAT	
C !A STATUS FLAG SET BY HYCMD FOR HYP

C--FILES AND OUTPUT CONTROLS
C--DEFINING COMMAND NAMES ARE IN PARENTHESES
	CHARACTER DEV*20
	CHARACTER*30 CRUFIL,STAFIL,INFILE,PHSFIL,SUMFIL,ARCFIL,PRTFIL
	COMMON /C/ SUMFIL	
C !HYPOINVERSE SUMMARY OUTPUT FILENAME (SUM)
	COMMON /C/ ARCFIL	
C !ARCHIVE OUTPUT FILENAME (ARC)
	COMMON /C/ PRTFIL	
C !PRINT OUTPUT FILENAME (PRT)
	COMMON /D/ LSUM		
C !TRUE TO OUTPUT SUMMARY DATA (SUM)
	COMMON /D/ LH71	
C !TRUE FOR HYPO71 SUMMARY FORMAT, F FOR HYPOINV (H71)
	COMMON /D/ LARC		
C !TRUE TO OUTPUT ARCHIVE DATA (ARC)
	COMMON /D/ LPRT		
C !TRUE TO OUTPUT A PRINTOUT FILE (PRT)
	COMMON /D/ LERR		
C !TRUE TO OUTPUT ERROR MESSAGES TO TERMINAL (ERF)
	COMMON /C/ CRUFIL(3)	
C !CRUST MODEL INPUT FILENAMES (CRT,CRH)
	COMMON /C/ STAFIL	
C !STATION INPUT FILENAME (STA)
	COMMON /C/ PHSFIL	
C !PHASE DATA INPUT FILENAME (PHS)
	COMMON /C/ INFILE	
C !COMMAND INPUT FILENAME (@)
	COMMON /D/ JCP		
C !PHASE DATA FORMAT CODE (COP)
	COMMON /D/ JCA		
C !ARCHIVE DATA FORMAT CODE (CAR)
C		THE CODES ARE: 1=FULL 2=CONDENSED 3=CONDENSED PICKER STYLE
	COMMON /D/ JST	
C !0=PRINT EVENTS ONLY, 1=ADD PARAMS & FILES TO START
C		OF PRINTOUT, 2=ADD STA LIST & CRUST MODELS.
	COMMON /D/ KPRINT	
C !CONTROLS AMOUNT OF PRINTOUT (KPR)
	COMMON /D/ LEJCT    
C !TRUE TO PAGE EJECT PRINTOUT BEFORE EACH EVENT (TOP)
	COMMON /D/ LREP  
C !TRUE TO REPORT EACH EVENT ON TERMINAL AS LOCATED (REP)
	COMMON /D/ LAPP(3) 
C !INDICATES WHETHER OUTPUT FILES ARE APPENDED TO (APP)
C		1=PRINT FILE 2=SUMMARY 3=ARCHIVE
	COMMON /C/ DEV	
C !DEV & DIR SPECIFIER FOR SUM & ARC FILES (DEV)
	COMMON /D/ NDEV	
C !NUMBER OF CHARS IN DEV (DEV)

C--DATA FOR ALL AVAILABLE STATIONS STORED AS LOOKUP TABLE (SUBSCRIPT J)
	PARAMETER (MAXSTA=500)	
C !MAX NO. OF STATIONS STORED IN LOOKUP TABLE
	COMMON /D/ JSTA		
C !NUMBER OF STATIONS ACTUALLY READ INTO TABLE
C				  JSTA <= MAXSTA

C--IN THE VAX VERSION, THE STATION DATA ARE INTEGER ARRAYS IN COMMON.
C--IN THE PC350 VERSION, THE DATA ARE REALLY IN COMMON D MEMORY, AND ARE
C--REFERENCED AS FUNCTION CALLS TO ENTRIES IN THE ROUTINE HYDAT.
C--SEE ALSO THE INCLUDE FILE HYPCOMV.

C--PC350 VERSION ONLY:
C	EXTERNAL JLATD,JLATM,JLOND,JLONM,JCAL,JMCOR,JMOD,JPD1,JPD2

C--VAX VERSION ONLY:
	COMMON /D/ JLATD (MAXSTA)	
C!LATITUDE (DEG)
	COMMON /D/ JLATM (MAXSTA)	
C!LATITUDE (IN .01 MIN)
	COMMON /D/ JLOND (MAXSTA)
C!LONGITUDE (DEG)
	COMMON /D/ JLONM (MAXSTA)	
C!LONGITUDE (IN .01 MIN)
	COMMON /D/ JCAL (MAXSTA)  
C!CONDENSED VALUES OF STA TYPE, CAL FACTOR & STD. PERIOD
	COMMON /D/ JMCOR (MAXSTA) 
C!CONDENSED VALS OF AMP & DUR MAG. CORRECTIONS
	COMMON /D/ JMOD (MAXSTA)  
C!P & S CRUST MODELS & STATION WEIGHT
	COMMON /D/ JPD1 (MAXSTA)	
C!P DELAY 1 IN .01 SEC
	COMMON /D/ JPD2 (MAXSTA)	
C!P DELAY 2 IN .01 SEC

C************** DATA FOR A PARTICULAR EVENT *********************
C--DATA PRESENT FOR EACH STATION REPORTING AN EVENT (SUBSCRIPT K)
	CHARACTER KPRK*3,KSRK*2,KRMK*1
	PARAMETER (MAXPHS=50)	
C !MAX NO. OF STATIONS FOR EACH EVENT
	COMMON /D/ KSTA		
C !NO. OF STATIONS (PHASE CARDS) FOR THIS EVENT
C				  KSTA <= MAXPHS
	COMMON /D/ KINDX (MAXPHS)
C !POINTER TO STATION IN LOOKUP TABLE
	COMMON /D/ KP (MAXPHS)		
C !P TIME IN .01"
	COMMON /D/ KS (MAXPHS)		
C !S TIME IN .01"
	COMMON /D/ KDIS (MAXPHS)	
C !DISTANCE TO EPICENTER IN .05 KM
	COMMON /D/ KAZEM (MAXPHS)	
C !CONDENSED AZIMUTH & EMERGENCE ANGLE
	COMMON /D/ KWT (MAXPHS)		
C !CONDENSED ASSIGNED P & S WEIGHT CODES
	COMMON /D/ KFMP (MAXPHS)	
C !CODA DURATION IN SECONDS
	COMMON /D/ KMAG (MAXPHS)	
C !CONDENSED CALC MAGNITUDES FOR THIS STA
	COMMON /D/ KAMP (MAXPHS)	
C !MAX PEAK-TO-PEAK AMP IN MM
	COMMON /C/ KPRK (MAXPHS)	
C !P REMARK INCL FIRST MOTION
	COMMON /C/ KSRK (MAXPHS)	
C !S REMARK
	COMMON /C/ KRMK (MAXPHS)	
C !ANY 1 LETTER STATION REMARK

C--DATA PRESENT FOR EACH PHASE (P OR S) REPORTED FOR THIS EVENT (SUBSCRIPT IM)
C--SEE ALSO THE INCLUDE FILE HYPCOMA.
	PARAMETER (MMAX=50)	
C !MAX NO. OF PHASES (P OR S) PER EVENT
	COMMON /D/ M		
C !NO. OF ARRIVAL TIMES FOR THIS EVENT
	COMMON /D/ IND (MMAX)	
C !POINTER TO STATION IN TABLE & S FLAG

C--HYPOCENTER DATA FOR THIS EVENT
	COMMON /D/ KYEAR	
C !TWO DIGIT YEAR
	COMMON /D/ KMONTH	
C !MONTH
	COMMON /D/ KDAY		
C !DAY
	COMMON /D/ KHOUR	
C !HOUR
	COMMON /D/ KMIN		
C !MINUTE
	COMMON /D/ T1		
C !CURRENT (OR TRIAL) ORIGIN TIME, SEC
	COMMON /D/ Z1		
C !CURRENT (OR TRIAL) DEPTH
	COMMON /D/ CLAT		
C !CURRENT (OR TRIAL) LAT, DECIMAL DEGREES
	COMMON /D/ CLON		
C !CURRENT (OR TRIAL) LON, DECIMAL DEGREES
	COMMON /D/ LAT		
C !EVENT LAT, DEG
	COMMON /D/ XLTM		
C !EVENT LAT, MIN
	COMMON /D/ LON		
C !EVENT LON, DEG
	COMMON /D/ XLNM		
C !EVENT LON, MIN

C--ERROR DATA FOR THIS EVENT
	COMMON /D/ ERH		
C !HORIZONTAL LOCATION ERROR
	COMMON /D/ ERZ		
C !DEPTH ERROR
	COMMON /D/ SERR(3)	
C !MAGNITUDES OF 3 STD. ERRORS
	COMMON /D/ IAZ(3)	
C !AZIMUTHS OF 3 STD. ERRORS
	COMMON /D/ IDIP(3)	
C !DIPS OF 3 STD. ERRORS

C--MISCELLANEOUS DATA FOR THIS EVENT
	CHARACTER REMK*3,RMK1*1,RMK2*1
	COMMON /D/ FMAG		
C !AVERAGE DURATION MAG
	COMMON /D/ XMAG		
C !AVERAGE AMPLITUDE MAG
	COMMON /D/ RMS		
C !RMS RESIDUAL AFTER RESIDUAL WEIGHTING
	COMMON /D/ RMSWT	
C !RMS RESIDUAL BEFORE RESIDUAL WEIGHTING
	COMMON /C/ REMK		
C !3-LETTER REMARK BASED ON LOCATION
	COMMON /C/ RMK1		
C !FIRST 1-LETTER AUXILIARY REMARK
	COMMON /C/ RMK2		
C !SECOND 1-LETTER AUXILIARY REMARK
	COMMON /D/ DONE		
C !FLAG SET WHEN EVENT IS LOCATED
	COMMON /D/ V(4,4)	
C !EIGENVECTOR MATRIX
	COMMON /D/ EIGVAL(4)	
C !EIGENVALUES
	COMMON /D/ COVAR(4,4)	
C !COVARIANCE MATRIX
	COMMON /D/ LOCIN	
C !EVENT ID OR SEQUENCE NO. INPUT FOR EVENT
	COMMON /D/ LOCNUM	
C !EVENT ID OR SEQUENCE NO.
	COMMON /D/ INUM		
C !EVENT NO. WITHIN THIS LOCATION RUN
	COMMON /D/ ITR		
C !CURRENT ITERATION NUMBER
	COMMON /D/ DMIN		
C !DISTANCE TO CLOSEST STATION
	COMMON /D/ KEND		
C !PROGRAM TERMINATION FLAG
	COMMON /D/ MAXGAP	
C !MAXIMUM AZIMUTHAL GAP
	COMMON /D/ NFRM		
C !NUMBER OF FIRST MOTIONS
	COMMON /D/ NWR		
C !NUMBER OF WEIGHTED READINGS (P & S)
	COMMON /D/ NWS		
C !NUMBER OF WEIGHTED S READINGS
	COMMON /D/ RR		
C !LENGTH OF ADJUSTMENT VECTOR IN KM

C***************** PARAMETERS WHICH APPLY TO ALL EVENTS ******************
C--THE DEFINING COMMANDS ARE GIVEN IN PARENTHESES

C--STATION DELAY PARAMETERS (DLY)
	COMMON /D/ KDLY	
C !DELAY MODEL CONTROL: 1=MODEL 1, 2=MODEL 2, 3=LINE
C			 SEPARATES 2 MODELS, 4=CIRCLE SEPS. 2 MODELS.
	COMMON /D/ DLYBAL	
C !FACTOR WHICH BALENCES BETWEEN 2 DELAY MODELS
C			  (0 FOR MOD1, 1 FOR MOD2)
	COMMON /D/ DLYAZ	
C !AZIMUTH OF LINE OR RADIUS OF CIRCLE WHICH
C			  SEPARATES THE 2 DELAY MODELS
	COMMON /D/ DLYWD	
C !WIDTH OF TRANSITION ZONE BETWEEN MODELS
	COMMON /D/ DLYLON	
C !LON OF CIRCLE CENTER OR POINT ON LINE
	COMMON /D/ DLYLAT	
C !LAT OF CIRCLE CENTER OR POINT ON LINE
C                         BOTH IN DECIMAL DEGREES, POS N & W

C--TERMINATING LOCATION UPON CONVERGENCE (CON)
	COMMON /D/ ITRLIM	
C !MAXIMUM NUMBER OF ITERATIONS
	COMMON /D/ DQUIT	
C !STOP WHEN HYPO ADJUSTMENT IS < THIS
	COMMON /D/ DRQT	
C !STOP WHEN CHANGE IN RMS < THIS

C--ITERATION & DAMPING CONTROLS (DAM)
	COMMON /D/ DXFIX	
C !KEEP DEPTH FIXED UNTIL ADJUST IS < THIS
	COMMON /D/ DZMAX	
C !DAMP DEPTH ADJUST IF > THIS
	COMMON /D/ DZAIR	
C !FRACTION OF DEPTH ADJ. IF QUAKE GOES INTO AIR
	COMMON /D/ DAMP		
C !DAMPING FACTOR FOR ALL HYPO ADJUSTMENTS
	COMMON /D/ EIGTOL	
C !MIN EIGENVALUE REQUIRED FOR ADJUSTMENT
	COMMON /D/ RBACK
C !LIMIT ON RMS INCREASE FOR ONE ITERATION
	COMMON /D/ BACFAC
C !FRACTION OF STEP TO MOVE BACK IF 
C			  INCREASE IN RMS > RBACK

C--DURATION MAG CONSTANTS (DUR)
	COMMON /D/ FMA1,FMB1,FMZ1,FMD1	
C !LOW DUR MAG CONSTANTS
	COMMON /D/ FMA2,FMB2,FMZ2,FMD2	
C !HIGH DUR MAG CONSTANTS
	COMMON /D/ FMBRK	
C !DURATION SEPARATING LO & HI CONSTANTS

C--MISCELLANEOUS PARAMETERS
	COMMON /D/ ITRDIS	
C !ITERATION TO BEGIN DISTANCE WEIGHTING (DIS)
	COMMON /D/ DISCUT,DISW1,DISW2	
C !DIST. WEIGHT PARAMETERS (DIS)
	COMMON /D/ ITRRES	
C !ITERATION TO BEGIN RESIDUAL WEIGHTING (RMS)
	COMMON /D/ RMSCUT,RMSW1,RMSW2	
C !RMS WEIGHTING PARAMS. (RMS)
	COMMON /D/ SWT		
C !MULTIPLY ALL S WEIGHTS BY THIS (SWT)
	COMMON /D/ POS		
C !VP/VS VELOCITY RATIO (POS)
	COMMON /D/ ZTR		
C !TRIAL DEPTH (ZTR)
	COMMON /D/ RDERR	
C !ESTIMATED READING ERROR IN SECS (ERR)
	COMMON /D/ ERCOF	
C !WEIGHTING FACTOR OF RMS IN ERROR CALCS (ERC)
	COMMON /D/ NET	
C !NET FOR ASSIGNING 3-LET. NAMES BASED ON LOCATION (NET)
