next up previous contents index
Next: 36. ML inversion, MAG2 Up: SEISAN Previous: 34.4 CLUSTER:   Contents   Index

35. Magnitude relations, MAG

The MAG program calculates simple magnitude relations. The program has three functions: (1) Calculate parameters for a magnitude scale (Ml or Mc), (2) Calculate relation between two different magnitudes and/or spectral parameters and (3) Calculate a new magnitude as a function of an existing magnitude, a natural step following function (2). All three functions can be done at the same time. Function (3) can also be used for moving a particular magnitude type and/or agency to the first magnitude position in line 1 to be plotted with EPIMAP.


Input: The data input is a CAT-file like one made with SELECT or COLLECT or it can be a compact file if only magnitude comparison is made. Optionally there can be a parameter file, which MUST be, called mag.par and MUST reside in the working directory. An example of the parameter file is found in DAT and also shown below. The parameter file is not needed for all operations, see details below.

1: Magnitude scales

Coda magnitude Mc: The coda magnitude scale used is

\bgroup\color{black}$\displaystyle Mc = A * log(coda) + B * dist + C

where Mc is the coda magnitude, coda is the coda length in secs, dist is the hypocentral distance in km (calculated from epicentral distance and depth in CAT file) and A, B and C are constants to be determined. This is done in two ways

3d regression

\bgroup\color{black}$\displaystyle m = A * log (coda) + B * dist + C

2d regression

\bgroup\color{black}$\displaystyle m = A * (log (coda) + dist\_coff * dist) + C

with B = A * dist_coff where dist_coff is given in the parameter file and m is the reference magnitude. SO B AND dist_coff ARE DIFFERENT. The CAT-file must contain coda readings, epicentral distances and a magnitude in the header line. A linear regression is then made between the known magnitude from a given agency and the observed coda lengths following the relations above. The user has the option to choose the type of magnitude to use in the regression. Usually Ml or Mb are used. All station-event combinations are used to determine simultaneously the 3 constants A, B and C. Since the data often is too bad to determine all 3 parameters at the same time, the program will also calculate just A and C using a fixed user supplied value for the distance correction to the coda. The constant dist_coff is given in the mag.par file as the second parameter under MAG_TYP_COF (see below). IN ORDER FOR THE CODA SCALE OPTION TO WORK, THE DISTANCE COEFFICIENT MUST BE DIFFERENT FROM ZERO.

Output: On the screen the constants will be printed out and a file mag_coda.out will contain pairs of values m and (log(coda) + dist_coff*dist), which can be used to plot the distance corrected coda relation. If results from the 3D is to be plotted, dist_coff must be calculated as dist_coff=B/A, put into mag.par and mag run again. On the other hand, if a best dist_cof has been found, B is calculated as B=A*dist_cod

A typical coda magnitude relation is :

\bgroup\color{black}$\displaystyle Mc = 2.0*log(coda) + 0.0035*dist - 0.87

[Lee et al., 1972]

Local magnitude Ml:
The local magnitude scale is calculated by determining an amplitude attenuation scale using amplitudes and distances in CAT file. The parameters in the Ml magnitude scale are computed for every event individually, parameters are determined as averages of all events.

For each event (only type L and R are used) a,b,c are calculated if at least 3 stations are available using least squares regression as follows:

\bgroup\color{black}$\displaystyle log(amp) = a * log(dist) + b * dist + c \index{Amplitude attenuation}\index{Quality factor}

The relation above can be derived from the standard geometrical spreading and attenuation relations:

\bgroup\color{black}$\displaystyle amp = (dist ** a) * exp(pi * f * dist/(v*q ))

where \bgroup\color{black}$ f$\egroup is the frequency, \bgroup\color{black}$ v$\egroup is the velocity and \bgroup\color{black}$ q = q0*f**qalpha$\egroup . The relation can be rewritten

\bgroup\color{black}$\displaystyle log(amp) = a * log(dist) + (pi * f * dist) /(v * q0*f**qalpha * 2.3)

Since \bgroup\color{black}$ qalpha$\egroup often is close to \bgroup\color{black}$ 1.0$\egroup , the relation can be simplified to the frequency independent relation:

\bgroup\color{black}$\displaystyle log(amp) = a * log(dist) + (pi * dist) /(v * q0 * 2.3)

If body wave spreading is assumed \bgroup\color{black}$ (a=1)$\egroup , \bgroup\color{black}$ q0=100$\egroup and \bgroup\color{black}$ v=3.5 km/sec$\egroup , the relation is

\bgroup\color{black}$\displaystyle log(amp) = 1.0 * log(dist) + 0.004 * dist

which is comparable to the relation shown below for California.

Similarly to the coda relation, a 2D relation is also calculated

\bgroup\color{black}$\displaystyle log(amp) - b*dist = a * log(dist)

where \bgroup\color{black}$ b=dist\_coff$\egroup is fixed to the value given in the mag.par file (same parameter as used for coda). This gives a more stable solution, however b = dist_coff must be determined by trial and error or fixed using known values from e.g. q-studies.

The amplitudes are assumed to be ground displacements (in SEISAN they are ground displacements highpass filtered at 1.25 Hz to resemble Wood Anderson seismograms, see MULPLT). The distance ratio between stations with the maximum distance and minimum distance must be more than 3 for the event to be selected for analysis. It is assumed that a and b will be the same for all events, while c is different (magnitude dependent). At the end, the average constants a and b are calculated of all values a and b which are not deviating too much (a must be in the range 0 to -5, hardwired). Distance attenuation coefficients a and b are supposed to be negative since amplitude decrease with distance. To get the local magnitude scale

