Project

General

Profile

Exercises for Earthscope2013

WILBER3

WILBER is a web-based application that allows you to interactively look at and download event-based data

http://www.iris.edu/wilber3/

Wilber Exercise

Choose the Event

  • Draw selection box including Alaska, Indonesia, NZ
  • Sort by magnitude to grab the greatest
  • Choose largest event

Select Stations

  • Distance 80-120
  • 1 station every 1 degree

Show Record Station

  • 10 min after S arrival
  • Request SAC data as gzipped tar archive
  • form information... Label WILBER3TEST, your name & email

JWEED

JWEED is a desktop application that allows you to view and retrieve event data

http://www.iris.edu/dms/nodes/dmc/software/downloads/JWEED

FETCH scripts

Create a directory for these exercises, and work in that. suggestion : ~/fetchexercise

Fetch scripts available from http://service.iris.edu/clients

Common pitfall- make sure that wildcarded items are single-quoted to prevent the system from trying to expand them
ex. -S 'A*'

Download the latest version of FetchData

Current version on systems already outdated.
Grab the new one, from http://service.iris.edu/clients/ (v 2013.212)
Replace the existing FetchData with it.
  • use which FetchData to find the original on your system.
  • rename it to FetchData.old
  • Copy the new version into the same directory as FetchData
  • Make it executable chmod +x FetchData

Fetch Event

  1. Find out what options are available for FetchEvent
  2. Find the largest event that has occurred within 10 degrees of us, since 2011
    • Hint, we are located at 41.894, -87.62
    • Too many events? limit the results.
    • Did you sort by magnitude?
    • HANG ON TO THIS INFO, we'll use it again later.

Now, with FDSN

Find out what web services exist… Hint: Internet search, including the term fdsnws
  1. What 3 organizations currently have EVENT web services?
  2. Which 3 organizations currently have the dataselect web service? [seiscomp3 isn't one of them]
  3. Use fetchmetadata to find out how many stations each center has that start with A.
    • Hint: 1 station per line, so count the lines
    • Hint: The first line is a header. How could you bypass that?
  4. Use fetchevent to find out what the largest event is that each organization has.
    • Not listed in help: Use @--metadataws "blahblahblah" to specify the path to the service.
      ex. FetchMetadata --metadataws "service.iris.edu/fdsnws/station/1"

Fetching DATA

FetchData -C LHZ  -radius 41.15:-114.87:10 -s 2008-02-21T14:16:00 -e 2008-02-21T14:26:00 -S 'A*,B*,C*' -o Wells.mseed -m Wells.meta

create a sac file... optionally including information about the event. In this case:

mseed2sac Wells.mseed -m Wells.meta -E 2008,52,14,16,02/41.143/-114.867/6.7

the "-E" parameter is Year,JulianDay,Hour,Min,Second/Lat/Lon/Depth , note you can use julday or calday to convert the date into the right format

plot in sac

sac
r *.sac
sss
plotrecordsection

The Process...

For the nearby event we found earlier...
  1. Retrieve 10 minutes of data from the LHZ component of stations within 15 degrees of the event, from the _GSN network
  2. Convert to SAC including the event information. ( use julday or calday to convert the date into the right format )
  3. Use SAC to plot the results.

MATLAB

Help!

Various levels of help exist...

Hands on

irisFetch.Events

irisFetch.Stations / irisFetch.Networks / irisFetch.Channels

sf= irisFetch.Channels('channel','_US-REGIONAL','*','*','BHZ');
scatter([sf.Longitude],[sf.Latitude],'s','markerfacecolor',[0 .5 0]);
axis([-180,-50,10,70])

irisFetch.Traces

Code that uses the retrieved data

Sample Matlab code...

get seismicity from South America

ev = irisFetch.Events(...
    'StartTime' , '1/1/2010', 'EndTime', '1/1/2013', ...
    'minmag',3.1,...
    'radialcoordinates',[-20,-70,30]);

functions that determine the magnitude size and scaled depth

dfun=@(orig) ([orig.Depth].^ (1/3)) / max([orig.Depth].^(1/3));
mfun=@(x) ([x.PreferredMagnitudeValue]-2) .^ 3

plot and format the seismicity

orig = [ev.PreferredOrigin]';
scaledDepths=dfun(orig);
% scatter( [orig.Longitude] , [orig.Latitude], mfun(ev) , scaledDepths);
scatter3( [orig.Longitude] , [orig.Latitude] , [orig.Depth], mfun(ev) , scaledDepths);
set(gca,'zdir','reverse')
xlabel('lon (deg)');
ylabel('lat ((deg)');
zlabel('depth (km)');
disp('done')

Timelapse earthquakes

Based on same data as above

This plots the data for each day, taking advantage of changing the data within a graph instead of recreating the graph. This makes it MUCH more responsive.

figure
fadeDays = 90;

evDates=datenum({orig.Time});
mydates=min(evDates) : max(evDates);

b=scatter(orig(1).Longitude,orig(1).Latitude,5,[0.7 0.7 0.7]); hold on;
a=scatter(orig(1).Longitude,orig(1).Latitude,5,[0.0 0.0 1]); hold off;
c = get(a, 'Children');
q = get(b, 'Children');

for d=1:numel(mydates)-1
    oldEv = evDates < mydates(d);
    newEv = evDates < mydates(d+1) & ~(oldEv);
    reallyold = evDates < (mydates(d)-fadeDays);
    set(c,'xdata',[orig(newEv).Longitude],'ydata',[orig(newEv).Latitude]);
    set(q,'xdata',[orig(oldEv).Longitude],'ydata',[orig(oldEv & ~reallyold).Latitude]);
    axis([-90 -50 -40 0])
    % pause(.03)
    title(datestr(mydates(d)))
    drawnow
end

BREQ_FAST

Sample BREQFAST post body

Of course, you'd want to change the NAME and EMAIL.

.NAME Joe Seismologist 
.EMAIL joe@podunk.edu 
.MEDIA FTP
.LABEL Earthquake1
.QUALITY B 
.END 
GRFO IU 1999 01 02 00 18 10.4 1999 01 02 00 20 10.4 1 SHZ 
ANTO IU 1999 01 02 02 10 36.6 1999 01 02 02 12 36.6 1 SH? 
AFI IU 1999 01 02 02 10 37.1 1999 01 02 02 12 37.1 1 BH? 00 
SEE CD 1999 01 02 14 45 08.9 1999 01 02 14 47 08.9 1 SHZ 
CASY IU 1999 01 04 02 42 13.4 1999 01 04 02 44 13.4 1 BHZ 10 
KMI CD 1999 01 04 02 41 57.5 1999 01 04 02 43 57.5 1 BHZ 
SSE CD 1999 01 04 02 18 25.4 1999 01 04 02 20 25.4 2 B?? SHZ 
PAS TS 1999 1 4 2 10 49 1999 1 4 2 12 49 3 BH? SHZ L??