Go to the documentation of this file.
95 SUBROUTINE w3snl2 ( A, CG, DEPTH, S, D )
197 REAL,
INTENT(IN) :: A(NTH,NK), CG(NK), DEPTH
198 REAL,
INTENT(OUT) :: S(NTH,NK), D(NTH,NK)
203 INTEGER :: IK, ITH, IERR = 0
205 INTEGER,
SAVE :: IENT = 0
207 REAL :: A2(NK,NTH), S2(NK,NTH), D2(NK,NTH)
209 REAL :: SOUT(NK,NK), DOUT(NK,NK)
215 CALL strace (ient,
'W3SNL2')
226 a2(ik,ith) = a(ith,ik) / cg(ik)
235 IF ( ierr .NE. 0 )
GOTO 800
241 s(ith,ik) = s2(ik,ith) * cg(ik)
242 d(ith,ik) = d2(ik,ith)
251 sout(ik,ith) = s(ik,ith) *
tpi *
sig(ik) / cg(ik)
252 dout(ik,ith) = d(ik,ith)
255 CALL prt2ds (
ndst, nk, nk, nth, sout,
sig(1:nk),
' ', 1., &
256 0.0, 0.001,
'Snl(f,t)',
' ',
'NONAME')
257 CALL prt2ds (
ndst, nk, nk, nth, dout,
sig(1:nk),
' ', 1., &
258 0.0, 0.001,
'Diag Snl',
' ',
'NONAME')
263 CALL outmat (
ndst, d, nth, nth, nk,
'Diag Snl')
276 1000
FORMAT (/
' *** WAVEWATCH III ERROR IN W3SNL2 :'/ &
277 ' xnl_main RETURN CODE NON ZERO : ',i4,
' ***'/)
280 9000
FORMAT (
' TEST W3SNL2 : IQTPE :',i4)
365 INTEGER :: IGRD, IERR
367 INTEGER,
SAVE :: IENT = 0
374 CALL strace (ient,
'INSNL2')
396 IF ( ierr .NE. 0 )
GOTO 800
408 1000
FORMAT (/
' *** WAVEWATCH III ERROR IN INSNL2 :'/ &
409 ' xnl_init RETURN CODE NON ZERO : ',i8/)
412 9000
FORMAT (
' TEST INSNL2 : NLTAIL :',f6.1/ &
416 ' NDPTHS :',i4,
' (depths follow)')
417 9001
FORMAT (
' ',5e10.3)
418 9002
FORMAT (
' FREQS :',2f8.3/ &
subroutine insnl2
Preprocessing for nonlinear interactions (Xnl).
real, dimension(:), pointer sig
real, parameter rade
RADE Conversion factor from radians to degrees.
subroutine outmat(NDS, A, MX, NX, NY, MNAME)
real, dimension(:), pointer th
subroutine xnl_init(sigma, dird, nsigma, ndir, pftail, x_grav, depth, ndepth, iquad, iqgrid, iproc, ierr)
Initialize coefficients, integration space, file i/o for computation nonlinear quadruplet wave-wave i...
real, parameter tpiinv
TPIINV Inverse of 2*Pi.
subroutine init_constants
Subroutine init_constants sets constant values.
real, dimension(:), pointer dpthnl
real, parameter tpi
TPI 2*Pi.
subroutine strace(IENT, SNAME)
subroutine w3snl2(A, CG, DEPTH, S, D)
Interface to exact interactions.
Define some much-used constants for global use (all defined as PARAMETER).
subroutine extcde(IEXIT, UNIT, MSG, FILE, LINE, COMM)
subroutine prt2ds(NDS, NFR0, NFR, NTH, E, FR, UFR, FACSP, FSC, RRCUT, PRVAR, PRUNIT, PNTNME)
Interface module to exact nonlinear interactions.
Module for computing the quadruplet interaction.
subroutine xnl_main(aspec, sigma, angle, nsig, ndir, depth, iquad, xnl, diag, iproc, ierr)
Compute nonlinear transfer for a given action density spectrum on a given sigma and direction grid (W...
real, parameter grav
GRAV Acc.