-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwwm_snl4_wrt.F90
127 lines (127 loc) · 3.66 KB
/
wwm_snl4_wrt.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
!----------------------------------------------------------------------
subroutine wwmquad_wrt (aquad,sigma,dir,ndir,nsig,depth,iquad,xnl,diag,ierr)
!----------------------------------------------------------------------
!
! +-------+ ALKYON Hydraulic Consultancy & Research
! | | Gerbrant Ph. van Vledder
! | +---+
! | | +---+ Last update: 9 September 2002
! +---+ | | Release: 1.0
! +---+
!
! +--------+ +-+ +-+ +------+ Unversity of Technology Darmstadt
! | | | | | | |+--+ | Institute for Hydraulic Engineering and Water Resources Managment
! +--| |--+ | | | | || | |
! | | | | | | || | | Aaron Roland
! | | | +---+ | |+--+ |
! +--+ +-------+ +------+ Last update: 29.12.2005
!
use serv_xnl4v5
use m_xnldata
!
implicit none
!-----------------------------------------------------------------------------------
!
! 0. Update history
!
! 29/12/2005 Implementation in the WindWaveModel, Aaron Roland, Vrdnik, Yugoslawija
!
! 1. Purpose:
!
! interface with WWM model to compute nonlinear transfer for
! given action density spectrum
!
! 2. Method
!
! Resio/Tracy deep water geometric scaling
! Rewritten by Gerbrant van Vledder
!
! 3. Parameter list:
!
! Type I/O Name Description
!----------------------------------------------------------------------------------
integer, intent(in) :: ndir ! number of directions
integer, intent(in) :: nsig ! number of sigma values in array
integer, intent(in) :: iquad ! method of computing nonlinear quadruplet interactions
!
real(rkind), intent(in) :: aquad(nsig,ndir) ! action density spectrum as a function of (sigma,dir)
real(rkind), intent(in) :: sigma(nsig) ! Intrinsic frequencies
real(rkind), intent(in) :: dir(ndir) ! directions in radians
real(rkind), intent(in) :: depth ! local depth
!
!
integer, intent(out):: ierr ! Error indicator. If no errors are detected IERR=0
!
real(rkind), intent(out) :: xnl(nsig,ndir) ! transfer rate dA/dt(sigma,dir)
real(rkind), intent(out) :: diag(nsig,ndir) ! diagonal term (dXnl/dA)
! ! a certain exact method (sigma,dir)
!--------------------------------------------------------------------------------------------------
!
! 4. Error messages
!
! An error message is produced within the QUAD system.
! If no errors are detected ierror = 0
! 1, incorrect iquad
!
! 5. Called by
!
! Program XNLTEST4
!
! 6. Subroutines used
!
! 7. Remarks
!
! Old swan call routine ... rewritten by Aaron Roland
!
! 8. Structure
!
! 9. Switches
!
! 10. Source code
!------------------------------------------------------------------------------
! Local parameters
!
integer iproc ! processor number for MPI and file naming
!
!------------------------------------------------------------------------------
!
! initialisations
!
ierr = 0
diag = 0.
!
! check value of iquad
!
! iquad = 1 ! deep water transfer
! iquad = 2 ! deep water transfer with WAM depth scaling
! iquad = 3 ! finite depth transfer
!
if (iquad .lt. 1 .or. iquad .gt. 3) then
ierr = 1
end if
!
xnl = 0.
diag = 0.
iproc = 0
!
!
!WRITE (*,*) 'WALOC'
!WRITE (*,*) aquad
!WRITE (*,*) 'SIGMA'
!WRITE (*,*) sigma
!WRITE (*,*) 'SPDIR'
!WRITE (*,*) dir
!WRITE (*,*) 'nsig & ndir'
!WRITE (*,*) nsig, ndir
!WRITE (*,*) 'dep'
!WRITE (*,*) depth
!WRITE (*,*) 'iquad'
!WRITE (*,*) iquad
!WRITE (*,*) 'iproc'
!WRITE (*,*) iproc
!WRITE (*,*) 'ierr'
!WRITE (*,*) ierr
!
call xnl_main(aquad,sigma,dir,nsig,ndir,depth,iquad,xnl,diag,iproc,ierr)
!
end subroutine