forked from uafgeotools/capuaf
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathm02mw.m
More file actions
59 lines (48 loc) · 1.38 KB
/
m02mw.m
File metadata and controls
59 lines (48 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
function Mw = m02mw(imag,M0)
%M02MW converts from scalar seismic moment to moment magnitude
%
% INPUT
% imag =1 for Kanamori (1977), =2 for GCMT formula
% M0 scalar seismic moment in N-m (not dyne-cm)
%
% See Latex notes cmt.pdf.
%
% EXAMPLE (Denali earthquake):
% M0 = 7.48*1e20; Mw = m02mw(1,M0)
%
% Carl Tape, 2007-10-31
%
% convert moment tensor from N-m to dyne-cm, since these formulas assume dyne-cm
M0 = 1e7 * M0;
if imag==1
% Kanamori 1978
%k = -10.7;
% Kanamori 1977
%k = -(2/3)*(11.8 - log10(1/2e4)); % for M0 in units of dyne-cm
%k = -(2/3)*(11.8 - log10(5e-5)); % dyne-cm
%k = -(2/3)*(16.8 - log10(5)); % dyne-cm
%k = -11.2 + (2/3)*log10(5); % dyne-cm
%k = -10.7340
% Kanamori 1977 or 1978
%Mw = (2/3) * log10(M0) + k;
% Kanamori 1977 (modified form, but exact)
A = 2 / (3*log(10));
K = 0.2 * 10^16.8;
Mw = A*log(M0/K);
elseif imag == 2
% Harvard CMT
% k = 2/3 * 16.1
Mw = (2/3) * (log10(M0) - 16.1);
else
error('imag must be 1 or 2.');
end
%----------------------------------
if 0==1
M0 = 2.7 * 1e23; % Cipar and Kanamori (1974), N-m
Mw = m02mw(2,M0)
Mw = m02mw(1,M0)
% check direct calculation for M0 in N-m
k = -(2/3)*(11.8 - log10(1/2e4) - 7)
Mw = (2/3)*log10(M0) + k
end
%=====================================================