bord_tide_misc.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\telemac2d\bord_tide_misc.f
00002 !
00056                      SUBROUTINE BORD_TIDE_MISC
00057 !                    *************************
00058 !
00059      &(ZF,NBOR,LIHBOR,LIUBOR,NPOIN,NPTFR,TEMPS,DT,NCOTE,NVITES,
00060      & NUMLIQ,KENT,KENTU,NOMIMP,TIDALTYPE,CTIDE,MSL,
00061      & CTIDEV,NODALCORR,NFOT,
00062      & BOUNDARY_COLOUR,HBTIDE,UBTIDE,VBTIDE,NUMTIDE,ICALHW,
00063      & MARDAT,MARTIM)
00064 !
00065 !***********************************************************************
00066 ! TELEMAC2D   V7P0                                   08/01/2014
00067 !***********************************************************************
00068 !
00069 !
00070 !
00071 !
00072 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00073 !| BOUNDARY_COLOUR|-->| AN INTEGER LINKED TO BOUNDARY POINTS
00074 !|                |   | BY DEFAULT THE LAST LINE OF BOUNDARY CONDITIONS
00075 !|                |   | FILE, HENCE THE GLOBAL BOUNDARY NUMBER, BUT CAN
00076 !|                |   | BE CHANGED BY USER.
00077 !| CTIDE          |-->| COEFFICIENT TO CALIBRATE THE TIDAL RANGE
00078 !| CTIDEV         |-->| COEFFICIENT TO CALIBRATE THE VELOCITIES
00079 !| DT             |-->| TIME STEP
00080 !| HBTIDE         |<->| WATER DEPTH ON TIDAL BOUNDARY CONDITIONS
00081 !| ICALHW         |<->| NUMBER THAT MAY BE CHOSEN BY THE USER
00082 !|                |   | TO CALIBRATE HIGH WATER OR AUTOMATICALLY CHOSEN
00083 !|                |   | IN CASE OF THE MODELLING OF A SCHEMATIC TIDE
00084 !| KENT           |-->| CONVENTION FOR LIQUID INPUT WITH PRESCRIBED VALUE
00085 !| KENTU          |-->| CONVENTION FOR LIQUID INPUT WITH PRESCRIBED VELOCITY
00086 !| LIHBOR         |-->| TYPE OF BOUNDARY CONDITIONS ON DEPTH
00087 !| LIUBOR         |-->| TYPE OF BOUNDARY CONDITIONS ON VELOCITY
00088 !| MARDAT         |-->| DATE (YEAR,MONTH,DAY)
00089 !| MARTIM         |-->| TIME (HOUR,MINUTE,SECOND)
00090 !| MSL            |-->| COEFFICIENT TO CALIBRATE THE SEA LEVEL
00091 !| NBOR           |-->| GLOBAL NUMBER OF BOUNDARY POINTS
00092 !| NCOTE          |-->| NUMBER OF BOUNDARIES WITH PRESCRIBED ELEVATION
00093 !|                |   | AS GIVEN IN THE PARAMETER FILE
00094 !| NFOT           |-->| LOGICAL UNIT OF HARMONIC CONSTANTS FILE
00095 !| NODALCORR      |-->| OPTION FOR CALCULATION OF NODAL FACTOR CORRECTION F
00096 !| NOMIMP         |-->| NAME OF LIQUID BOUNDARIES FILE
00097 !| NPOIN          |-->| NUMBER OF POINTS
00098 !| NPTFR          |-->| NUMBER OF BOUNDARY POINTS
00099 !| NUMLIQ         |-->| LIQUID BOUNDARY NUMBER OF BOUNDARY POINTS
00100 !| NUMTIDE        |<->| NUMBER OF THE TIDAL BOUNDARY
00101 !|                |   | ASSOCIATED TO EACH POINT OF THE BOUNDARY
00102 !| NVITES         |-->| NUMBER OF BOUNDARIES WITH VELOCITY PRESCRIBED
00103 !|                |   | AS GIVEN IN THE PARAMETER FILE
00104 !| TEMPS          |-->| TIME IN SECONDS
00105 !| TIDALTYPE      |-->| TYPE OF TIDE TO MODEL
00106 !| UBTIDE         |<->| VELOCITY ON TIDAL BOUNDARY CONDITIONS
00107 !| VBTIDE         |<->| VELOCITY ON TIDAL BOUNDARY CONDITIONS
00108 !| ZF             |-->| BOTTOM TOPOGRAPHY
00109 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00110 !
00111       USE BIEF
00112       USE INTERFACE_TELEMAC2D, EX_BORD_TIDE_MISC => BORD_TIDE_MISC
00113 !
00114       IMPLICIT NONE
00115       INTEGER LNG,LU
00116       COMMON/INFO/LNG,LU
00117 !
00118 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00119 !
00120       INTEGER, INTENT(IN)             :: NPOIN,NPTFR,NCOTE,NVITES,NFOT
00121       INTEGER, INTENT(IN)             :: KENT,KENTU,NODALCORR
00122       INTEGER, INTENT(IN)             :: LIHBOR(NPTFR),LIUBOR(NPTFR)
00123       INTEGER, INTENT(IN)             :: NUMLIQ(NPTFR),NBOR(NPTFR)
00124       INTEGER, INTENT(IN)             :: TIDALTYPE,MARDAT(3),MARTIM(3)
00125       INTEGER, INTENT(INOUT)          :: ICALHW
00126       DOUBLE PRECISION, INTENT(IN)    :: TEMPS,CTIDE,MSL,CTIDEV,DT
00127       DOUBLE PRECISION, INTENT(IN)    :: ZF(NPOIN)
00128       TYPE(BIEF_OBJ), INTENT(IN)      :: BOUNDARY_COLOUR
00129       TYPE(BIEF_OBJ), INTENT(INOUT)   :: NUMTIDE,UBTIDE,VBTIDE,HBTIDE
00130       CHARACTER(LEN=144), INTENT(IN)  :: NOMIMP
00131 !
00132 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00133 !
00134       INTEGER K,IERR,I,J
00135 !
00136 !-----------------------------------------------------------------------
00137 !
00138       INTEGER, PARAMETER   :: MISC_NCMX = 54
00139       INTEGER IPTFR,IPTFRL,NPTFRL,NTIDE,NWAVES
00140       INTEGER, ALLOCATABLE :: FIRSTTIDE(:),LASTTIDE(:),SHIFTTIDE(:)
00141       INTEGER, ALLOCATABLE :: INDW(:)
00142 !
00143       DOUBLE PRECISION PI,DTR
00144       DOUBLE PRECISION SUMH,SUMU,SUMV
00145       DOUBLE PRECISION, ALLOCATABLE :: AH(:,:),PH(:,:)
00146       DOUBLE PRECISION, ALLOCATABLE :: AU(:,:),PU(:,:)
00147       DOUBLE PRECISION, ALLOCATABLE :: AV(:,:),PV(:,:)
00148       DOUBLE PRECISION, ALLOCATABLE :: LON(:,:),LAT(:,:)
00149       DOUBLE PRECISION, ALLOCATABLE :: UPV(:),FF(:),OMEGA(:),PHCALHW(:)
00150 !
00151       CHARACTER(LEN=4) TEXT
00152       CHARACTER(LEN=4), ALLOCATABLE :: NAMEWAVE(:)
00153 !
00154       CHARACTER(LEN=4) MISC_CONSTID(MISC_NCMX)
00155       DATA MISC_CONSTID /'2MK6','2MN6','2MS6','2N2 ','2Q1 ',
00156      &                   '2SM2','2SM6','E2  ','Tta1','J1  ',
00157      &                   'K1  ','K2  ','KJ2 ','KQ1 ','L2  ',
00158      &                   'La2 ','M1  ','M2  ','M4  ','M6  ',
00159      &                   'Mf  ','MK3 ','MK4 ','MKS2','Mm  ',
00160      &                   'MN4 ','MO3 ','MP1 ','MS4 ','MSK6',
00161      &                   'MSN2','MSN6','MSqm','Mtm ','Mu2 ',
00162      &                   'N2  ','Nu2 ','O1  ','OO1 ','P1  ',
00163      &                   'Pi1 ','Q1  ','R2  ','Ro1 ','S2  ',
00164      &                   'S4  ','Sig1','SK4 ','SN4 ','T2  ',
00165      &                   'Phi1','Ki1 ','Psi1','Z0  '/
00166 !
00167       LOGICAL DEJA
00168       DATA    DEJA /.FALSE./
00169 !
00170       SAVE
00171 !
00172 !-----------------------------------------------------------------------
00173 !
00174       PI  = ATAN(1.D0)*4.D0
00175       DTR = PI/180.D0
00176 !
00177 !  TEST TO CHECK CORRECT VALUES FOR TIDALTYPE
00178 !
00179       IF(.NOT.DEJA) THEN
00180 !$$$        IF(TIDALTYPE.LT.1.OR.TIDALTYPE.GT.6) THEN
00181         IF(TIDALTYPE.NE.1) THEN
00182           IF(LNG.EQ.1) THEN
00183             WRITE(LU,*) 'MAUVAISE VALEUR POUR TIDALTYPE =',TIDALTYPE
00184             WRITE(LU,*) 'ELLE DOIT ETRE EGALE A 1 ACTUELLEMENT'
00185             WRITE(LU,*) 'AVEC LES BASES DE DONNEES DE MAREE MISC'
00186 !$$$            WRITE(LU,*) 'ELLE DOIT ETRE COMPRISE ENTRE 1 ET 6'
00187           ENDIF
00188           IF(LNG.EQ.2) THEN
00189             WRITE(LU,*) 'UNEXPECTED VALUE FOR TIDALTYPE=',TIDALTYPE
00190             WRITE(LU,*) 'IT MUST BE CHOSEN EQUAL TO 1 CURRENTLY'
00191             WRITE(LU,*) 'WITH MISC TIDAL DATA BASES'
00192 !$$$            WRITE(LU,*) 'IT MUST BE CHOSEN BETWEEN 1 AND 6'
00193           ENDIF
00194           CALL PLANTE(1)
00195           STOP
00196         ENDIF
00197       ENDIF
00198 !
00199 !  MAGNITUDES AND PHASES ARE READ IN TIDAL FILE
00200 !  TIDAL FILE IS OBTAINED FROM THE TIDAL TOOL BOX (LEGOS)
00201 !
00202 !  NTIDE:  NUMBER OF THE TIDAL BOUNDARIES
00203 !  NPTFRL: NUMBERS OF BOUNDARY POINTS WHERE TIDE IS PRESCRIBED
00204 !
00205       IF(.NOT.DEJA) THEN
00206 !
00207         REWIND NFOT
00208 !
00209         READ(NFOT,*,END=2) NTIDE
00210         DO K=1,NTIDE
00211           READ(NFOT,*,END=2)
00212         ENDDO
00213 !
00214         READ(NFOT,*,END=2) NPTFRL,NWAVES,TEXT
00215 !
00216         IF(NWAVES.GT.MISC_NCMX) THEN
00217           IF(LNG.EQ.1) THEN
00218             WRITE(LU,*) 'NOMBRE D ONDES PRESENTES DANS LE FICHIER DE'
00219             WRITE(LU,*) 'CONSTANTES HARMONIQUES SUPERIEUR A',MISC_NCMX
00220             WRITE(LU,*) 'CERTAINES ONDES NE SONT PAS PREVUES.'
00221             WRITE(LU,*) 'LE FICHIER EST A AJUSTER'
00222           ENDIF
00223           IF(LNG.EQ.2) THEN
00224             WRITE(LU,*) 'NUMBER OF WAVES IN THE HARMONIC CONSTITUENTS'
00225             WRITE(LU,*) 'FILE GREATER THAN',MISC_NCMX
00226             WRITE(LU,*) 'SOME WAVES ARE NOT EXPECTED. THE FILE IS TO'
00227             WRITE(LU,*) 'BE ADJUSTED'
00228           ENDIF
00229           CALL PLANTE(1)
00230           STOP
00231         ENDIF
00232 !
00233       ENDIF
00234 !
00235 2     CONTINUE
00236 !
00237       IF(.NOT.DEJA) THEN
00238         ALLOCATE(FIRSTTIDE(NTIDE),STAT=IERR)
00239         ALLOCATE(LASTTIDE(NTIDE), STAT=IERR)
00240         ALLOCATE(SHIFTTIDE(NTIDE),STAT=IERR)
00241 !
00242         ALLOCATE(AH(NPTFRL,NWAVES),STAT=IERR)
00243         ALLOCATE(PH(NPTFRL,NWAVES),STAT=IERR)
00244         ALLOCATE(AU(NPTFRL,NWAVES),STAT=IERR)
00245         ALLOCATE(PU(NPTFRL,NWAVES),STAT=IERR)
00246         ALLOCATE(AV(NPTFRL,NWAVES),STAT=IERR)
00247         ALLOCATE(PV(NPTFRL,NWAVES),STAT=IERR)
00248         ALLOCATE(LON(NPTFRL,NWAVES),STAT=IERR)
00249         ALLOCATE(LAT(NPTFRL,NWAVES),STAT=IERR)
00250         ALLOCATE(NAMEWAVE(NWAVES),STAT=IERR)
00251         ALLOCATE(INDW(NWAVES),STAT=IERR)
00252         IF(TIDALTYPE.GE.2.AND.TIDALTYPE.LE.6) THEN
00253           ALLOCATE(PHCALHW(NWAVES),STAT=IERR)
00254         ENDIF
00255         ALLOCATE(UPV(MISC_NCMX),STAT=IERR)
00256         ALLOCATE(FF(MISC_NCMX),STAT=IERR)
00257         ALLOCATE(OMEGA(MISC_NCMX),STAT=IERR)
00258       ENDIF
00259 !
00260 !  COMPUTE THE FIRST AND LAST INDICES OF THE OPEN LIQUID BOUNDARY WITH TIDE TO PRESCRIBE
00261 !
00262       IF(.NOT.DEJA) THEN
00263         REWIND NFOT
00264 !
00265         READ(NFOT,*)
00266         DO I=1,NTIDE
00267           READ(NFOT,*,END=4) FIRSTTIDE(I),LASTTIDE(I)
00268         ENDDO
00269 4       CONTINUE
00270 !
00271 !  SHIFTS WHEN CHANGING TIDAL BOUNDARY
00272 !
00273         SHIFTTIDE(1) = 0
00274 !
00275         DO I=2,NTIDE
00276           SHIFTTIDE(I) = LASTTIDE(I-1) - FIRSTTIDE(I-1) + 1
00277      &                 + SHIFTTIDE(I-1)
00278         ENDDO
00279 !
00280         READ(NFOT,*) NPTFRL,NWAVES,TEXT
00281 !
00282 !  READING OF TIDAL DATA AT THE FIRST TIME STEP
00283 !
00284         DO I=1,NWAVES
00285           READ(NFOT,*)NAMEWAVE(I)
00286           DO IPTFRL = 1,NPTFRL
00287             READ(NFOT,*) LON(IPTFRL,I),LAT(IPTFRL,I),
00288      &                   AH(IPTFRL,I),PH(IPTFRL,I),
00289      &                   AU(IPTFRL,I),PU(IPTFRL,I),
00290      &                   AV(IPTFRL,I),PV(IPTFRL,I)
00291           ENDDO
00292         ENDDO
00293 !
00294         DO K = 1,NWAVES
00295           INDW(K) = 0
00296           DO I = 1,MISC_NCMX
00297             IF(NAMEWAVE(K).EQ.MISC_CONSTID(I)) THEN
00298               INDW(K) = I
00299               EXIT
00300             ENDIF
00301           ENDDO
00302           IF(INDW(K).EQ.0) THEN
00303             IF(LNG.EQ.1) THEN
00304               WRITE(LU,*) 'MISC : ATTENTION :' //
00305      &         'COMPOSANTE ID ',NAMEWAVE(K),' N''EST PAS PERMISE'
00306             ENDIF
00307             IF(LNG.EQ.2) THEN
00308               WRITE(LU,*) 'MISC : WARNING:' //
00309      &         'CONSTITUENT ID ',NAMEWAVE(K),' IS NOT ALLOWED'
00310             ENDIF
00311             CALL PLANTE(1)
00312             STOP
00313           ENDIF
00314         ENDDO
00315 !
00316 !       POTENTIAL SPECIFIC TREATMENTS
00317 !
00318         IF(TIDALTYPE.EQ.1) THEN
00319 !
00320 !         DEGREES TO RADIANS CONVERSIONS
00321           DO I=1,NWAVES
00322             DO IPTFRL = 1,NPTFRL
00323               PH(IPTFRL,I) = PH(IPTFRL,I)*DTR
00324               PU(IPTFRL,I) = PU(IPTFRL,I)*DTR
00325               PV(IPTFRL,I) = PV(IPTFRL,I)*DTR
00326             ENDDO
00327           ENDDO
00328 !
00329         ELSEIF(TIDALTYPE.GE.2.AND.TIDALTYPE.LE.6) THEN
00330 !
00331 !         ARBITRARY CHOICE
00332           IF(ICALHW.EQ.0) ICALHW = NPTFRL/2
00333 !
00334 !  CALIBRATION WITH RESPECT TO HIGH WATER!!!
00335 !  PHASES FOR HEIGHTS ARE READ IN TIDAL FILE
00336 !  EXCEPT M4: 2*PHM2 MOD 360 IS APPLIED
00337 ! --------------------------------------------------
00338 !
00339           DO I=1,NWAVES
00340             PHCALHW(I) = PH(ICALHW,I)
00341             DO IPTFRL = 1,NPTFRL
00342               PH(IPTFRL,I) = (PH(IPTFRL,I) - PHCALHW(I))*DTR
00343               PU(IPTFRL,I) = (PU(IPTFRL,I) - PHCALHW(I))*DTR
00344               PV(IPTFRL,I) = (PV(IPTFRL,I) - PHCALHW(I))*DTR
00345             ENDDO
00346           ENDDO
00347 !
00348         ENDIF
00349 !
00350 !  NUMBER OF THE TIDAL BOUNDARY ASSOCIATED TO EACH POINT OF THE BOUNDARY
00351 !  REMAINS 0 IF POINT IS NOT ON AN OPEN BOUNDARY WITH TIDE
00352 !
00353         DO K=1,NPTFR
00354           NUMTIDE%I(K) = 0
00355           IPTFR=BOUNDARY_COLOUR%I(K)
00356           DO I=1,NTIDE
00357             IF(IPTFR.GE.FIRSTTIDE(I).AND.IPTFR.LE.LASTTIDE(I)) THEN
00358               NUMTIDE%I(K) = I
00359             ENDIF
00360           ENDDO
00361         ENDDO
00362 !
00363 !  FOR THE SIMULATION OF REAL TIDES, NODAL FACTOR CORRECTIONS ARE COMPUTED
00364 !  WITH SCHUREMAN FORMULAE
00365 !  SCHUREMAN P. (1971). MANUAL OF HARMONIC ANALYSIS AND PREDICTION OF TIDES
00366 !
00367         IF(TIDALTYPE.EQ.1) THEN
00368 !
00369           CALL NODALUPV_SCHUREMAN(UPV,OMEGA,MARDAT,MARTIM)
00370 !  TEMPS-DT RATHER THAN TEMPS BECAUSE THE FIRST CALL TO BORD_TIDE_MISC
00371 !  IS AT THE FIRST TIME STEP
00372           CALL NODALF_SCHUREMAN(FF,NODALCORR,TEMPS-DT,DEJA,
00373      &                          MARDAT,MARTIM)
00374 !
00375         ENDIF
00376 !
00377         DEJA = .TRUE.
00378 !
00379       ENDIF
00380 !
00381       IF(TIDALTYPE.EQ.1.AND.NODALCORR.EQ.0) THEN
00382         CALL NODALF_SCHUREMAN(FF,NODALCORR,TEMPS,DEJA,
00383      &                        MARDAT,MARTIM)
00384       ENDIF
00385 !
00386 !  LOOP ON ALL BOUNDARY POINTS
00387 !
00388       DO K=1,NPTFR
00389 !
00390         IPTFR=BOUNDARY_COLOUR%I(K)
00391 !
00392 !     LEVEL IMPOSED WITH VALUE GIVEN IN THE CAS FILE (NCOTE0)
00393 !
00394         IF(LIHBOR(K).EQ.KENT) THEN
00395 !         BEGINNING OF PRESCRIBED DEPTHS
00396           IF(NUMTIDE%I(K).GT.0) THEN
00397             IPTFRL=IPTFR-FIRSTTIDE(NUMTIDE%I(K))+1
00398      &                  +SHIFTTIDE(NUMTIDE%I(K))
00399 !
00400 !  TYPE OF TIDE TO MODEL
00401 !  1: REAL TIDE (RECOMMENDED METHODOLOGY)
00402 !  2: ASTRONOMICAL TIDE      (COEF. NEARLY 120)
00403 !  3: MEAN SPRING TIDE       (COEF. NEARLY 95)
00404 !  4: MEAN TIDE              (COEF. NEARLY 70)
00405 !  5: MEAN NEAP TIDE         (COEF. NEARLY 45)
00406 !  6: ASTRONOMICAL NEAP TIDE (COEF. NEARLY 20)
00407 !
00408             IF(TIDALTYPE.EQ.1) THEN
00409               SUMH = 0.D0
00410               DO I=1,NWAVES
00411                 J = INDW(I)
00412                 IF(J.NE.0) THEN
00413                   SUMH = SUMH + FF(J)*AH(IPTFRL,I)
00414      &                         *COS( TEMPS*OMEGA(J)-PH(IPTFRL,I)+UPV(J))
00415                 ENDIF
00416               ENDDO
00417 !$$$            ELSEIF(TIDALTYPE.GE.2.AND.TIDALTYPE.LE.6) THEN
00418             ELSEIF(TIDALTYPE.EQ.2) THEN
00419               SUMH = 0.D0
00420               DO I=1,NWAVES
00421                 J = INDW(I)
00422                 IF(J.NE.0) THEN
00423                   SUMH = SUMH + AH(IPTFRL,I)
00424      &                         *COS(TEMPS*OMEGA(J)-PH(IPTFRL,I))
00425                 ENDIF
00426               ENDDO
00427             ENDIF
00428 !
00429             IF(TIDALTYPE.EQ.1.OR.TIDALTYPE.EQ.2) THEN
00430               HBTIDE%R(K) = -ZF(NBOR(K)) + CTIDE*SUMH + MSL
00431 !$$$            ELSEIF(TIDALTYPE.EQ.2.AND.TIDALTYPE.LE.6) THEN
00432             ENDIF
00433 !
00434           ENDIF
00435 !         ELSE HBOR TAKEN IN BOUNDARY CONDITIONS FILE
00436         ENDIF
00437 !
00438 !  VELOCITY IMPOSED: ONE USES THE OUTGOING DIRECTION
00439 !                    PROVIDED BY THE USER.
00440 !
00441       IF(LIUBOR(K).EQ.KENTU) THEN
00442 !
00443 !       POINTS ON WEIRS HAVE NUMLIQ(K)=0
00444         IF(NUMLIQ(K).GT.0) THEN
00445 !
00446 !         BEGINNING OF PRESCRIBED VELOCITIES
00447 !
00448           IF(NUMTIDE%I(K).GT.0) THEN
00449             IPTFRL=IPTFR-FIRSTTIDE(NUMTIDE%I(K))+1
00450      &                  +SHIFTTIDE(NUMTIDE%I(K))
00451 !
00452 !  TYPE OF TIDE TO MODEL
00453 !  1: REAL TIDE (RECOMMENDED METHODOLOGY)
00454 !  2: ASTRONOMICAL TIDE      (COEF. NEARLY 120)
00455 !  3: MEAN SPRING TIDE       (COEF. NEARLY 95)
00456 !  4: MEAN TIDE              (COEF. NEARLY 70)
00457 !  5: MEAN NEAP TIDE         (COEF. NEARLY 45)
00458 !  6: ASTRONOMICAL NEAP TIDE (COEF. NEARLY 20)
00459 !
00460             IF(TIDALTYPE.EQ.1) THEN
00461               SUMU = 0.D0
00462               SUMV = 0.D0
00463               DO I=1,NWAVES
00464                 J = INDW(I)
00465                 IF(J.NE.0) THEN
00466                   SUMU = SUMU + FF(J)*AU(IPTFRL,I)
00467      &                         *COS( TEMPS*OMEGA(J)-PU(IPTFRL,I)+UPV(J))
00468                   SUMV = SUMV + FF(J)*AV(IPTFRL,I)
00469      &                         *COS( TEMPS*OMEGA(J)-PV(IPTFRL,I)+UPV(J))
00470                 ENDIF
00471               ENDDO
00472 !$$$            ELSEIF(TIDALTYPE.GE.2.AND.TIDALTYPE.LE.6) THEN
00473             ELSEIF(TIDALTYPE.EQ.2) THEN
00474               SUMU = 0.D0
00475               SUMV = 0.D0
00476               DO I=1,NWAVES
00477                 J = INDW(I)
00478                 IF(J.NE.0) THEN
00479                   SUMU = SUMU + AU(IPTFRL,I)
00480      &                         *COS(TEMPS*OMEGA(J)-PU(IPTFRL,I))
00481                   SUMV = SUMV + AV(IPTFRL,I)
00482      &                         *COS(TEMPS*OMEGA(J)-PV(IPTFRL,I))
00483                 ENDIF
00484               ENDDO
00485             ENDIF
00486 !
00487             IF(TIDALTYPE.EQ.1.OR.TIDALTYPE.EQ.2) THEN
00488               UBTIDE%R(K) = CTIDEV*SUMU
00489               VBTIDE%R(K) = CTIDEV*SUMV
00490 !$$$            ELSEIF(TIDALTYPE.EQ.2.AND.TIDALTYPE.LE.6) THEN
00491             ENDIF
00492 !
00493           ENDIF
00494         ENDIF
00495       ENDIF
00496 !
00497       ENDDO
00498 !
00499 !-----------------------------------------------------------------------
00500 !
00501       RETURN
00502       END

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