-
Notifications
You must be signed in to change notification settings - Fork 0
/
assign_parameter.f90
84 lines (71 loc) · 2.44 KB
/
assign_parameter.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
!! define intermediate parameters for the visco-acoustic propagator!!
! Coded by : Peng Guo
! Date : January 2014
! Language : Fortran 90
! Copyright: Center for Lithospheric Studies
! The University of Texas at Dallas, 2014
! TOTAL E&P USA, 2014
! updated, July 2016
! --------------------------------------------------------------------
subroutine assign_parameter(nx,nz,lv,nrel,deltat,&
tau11_eps,tau11,tau11_new,tau_sigma,x1,x2,&
c11_r,dens,c11_u)
implicit none
integer::nx,nz,lv,nrel
integer::i,j,l
integer,parameter::dp=kind(0.e0)
real(dp)::tau11_eps(1:nrel,1:nx,1:nz),tau11_eps_tmp(1:nrel,1:nx,1:nz)
real(dp)::tau11(1:nrel,1:nx,1:nz),tau11_new(1:nrel,1:nx,1:nz)
real(dp)::tau11_sum(1:nx,1:nz)
real(dp)::tau_sigma(1:nrel,1:nx,1:nz),tau_sigma_tmp(1:nrel,1:nx,1:nz)
real(dp),dimension(1:nrel,1:nx,1:nz)::x1,x2
real(dp)::c11_u(1:nx,1:nz),c11_r(1:nx,1:nz)
real(dp)::dens(1:nx,1:nz)
real(dp)::deltat
do i=1,nx
do j=1,nz
do l=1,nrel
tau11_eps_tmp(l,i,j)=tau11_eps(l,i,j)/tau_sigma(l,i,j)-1.0
enddo
enddo
enddo
do i=1,nx
do j=1,nz
do l = 1, nrel
tau_sigma_tmp(l,i,j) = 1.0/tau_sigma(l,i,j)
enddo
enddo
enddo
do i=1,nx
do j=1,nz
do l=1,nrel
x1(l,i,j)=1.0/(1.0 + deltat*0.50*tau_sigma_tmp(l,i,j))
x2(l,i,j)=1.0 - deltat*0.50*tau_sigma_tmp(l,i,j)
enddo
enddo
enddo
tau11_sum=0.0
do i=1,nx
do j=1,nz
do l = 1, nrel
tau11_sum(i,j) = tau11_sum(i,j) + tau11_eps_tmp(l,i,j)
enddo
enddo
enddo
do i=1,nx
do j=1,nz
c11_u(i,j)=c11_r(i,j)*(1.0+1.0/real(nrel)*tau11_sum(i,j))
enddo
enddo
do j=1,nz
do i=1,nx
do l=1,nrel
tau11(l,i,j) = - tau11_eps_tmp(l,i,j)*c11_r(i,j)/real(nrel)&
* tau_sigma_tmp(l,i,j)*deltat
tau11_new(l,i,j) = tau11_eps_tmp(l,i,j)*c11_r(i,j)/real(nrel)
enddo
! Store unrelaxed modulii in their variables and include dt
c11_u(i,j) = - c11_u(i,j)*deltat
enddo
enddo
end