36. MAGRES, calculate average magnitude residuals

The program MAGRES is used to calcualte average magnitude residuals for each station and component in a given data set. Currently the program only work with Nordic2 format, which has the magnitude residual in the S-file after it has been updated. So if data is in Nordic format, transfer to Nordic2 with NOR2NOR2, relocate the events and run the program. The progrsam is intended to check a data set for stations with a magnitude bias. In addition, if magnitudes are available on all 3 components, the average difference in magnitude between vertical and horizontal components, are calculated. This can be used to find if there is a bias using vertical compoent instead of horizontal component.

Below is an example:

[seismo@rick jens]$ magres
 Magnitude type: L, C, b, B, s, S or W
L
  Event data input - select one:

     SEISAN default data base or                     :Enter 
     Alternative data base, give 1-5 letter code or  :
     Local index file, name must start with index or :
     Local data base, write ,, or                    :
     Filename for one file, min. 6 chars or with a . : 

hyp.out

 2021  3 2 1955 28.1 L  34.971  22.361 3.00F TIR 15 1.4 3.9LTIR 3.7WTIR 3.8LNOA
 2021  3 3  437 15.8 L  44.994  15.893 3.00F TIR 12 .70 4.1LTIR
 2021  3 3 1016  8.4 L  39.594  22.345 10.0F TIR 16 1.8 6.3LTIR
 2021  3 3 1016  7.8 L  39.612  22.315 0.00  TIR 16 1.7 6.2LTIR 6.3STIR 6.0LNOA
 2021  3 3 1016  8.2 L  39.686  22.229 8.80  TIR 16 1.5 6.2LTIR 6.0WTIR
 2021  3 3 1016  7.3 L  39.638  22.318 0.40  TIR 12 1.0 6.2LTIR 5.9STIR 5.8WTIR
 2021  3 3 1034  7.4 L  39.681  22.278 14.1  TIR 19 1.1 4.9LTIR 4.9WTIR 4.9LNOA 
...
...
 2021  330  326  8.4 L  42.429  16.091 41.1  TIR  7 1.5 2.6LTIR 3.5WTIR
 2021  330  735 40.0 L  42.476  15.767 10.0F TIR  8 1.3 4.1LTIR 3.9WTIR
 2021  330 11 1 40.0 L  42.405  16.252 37.5  TIR  6 2.8 3.2LTIR 3.7WTIR
 2021  330 1624  8.1 L  50.842  12.937 5.10  TIR  9 1.0 5.0LTIR
 2021  331 1849 41.8 L  42.414  16.104 23.6  TIR  9 .60 3.4LTIR 3.6WTIR
End of s-file

Residuals for magnitude type L

 STAT COM      N        AV      SD
 IGT  HHZ    106      0.10    0.12
 IGT  HHN    104      0.14    0.14
 IGT  HHE    105      0.03    0.10
 SRN  HHZ    103     -0.02    0.10
 SRN  HHE     99     -0.01    0.08
 SRN  HHN    102      0.01    0.10
 THE  HHZ     94     -0.43    0.19
 THE  HHN     93     -0.35    0.19
 BERA HHE     87      0.08    0.12
 BERA HHN     87      0.10    0.13
 BERA HHZ     75     -0.08    0.27
 PHP  HHN    104      0.04    0.09
 PHP  HHZ    105     -0.14    0.14
 PHP  HHE    108      0.65    0.51
 PUK  HHN     82     -0.03    0.09
 PUK  HHZ     86     -0.39    0.13
 PUK  HHE     84      0.00    0.07
 SDA  HHZ     62     -0.10    0.14
 SDA  HHE     60     -0.11    0.13
 BCI  HHN     84      0.21    0.13
 BCI  HHE     82      0.19    0.14
 BCI  HHZ     81      0.08    0.11
 PDG  HHZ     41     -0.13    0.13
 PDG  HHN     41     -0.04    0.13
 PDG  HHE     42     -0.08    0.11
 TIR  HHN     55     -0.25    0.11
 TIR  HHE     54     -0.27    0.12
 TIR  HHZ     54     -0.37    0.13
 KBN  HHZ     95     -0.02    0.09
 KBN  HHN     93      0.14    0.11
 KBN  HHE     93      0.00    0.05
 THE  HHE     92     -0.32    0.21
 VLO  HHN     38      0.35    0.11
 VLO  HHZ     40      0.10    0.10
 VLO  HHE     38      0.29    0.13
 SDA  HHN     61     -0.07    0.12
 NEST HHZ     37      0.07    0.13
 NEST HHE     37      0.06    0.17
 NEST HHN     37      0.05    0.12
 LSK  HHZ      6      0.00    0.00
 LSK  HHE      6     -0.12    0.04
 LSK  HHN      6      0.27    0.10

Average horizontal m above m on Z for station IGT    -0.02
Average horizontal m above m on Z for station SRN     0.02
Average horizontal m above m on Z for station THE     0.10
Average horizontal m above m on Z for station BERA    0.17
Average horizontal m above m on Z for station PHP     0.48
Average horizontal m above m on Z for station PUK     0.37
Average horizontal m above m on Z for station SDA     0.01
Average horizontal m above m on Z for station BCI     0.12
Average horizontal m above m on Z for station PDG     0.07
Average horizontal m above m on Z for station TIR     0.11
Average horizontal m above m on Z for station KBN     0.09
Average horizontal m above m on Z for station VLO     0.22
Average horizontal m above m on Z for station NEST   -0.01
Average horizontal m above m on Z for station LSK     0.08

Average and sd of all  *********  0.13  0.14

 Number of events in input file or data base         119
 Number of channels with mag          42
 Number of stations with mag          14
 Number of stations with magnitudes on Z,N and E          14
 Output file name is magres.out

In the above example, N is the number of values, m the magnitude, AV is average and SD standard deviation.



Peter Voss : Tue Jun 8 13:38:42 UTC 2021