Closed cjhopp closed 8 years ago
I don't use hyp2000 much with obspyck, so it might not be set up perfectly in all regards, but it works in general (I just did a dummy location..).
Below is our input file, esp. the Choose between formats
line will influence you, I think.. looks like we're using hypo71
format for all three files (phases, stations, location output), but it's kind of hard to find a good documentation on those.. for the stations it looks like it's what is described on page 13 of this pdf, labelled "Station format no. 1". Esp. be aware that station codes are limited to 4 letters (I have %6s
in the code but I think it only works for station codes with 4 letters or less, compare pdf, two blanks then 4-letter station code)! It looks like yours are much longer? So you either have to change your station names, or adapt the obspyck code to handle those with hyp2000 differently (compare what I'm doing for focmec).
Or.. you could try to switch obspyck code to use "new hypoinverse" formats (I guess it's this one and it supports 5 letters).
hope it helps..
*
* STATION DATA
* ************
* You must read stations before using the ATE, DEL, FMC or XMC commands
*
* Enable year 2000 formats
* ************************
200 F 2000 0
* Use new station codes
* *********************
* LET 5 2 3 2 2
*
* Choose between formats.
* 1 = Summary format (1=old hypoinverse; 2=hypo71; 3=new hypoinverse)
* 2 = Terminator format (1=hypoinverse; 2=hypo71; 3=get trial hypocenter from header record)
* 3 = Station format (1=old hypoinverse; 2=hypo71; 3=new hypoinverse)
* ******************************************************************************************
* H71 2 3 3 hypo_mgr settings
* H71 1 1 3 cal2000.hyp settings
H71 2 2 2
*
* Read ascii file of all stations
* *******************************
*STA 'hypoinverse/stas/all2.sta'
STA 'stations.dat'
*
PHS 'hyp2000.pha'
FIL
* Read XMAG corrections
* *********************
* XMC 'hypoinverse/stas/all2000.xmc' T 0
*
* Read FMAG corrections
* *********************
* FMC 'hypoinverse/stas/all2000.fmc' T 0
*
* CUSP phony station codes
* ************************
* UNK 5 'IRG1' 'IRG2' 'IRG3' 'IRGE' 'WWVB'
*
* CRH @bw.crh
* MULTIPLE CRUSTAL MODELS
* ***********************
*
* Read multiple model info and station delays (in ascii)
* ******************************************************
@bayernmult.hyp
*
* MAGNITUDE CHOICES
* *****************
*
* Use Eaton for Fmag1 and logA0, Hirshorn for Fmag2
* *************************************************
* MAG 1 T 3 1
*
* Set Eaton's new magnitude constants
* ***********************************
* DUR -.81 2.22 0 .0011 0, 5*0, 9999 1
*
* Extra distance and depth terms for Eaton
* ****************************************
* DU2 .005 40, .0006 350, .014 10
*
* Zmag of Hirshorn; use -2.06=-.71-1.35
* -1.35 compensates for the 1.35 gain corr used for the 42db Z stations
* *********************************************************************
* DUB -2.06 2.95 0 .001 0, 1 /This comment is required for some reason (BUG!!!)
* DUB -2.06 2.95 0 .001 0, 5*0, 9999 1 /corrected 990111 by Klein
*
* Components for FMAG1; new code D
* ********************************
* FC1 'D' 4 'VHZ' 'VHE' 'VHN' 'VLZ'
*
* Use low-gain verticals for FMAG2 = Zmag
* Old codes: FC2 'Z' 1 'Z'
* ***************************************
* FC2 'Z' 1 'VLZ'
*
* XMAG components
* ***************
* XC1 'X' 7 'VHZ' 'VLZ' 'VLE' 'VLN' 'VDZ' 'VDN' 'VDE'
*
* Local Magnitude (ML) components
* *******************************
* XC2 'L' 6 'WLN' 'WLE' 'HHN' 'HHE' 'BHN' 'BHE'
*
* Use Berkeley's Nordquist logA0 relation
* for the WA & synthetic WA components
* ***************************************
* LA0 6 'WLN' 4, 'WLE' 4, 'BHN' 4, 'BHE' 4, 'HHN' 4, 'HHE' 4
*
* Component corrections for Eaton Fmags
* Old codes: FCM 3 'Z' -.06 'E' -.30, 'N' -.30
* ********************************************
* FCM 3 'VLZ' -.06 'VLE' -.30 'VLN' -.30
*
* Component corrections for Eaton Xmags
* Old codes: XCM 2 'V' .33, 'Z' .20
* *************************************
* XCM 2 'VHZ' .33, 'VLZ' .20
*
* Preferred magnitudes.
* Minimum number of readings and min, max magnitudes
* Changed as shown for hyp2000.
* **************************************************
* PRE 7, 3 4 4 9, 5 6 4 9, 1 1 0 9, 2 1 0 9, 4 4 4 9, 3 0 0 9, 4 0 0 9
* PRE 7, 3 0 4 9, 5 6 4 9, 1 1 0 9, 2 1 0 9, 4 4 4 9, 3 0 0 9, 4 0 0 9
*
* STANDARD CHOICES FOR CALNET
* ***************************
*
* Residual weighting
* ******************
RMS 4 .10 2 3
*
* Standard timing error
* *********************
ERR .10
*
* P to S ratio
* ************
POS 1.78
*
* Don't log events to terminal.
* Don't print unweighted stations.
* ********************************
REP F F
*
* Force location of junk events
* *****************************
JUN T
*
* Minimum number of stations
* **************************
MIN 4
*
* Use California region codes
* ***************************
* NET 2
*
* Trial depth
* ***********
ZTR 5
*
* Distance weighting
* ******************
DIS 4 15 3.5 7
*
* Weights for P weight codes 0-3
* Old values were: 1. .75 .5 .25
* New values are: 1. .5 .2 .1
* ******************************
WET 1. .5 .2 .1
*
* OUTPUT FORMAT
* *************
*
* Send error messages to terminal
* *******************************
ERF T
*
* No page ejects
* **************
TOP T
*
* No station list or models in printfile
* **************************************
LST 0 0 0
*
* Medium print output each event
* ******************************
KPR 2
*
* You should use the ATE command with the date and time of your first eq.
* using a year of 0 will always work, but is inefficient.
*
* An easy way is to use the ATE command below with a 0 year, then
* follow this command file with your own ATE command:
* ATE 1* 84 1 1 0 0 This rereads the standard file but loads
* attenuations from your starting date.
*
* Use this line if first date is unknown
* **************************************
* ATE 'hypoinverse/stas/all2000.atn' 0
*
* Load cal factors for digital stations
* *************************************
* CAL 'hypoinverse/stas/all2000.cal' 0
*
* Specify phase format.
* 5 = archive file with shadow cards
* **********************************
* COP 5
*
* Set the archive file format.
* 3 = Full format with shadow cards
* *********************************
* CAR 3
*
* for ARC, SUM, and PRT commands
*
* Name the print output file
* NOTE: filename must be enclosed in single-quotes for PRT command
* ****************************************************************
PRT 'hypo.prt'
*
* Name of summary file
* NOTE: filename must be enclosed in single-quotes for SUM command
* ****************************************************************
SUM 'hypo.sum'
*
* Name the archive output file
* NOTE: filename must be enclosed in single-quotes for ARC command
* ****************************************************************
ARC 'hypo.arc'
*
* Set the append flags to T or F.
* 1 = Printout file,
* 2 = Summary file,
* 3 = Archive file.
* *******************************
APP F F F
LOC
*
Hi Tobias,
This helped a lot, thank you! Hyp2000 now works fine with some minor tweaks.
When the input files were written for hyp2000, obspyck assumed N and E hemisphere locations. I made some minor changes to account for this and created a pull request (I really just wanted to acquaint myself with how Git worked in that regard so disregard it if you'd like).
Cheers,
Chet
Thanks for sharing the improvements to the code, I'll happily merge them of course. Just a tip: In general it's best to work on a branch when you do things like this, so that the master branch at your fork and the master of the upstream repository stay in sync.
I appreciate the tip. I'm implementing a git-flow branching model to my forks as we speak.
Cheers,
Chet
Hi all,
I'm attempting to setup hypo2000 for use with Obspyck and I think I have everything in the right place. I have a symlink to the hyp1.40 binary (named
hyp2000__Linux__64bit
) along with the command filebay2000.inp
and a velocity model, which are all located in ~/obspyck/hyp_2000.At present, the event file which is being read from SeisHub only contains P-picks, no magnitudes, S-picks or locations.
When I click 'do hyp2000' I get the following output followed by an error message:
I've tried running hyp2000 by itself with the .sta and .pha files written to the /tmp directory by obspyck but hyp2000 has trouble reading the formats of these files:
I think there was a tab placed at the beginning of each line in the station file. When I removed this, it stopped throwing the error but instead threw the following:
So it looks like maybe my command file is set up wrong (I've just been editing the example file provided with the hyp1.40 download) and hyp2000 is not creating any output for Obspyck to read. Would anyone be able to provide an example of a working plugin_dir and command file (or any other advice)?
Thanks,
Chet
Command file: bay2000.inp.txt Station and phase files written by Obspyck: hyp2000.pha.txt stations_original.dat.txt