3.2. Example usage of SeisSrcMoment to calculate \(M_W\) in the frequency domain

This example is for a volcano-tectonic earthquake at Uturuncu, Bolivia. The moment magnitude, \(M_W\), is calculated in the frequency domain, i.e. the long period spectral level is calculated by fitting a Brune model, as detailed in Stork et al (2014). This earthquake’s moment tensor is analysed in Alvizuri and Tape (2016), with \(M_W\) = 2.80 found by full waveform moment tensor inversion.

3.2.1. 1. Specify parameters to use:

[1]:
import numpy as np
from SeisSrcMoment import moment
from NonLinLocPy import read_nonlinloc
[2]:
# Specify variables:
inventory_fname = "data/instrument_gain_data/IRISDMC-Plutons_dataless.dataless"  # The inventory fname, pointing to the dataless file for the network (for full instrument frequency response removal)
mseed_filename = "data/mseed_data/20100516063454720000.m" # Note: One can pass the script an obspy stream instead if one wishes.
NLLoc_event_hyp_filename = "data/NLLoc_data/loc.Tom_RunNLLoc000.20100516.063457.grid0.loc.hyp"
stations_not_to_process = []
window_before_after = [0.1, 0.6] # The time before and after the phase pick to use for calculating the magnitude within
filt_freqs = [0.5, 49.0] # Filter frequencies to apply (important if not removing long period spectral noise)
MT_six_tensor = [] # If this is not specified, assumes average DC component in P (or S) from Stork et al (2014).
density = 2750. #2000. # Density of medium, in kg/m3
Vp = 5000. # P-wave velocity in m/s
# Note that Q not required as the program calculates Q when fitting the source model.
use_full_spectral_method = True
verbosity_level = 0 # Verbosity level (1 for moment only) (2 for major parameters) (3 for plotting of traces)
plot_switch = True
remove_noise_spectrum = False # If True, removes noise using spectrum taken from window before trace. Not thoroughly tested yet, but can get around by applying a high pass filter above anyway.

[3]:
# Read in stations to calculate for directly from nonlinloc hyp file:
nonlinloc_event_hyp_data = read_nonlinloc.read_hyp_file(NLLoc_event_hyp_filename)
stations_to_calculate_moment_for = list(nonlinloc_event_hyp_data.phase_data.keys())

3.2.2. Run moment calculation:

[4]:
# Find seismic moment release:
av_M_0, std_err_av_M_0, n_obs, event_obs_dict = moment.calc_moment(mseed_filename, NLLoc_event_hyp_filename, stations_to_calculate_moment_for, density, Vp, inventory_fname=inventory_fname, window_before_after=window_before_after, filt_freqs=filt_freqs, use_full_spectral_method=use_full_spectral_method, stations_not_to_process=stations_not_to_process, MT_six_tensor=MT_six_tensor, verbosity_level=verbosity_level, plot_switch=plot_switch)
print("Seismic moment release (Nm):", av_M_0)
Warning: Need to specify MT_six_tensor or MT_data_filename for accurate radiation pattern correction.
 Using average radiation pattern value instead.
/Users/eart0504/opt/anaconda3/lib/python3.7/site-packages/obspy/io/xseed/fields.py:377: UserWarning: Date is required.
  warnings.warn('Date is required.', UserWarning)
Station (PLLO) or channel (HHN) not in instrument inventory, therefore not correcting for this component and removing it.
Station (PLLO) or channel (HHE) not in instrument inventory, therefore not correcting for this component and removing it.
Station (PLLO) or channel (HHZ) not in instrument inventory, therefore not correcting for this component and removing it.
Sigma_0: 8.41237561982e-08 f_c: 9.88411773698 t_star: 0.038183935262
/Users/eart0504/Documents/python/github_repositories/SeisSrcMoment/SeisSrcMoment/moment.py:480: MatplotlibDeprecationWarning: The 'nonposx' parameter of __init__() has been renamed 'nonpositive' since Matplotlib 3.3; support for the old name will be dropped two minor releases later.
  axes[0,0].set_xscale("log", nonposx='clip')
/Users/eart0504/Documents/python/github_repositories/SeisSrcMoment/SeisSrcMoment/moment.py:481: MatplotlibDeprecationWarning: The 'nonposy' parameter of __init__() has been renamed 'nonpositive' since Matplotlib 3.3; support for the old name will be dropped two minor releases later.
  axes[0,0].set_yscale("log", nonposy='clip')
/Users/eart0504/Documents/python/github_repositories/SeisSrcMoment/SeisSrcMoment/moment.py:499: MatplotlibDeprecationWarning: The 'nonposx' parameter of __init__() has been renamed 'nonpositive' since Matplotlib 3.3; support for the old name will be dropped two minor releases later.
  axes[1,0].set_xscale("log", nonposx='clip')
