source: SHX/trunk/SeismicHandler/cmdscripts/EXAMPLE12.SHC @ 1113

Revision 1113, 1.2 KB checked in by klaus, 4 years ago (diff)

bugfix

Line 
1! Read closest stations to a recent event.
2! Default location in Italy, (44.,11.25), use INGV FDSN server
3
4default 1 44.0   latitude
5default 2 11.25  longitude
6default 3 1.0    radius
7default 4 5.0    mininum magnitude
8default 5 ingv   fdsn-server
9
10! copy parameters into variables for better readability
11sdef lat #1
12sdef lon #2
13sdef radius #3
14sdef minmagn #4
15sdef server #5
16
17! Get lists of events with a 1 deg radius, > magn 5 (from IRIS server),
18! subtract Time offset of 30s.
19echo_ch/new evcatalog
20events "lat "lon "radius "minmagn ;; 30.0
21echo_ch
22
23! read latest event (first line), time and location
24sdef rtime
25sdef elat
26sdef elon
27calc s &rtime = %evcatalog parse 1
28calc s &elat = %evcatalog parse 2
29calc s &elon = %evcatalog parse 3
30
31! Read 3 min of data from FDSN server
32fdsnws |"elat|,|"elon|,|"radius| * * * "rtime 180 /addr="server
33
34! Reduce channels to EH,HH,BH,SH in this priority (location codes not used here)
35chanselect eh,hh,bh,sh
36
37! get metadata
38meta all complete /del_incomplete /addr="server
39
40! Result of sorting depends on accuracy of epicenter (we may be very close).
41sort_by_distance "lat "lon
42
43! Show figure with station locations
44plot_stations all /addloc=|"lat|,|"lon|
45
46
47return
Note: See TracBrowser for help on using the repository browser.