\bgroup\color{black}$\displaystyle Ml = log(amp) - a * log(dist) - b * dist - C

the constant C must be determined by fixing the magnitude at some reference distance like the original Wood Anderson definition with \bgroup\color{black}$ Ml = 3$\egroup at \bgroup\color{black}$ dist= 100 km$\egroup and \bgroup\color{black}$ amp=1/2200 mm = 454 nm$\egroup (assuming gain of the Wood Anderson seismograph to be 2080, [Hutton and Boore, 1987]. The determination of a and b does not work well unless the observations are very good. The relation for California is [Hutton and Boore, 1987]

\bgroup\color{black}$\displaystyle Ml = log(amp) + 1.1 *log(dist) + 0.00189 * dist - 2.09

Output: On the screen the constants will be printed out and a file mag_amp.out will contain the values of a, b and c.

2: Magnitude relations and/or spectral parameter relations

Linear regression (maximum likelihood) can be made between any two magnitudes and/or spectral parameters on any of the header lines of an event in a CAT-file or a compact file. The user is interactively prompted for the magnitude type and/or spectral parameters and agencies to compare. If none is given, no magnitude comparison will be made. If several magnitudes/spectral parameters fit the requirement, the last one is used. If e.g. the first header line has a BER Ml and the last header line also has a BER Ml, the last one will be used. Maximum likelihood linear fitting is used. It is assumed that both variables have normal and correlated errors. See subroutine maxlik.for in LIB for more info.

The following parameter can be selected:

Any magnitude and agency
Seismic moment(log)
Stress drop (log)
Corner frequency (log)
Source radius(log)
Spectral decay
Omega zero level (log)

If any of the spectral parameters are selected, or moment magnitude is without agency, there will be an additional question about which station and component. A blank return means the average will be used. With these parameter selections, it is possible to compare spectral parameters from any two channels, compare the average spectral parameter with the parameter from one channel etc.

Output: A plot will be shown on the screen with the observations and the least squares fit and the values are also printed out on the screen. It is now possibel to click on any symbol to get up the correponding date and time. This facility can be used to find bad magnitides. A file mag_mag.out contains the pairs of magnitudes used.

3: Magnitude conversions

If a relation between two magnitude scales is known, e.g. by using option 2 above, an output file can be made with the converted magnitudes. The relation to use is specified in the mag.par file. Several different input magnitude types and agencies can be used and the relation-agency used is given in a priority list in the mag.par file, see example below. It is here shown that if a BER Mc is available, this will be the first choice. If no BER Mc then BER Mb will be the next choice etc. The new magnitude will have type X and agency NEW. Output: The output file is mag_new.out and has the same format as the input file. On the header line, the old magnitudes are removed and in the first magnitude position will be the converted magnitude (NEW) while in the second magnitude position, the magnitude selected for conversion will be given. The third magnitude position is blanked out. The conversion option can also be used to move magnitudes around by using a 1 to 1 relation as shown in mag.par example.

Summary of output files:

mag_amp.out : Details each event for amplitude regression.
mag_coda.out : Magnitude vs coda, see text.
mag_mag.out : Pairs of magnitudes used for regression.
mag_new.out : Events with converted magnitudes only.
mag_newa.out : All events, both converted and non converted (due to no correct input magnitude available).
mag_spec.out : Summary of normal header line, all associated magnitudes and spectral parameters.
mag_ml_inv.out : From Ml inversion

In DAT there is an example mag.par file.

Figure 35.1: Example of using the MAG program. Relation between NORSAR and Bergen local magnitudes.

An example of the mag.par parameter file:

This file is for parameters for MAG and called MAG.PAR. The name must
be in lower case on Sun. The following shows the parameters which can be set.
The file can contain any lines in any order, only the lines with 
recognized keywords and a non blank field under Par 1 will be read. The
comments have no importance. The text fields are left justified, the 
real numbers can be anywhere within the 10 columns of the parameter.
 MAGAGA is the magnitude type and agency to use for the converted magnitude.
 MAGREL gives the magnitude and agency to use for conversion e.g. LBER and
the parameters 2 and 3 gives the relationship: 

magnitude out = magnitude in * par2 + par3

The magnitude conversion uses one of the MAGREL relationships, where the
priority is in the same order as found in the list.

SCREENOUT can be (Y)ES or (N)O, indicates if a line is printed on the screen
for each event.

When doing a magnitude regression on coda or amplitude, BAD STATION indicates
stations not to be used.  MAG_TYP_COF is the magnitude type and agency to correlate 
coda readings with and the second parameter is the distance correction
term used when calculating a coda magnitude relation with a fixed distance 
term. The same parameter is also used for amplitude regression.

The input file can be either Nordic or compact Nordic, however if coda or
amplitudes are to be used, it must be NORDIC.

BAD STATION    Station not used for mag relation  BER
BAD STATION    Station not used for mag relation  XXX
BAD STATION    Station not used for mag relation  BER
MAGAGA         Magnitude type and agency, new mag XNEW
MAGREL         Mag type, agency, a,b for new mag  CBER        1.0       2.0
MAGREL         Mag type, agency, a,b for new mag  BBER        1.0       2.0
MAGREL         Mag type, agency, a,b for new mag  SBER        1.0       2.0
MAGREL         Mag type, agency, a,b for new mag  WBER        1.0       2.0
SCREENOUT      Header line printed each event     N   
MAG_TYP_COF    Mag. type for corr., dist coff.    LNAO        0.002           

next up previous contents index
Next: 36. ML inversion, MAG2 Up: SEISAN Previous: 34.4 CLUSTER:   Contents   Index
Peter Voss : Mon Feb 27 10:16:12 UTC 2017