/Users/eart0504/Documents/python/github_repositories/SeisSrcMoment/SeisSrcMoment/moment.py:500: MatplotlibDeprecationWarning: The 'nonposy' parameter of __init__() has been renamed 'nonpositive' since Matplotlib 3.3; support for the old name will be dropped two minor releases later.
  axes[1,0].set_yscale("log", nonposy='clip')
../../_images/tutorials_vt_example_frequency_domain_vt_example_frequency_domain_7_4.png
Sigma_0: 9.69070140418e-08 f_c: -6.77237617514 t_star: 0.0374773897286
/Users/eart0504/Documents/python/github_repositories/SeisSrcMoment/SeisSrcMoment/moment.py:480: MatplotlibDeprecationWarning: The 'nonposx' parameter of __init__() has been renamed 'nonpositive' since Matplotlib 3.3; support for the old name will be dropped two minor releases later.
  axes[0,0].set_xscale("log", nonposx='clip')
/Users/eart0504/Documents/python/github_repositories/SeisSrcMoment/SeisSrcMoment/moment.py:481: MatplotlibDeprecationWarning: The 'nonposy' parameter of __init__() has been renamed 'nonpositive' since Matplotlib 3.3; support for the old name will be dropped two minor releases later.
  axes[0,0].set_yscale("log", nonposy='clip')
/Users/eart0504/Documents/python/github_repositories/SeisSrcMoment/SeisSrcMoment/moment.py:499: MatplotlibDeprecationWarning: The 'nonposx' parameter of __init__() has been renamed 'nonpositive' since Matplotlib 3.3; support for the old name will be dropped two minor releases later.
  axes[1,0].set_xscale("log", nonposx='clip')
/Users/eart0504/Documents/python/github_repositories/SeisSrcMoment/SeisSrcMoment/moment.py:500: MatplotlibDeprecationWarning: The 'nonposy' parameter of __init__() has been renamed 'nonpositive' since Matplotlib 3.3; support for the old name will be dropped two minor releases later.
  axes[1,0].set_yscale("log", nonposy='clip')
../../_images/tutorials_vt_example_frequency_domain_vt_example_frequency_domain_7_7.png
Sigma_0: 1.20733156209e-07 f_c: 9.15817342733 t_star: 0.0366651655612
/Users/eart0504/Documents/python/github_repositories/SeisSrcMoment/SeisSrcMoment/moment.py:480: MatplotlibDeprecationWarning: The 'nonposx' parameter of __init__() has been renamed 'nonpositive' since Matplotlib 3.3; support for the old name will be dropped two minor releases later.
  axes[0,0].set_xscale("log", nonposx='clip')
/Users/eart0504/Documents/python/github_repositories/SeisSrcMoment/SeisSrcMoment/moment.py:481: MatplotlibDeprecationWarning: The 'nonposy' parameter of __init__() has been renamed 'nonpositive' since Matplotlib 3.3; support for the old name will be dropped two minor releases later.
  axes[0,0].set_yscale("log", nonposy='clip')
/Users/eart0504/Documents/python/github_repositories/SeisSrcMoment/SeisSrcMoment/moment.py:499: MatplotlibDeprecationWarning: The 'nonposx' parameter of __init__() has been renamed 'nonpositive' since Matplotlib 3.3; support for the old name will be dropped two minor releases later.
  axes[1,0].set_xscale("log", nonposx='clip')
/Users/eart0504/Documents/python/github_repositories/SeisSrcMoment/SeisSrcMoment/moment.py:500: MatplotlibDeprecationWarning: The 'nonposy' parameter of __init__() has been renamed 'nonpositive' since Matplotlib 3.3; support for the old name will be dropped two minor releases later.
  axes[1,0].set_yscale("log", nonposy='clip')
../../_images/tutorials_vt_example_frequency_domain_vt_example_frequency_domain_7_10.png
Sigma_0: 8.70615040794e-08 f_c: 7.1028571671 t_star: 0.0386034621862
/Users/eart0504/Documents/python/github_repositories/SeisSrcMoment/SeisSrcMoment/moment.py:480: MatplotlibDeprecationWarning: The 'nonposx' parameter of __init__() has been renamed 'nonpositive' since Matplotlib 3.3; support for the old name will be dropped two minor releases later.
  axes[0,0].set_xscale("log", nonposx='clip')
/Users/eart0504/Documents/python/github_repositories/SeisSrcMoment/SeisSrcMoment/moment.py:481: MatplotlibDeprecationWarning: The 'nonposy' parameter of __init__() has been renamed 'nonpositive' since Matplotlib 3.3; support for the old name will be dropped two minor releases later.
  axes[0,0].set_yscale("log", nonposy='clip')
/Users/eart0504/Documents/python/github_repositories/SeisSrcMoment/SeisSrcMoment/moment.py:499: MatplotlibDeprecationWarning: The 'nonposx' parameter of __init__() has been renamed 'nonpositive' since Matplotlib 3.3; support for the old name will be dropped two minor releases later.
  axes[1,0].set_xscale("log", nonposx='clip')
