-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathtravel_times.f90
49 lines (39 loc) · 1.23 KB
/
travel_times.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
!
! $Id:$
!
!----------------------------------------------------------------------
! Code that uses the libtau library to output arrival times for phases
!----------------------------------------------------------------------
subroutine ttimes(dist_deg,depth,nphases,names,times)
implicit none
integer, parameter :: MAX_PHASES=60
real, intent(in) :: dist_deg, depth
integer, intent(out) :: nphases
character*8, dimension(*), intent(out) :: names
double precision, dimension(*), intent(out) :: times
! legacy variables needed to use the libtau routines
logical prnt(3)
character*8 phlst(10)
real usrc(2)
real, dimension(MAX_PHASES) :: dtdd,dtdh,dddp
real, dimension(MAX_PHASES) :: times_sngl
character*262 modnam
character*256 iaspmod
! ask for all phases
phlst(1)="all"
prnt(1)=.false.
prnt(2)=.false.
prnt(3)=.false.
call getenv('IASPMODEL', iaspmod)
if (trim(iaspmod) == '') then
modnam='iasp91'
else
modnam=iaspmod
endif
call tabin(1,modnam)
call brnset(1,phlst,prnt)
call depset(depth,usrc)
call trtm(dist_deg,MAX_PHASES,nphases,times_sngl,dtdd,dtdh,dddp,names)
times(1:nphases) = dble(times_sngl(1:nphases))
!write(*,*) 'Found ', nphases, ' phases:'
end subroutine ttimes