Magnitude Calculation
Once a solution has been found for an event, function calc_netmag
is called to calculate average body wave and surface wave magnitudes from
amplitudes reported with associated phases. Body wave magnitudes are
only calculated for phases identified as P which were recorded at a suitable
distance and have an amplitude reported for a suitable period. Surface
wave magnitudes are calculated for any unidentified phase recorded at a suitable
distance with an amplitude measured at a suitable period because surface
waves are not included in the location and so are not given an internal phase
code if they were reported as LR etc.
There are 6 members of the solution structure that relate to the calculation of magnitudes:
-
bodymag - network body wave magnitude. Set in function calc_netmag.
- surfmag - network surface wave magnitude. Set in function calc_netmag.
-
nsta_mb - number of stations contributing to body wave magnitude. Set in function calc_netmag.
-
nsta_ms - number of stations contributing to surface wave magnitude. Set in function calc_netmag.
-
mb_id - numerical ID for body wave magnitude, assigned for writing to database. Set in function put_hyp.
-
ms_id - numerical ID for surface wave magnitude, assigned for writing to database. Set in function put_hyp.
There are 4 members of each phase structure that relate to the calculation of magnitudes:
-
numamps - number of amplitudes measured for this phase and stored in the array a. Set in function get_pha.
-
a - an array of amplitude structures with the following members:
-
amp - zero-to-peak amplitude in nanometres. Set in function get_pha.
-
per - period of the measured amplitude. Set in function get_pha.
-
logat -Logarithm base 10 of ground motion amplitude divided by period. Set in function get_pha.
-
comp - component on which the amplitude measurement was made N, E, or Z. Set in function get_pha.
-
bodymag - body wave magnitude calculated for this phase. Set in function calc_sta_mb.
-
surfmag - body wave magnitude calculated for this phase. Set in function calc_sta_ms.
There are 9 external variables related to magnitudes assigned in
read_config
and corresponding to lines in
config.txt:
-
body_mag_min_dist - minimum distance in degrees that a station must be
from an event for amplitudes measured there to be considered for inclusion
in a body wave magnitude calculation.
-
body_mag_max_dist - maximum distance in degrees that a station can be from an event
for amplitudes measured there to be considered for inclusion in a body wave
magnitude calculation.
-
surf_mag_min_dist - minimum distance in degrees that a station must be from an event
for amplitudes measured there to be considered for inclusion in a surface wave
magnitude calculation.
-
surf_mag_max_dist - maximum distance in degrees that a station can be from an event
for amplitudes measured there to be considered for inclusion in a surface wave
magnitude calculation.
-
body_mag_min_per - minimum period that an amplitude can be measured
at before it is considered for inclusion in a body wave magnitude calculation.
-
body_mag_max_per- maximum period that an amplitude can be measured at
before it is considered for inclusion in a body wave magnitude calculation.
-
surf_mag_min_per - minimum period that an amplitude can be measured at
before it is considered for inclusion in a surface wave magnitude calculation.
-
surf_mag_max_per - maximum period that an amplitude can be measured at before it is considered
for inclusion in a surface wave magnitude calculation.
-
mag_range_warn_thresh - difference between body wave and surface wave magnitudes above which a warning will br printed to the logfile
output stream.