Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

getCMT

Read CMT


Description

Read and reformat CMT solutions downloaded from the web.

Usage

getCMT(fn, skip=1)

Arguments

fn

character file name

skip

number of lines to skip (e.g. header)

Details

Data can be extracted from web site: http://www.globalcmt.org/CMTsearch.html

The file must be cleaned prior to scanning - on download from the web site there are extra lines on top and bottom of file. Delete these. Leave one line on the top that describesthe columns. Data is separated by blanks. The files have a mixture of dates - some with 7 component dates (YYMMDD and others with 14 components YYYYMODDHHMM these are read in separately. Missing hours and minutes areset to zero.

Value

list of CMT solution data:

lon

lon of epicenter

lat

lat of epicenter

str1

strike of fault plane

dip1

dip of fault plane

rake1

rake of fault plane

str2

strike of auxilliary plane

dip2

dip of auxilliary plane

rake2

rake of auxilliary plane

sc

scale?

iexp

exponent?

name

name, includes the date

Elat

exploding latitude, set to lat initially

Elon

exploding longitude, set to lon initially

jd

julian day

yr

year

mo

month

dom

day of month

Note

Use ExplodeSymbols or explode to get new locations for expanding the plotting points.

Author(s)

Jonathan M. Lees<jonathan.lees@unc.edu>

References

http://www.globalcmt.org/CMTsearch.html

G. Ekstrom. Rapid earthquake analysis utilizes the internet. Computers in Physics, 8:632-638, 1994.

See Also

ExplodeSymbols, spherefocgeo, ternfocgeo

Examples

## Not run: 


g = getCMT("/home/lees/aleut.cmt")

pg = prepFOCS(g)


plot(range(pg$LONS), range(pg$LATS), type = "n", xlab = "LON",
    ylab = "LAT", asp = 1)


 for (i in 1:length(pg$LATS)) {
    mc = CONVERTSDR(g$str1[i], g$dip1[i], g$rake1[i])
     MEC <- MRake(mc$M)
MEC$UP = FALSE
     Fcol <- foc.color(foc.icolor(MEC$rake1), pal = 1)
     justfocXY(MEC, x = pg$LONS[i], y = pg$LATS[i], focsiz = 0.4,
     fcol = Fcol, xpd = FALSE)
 }




## End(Not run)

RFOC

Graphics for Spherical Distributions and Earthquake Focal Mechanisms

v3.4-6
GPL (>= 2)
Authors
Jonathan M. Lees [aut, cre], Keehoon Kim [ctb]
Initial release
2018-01-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.