The TELEMAC-MASCARET system
trunk
sources
tomawac
preqt2.f
Go to the documentation of this file.
1
! *****************
2
SUBROUTINE
preqt2
3
! *****************
4
!
5
!***********************************************************************
6
! TOMAWAC V8P0 32/12/2018
7
!***********************************************************************
8
!
9
!brief SOURCE TERM RELATED TO NON-LINEAR INTERACTIONS
10
!+ BETWEEN FREQUENCY TRIPLETS.
11
!+ DEVELOPED FROM THE BOUSSINESQ EQUATIONS.
12
!
13
!history EDF/DER/LNH
14
!+ 11/06/98
15
!+ V5P0
16
!+
17
!
18
!history N.DURAND (HRW), S.E.BOURBAN (HRW)
19
!+ 13/07/2010
20
!+ V6P0
21
!+ Translation of French comments within the FORTRAN sources into
22
!+ English comments
23
!
24
!history N.DURAND (HRW), S.E.BOURBAN (HRW)
25
!+ 21/08/2010
26
!+ V6P0
27
!+ Creation of DOXYGEN tags for automated documentation and
28
!+ cross-referencing of the FORTRAN sources
29
!
30
!history G.MATTAROLO (EDF - LNHE)
31
!+ 23/06/2011
32
!+ V6P1
33
!+ Translation of French names of the variables in argument
34
!
35
USE
declarations_tomawac
36
USE
interface_tomawac
, ex_preqt2 =>
preqt2
37
IMPLICIT NONE
38
!
39
!.....VARIABLES FROM MODULE TOMAWAC
40
! """""""""""""""""""""""""""""
41
!| QINDI |<--| CONFIGURATION INDEX
42
!| NBD |-->| NUMBER OF TRIAD CONFIGURATIONS
43
!| BDISPB |-->| LOWER DIRECTIONAL BOUND. OF SPB TRIAD MODEL
44
!| BDSSPB |-->| UPPER DIRECTIONAL BOUND. OF SPB TRIAD MODEL
45
!| KSPB |-->| COEFFICIENT K OF SPB TRIAD INTERACTION MODEL
46
47
!
48
!.....LOCAL VARIABLES
49
! """""""""""""""""
50
INTEGER
IPL
51
DOUBLE PRECISION
AP2 , DTETA
52
!
53
INTEGER
NBPL , NBPU, NB1
54
!
55
! """"""""""""""""""""""""""""""""""""""""""""""""""""""""""
56
IF
(.NOT.
deja_qt2
)
THEN
57
ALLOCATE
(
qindi
(
ndire
))
58
deja_qt2
=.true.
59
ENDIF
60
!
61
dteta =
teta
(2)-
teta
(1)
62
IF
(
bdsspb
.GE.
bdispb
)
THEN
63
ap2 = (
bdispb
-
teta
(1))/dteta
64
nbpl = nint(ap2) + 1
65
ap2 = (
bdsspb
-
teta
(1))/dteta
66
nbpu = nint(ap2)
67
nbd
=nbpu-nbpl+1
68
DO
ipl=1,
nbd
69
qindi
(ipl)=nbpl+ipl-1
70
END DO
71
ELSE
72
ap2 = (
bdsspb
-
teta
(1))/dteta
73
nbpu = nint(ap2) + 1
74
ap2 = (
bdispb
-
teta
(1))/dteta
75
nbpl = nint(ap2)
76
IF
(nbpl.GT.
ndire
)
THEN
77
nbpl = 1
78
qindi
(1) = 1
79
nbd
= nbpu - nbpl + 1
80
DO
ipl = 2,
nbd
81
qindi
(ipl)=ipl
82
END DO
83
ELSE
84
nb1 =
ndire
- nbpl + 1
85
nbd
= nb1 + nbpu
86
DO
ipl = 1,nb1
87
qindi
(ipl)=nbpl+ipl-1
88
END DO
89
DO
ipl = 1,nbpu
90
qindi
(ipl+nb1)=ipl
91
END DO
92
ENDIF
93
ENDIF
94
!
95
RETURN
96
END
declarations_tomawac::nbd
integer nbd
Definition:
declarations_tomawac.f:565
declarations_tomawac::teta
double precision, dimension(:), pointer teta
Definition:
declarations_tomawac.f:1100
declarations_tomawac::bdsspb
double precision bdsspb
Definition:
declarations_tomawac.f:577
declarations_tomawac
Definition:
declarations_tomawac.f:3
declarations_tomawac::ndire
integer ndire
Definition:
declarations_tomawac.f:225
preqt2
subroutine preqt2
Definition:
preqt2.f:4
declarations_tomawac::qindi
integer, dimension(:), allocatable qindi
Definition:
declarations_tomawac.f:579
declarations_tomawac::bdispb
double precision bdispb
Definition:
declarations_tomawac.f:573
declarations_tomawac::deja_qt2
logical deja_qt2
Definition:
declarations_tomawac.f:580
interface_tomawac
Definition:
interface_tomawac.f:5