prenl1.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\tomawac\prenl1.f
00002 !
00072                      SUBROUTINE PRENL1
00073 !                    *****************
00074 !
00075      &( IANGNL, COEFNL, NPLAN , NF    , RAISF , XLAMD )
00076 !
00077 !***********************************************************************
00078 ! TOMAWAC   V6P1                                   22/06/2011
00079 !***********************************************************************
00080 !
00081 !
00082 !
00083 !reference  HASSELMANN S., HASSELMANN K. ET AL.(1985) :
00084 !+                     "COMPUTATIONS AND PARAMETERIZATIONS OF THE NONLINEAR
00085 !+                      ENERGY TRANSFER IN GRAVITY-WAVE SPECTRUM. PART1 :
00086 !+                      A NEW METHOD FOR EFFICIENT COMPUTATION OF THE EXACT
00087 !+                      NON-LINEAR TRANSFER INTEGRAL". JPO, VOL 15, PP 1369-1377.
00088 !reference    HASSELMANN S., HASSELMANN K. ET AL.(1985) :
00089 !+                     "COMPUTATIONS AND PARAMETERIZATIONS OF THE NONLINEAR
00090 !+                      ENERGY TRANSFER IN GRAVITY-WAVE SPECTRUM. PART2 :
00091 !+                      PARAMETERIZATIONS OF THE NONLINEAR ENERGY TRANSFER
00092 !+                      FOR APPLICATION IN WAVE MODELS". JPO, VOL 15, PP 1378-1391.
00093 !
00094 !
00095 !
00096 !
00097 !
00098 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00099 !| COEFNL         |<--| COEFFICIENTS USED FOR DIA METHOD
00100 !| IANGNL         |<--| ANGULAR INDICES TABLE
00101 !| NF             |-->| NUNMBER OF FREQUENCIES
00102 !| NPLAN          |-->| NUMBER OF DIRECTIONS
00103 !| RAISF          |-->| FREQUENTIAL RATIO
00104 !| XLAMD          |-->| DIA STANDARD CONFIGURATION LAMBDA COEFFICIENT
00105 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00106 !
00107       USE INTERFACE_TOMAWAC, EX_PRENL1 => PRENL1
00108       IMPLICIT NONE
00109 !
00110 !.....VARIABLES IN ARGUMENT
00111 !     """""""""""""""""""""
00112       INTEGER  NPLAN , NF
00113       INTEGER  IANGNL(NPLAN,8)
00114       DOUBLE PRECISION RAISF , XLAMD
00115       DOUBLE PRECISION COEFNL(16)
00116 !
00117 !.....LOCAL VARIABLES
00118 !     """"""""""""""""""
00119       INTEGER  JP
00120       DOUBLE PRECISION DELTA1, DELTA2, DTMOIN, DTPLUS, DTETAD
00121       DOUBLE PRECISION APLUS , AMOIN , BPLUS , BMOIN , FPLUS , FMOIN
00122 !
00123       INTRINSIC LOG,DBLE,INT
00124 !
00125 !=====C---------------------------------------------------C
00126 !  1  C COMPUTATIONS RELATED TO ANGULAR INTERPOLATION     C
00127 !=====C---------------------------------------------------C
00128 !
00129 !.....1.1 DETERMINES RESONANT DIRECTIONS
00130 !         (WITH THE CONVENTION  0
00131 !     """""""""""""""""""""""""""""""""""""""""""""
00132       CALL  ANGLES( XLAMD , DTPLUS, DTMOIN)
00133 !
00134 !.....1.2 DETERMINES ANGULAR INDICES FOR THE 'STANDARD' CONFIGURATION
00135 !         (CORRESPONDING TO (-DTPLUS,DTMOIN))
00136 !     """"""""""""""""""""""""""""""""""""""""""""""""""""""""
00137       DELTA1=-DTPLUS
00138       DELTA2= DTMOIN
00139       DO JP=1,NPLAN
00140         CALL INTANG( IANGNL(JP,2) , IANGNL(JP,1) , JP , NPLAN , DELTA1)
00141         CALL INTANG( IANGNL(JP,3) , IANGNL(JP,4) , JP , NPLAN , DELTA2)
00142       ENDDO ! JP
00143 !
00144 !.....1.3 DETERMINES ANGULAR INDICES FOR THE 'IMAGE' CONFIGURATION
00145 !         (CORRESPONDING TO (DTPLUS,-DTMOIN))
00146 !     """""""""""""""""""""""""""""""""""""""""""""""""""""
00147       DELTA1= DTPLUS
00148       DELTA2=-DTMOIN
00149       DO JP=1,NPLAN
00150         CALL INTANG( IANGNL(JP,5) , IANGNL(JP,6) , JP , NPLAN , DELTA1)
00151         CALL INTANG( IANGNL(JP,8) , IANGNL(JP,7) , JP , NPLAN , DELTA2)
00152       ENDDO ! JP
00153 !
00154 !.....1.4 DETERMINES COEFFICIENTS OF ANGULAR INTERPOLATION
00155 !     """""""""""""""""""""""""""""""""""""""""""
00156       DTETAD=360.D0/DBLE(NPLAN)
00157       APLUS=DTPLUS/DTETAD-DBLE(INT(DTPLUS/DTETAD))
00158       AMOIN=DTMOIN/DTETAD-DBLE(INT(DTMOIN/DTETAD))
00159 !
00160 !
00161 !=====C---------------------------------------------------C
00162 !  2  C COMPUTATIONS RELATED TO FREQUENCY INTERPOLATION   C
00163 !=====C---------------------------------------------------C
00164       FPLUS=LOG(1.D0+XLAMD)/LOG(RAISF)
00165       FMOIN=LOG(1.D0-XLAMD)/LOG(RAISF)
00166       BPLUS=(RAISF**(FPLUS-INT(FPLUS)     )-1.D0)/(RAISF-1.D0)
00167       BMOIN=(RAISF**(FMOIN-INT(FMOIN)+1.D0)-1.D0)/(RAISF-1.D0)
00168 !
00169 !
00170 !=====C---------------------------------------------------C
00171 !  3 C ASSIGNS THE COEFFICIENTS FOR QNLIN1                C
00172 !=====C---------------------------------------------------C
00173       COEFNL( 1)=(1.D0-APLUS) * (1.D0-BPLUS)
00174       COEFNL( 2)=      APLUS  * (1.D0-BPLUS)
00175       COEFNL( 3)=(1.D0-APLUS) *       BPLUS
00176       COEFNL( 4)=      APLUS  *       BPLUS
00177       COEFNL( 5)=(1.D0-AMOIN) * (1.D0-BMOIN)
00178       COEFNL( 6)=      AMOIN  * (1.D0-BMOIN)
00179       COEFNL( 7)=(1.D0-AMOIN) *       BMOIN
00180       COEFNL( 8)=      AMOIN  *       BMOIN
00181       COEFNL( 9)=FPLUS
00182       COEFNL(10)=FMOIN
00183       COEFNL(11)=1.D0/(1.D0+XLAMD)**4
00184       COEFNL(12)=1.D0/(1.D0-XLAMD)**4
00185       COEFNL(13)=DBLE(1)
00186       COEFNL(14)=DBLE(NF+INT(1.D0-FMOIN))
00187 !
00188       RETURN
00189       END

Generated on Fri Aug 31 2013 18:12:58 by S.E.Bourban (HRW) using doxygen 1.7.0