spejon.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\tomawac\spejon.f
00002 !
00048                      SUBROUTINE SPEJON
00049 !                    *****************
00050 !
00051      &( SPEC  , FREQ  , NF    , AL    , FP     , GAMMA , SIGMAA, SIGMAB,
00052      &  DEUPI , GRAVIT, E2FMIN, FPMIN )
00053 !
00054 !***********************************************************************
00055 ! TOMAWAC   V6P1                                   28/06/2011
00056 !***********************************************************************
00057 !
00058 !
00059 !
00060 !
00061 !
00062 !
00063 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00064 !| AL             |-->| PHILLIPS CONSTANT (ALPHA)
00065 !| DEUPI          |-->| 2.PI
00066 !| E2FMIN         |-->| SPECTRUM ENERGY THRESHOLD
00067 !| FP             |-->| JONSWAP SPECTRUM PEAK FREQUENCY
00068 !| FPMIN          |-->| MINIMUM PEAK FREQUENCY VALUE
00069 !| FREQ           |-->| DISCRETIZED FREQUENCIES
00070 !| GAMMA          |-->| JONSWAP SPECTRUM PEAK FACTOR
00071 !| GRAVIT         |-->| GRAVITY ACCELERATION
00072 !| NF             |-->| NUMBER OF FREQUENCIES
00073 !| SIGMAA         |-->| VALUE OF SIGMA FOR JONSWAP SPECTRUM (F<FP)
00074 !| SIGMAB         |-->| VALUE OF SIGMA FOR JONSWAP SPECTRUM (F>FP)
00075 !| SPEC           |<--| JONSWAP VARIANCE DENSITY FREQUENCY SPECTRUM
00076 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00077 !
00078       IMPLICIT NONE
00079 !
00080 !.....VARIABLES IN ARGUMENT
00081 !     """"""""""""""""""""
00082       INTEGER  NF
00083       DOUBLE PRECISION GRAVIT, SIGMAA, SIGMAB, GAMMA , DEUPI , FPMIN
00084       DOUBLE PRECISION FP    , E2FMIN, AL
00085       DOUBLE PRECISION SPEC(NF)      , FREQ(NF)
00086 !
00087 !.....LOCAL VARIABLES
00088 !     """""""""""""""""
00089       INTEGER  JF
00090       DOUBLE PRECISION COEF  , ARG1   , ARG2  , ARG3  , SIG   , FF
00091 !
00092 !
00093       IF(FP.GT.FPMIN) THEN
00094         COEF=AL*GRAVIT**2/DEUPI**4
00095         DO JF=1,NF
00096           FF=FREQ(JF)
00097           IF(FF.LT.FP) THEN
00098             SIG=SIGMAA
00099           ELSE
00100             SIG=SIGMAB
00101           ENDIF
00102           ARG1=0.5D0*((FF-FP)/(SIG*FP))**2
00103           IF (ARG1.LT.99.D0) THEN
00104             ARG1=GAMMA**EXP(-ARG1)
00105           ELSE
00106             ARG1=1.D0
00107           ENDIF
00108           ARG2=1.25D0*(FP/FF)**4
00109           IF (ARG2.LT.99.D0) THEN
00110             ARG2=EXP(-ARG2)
00111           ELSE
00112             ARG2=0.D0
00113           ENDIF
00114           ARG3=COEF/FF**5
00115           SPEC(JF)=ARG1*ARG2*ARG3
00116           IF (SPEC(JF).LT.E2FMIN) SPEC(JF)=0.D0
00117         ENDDO ! JF
00118       ELSE
00119         DO JF=1,NF
00120           SPEC(JF)=0.D0
00121         ENDDO ! JF
00122       ENDIF
00123 !
00124       RETURN
00125       END

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