fremoy.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\tomawac\fremoy.f
00002 !
00068                      SUBROUTINE FREMOY
00069 !                    *****************
00070 !
00071      &(FMOY,F,FREQ,DFREQ,TAILF,NF,NPLAN,NPOIN2,AUX1,AUX2)
00072 !
00073 !***********************************************************************
00074 ! TOMAWAC   V6P1                                   15/06/2011
00075 !***********************************************************************
00076 !
00077 !
00078 !
00079 !
00080 !
00081 !
00082 !
00083 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00084 !| AUX1           |<->| WORK TABLE
00085 !| AUX2           |<->| WORK TABLE
00086 !| DFREQ          |-->| FREQUENCY STEPS BETWEEN DISCRETIZED FREQUENCIES
00087 !| F              |-->| VARIANCE DENSITY DIRECTIONAL SPECTRUM
00088 !| FMOY           |<--| MEAN FREQUENCIES F-10
00089 !| FREQ           |-->| DISCRETIZED FREQUENCIES
00090 !| NF             |-->| NUMBER OF FREQUENCIES
00091 !| NPLAN          |-->| NUMBER OF DIRECTIONS
00092 !| NPOIN2         |-->| NUMBER OF POINTS IN 2D MESH
00093 !| TAILF          |-->| SPECTRUM QUEUE FACTOR
00094 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00095 !
00096       USE DECLARATIONS_TOMAWAC, ONLY : DEUPI
00097 !
00098       IMPLICIT NONE
00099 !
00100 !.....VARIABLES IN ARGUMENT
00101 !     """"""""""""""""""""
00102       INTEGER  NF    , NPLAN , NPOIN2
00103       DOUBLE PRECISION TAILF
00104       DOUBLE PRECISION F(NPOIN2,NPLAN,NF)
00105       DOUBLE PRECISION FREQ(NF), DFREQ(NF), FMOY(NPOIN2)
00106       DOUBLE PRECISION AUX1(NPOIN2), AUX2(NPOIN2)
00107 !
00108 !.....LOCAL VARIABLES
00109 !     """""""""""""""""
00110       INTEGER  JP    , JF    , IP
00111       DOUBLE PRECISION SEUIL , DTETAR, AUX3  , AUX4
00112 !
00113 !
00114       SEUIL = 1.D-20
00115       DTETAR= DEUPI/DBLE(NPLAN)
00116       DO IP = 1,NPOIN2
00117         AUX1(IP) = 0.D0
00118         AUX2(IP) = 0.D0
00119       ENDDO
00120 !
00121 !-----C-------------------------------------------------------C
00122 !-----C SUMS UP THE CONTRIBUTIONS FOR THE DISCRETISED PART OF THE SPECTRUM     C
00123 !-----C-------------------------------------------------------C
00124       DO JF = 1,NF-1
00125         AUX3=DTETAR*DFREQ(JF)
00126         AUX4=AUX3/FREQ(JF)
00127         DO JP = 1,NPLAN
00128           DO IP=1,NPOIN2
00129             AUX1(IP) = AUX1(IP) + F(IP,JP,JF)*AUX3
00130             AUX2(IP) = AUX2(IP) + F(IP,JP,JF)*AUX4
00131           ENDDO ! IP
00132         ENDDO ! JP
00133       ENDDO ! JF
00134 !
00135 !-----C-------------------------------------------------------------C
00136 !-----C (OPTIONALLY) TAKES INTO ACCOUNT THE HIGH-FREQUENCY PART     C
00137 !-----C-------------------------------------------------------------C
00138       IF (TAILF.GT.1.D0) THEN
00139         AUX3=DTETAR*(DFREQ(NF)+FREQ(NF)/(TAILF-1.D0))
00140         AUX4=DTETAR*(DFREQ(NF)/FREQ(NF)+1.D0/TAILF)
00141       ELSE
00142         AUX3=DTETAR*DFREQ(NF)
00143         AUX4=AUX3/FREQ(NF)
00144       ENDIF
00145       DO JP = 1,NPLAN
00146         DO IP=1,NPOIN2
00147           AUX1(IP) = AUX1(IP) + F(IP,JP,NF)*AUX3
00148           AUX2(IP) = AUX2(IP) + F(IP,JP,NF)*AUX4
00149         ENDDO ! IP
00150       ENDDO ! JP
00151 !
00152 !-----C-------------------------------------------------------------C
00153 !-----C COMPUTES THE MEAN FREQUENCY                                 C
00154 !-----C-------------------------------------------------------------C
00155       DO IP=1,NPOIN2
00156         IF (AUX1(IP).LT.SEUIL) THEN
00157           FMOY(IP) = SEUIL
00158         ELSE
00159           FMOY(IP) = AUX1(IP)/AUX2(IP)
00160         ENDIF
00161       ENDDO ! IP
00162 !
00163       RETURN
00164       END

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