-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathflexwin.f90
55 lines (43 loc) · 1.33 KB
/
flexwin.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
!----------------------------------------------------
program flexwin
use seismo_variables
implicit none
character*120, dimension (1000):: basename
character*240, dimension (1000):: obs_name, syn_name
integer :: n_seis, i
integer :: ier
! read the parameter file
call read_parameter_file()
write(*,*) 'Number of seismograms to measure : '
read(*,*) n_seis
write(*,*) n_seis
write(*,*) 'For each seismogram: '
do i = 1, n_seis
write(*,*) 'Observed seismogram'
read(*,'(a)') obs_name(i)
write(*,'(a)') trim(obs_name(i))
write(*,*) 'Synthetic seismogram'
read(*,'(a)') syn_name(i)
write(*,'(a)') trim(syn_name(i))
write(*,*) 'Output basename'
read(*,'(a)') basename(i)
write(*,'(a)') trim(basename(i))
if (DEBUG) write(*,*) 'DEBUG : reading sac files'
call read_sac_files(syn_name(i),obs_name(i),ier)
if( ier /= 0 ) then
write(*,*) 'error files read in:',trim(syn_name(i))
write(*,*) 'skipping files'
cycle
endif
if (DEBUG) write(*,*) 'DEBUG : selecting windows'
call select_windows_stalta2()
if(MAKE_SEISMO_PLOTS) then
if (DEBUG) write(*,*) 'DEBUG : writing output seismos'
call write_seismos_gmt(basename(i))
endif
if(MAKE_WINDOW_FILES) then
if (DEBUG) write(*,*) 'DEBUG : writing mt input'
call write_mt_input_2(basename(i),obs_name(i),syn_name(i))
endif
enddo
end program flexwin