Get UW focal mechansims from a file. These are often called A and M cards
getUWfocs(amfile)
List:
numeric, longitude
numeric, latitude
numeric, strike of plane 1
numeric, dip of plane 1
numeric, rake of plane 1
numeric, strike of plane 2
numeric, dip of plane 2
numeric, rake of plane 2
character, some GMT info for scale
character, some GMT info for scale
character, name
numeric, year
numeric, month
numeric, day of month
numeric, julian day
numeric, hour
numeric, minute
numeric, second
numeric, depth
numeric, magnitude
character, file name
Jonathan M. Lees<jonathan.lees@unc.edu>
UW focal mechanisms are stored as A and M cards. The A card described the hypocenter the M card describes the focal mechanism.
http://www.unc.edu/~leesj/XM_DOC/xm_hypo.doc.html
getCMT
if (FALSE) {
##### uwpickfile is an ascii format file from University of Washington
G1 = getUWfocs(uwpickfile)
plot(G1$lon, G1$lat)
MEKS = list(lon=G1$lon, lat=G1$lat, str1=G1$str1,
dip1=G1$dip1, rake1=G1$rake1, dep=G1$z, name=G1$name)
## utm projection
PROJ = GEOmap::setPROJ(type=2, LAT0=mean(G1$lat) , LON0=mean(G1$lon) )
XY = GEOmap::GLOB.XY(G1$lat, G1$lon, PROJ)
plot(range(XY$x), range(XY$y), type='n', asp=1)
plotmanyfoc(MEKS, PROJ, focsiz=0.05)
}
Run the code above in your browser using DataLab