/Users/eart0504/Documents/python/github_repositories/SeisSrcMoment/SeisSrcMoment/moment.py:500: MatplotlibDeprecationWarning: The 'nonposy' parameter of __init__() has been renamed 'nonpositive' since Matplotlib 3.3; support for the old name will be dropped two minor releases later.
  axes[1,0].set_yscale("log", nonposy='clip')
../../_images/tutorials_vt_example_frequency_domain_vt_example_frequency_domain_7_13.png
Sigma_0: 2.12078229403e-08 f_c: 6.12423257402 t_star: 0.0165399569795
/Users/eart0504/Documents/python/github_repositories/SeisSrcMoment/SeisSrcMoment/moment.py:480: MatplotlibDeprecationWarning: The 'nonposx' parameter of __init__() has been renamed 'nonpositive' since Matplotlib 3.3; support for the old name will be dropped two minor releases later.
  axes[0,0].set_xscale("log", nonposx='clip')
/Users/eart0504/Documents/python/github_repositories/SeisSrcMoment/SeisSrcMoment/moment.py:481: MatplotlibDeprecationWarning: The 'nonposy' parameter of __init__() has been renamed 'nonpositive' since Matplotlib 3.3; support for the old name will be dropped two minor releases later.
  axes[0,0].set_yscale("log", nonposy='clip')
/Users/eart0504/Documents/python/github_repositories/SeisSrcMoment/SeisSrcMoment/moment.py:499: MatplotlibDeprecationWarning: The 'nonposx' parameter of __init__() has been renamed 'nonpositive' since Matplotlib 3.3; support for the old name will be dropped two minor releases later.
  axes[1,0].set_xscale("log", nonposx='clip')
/Users/eart0504/Documents/python/github_repositories/SeisSrcMoment/SeisSrcMoment/moment.py:500: MatplotlibDeprecationWarning: The 'nonposy' parameter of __init__() has been renamed 'nonpositive' since Matplotlib 3.3; support for the old name will be dropped two minor releases later.
  axes[1,0].set_yscale("log", nonposy='clip')
../../_images/tutorials_vt_example_frequency_domain_vt_example_frequency_domain_7_16.png
Sigma_0: 1.35783239206e-07 f_c: -7.8257630397 t_star: 0.0469219509214
/Users/eart0504/Documents/python/github_repositories/SeisSrcMoment/SeisSrcMoment/moment.py:480: MatplotlibDeprecationWarning: The 'nonposx' parameter of __init__() has been renamed 'nonpositive' since Matplotlib 3.3; support for the old name will be dropped two minor releases later.
  axes[0,0].set_xscale("log", nonposx='clip')
/Users/eart0504/Documents/python/github_repositories/SeisSrcMoment/SeisSrcMoment/moment.py:481: MatplotlibDeprecationWarning: The 'nonposy' parameter of __init__() has been renamed 'nonpositive' since Matplotlib 3.3; support for the old name will be dropped two minor releases later.
  axes[0,0].set_yscale("log", nonposy='clip')
/Users/eart0504/Documents/python/github_repositories/SeisSrcMoment/SeisSrcMoment/moment.py:499: MatplotlibDeprecationWarning: The 'nonposx' parameter of __init__() has been renamed 'nonpositive' since Matplotlib 3.3; support for the old name will be dropped two minor releases later.
  axes[1,0].set_xscale("log", nonposx='clip')
/Users/eart0504/Documents/python/github_repositories/SeisSrcMoment/SeisSrcMoment/moment.py:500: MatplotlibDeprecationWarning: The 'nonposy' parameter of __init__() has been renamed 'nonpositive' since Matplotlib 3.3; support for the old name will be dropped two minor releases later.
  axes[1,0].set_yscale("log", nonposy='clip')
../../_images/tutorials_vt_example_frequency_domain_vt_example_frequency_domain_7_19.png
Seismic moment release (Nm): 1.47886373063e+13
[5]:
# And find corresponding moment magnitude, M_w (Hanks and Kanamori 1979):
M_w = (2./3.)*np.log10(av_M_0) - 6.0
print("Local moment magnitude, M:", M_w)
Local moment magnitude, M: 2.77995210529

Note that this magnitude is approximately the same as that found in Alvizuri and Tape (2016), where they found that \(M_W = 2.80\).

3.2.2.1. References:

Alvizuri, C., & Tape, C. (2016). Full moment tensors for small events (Mw < 3) at Uturuncu volcano, Bolivia. Geophysical Journal International, 206(3), 1761–1783. https://doi.org/10.1093/gji/ggw247

Stork, A. L., Verdon, J. P., & Kendall, J. M. (2014). The robustness of seismic moment and magnitudes estimated using spectral analysis. Geophysical Prospecting, 62(4), 862–878. https://doi.org/10.1111/1365-2478.12134

[ ]: