forked from jwookey/sheba
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sheba_config.f90
114 lines (88 loc) · 4.06 KB
/
sheba_config.f90
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
!===============================================================================
! S H E B A - Shear-wave Birefringence Analysis
!===============================================================================
! This software is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
!===============================================================================
!
! James Wookey, School of Earth Sciences, University of Bristol
!
!=======================================================================
module sheba_config ! Utility module for F90/95 for SAC files
!=======================================================================
implicit none
! * data structure definition
type sheba_config_type
! * filename of input traces
character (len=50) :: fname_base
! * filename extensions
character (len=3) :: comp(3)
! * cluster analysis specific stuff
integer :: nwindbeg, nwindend
! * shear-wave splitting mode (0=trans. ener. 1=eigenvalue)
integer :: imode
real :: source_pol ! required for transverse energy min.
! * tlag_scale
real :: max_tlag
! * pre-analysis station correction
integer :: iuma_corr
real :: uma_dt, uma_phi
! * Useful?
real :: input_h1_pol
! ** post-analysis correction (source-side anisotropy)
integer :: i_src_corr
real :: src_tlag, src_fast
! ** pre-analysis ABC rotation (unused option)
integer :: i_rotate_to_ABC
real :: slw
! ** window selection mode (new in SHEBA 2008)
integer :: WindowSelectionMode
! ** Cluster analysis parameters, hardwired
real :: dtlag_max
real :: dfast_max
real :: fast_scale
integer :: min_pts_per_cluster
integer :: max_no_clusters
! ** ordering
integer :: iorder(3)
! ** no Z mode
logical :: no_Z_mode
end type sheba_config_type
! * data structure for various config flags
type (sheba_config_type),public,save :: config
! * useful stuff
integer, parameter :: iulog = 8 ! logfile unit number
! * maths constants and other useful things
real*8, parameter :: pi = 3.141592653589793238462643d0 ;
real*8, parameter :: to_rad = 1.74532925199433D-002 ;
real*8, parameter :: to_deg = 57.2957795130823d0 ;
real*4, parameter :: angtol = 0.001 ; ! angle comparison tol.
real*8, parameter :: to_km = 111.194926644559 ;
real*8, parameter :: close_to_zero = 1e-6 ;
real*8, parameter :: close_to_one = 0.999999 ;
! ** default mts reference frame setting (affects .mts output only)
character (len=3), parameter :: mts_frame = 'geo'
CONTAINS
!===============================================================================
subroutine sheba_config_init()
!===============================================================================
!
! Set the date and time in a SAC object
!
implicit none
! ** Cluster analysis parameters, hardwired
config % dtlag_max = 2.0
config % dfast_max = 20.0
config % fast_scale = 90.0
config % min_pts_per_cluster = 5
config % max_no_clusters = 5
config % WindowSelectionMode = 1
return
end subroutine sheba_config_init
!===============================================================================
!=======================================================================
end module sheba_config
!=======================================================================
! END OF sheba_config module
!=======================================================================