attenuation.f90 1.89 KB
Newer Older
Jérémy Baudry's avatar
Jérémy Baudry committed
1

2
!____________________________________________________________________________
Jérémy Baudry's avatar
Jérémy Baudry committed
3
4


5
6
7
8
                        !DESCRIPTION: In this routine, the attenuation
                        !coefficient is calculated according Kohout and
                        !Meylan (2008) and the spectrum attenuation is
                        !computed.
Jérémy Baudry's avatar
Jérémy Baudry committed
9

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
!____________________________________________________________________________



                        !INTERFACE:
                        subroutine attenuation

                        !USES:
                        use parameters

                        implicit none

                        double precision :: q11,q12,q13,q14,q15,q21,q22,q23,q24,q25
                        double precision :: q31,q32,q33,q34,q35
                        double precision, allocatable :: p1(:),p2(:),p3(:)
                        double precision, allocatable :: att(:)

                        allocate(p1(nfreq))
                        allocate(p2(nfreq))
                        allocate(p3(nfreq))
                        allocate(att(nfreq))

!____________________________________________________________________________
Jérémy Baudry's avatar
Jérémy Baudry committed
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

q11 = -0.00000777
q12 =  0.00032080
q13 = -0.00437542
q14 =  0.02047559
q15 = -0.01356537

q21 =  0.00003635
q22 = -0.00153484
q23 =  0.02121709
q24 = -0.09289399
q25 = -0.03693082

q31 = -0.00004509
q32 =  0.00214484
q33 = -0.03663425
q34 =  0.26065369
q35 = -0.62474085

p1 = q11*T**4 + q12*T**3 + q13*T**2 + q14*T + q15
p2 = q21*T**4 + q22*T**3 + q23*T**2 + q24*T + q25
p3 = q31*T**4 + q32*T**3 + q33*T**2 + q34*T + q35

alpha(i,1:nfreq)=-1*(p1*h(i)**2 + p2*h(i) + p3)
do j=1,nfreq
if (alpha(i,j).lt.0)then
Jérémy Baudry's avatar
Jérémy Baudry committed
59
alpha(i,j)=0d0
Jérémy Baudry's avatar
Jérémy Baudry committed
60
61
62
end if
end do

63

Jérémy Baudry's avatar
Jérémy Baudry committed
64
att=C_ice(i)*alpha(i,1:nfreq)/(Dave(i)+3e-14)
Jérémy Baudry's avatar
Jérémy Baudry committed
65

66
S_ice(n,i,1:nfreq)=-att*E(n,i,1:nfreq)
Jérémy Baudry's avatar
Jérémy Baudry committed
67
68
69
70

E(n,i,1:nfreq)=E(n,i,1:nfreq)*exp(-att*Cg*dt)


71
!_____________________________________________________________________________
Jérémy Baudry's avatar
Jérémy Baudry committed
72
73

end subroutine attenuation