wpower.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\tomawac\wpower.f
00002 !
00069                      SUBROUTINE WPOWER
00070 !                    *****************
00071 !
00072      &( POWER , F     , FREQ  , DFREQ , CG    , TAILF , NF    , NPLAN ,
00073      &  NPOIN2, ROEAU )
00074 !
00075 !***********************************************************************
00076 ! TOMAWAC   V6P1                                   29/06/2011
00077 !***********************************************************************
00078 !
00079 !
00080 !
00081 !
00082 !
00083 !
00084 !
00085 !
00086 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00087 !| CG             |-->| DISCRETIZED GROUP VELOCITY
00088 !| DFREQ          |-->| FREQUENCY STEPS BETWEEN DISCRETIZED FREQUENCIES
00089 !| F              |-->| VARIANCE DENSITY DIRECTIONAL SPECTRUM
00090 !| FREQ           |-->| DISCRETIZED FREQUENCIES
00091 !| GRAVIT         |-->| GRAVITY ACCELERATION
00092 !| NF             |-->| NUMBER OF FREQUENCIES
00093 !| NPLAN          |-->| NUMBER OF DIRECTIONS
00094 !| NPOIN2         |-->| NUMBER OF POINTS IN 2D MESH
00095 !| POWER          |<--| WAVE POWER PER METER ALONG WAVE CREST
00096 !| ROEAU          |-->| WATER DENSITY
00097 !| TAILF          |-->| FACTEUR DE QUEUE DU SPECTRE
00098 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00099 !
00100       USE DECLARATIONS_TOMAWAC, ONLY : DEUPI,GRAVIT
00101 !
00102       IMPLICIT NONE
00103 !
00104 !.....VARIABLES IN ARGUMENT
00105 !     """"""""""""""""""""
00106       INTEGER          NF    , NPLAN , NPOIN2
00107       DOUBLE PRECISION TAILF , POWER(NPOIN2), FREQ(NF), DFREQ(NF)
00108       DOUBLE PRECISION F(NPOIN2,NPLAN,NF), CG(NPOIN2,NF)
00109       DOUBLE PRECISION ROEAU
00110 !
00111 !.....LOCAL VARIABLES
00112 !     """""""""""""""""
00113       INTEGER          IP    , JP    , JF
00114       DOUBLE PRECISION AUX1  , DTETAR, ROGER
00115 !
00116 !
00117       DTETAR=DEUPI/DBLE(NPLAN)
00118       ROGER=ROEAU*GRAVIT/1000.D0
00119       DO IP=1,NPOIN2
00120         POWER(IP)=0.D0
00121       ENDDO
00122 !
00123 !-----C-------------------------------------------------------C
00124 !-----C  SUMS UP THE DISCRETISED PART OF THE SPECTRUM         C
00125 !-----C-------------------------------------------------------C
00126       DO JF=1,NF
00127         AUX1=DFREQ(JF)*DTETAR
00128         DO JP=1,NPLAN
00129           DO IP=1,NPOIN2
00130             POWER(IP) = POWER(IP) + F(IP,JP,JF)*CG(IP,JF)*AUX1
00131           ENDDO
00132         ENDDO
00133       ENDDO
00134 !
00135 !-----C-------------------------------------------------------------C
00136 !-----C  TAKES THE HIGH FREQUENCY PART INTO ACCOUNT (OPTIONAL)      C
00137 !-----C-------------------------------------------------------------C
00138 !
00139       IF(TAILF.GT.1.D0) THEN
00140         AUX1=DTETAR*GRAVIT/(2.D0*DEUPI*TAILF)
00141         DO JP=1,NPLAN
00142           DO IP=1,NPOIN2
00143             POWER(IP)=POWER(IP) + F(IP,JP,NF)*AUX1
00144           ENDDO
00145         ENDDO
00146       ENDIF
00147 !
00148 !-----C-------------------------------------------------------------C
00149 !-----C  CONVERTS TO KW/M  (MULTIPLIES BY RO.G/1000)                C
00150 !-----C-------------------------------------------------------------C
00151 !
00152       DO IP=1,NPOIN2
00153         POWER(IP)=POWER(IP)*ROGER
00154       ENDDO
00155 !
00156       RETURN
00157       END

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