Blame view

src/initialization.f90 671 Bytes
81dede1c   Jérémy Baudry   first commit
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
subroutine initialization
use parameters

!local parameters
implicit none
	double precision, allocatable ::Gf(:),PM(:)

	allocate(Gf(nfreq))
	allocate(PM(nfreq))
	
	

!_________________________INITIAL SPECTRUM_____________________________
	E(1,1:nbin,1:nfreq)=0

	!build JONSWAP spectrum

	do i=1,nfreq 
		if (freq(i).le.freq_s) then
			sigma_s(i)=0.07
		else
			sigma_s(i)=0.09
		end if
	end do
	
	Gf=gamma_s**(exp((-(freq-freq_s)**2)/(2*sigma_s**2*freq_s**2)))
	PM=alpha_s*Hs**2*(freq_s**4/freq**5)*exp(-beta_s*(freq_s/freq)**4)

	Ei=Gf*PM

	

	E(1,1,1:nfreq)=Ei
	
!_______________________________________________________________________

end subroutine initialization