lecdon_telemac3d.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\telemac3d\lecdon_telemac3d.f
00002 !
00408                      SUBROUTINE LECDON_TELEMAC3D
00409 !                    ***************************
00410 !
00411      &(MOTCAR,FILE_DESC,PATH,NCAR)
00412 !
00413 !***********************************************************************
00414 ! TELEMAC3D   V7P0                                   21/08/2010
00415 !***********************************************************************
00416 !
00417 !
00418 !
00419 !
00420 !
00421 !
00422 !
00423 !
00424 !
00425 !
00426 !
00427 !
00428 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00429 !| FILE_DESC      |<->| STORES STRINGS 'SUBMIT' OF DICTIONARY
00430 !| MOTCAR         |<->| KEYWORD IN CHARACTER
00431 !| NCAR           |-->| NUMBER OF LETTERS IN STRING PATH
00432 !| PATH           |-->| FULL PATH TO CODE DICTIONARY
00433 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00434 !
00435       USE BIEF
00436       USE DECLARATIONS_TELEMAC
00437       USE DECLARATIONS_TELEMAC3D
00438 !
00439       IMPLICIT NONE
00440       INTEGER LNG,LU
00441       COMMON/INFO/LNG,LU
00442 !
00443 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00444 !
00445 !                                                 NMAX BELOW
00446       CHARACTER(LEN=144), INTENT(INOUT) :: MOTCAR(300)
00447       CHARACTER(LEN=144), INTENT(INOUT) :: FILE_DESC(4,300)
00448       CHARACTER(LEN=250), INTENT(IN) :: PATH
00449       INTEGER, INTENT(IN) :: NCAR
00450 !
00451 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00452 !
00453       LOGICAL CONVEC, DIFFUS
00454       INTEGER I,J,K,NTRTOT
00455 !
00456       CHARACTER(LEN=8) MNEMO(MAXVAR)
00457       CHARACTER(LEN=8) MNEM3(MAXVA3)
00458 !
00459       CHARACTER(LEN=250) NOM_CAS,NOM_DIC
00460       CHARACTER(LEN=24), PARAMETER :: CODE1='TELEMAC3D               '
00461 !
00462 !-----------------------------------------------------------------------
00463 ! DECLARATIONS NEEDED TO CALL DAMOCLES
00464 ! PARAMETER NMAX - MAX 300 STEERING WORDS ALLOWED
00465 !
00466       INTEGER, PARAMETER :: NMAX = 300
00467 !
00468       INTEGER ADRESS(4,NMAX),DIMEN(4,NMAX)
00469       DOUBLE PRECISION      MOTREA(NMAX)
00470       INTEGER               MOTINT(NMAX)
00471       LOGICAL               MOTLOG(NMAX)
00472       CHARACTER(LEN=72)     MOTCLE(4,NMAX,2)
00473       INTEGER TROUVE(4,NMAX)
00474       LOGICAL DOC
00475 !
00476 ! END OF VARIABLES FOR DAMOCLES
00477 !-----------------------------------------------------------------------
00478 !
00479       INTRINSIC MAX,MOD
00480 !
00481 !-----------------------------------------------------------------------
00482 !
00483       CHARACTER(LEN=2) I_IN_2_LETTERS(32)
00484       DATA I_IN_2_LETTERS /'1 ','2 ','3 ','4 ','5 ','6 ','7 ','8 ','9 ',
00485      &                     '10','11','12','13','14','15','16','17','18',
00486      &                     '19','20','21','22','23','24','25','26','27',
00487      &                     '28','29','30','31','32'/
00488 !
00489 !-----------------------------------------------------------------------
00490 !
00491       IF (LNG.EQ.1) WRITE(LU,101)
00492       IF (LNG.EQ.2) WRITE(LU,102)
00493 !
00494 101   FORMAT(1X,/,19X, '********************************************',/,
00495      &            19X, '*               LECDON:                    *',/,
00496      &            19X, '*        AVANT APPEL DE DAMOCLES           *',/,
00497      &            19X, '********************************************',/)
00498 102   FORMAT(1X,/,19X, '********************************************',/,
00499      &            19X, '*               LECDON:                    *',/,
00500      &            19X, '*        BEFORE CALLING DAMOCLES           *',/,
00501      &            19X, '********************************************',/)
00502 !
00503 !-----------------------------------------------------------------------
00504 ! INITIALISATIONS TO CALL DAMOCLES:
00505 ! STRINGS MUST BE EQUAL TO ' ' (ONE BLANK CHARACTER)
00506 !
00507       DO K=1,NMAX
00508         MOTCAR(K)(1:1)=' '
00509         DIMEN(1,K) = 0
00510         DIMEN(2,K) = 0
00511         DIMEN(3,K) = 0
00512         DIMEN(4,K) = 0
00513       ENDDO
00514 !
00515 ! DO NOT PRINT THE DICTIONARY OUT
00516 !
00517       DOC = .FALSE.
00518 !
00519 !-----------------------------------------------------------------------
00520 !     OPENS THE DICTIONARY AND STEERING FILES
00521 !-----------------------------------------------------------------------
00522 !
00523       IF(NCAR.GT.0) THEN
00524 !
00525         NOM_DIC=PATH(1:NCAR)//'T3DDICO'
00526         NOM_CAS=PATH(1:NCAR)//'T3DCAS'
00527 !
00528       ELSE
00529 !
00530         NOM_DIC='T3DDICO'
00531         NOM_CAS='T3DCAS'
00532 !
00533       ENDIF
00534 !
00535       OPEN(2,FILE=NOM_DIC,FORM='FORMATTED',ACTION='READ')
00536       OPEN(3,FILE=NOM_CAS,FORM='FORMATTED',ACTION='READ')
00537 !
00538 !-----------------------------------------------------------------------
00539 !
00540       CALL DAMOCLE( ADRESS , DIMEN  , NMAX   , DOC     , LNG    , LU ,
00541      &              MOTINT , MOTREA , MOTLOG , MOTCAR  , MOTCLE ,
00542      &              TROUVE , 2      , 3      , .FALSE. , FILE_DESC )
00543 !
00544 !-----------------------------------------------------------------------
00545 !     CLOSES THE DICTIONARY AND STEERING FILES
00546 !-----------------------------------------------------------------------
00547 !
00548       CLOSE(2)
00549       CLOSE(3)
00550 !
00551 !     DECODES THE SUBMIT STRINGS
00552 !
00553       CALL READ_SUBMIT(T3D_FILES,MAXLU_T3D,CODE1,FILE_DESC,300)
00554 !
00555 !-----------------------------------------------------------------------
00556 !
00557 !     RETRIEVES FILES NUMBERS IN TELEMAC-3D FORTRAN PARAMETERS
00558 !     AT THIS LEVEL LOGICAL UNITS ARE EQUAL TO THE FILE NUMBER
00559 !
00560       DO I=1,MAXLU_T3D
00561         IF(T3D_FILES(I)%TELNAME.EQ.'T3DGEO') THEN
00562 !         T3DGEO=T3D_FILES(I)%LU  (IS EQUIVALENT)
00563           T3DGEO=I
00564         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DCLI') THEN
00565           T3DCLI=I
00566         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DPRE') THEN
00567           T3DPRE=I
00568         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DRES') THEN
00569           T3DRES=I
00570         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DFON') THEN
00571           T3DFON=I
00572         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DSCO') THEN
00573           T3DSCO=I
00574         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DHYD') THEN
00575           T3DHYD=I
00576         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DFO1') THEN
00577           T3DFO1=I
00578         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DFO2') THEN
00579           T3DFO2=I
00580         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DBI1') THEN
00581           T3DBI1=I
00582         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DBI2') THEN
00583           T3DBI2=I
00584         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DSED') THEN
00585           T3DSED=I
00586         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DSUS') THEN
00587           T3DSUS=I
00588         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DREF') THEN
00589           T3DREF=I
00590         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DIMP') THEN
00591           T3DIMP=I
00592         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DDL1') THEN
00593           T3DDL1=I
00594         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DDL2') THEN
00595           T3DDL2=I
00596         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DDL3') THEN
00597           T3DDL3=I
00598         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DDL4') THEN
00599           T3DDL4=I
00600         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DDL5') THEN
00601           T3DDL5=I
00602         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DDL6') THEN
00603           T3DDL6=I
00604         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DDL7') THEN
00605           T3DDL7=I
00606         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DDL8') THEN
00607           T3DDL8=I
00608         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DDL9') THEN
00609           T3DDL9=I
00610         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DL10') THEN
00611           T3DL10=I
00612         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DL11') THEN
00613           T3DL11=I
00614         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DPAR') THEN
00615           T3DPAR=I
00616         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DVEF') THEN
00617           T3DVEF=I
00618         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DRBI') THEN
00619           T3DRBI=I
00620         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DRFO') THEN
00621           T3DRFO=I
00622         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DMIG') THEN
00623           T3DMIG=I
00624         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DRST') THEN
00625           T3DRST=I
00626         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DHAR') THEN
00627           T3DHAR=I
00628         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DTID') THEN
00629           T3DTID=I
00630         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DBDD') THEN
00631           T3DBDD=I
00632         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DBB1') THEN
00633           T3DBB1=I
00634         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DBB2') THEN
00635           T3DBB2=I
00636         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DFLO') THEN
00637           T3DFLO=I
00638         ELSEIF(T3D_FILES(I)%TELNAME.EQ.'T3DS2D') THEN
00639           T3DS2D=I
00640         ELSEIF(I.NE.02.AND.I.NE.03.AND.I.NE.05.AND.I.NE.06.AND.
00641      &         I.NE.15.AND.I.NE.16.AND.I.NE.17.AND.
00642      &         I.NE.19.AND.I.NE.20.AND.I.NE.21.AND.I.NE.33) THEN
00643 !         ONE FILE THAT SHOULD HAVE A STRING 'SUBMIT' IN DICTIONARY
00644 !         HAS RECEIVED NO NAME
00645           IF(LNG.EQ.1) THEN
00646             WRITE(LU,*) 'LECDON_TELEMAC3D: ERREUR POUR LE FICHIER'
00647             WRITE(LU,*) 'I=',I,' NOM=',T3D_FILES(I)%TELNAME
00648             WRITE(LU,*) 'IL MANQUE UNE CHAINE SUBMIT DANS LE'
00649             WRITE(LU,*) 'DICTIONNAIRE'
00650           ELSEIF(LNG.EQ.2) THEN
00651             WRITE(LU,*) 'LECDON_TELEMAC3D: ERROR FOR FILE NUMBER'
00652             WRITE(LU,*) 'I=',I,' NAME=',T3D_FILES(I)%TELNAME
00653             WRITE(LU,*) 'THIS FILE SHOULD HAVE A STRING SUBMIT'
00654             WRITE(LU,*) 'IN DICTIONARY'
00655           ENDIF
00656           CALL PLANTE(1)
00657           STOP
00658         ENDIF
00659       ENDDO
00660 !
00661 !-----------------------------------------------------------------------
00662 ! GETS VALUES ACCORDING TO THE KEYWORDS
00663 !
00664 ! INTEGER KEYWORDS
00665 !
00666       NIT       = MAX(MOTINT(ADRESS(1, 1)),0)
00667       NPLAN     = MAX(MOTINT(ADRESS(1, 2)),2)
00668       NTRAC     = MAX(MOTINT(ADRESS(1, 3)),0)
00669       MIXING    = MAX(MOTINT(ADRESS(1, 4)),0)
00670       NFLOT_MAX = MAX(MOTINT(ADRESS(1, 5)),0)
00671       FLOPRD    = MAX(MOTINT(ADRESS(1, 6)),1)
00672       GRAPRD    = MAX(MOTINT(ADRESS(1, 7)),1)
00673       LISPRD    = MAX(MOTINT(ADRESS(1, 8)),1)
00674       GRADEB    = MAX(MOTINT(ADRESS(1, 9)),0)
00675       LISDEB    = MAX(MOTINT(ADRESS(1,10)),0)
00676       LISFON    = MAX(MOTINT(ADRESS(1,11)),0)
00677       NSOUSI    = MAX(MOTINT(ADRESS(1,12)),1)
00678 !     NPLINT    = MAX(MIN(MOTINT(ADRESS(1,13)),NPLAN-1),1)
00679       ITURBV    = MOTINT(ADRESS(1,14))
00680       LISRUF    = MOTINT(ADRESS(1,15))
00681       LISRUL    = MOTINT(ADRESS(1,16))
00682       IORDRH    = MOTINT(ADRESS(1,17))
00683 !
00684       SCHCVI    = MOTINT(ADRESS(1,18))
00685 !     DEFAULT VALUE MAKES THAT DIMEN(1,19) IS AT LEAST 1
00686       IF(NTRAC.GT.0) THEN
00687         IF(DIMEN(1,19).LT.NTRAC) THEN
00688           DO K=1,NTRAC
00689             SCHCTA(K) = MOTINT(ADRESS(1,19))
00690           ENDDO
00691         ELSE
00692           DO K=1,NTRAC
00693             SCHCTA(K) = MOTINT(ADRESS(1,19)+K-1)
00694           ENDDO
00695         ENDIF
00696       ENDIF
00697       DAMPING   = MOTINT(ADRESS(1,20))
00698       SCHCKE    = MOTINT(ADRESS(1,21))
00699       SCHCH     = MOTINT(ADRESS(1,22))
00700       SCHDVI    = MOTINT(ADRESS(1,23))
00701       SCHDTA    = MOTINT(ADRESS(1,24))
00702       KFROTL    = MOTINT(ADRESS(1,25))
00703       SCHDKE    = MOTINT(ADRESS(1,26))
00704 !
00705       SLVDVI%PRECON  =  MOTINT(ADRESS(1,27))
00706       IF(NTRAC.GT.0) THEN
00707         IF(DIMEN(1,28).LT.NTRAC) THEN
00708           DO K=1,NTRAC
00709             SLVDTA(K)%PRECON = MOTINT(ADRESS(1,28))
00710           ENDDO
00711         ELSE
00712           DO K=1,NTRAC
00713             SLVDTA(K)%PRECON = MOTINT(ADRESS(1,28)+K-1)
00714           ENDDO
00715         ENDIF
00716       ENDIF
00717       SLVDSE%NITMAX  =  MOTINT(ADRESS(1,29))
00718       SLVDKE%PRECON  =  MOTINT(ADRESS(1,30))
00719       SLVPRO%PRECON  =  MOTINT(ADRESS(1,31))
00720       SLVW%PRECON    =  MOTINT(ADRESS(1,32))
00721 !
00722       SLVDVI%SLV = MOTINT(ADRESS(1,33))
00723       IF(NTRAC.GT.0) THEN
00724         IF(DIMEN(1,34).LT.NTRAC) THEN
00725           DO K=1,NTRAC
00726             SLVDTA(K)%SLV = MOTINT(ADRESS(1,34))
00727           ENDDO
00728         ELSE
00729           DO K=1,NTRAC
00730             SLVDTA(K)%SLV = MOTINT(ADRESS(1,34)+K-1)
00731           ENDDO
00732         ENDIF
00733       ENDIF
00734       PERCOU_WAC = MOTINT(ADRESS(1,35))
00735       SLVDKE%SLV = MOTINT(ADRESS(1,36))
00736       SLVPRO%SLV = MOTINT(ADRESS(1,37))
00737       SLVW%SLV   = MOTINT(ADRESS(1,38))
00738 !
00739       SLVDVI%NITMAX    = MOTINT(ADRESS(1,39))
00740       SLVDTA(1)%NITMAX = MOTINT(ADRESS(1,40))
00741       IF(NTRAC.GT.1) THEN
00742         DO K=2,NTRAC
00743           SLVDTA(K)%NITMAX = SLVDTA(1)%NITMAX
00744         ENDDO
00745       ENDIF
00746       PERCOU_SIS       = MOTINT(ADRESS(1,41))
00747       SLVDKE%NITMAX    = MOTINT(ADRESS(1,42))
00748       SLVPRO%NITMAX    = MOTINT(ADRESS(1,43))
00749       SLVW%NITMAX      = MOTINT(ADRESS(1,44))
00750 !
00751       NCSIZE    =     MOTINT(ADRESS(1,45))
00752 !
00753       TRBAVI    =     MOTINT(ADRESS(1,46))
00754       TRBATA    =     MOTINT(ADRESS(1,47))
00755       BC_BOTTOM =     MOTINT(ADRESS(1,48))
00756       TRBAKE    =     MOTINT(ADRESS(1,49))
00757 !
00758 ! NEW ONES 60,61 (50++ FOR SEDIMENT)
00759 !
00760       LVMAC     =     MOTINT(ADRESS(1,61))
00761       NPRIV     =     MOTINT(ADRESS(1,62))
00762 !     R3D2D     =     MOTINT(ADRESS(1,63))
00763 ! JMH 29/09/99:
00764       KFROT     =     MOTINT(ADRESS(1,64))
00765 ! CV 2013
00766       NCOUCH=         MOTINT(ADRESS(1,65))
00767 !
00768 ! NON-HYDROSTATIC
00769 !
00770       SLVPOI%PRECON = MOTINT( ADRESS(1,71) )
00771       SLVPOI%SLV    = MOTINT( ADRESS(1,72) )
00772       SLVPOI%NITMAX = MOTINT( ADRESS(1,73) )
00773 !
00774 !     FOLLOWING LINES ARE DONE LATER
00775 !     SLVDVI%KRYLOV = MOTINT( ADRESS(1,74) )
00776 !     SLVDTA(1)%KRYLOV = MOTINT( ADRESS(1,75) )
00777 !     SLVDKE%KRYLOV = MOTINT( ADRESS(1,76) )
00778 !     SLVPRO%KRYLOV = MOTINT( ADRESS(1,77) )
00779       SLVPRJ%PRECON = MOTINT( ADRESS(1,78) )
00780       SLVPRJ%SLV    = MOTINT( ADRESS(1,79) )
00781       SLVPRJ%NITMAX = MOTINT( ADRESS(1,80) )
00782 !     FOLLOWING LINE IS DONE LATER
00783 !     SLVPOI%KRYLOV = MOTINT( ADRESS(1,81) )
00784       START_RECORD  = MOTINT( ADRESS(1,82) )
00785 !     FOLLOWING LINES ARE DONE LATER
00786 !     SLVPRJ%KRYLOV = MOTINT( ADRESS(1,83) )
00787 !     SLVDSE%KRYLOV = MOTINT( ADRESS(1,84) )
00788       ITURBH        = MOTINT( ADRESS(1,85) )
00789       PROTYP        = MOTINT( ADRESS(1,86) )
00790       OPTASS        = MOTINT( ADRESS(1,87) )
00791       OPTASS2D      = OPTASS
00792 !     ??????        = MOTINT( ADRESS(1,88)     )
00793 !     ??????        = MOTINT( ADRESS(1,88) + 1 )
00794       DENLAW        = MOTINT( ADRESS(1,89) )
00795       OPTBAN        = MOTINT( ADRESS(1,90) )
00796       MARDAT(1)     = MOTINT( ADRESS(1,91) )
00797       MARDAT(2)     = MOTINT( ADRESS(1,91) + 1 )
00798       MARDAT(3)     = MOTINT( ADRESS(1,91) + 2 )
00799       MARTIM(1)     = MOTINT( ADRESS(1,92) )
00800       MARTIM(2)     = MOTINT( ADRESS(1,92) + 1 )
00801       MARTIM(3)     = MOTINT( ADRESS(1,92) + 2 )
00802       OPTDIF        = MOTINT( ADRESS(1,93) )
00803 !     HYDSTEP       = MOTINT( ADRESS(1,94) )
00804       DIRFLU(0)=0
00805       DO K=1,MAXFRO
00806         PROFVEL(K)=1
00807         DIRFLU(K)=1
00808         VERPROVEL(K)=1
00809         STA_DIS_CURVES(K)=0
00810       ENDDO
00811       DO K=1,MAXFRO*MAXTRA
00812         VERPROTRA(K)=1
00813       ENDDO
00814       IF(DIMEN(1,95).GT.0) THEN
00815         DO K=1,DIMEN(1,95)
00816           PROFVEL(K) = MOTINT( ADRESS(1,95) + K-1 )
00817         ENDDO
00818       ENDIF
00819       TRANSF= MOTINT( ADRESS(1,96) )
00820 !
00821       IF(DIMEN(1,97).GT.0) THEN
00822         DO K=1,DIMEN(1,97)
00823           DIRFLU(K) = MOTINT( ADRESS(1,97) + K-1 )
00824         ENDDO
00825       ENDIF
00826       IF(DIMEN(1,98).GT.0) THEN
00827         DO K=1,DIMEN(1,98)
00828           VERPROVEL(K) = MOTINT( ADRESS(1,98) + K-1 )
00829         ENDDO
00830       ENDIF
00831       IF(DIMEN(1,99).GT.0) THEN
00832         DO K=1,DIMEN(1,99)
00833           VERPROTRA(K) = MOTINT( ADRESS(1,99) + K-1 )
00834         ENDDO
00835       ENDIF
00836       OPTSUP(1)=1
00837       IF(DIMEN(1,100).GT.0) THEN
00838         DO K=1,MAX(DIMEN(1,100),4)
00839           OPTSUP(K) = MOTINT( ADRESS(1,100) + K-1 )
00840         ENDDO
00841       ENDIF
00842 !     SO FAR THE SUPG MATRIX IS THE SAME FOR ALL ADVECTIONS
00843 !     SEE IN PRECON
00844 !     OPTSUP(2)=OPTSUP(1)  (THIS IS DEPTH, NO LONGER USED)
00845       OPTSUP(3)=OPTSUP(1)
00846       OPTSUP(4)=OPTSUP(1)
00847       WAQPRD=MOTINT( ADRESS(1,101) )
00848 !     KEYWORD: ORIGIN COORDINATES
00849       I_ORIG = MOTINT( ADRESS(1,102)   )
00850       J_ORIG = MOTINT( ADRESS(1,102)+1 )
00851 !     KEYWORD: STAGE-DISCHARGE CURVES
00852       IF(DIMEN(1,103).NE.0) THEN
00853         DO K=1,DIMEN(1,103)
00854           STA_DIS_CURVES(K) = MOTINT( ADRESS(1,103) + K-1 )
00855         ENDDO
00856       ENDIF
00857 !     KEYWORD: DEBUGGER
00858       DEBUG = MOTINT( ADRESS(1,104) )
00859 !     KEYWORD: RECORD IN THE WAVE DRIVEN CURRENTS FILE
00860       NPTH = MOTINT( ADRESS(1,105) )
00861 !     KEYWORD: TREATMENT OF NEGATIVE DEPTHS
00862       OPT_HNEG = MOTINT( ADRESS(1,106) )
00863 !     KEYWORD: SKIN FRICTION
00864       ICR = MOTINT( ADRESS(1,107) )
00865 !
00866       ICQ=  MOTINT( ADRESS(1,108) )
00867       IF(ICQ.NE.1.AND.ICQ.NE.3) THEN
00868         IF(LNG.EQ.1) WRITE(LU,1401) ICQ
00869         IF(LNG.EQ.2) WRITE(LU,1402) ICQ
00870 1401    FORMAT('ERREUR SUR LA CONCENTRATION DE REFERENCE : ',1I3)
00871 1402    FORMAT('ERROR ON THE REFERENCE CONCENTRATION: ',1I3)
00872         CALL PLANTE(1)
00873         STOP
00874       ENDIF
00875 !
00876       DO K=1,MAXFRO
00877         FRTYPE(K)=1
00878       ENDDO
00879       THOMFR=.FALSE.
00880       IF(DIMEN(1,109).GT.0) THEN
00881         DO K=1,DIMEN(1,109)
00882           FRTYPE(K) = MOTINT( ADRESS(1,109) + K-1 )
00883           IF(FRTYPE(K).EQ.2) THOMFR=.TRUE.
00884         ENDDO
00885       ENDIF
00886 !     KEYWORD: VERTICAL VELOCITY DERIVATIVES
00887       LINLOG = MOTINT( ADRESS(1,110) )
00888 !     OPTION FOR TIDAL BOUNDARY CONDITIONS
00889       TIDALTYPE  = MOTINT(ADRESS(1,111))
00890 !     INPUT TIDAL DATA BASE
00891       TIDALDB = MOTINT(ADRESS(1,112))
00892 !     GEOGRAPHIC SYSTEM IN WHICH THE NUMERICAL MODEL IS BUILT (TIDAL MODEL)
00893       GEOSYST = MOTINT(ADRESS(1,113))
00894 !     ZONE NUMBER WHEN USING A PLANE PROJECTION,
00895 !     ASSOCIATED TO GEOGRAPHIC SYSTEM (TIDAL MODEL)
00896       NUMZONE = MOTINT(ADRESS(1,114))
00897 !     MAXIMUM NUMBER OF ITERATIONS FOR ADVECTION SCHEMES
00898       MAXADV = MOTINT(ADRESS(1,115))
00899 !     OPTION FOR CHARACTERISTICS
00900       OPTCHA = MOTINT(ADRESS(1,116))
00901 !     MAXIMUM NUMBER OF GAUSS POINTS FOR WEAK CHARACTERISTICS
00902       NGAUSS = MOTINT(ADRESS(1,117))
00903 ! TBE + CV
00904       HIND_TYPE = MOTINT(ADRESS(1,125))
00905       FLOC_TYPE= MOTINT(ADRESS(1,126))
00906 !     OPTION OF ATMOSPHERE-WATER EXCHANGE MODEL
00907       ATMOSEXCH = MOTINT(ADRESS(1,50))
00908 !
00909 ! REAL KEYWORDS
00910 !
00911       DT        = MOTREA(ADRESS(2, 1))
00912       GRAV      = MOTREA(ADRESS(2, 2))
00913       FCOR      = MOTREA(ADRESS(2, 3))
00914       FAIR      = MOTREA(ADRESS(2, 4))
00915       FUAIR     = MOTREA(ADRESS(2, 5))
00916       FVAIR     = MOTREA(ADRESS(2, 6))
00917       TAIR      = MOTREA(ADRESS(2, 7))
00918 !
00919       IF(NTRAC.GT.0) THEN
00920         IF(TROUVE(2,8).EQ.2.AND.DIMEN(2,8).EQ.NTRAC) THEN
00921           DO I=1,NTRAC
00922             BETAC(I)  = MOTREA(ADRESS(2, 8)+I-1)
00923           ENDDO
00924         ELSEIF(DENLAW.EQ.4) THEN
00925           IF(LNG.EQ.1) THEN
00926             WRITE(LU,*) 'AVEC LOI DE DENSITE = 4 DONNER LE MOT-CLE'
00927             WRITE(LU,*)
00928      &      'COEFFICIENT DE DILATATION BETA POUR LES TRACEURS'
00929             WRITE(LU,*) 'POUR TOUS LES TRACEURS'
00930           ENDIF
00931           IF(LNG.EQ.2) THEN
00932             WRITE(LU,*) 'WITH DENSITY LAW = 4 GIVE THE KEY-WORD'
00933             WRITE(LU,*) 'BETA EXPANSION COEFFICIENT FOR TRACERS'
00934             WRITE(LU,*) 'FOR ALL TRACERS'
00935           ENDIF
00936           CALL PLANTE(1)
00937           STOP
00938         ENDIF
00939         IF(TROUVE(2,9).EQ.2.AND.DIMEN(2,9).GE.NTRAC) THEN
00940           DO I=1,NTRAC
00941             T0AC(I)  = MOTREA(ADRESS(2, 9)+I-1)
00942           ENDDO
00943         ELSEIF(DENLAW.EQ.4) THEN
00944           IF(LNG.EQ.1) THEN
00945             WRITE(LU,*) 'LOI DE DENSITE = 4 : DONNER LE MOT-CLE'
00946             WRITE(LU,*) 'VALEUR DE REFERENCE DES TRACEURS'
00947             WRITE(LU,*) 'POUR TOUS LES TRACEURS'
00948           ENDIF
00949           IF(LNG.EQ.2) THEN
00950             WRITE(LU,*) 'WITH DENSITY LAW = 4 GIVE THE KEY-WORD'
00951             WRITE(LU,*) 'STANDARD VALUE FOR TRACERS'
00952             WRITE(LU,*) 'FOR ALL TRACERS'
00953           ENDIF
00954           CALL PLANTE(1)
00955           STOP
00956         ENDIF
00957       ENDIF
00958 !
00959       RHO0      = MOTREA(ADRESS(2,10))
00960       RUGOF0    = MOTREA(ADRESS(2,11))
00961       RUGOL0    = MOTREA(ADRESS(2,12))
00962 !
00963 ! (...THE SAME ZERO FOR ALL SOLVERS...)
00964 !
00965       SLVDVI%ZERO = MOTREA(ADRESS(2,13))
00966       SLVDTA(1)%ZERO = MOTREA(ADRESS(2,13))
00967       IF(NTRAC.GT.1) THEN
00968         DO K=2,NTRAC
00969           SLVDTA(K)%ZERO = SLVDTA(1)%ZERO
00970         ENDDO
00971       ENDIF
00972 !     NO KEY-WORD FOR THIS ONE
00973       SLVDSE%ZERO = SLVDTA(1)%ZERO
00974       SLVDKE%ZERO = MOTREA(ADRESS(2,13))
00975       SLVPRO%ZERO = MOTREA(ADRESS(2,13))
00976       SLVW%ZERO   = MOTREA(ADRESS(2,13))
00977       SLVPOI%ZERO = MOTREA(ADRESS(2,13))
00978       SLVPRJ%ZERO = MOTREA(ADRESS(2,13))
00979 !
00980       HMIN      = MOTREA(ADRESS(2,14))
00981       HAULIN    = MOTREA(ADRESS(2,15))
00982       DNUVIH    = MOTREA(ADRESS(2,16))
00983       DNUVIV    = MOTREA(ADRESS(2,17))
00984       DNUTAH    = MOTREA(ADRESS(2,18))
00985       DNUTAV    = MOTREA(ADRESS(2,19))
00986 !
00987       IF(NTRAC.GT.0) THEN
00988         IF(TROUVE(2,20).EQ.2.AND.DIMEN(2,20).GE.NTRAC) THEN
00989           DO I=1,NTRAC
00990             TRAC0(I) = MOTREA(ADRESS(2,20)+I-1)
00991           ENDDO
00992         ELSE
00993           IF(LNG.EQ.1) THEN
00994             WRITE(LU,*) 'DONNER LE MOT-CLE'
00995             WRITE(LU,*) 'VALEURS INITIALES DES TRACEURS'
00996             WRITE(LU,*) 'POUR TOUS LES TRACEURS'
00997           ENDIF
00998           IF(LNG.EQ.2) THEN
00999             WRITE(LU,*) 'GIVE THE KEY-WORD'
01000             WRITE(LU,*) 'INITIAL VALUES OF TRACERS'
01001             WRITE(LU,*) 'FOR ALL TRACERS'
01002           ENDIF
01003           CALL PLANTE(1)
01004           STOP
01005         ENDIF
01006       ENDIF
01007 !
01008       SLVDSE%EPS    = MOTREA(ADRESS(2,21))
01009       SLVDVI%EPS    = MOTREA(ADRESS(2,22))
01010       SLVDTA(1)%EPS = MOTREA(ADRESS(2,23))
01011       IF(NTRAC.GT.1) THEN
01012         DO K=2,NTRAC
01013           SLVDTA(K)%EPS = SLVDTA(1)%EPS
01014         ENDDO
01015       ENDIF
01016       HLIM          = MOTREA(ADRESS(2,24))
01017       HSED          = MOTREA(ADRESS(2,36)) ! CV
01018       SLVDKE%EPS    = MOTREA(ADRESS(2,25))
01019       SLVPRO%EPS    = MOTREA(ADRESS(2,26))
01020       SLVW%EPS      = MOTREA(ADRESS(2,27))
01021 !
01022       TETAH     = MOTREA(ADRESS(2,28))
01023       TETAU     = MOTREA(ADRESS(2,29))
01024       AGGLOH    = MOTREA(ADRESS(2,30))
01025       AGGLOU    = MOTREA(ADRESS(2,31))
01026 !
01027 !       VALUES OF TRACERS IN THE RAIN
01028 !
01029       IF(NTRAC.GT.0) THEN
01030         DO I=1,NTRAC
01031           TRAIN(I) = 0.D0
01032         ENDDO
01033         IF(TROUVE(2,32).EQ.2) THEN
01034           DO I=1,DIMEN(2,32)
01035             TRAIN(I) = MOTREA(ADRESS(2,32)+I-1)
01036           ENDDO
01037         ENDIF
01038       ENDIF
01039 !
01040       NDEBIT=DIMEN(2,33)
01041       DO I=1,NDEBIT
01042         DEBIMP(I) = MOTREA(ADRESS(2,33)+I-1)
01043       ENDDO
01044 !
01045       NCOTE=DIMEN(2,34)
01046       DO I=1,NCOTE
01047         COTIMP(I) = MOTREA(ADRESS(2,34)+I-1)
01048       ENDDO
01049 !
01050       NVIT=DIMEN(2,35)
01051       DO I=1,NVIT
01052         VITIMP(I) = MOTREA(ADRESS(2,35)+I-1)
01053       ENDDO
01054 !
01055 !     CHECKING THE SIZE OF KEY-WORD TREATMENT OF FLUXES AT THE BOUNDARIES
01056 !     SOME USERS THINK IT IS A SINGLE VALUE FOR ALL BOUNDARIES
01057 !
01058       IF(TROUVE(1,97).EQ.2.AND.
01059      &    DIMEN(1,97).LT.MAX(NDEBIT,NCOTE,NVIT)) THEN
01060         IF(LNG.EQ.1) THEN
01061           WRITE(LU,*) 'LE MOT-CLEF'
01062           WRITE(LU,*) 'TRAITEMENT DES FLUX AUX FRONTIERES'
01063           WRITE(LU,*) 'DOIT ETRE UNE LISTE DE ',
01064      &                 MAX(NDEBIT,NCOTE,NVIT),
01065      &                ' VALEURS AU MOINS'
01066         ENDIF
01067         IF(LNG.EQ.2) THEN
01068           WRITE(LU,*) 'THE KEY-WORD'
01069           WRITE(LU,*) 'TREATMENT OF FLUXES AT THE BOUNDARIES'
01070           WRITE(LU,*) 'MUST BE A LIST OF ',
01071      &                 MAX(NDEBIT,NCOTE,NVIT),
01072      &                ' VALUES AT LEAST'
01073         ENDIF
01074         CALL PLANTE(1)
01075         STOP
01076       ENDIF
01077 !
01078 ! CV : TURBULENCE MODEL CONSTANTS
01079 !  7.0
01080       KARMAN= MOTREA( ADRESS(2, 65) )
01081       PRANDTL= MOTREA( ADRESS(2, 66) )
01082       FICT = MOTREA( ADRESS(2, 67) )
01083 !
01084 ! NON-HYDROSTATIC
01085 !
01086       SLVPOI%EPS = MOTREA( ADRESS(2, 71) )
01087 !     ??????     = MOTREA( ADRESS(2, 72) )
01088       SLVPRJ%EPS = MOTREA( ADRESS(2, 73) )
01089 !     ?????      = MOTREA( ADRESS(2, 74) )
01090       PHILAT     = MOTREA( ADRESS(2, 75) )
01091       DELTA      = MOTREA( ADRESS(2, 76) )
01092 ! SOGREAH ADDITIONS
01093       LATIT      = MOTREA( ADRESS(2, 77) )
01094       LONGIT     = MOTREA( ADRESS(2, 78) )
01095       NORD       = MOTREA( ADRESS(2, 79) )
01096       NSCE=DIMEN(2,80)
01097       DO I=1,NSCE
01098         XSCE(I) = MOTREA(ADRESS(2,80)+I-1)
01099         YSCE(I) = MOTREA(ADRESS(2,81)+I-1)
01100         ZSCE(I) = MOTREA(ADRESS(2,82)+I-1)
01101         QSCE(I) = MOTREA(ADRESS(2,83)+I-1)
01102       ENDDO
01103 !
01104       IF(NTRAC.GT.0) THEN
01105         DO I=1,NTRAC
01106           DO J=1,NSCE
01107             TASCE(J,I) = MOTREA(ADRESS(2,84)+((J-1)*NTRAC)+I-1)
01108           ENDDO
01109         ENDDO
01110         NTRACER=DIMEN(2,85)
01111         IF(NTRACER.GT.0) THEN
01112 !         TRACER WILL BE TRACER(NFRLIQ,NTRAC) BUT NFRLIQ UNKNOWN
01113           DO I=1,NTRACER
01114             TRACER(I)=MOTREA(ADRESS(2,85)+I-1)
01115           ENDDO
01116         ENDIF
01117       ENDIF
01118 !
01119       NREJEU = DIMEN(2,86)
01120       IF(NREJEU.EQ.NSCE) THEN
01121         DO I=1,NSCE
01122           USCE(I) = MOTREA(ADRESS(2,86)+I-1)
01123         ENDDO
01124       ELSEIF(NREJEU.EQ.0) THEN
01125         DO I=1,NSCE
01126           USCE(I) = 0.D0
01127         ENDDO
01128       ELSE
01129         IF(LNG.EQ.1) WRITE(LU,*)
01130      &    'MAUVAIS NOMBRE DE VITESSES DES SOURCES SELON X'
01131         IF(LNG.EQ.2) WRITE(LU,*)
01132      &    'WRONG NUMBER OF VELOCITIES OF SOURCES ALONG X'
01133         CALL PLANTE(1)
01134         STOP
01135       ENDIF
01136 !
01137       IF(DIMEN(2,87).EQ.NSCE) THEN
01138         DO I=1,NSCE
01139           VSCE(I) = MOTREA(ADRESS(2,87)+I-1)
01140         ENDDO
01141       ELSEIF(DIMEN(2,87).EQ.0) THEN
01142         DO I=1,NSCE
01143           VSCE(I) = 0.D0
01144         ENDDO
01145       ELSE
01146         IF(LNG.EQ.1) WRITE(LU,*)
01147      &    'MAUVAIS NOMBRE DE VITESSES DES SOURCES SELON Y'
01148         IF(LNG.EQ.2) WRITE(LU,*)
01149      &    'WRONG NUMBER OF VELOCITIES OF SOURCES ALONG Y'
01150       ENDIF
01151 !
01152 ! END OF SOGREAH ADDITIONS
01153 !
01154       COTINI = MOTREA( ADRESS(2, 88) )
01155       HAUTIN = MOTREA( ADRESS(2, 89) )
01156       TETADI = MOTREA( ADRESS(2, 90) )
01157       D50    = MOTREA( ADRESS(2, 91) )
01158 !     RELEASE 5.5 : MASS-LUMPING FOR DIFFUSION
01159       AGGLOD = MOTREA( ADRESS(2, 92) )
01160 !     RELEASE 5.7 :
01161       DUREE  = MOTREA( ADRESS(2, 93) )
01162       NIT=MAX(NIT,INT(DUREE/DT+0.5))
01163       TETAZCOMP = MOTREA( ADRESS(2, 94) )
01164       RAIN_MMPD = MOTREA( ADRESS(2, 95) )
01165       KSPRATIO  = MOTREA( ADRESS(2, 96) )
01166       AC        = MOTREA( ADRESS(2, 97) )
01167       HWIND     = MOTREA( ADRESS(2, 98) )
01168 !     COEFFICIENT TO CALIBRATE TIDAL RANGE
01169       CTIDE     = MOTREA( ADRESS(2, 99) )
01170 !     COEFFICIENT TO CALIBRATE TIDAL VELOCITIES
01171       CTIDEV    = MOTREA( ADRESS(2,100) )
01172 !     COEFFICIENT TO CALIBRATE SEA LEVEL (TIDAL MODEL)
01173       MSL       = MOTREA( ADRESS(2,101) )
01174 !     MASS-LUMPING FOR WEAK CHARACTERISTICS
01175       AGGLOW    = MOTREA( ADRESS(2,102) )
01176 ! TBE
01177       CGEL= MOTREA( ADRESS(2,103) )
01178       CINI= MOTREA( ADRESS(2,104) )
01179 !     SETTLING VELOCITY OF SANDS
01180       WCS0 = MOTREA( ADRESS(2,105) )
01181 !     INITIAL PERCENTAGE OF NON COHESIVE SEDIMENT
01182       PVSNCO0 = MOTREA( ADRESS(2,106) )
01183 !
01184 !     COEFFICIENT TO CALIBRATE THE ATMOSPHERE-WATER EXCHANGE MODEL
01185       C_ATMOS   = MOTREA( ADRESS(2,37) )
01186 !
01187 ! LOGICAL KEYWORDS
01188 !
01189       DEBU      = .NOT.MOTLOG(ADRESS(3,1))
01190       CONVEC    = MOTLOG(ADRESS(3, 2))
01191       DIFFUS    = MOTLOG(ADRESS(3, 3))
01192       PROP      = MOTLOG(ADRESS(3, 4))
01193       CORIOL    = MOTLOG(ADRESS(3, 5))
01194       VENT      = MOTLOG(ADRESS(3, 6))
01195       ATMOS     = MOTLOG(ADRESS(3, 7))
01196       RAZTIM    = MOTLOG(ADRESS(3, 8))
01197       SEDI      = MOTLOG(ADRESS(3, 9))
01198       IF(SEDI.AND.NTRAC.EQ.0) THEN
01199         IF(LNG.EQ.1) THEN
01200           WRITE(LU,*)
01201           WRITE(LU,*) 'AVEC SEDIMENT IL FAUT AU MOINS UN TRACEUR'
01202           WRITE(LU,*)
01203         ENDIF
01204         IF(LNG.EQ.2) THEN
01205           WRITE(LU,*)
01206           WRITE(LU,*) 'WITH SEDIMENT AT LEAST ONE TRACER NEEDED'
01207           WRITE(LU,*)
01208         ENDIF
01209         CALL PLANTE(1)
01210         STOP
01211       ENDIF
01212       MSKUSE       = MOTLOG(ADRESS(3,10))
01213       BANDEC       = MOTLOG(ADRESS(3,11))
01214       PROLIN       = MOTLOG(ADRESS(3,12))
01215       BILMAS       = MOTLOG(ADRESS(3,13))
01216       INFMAS       = MOTLOG(ADRESS(3,14))
01217       RAIN         = MOTLOG(ADRESS(3,15))
01218       INCHYD       = MOTLOG(ADRESS(3,16))
01219       SPHERI       = MOTLOG(ADRESS(3,17))
01220       MAREE        = MOTLOG(ADRESS(3,18))
01221       VALID        = MOTLOG(ADRESS(3,19))
01222       RESTART_MODE = MOTLOG(ADRESS(3,20))
01223       TASSE        = MOTLOG(ADRESS(3,51))
01224 ! OBSOLE REPLACED BY ITASS
01225 !      GIBSON       = MOTLOG(ADRESS(3,52))
01226 !      TURBWC       = MOTLOG(ADRESS(3,53))
01227       LISTIN       = MOTLOG(ADRESS(3,61))
01228 !
01229 ! NON-HYDROSTATIC
01230 !
01231       CLDYN     = MOTLOG( ADRESS(3,70) )
01232       NONHYD    = MOTLOG( ADRESS(3,71) )
01233       DPWAVEQ   = MOTLOG( ADRESS(3,72) )
01234 !
01235 ! SEDIMENT CONSOLIDATION
01236 !
01237       CONSOL    = MOTLOG( ADRESS(3,73) )
01238 !
01239 ! CONSISTENT PROJECTION (CURRENTLY NOT USED...)
01240 !
01241       CONPRO    = MOTLOG( ADRESS(3,74) )
01242 !
01243       SUIT2     = MOTLOG( ADRESS(3,75) )
01244 ! COHESIVE SEDIMENT
01245       SEDCO     = MOTLOG( ADRESS(3,76) )
01246 ! SALINITY AND TEMPERATURE OUTPUT FOR DELWAQ
01247       SALI_DEL  = MOTLOG( ADRESS(3,77) )
01248       TEMP_DEL  = MOTLOG( ADRESS(3,78) )
01249       VELO_DEL  = MOTLOG( ADRESS(3,79) )
01250       DIFF_DEL  = MOTLOG( ADRESS(3,80) )
01251 ! WAVE DRIVEN CURRENTS
01252       COUROU    = MOTLOG( ADRESS(3,81) )
01253 !     BYPASS VOID VOLUMES
01254       BYPASS    = MOTLOG( ADRESS(3,82) )
01255 !     VELOCITY PROJECTED ON SOLID LATERAL BOUNDARIES
01256       VELPROLAT = MOTLOG( ADRESS(3,83) )
01257 !     VELOCITY PROJECTED ON BOTTOM
01258       VELPROBOT = MOTLOG( ADRESS(3,84) )
01259 !     OIL SPILL MODEL
01260       SPILL_MODEL=MOTLOG( ADRESS(3,85) )
01261 !     INFERENCE OF MINOR CONSTITUENTS OF TPXO TIDAL DATABASE
01262       INTMICON  = MOTLOG( ADRESS(3,86) )
01263 ! TBE + CV
01264       READ_TOCE=  MOTLOG( ADRESS(3,87))
01265       HINDER=  MOTLOG( ADRESS(3,90))
01266       FLOC =  MOTLOG( ADRESS(3,91))
01267 !     MIXED SEDIMENT
01268       MIXTE=  MOTLOG( ADRESS(3,92))
01269 !     LOGICAL SEDNCO IS DEDUCED FROM MIXTE AND SEDCO
01270       SEDNCO=MIXTE.EQV.SEDCO
01271 !
01272 !     FOR NEXT LOGICAL, USE 21 TO 50 AND OTHER AVAILABLE NUMBERS !!!!!!!!!!!!
01273 !
01274 ! CHARACTER KEYWORDS (APPROPRIATELY TRUNCATED!)
01275 !
01276       TITCAS    = MOTCAR(ADRESS(4, 1))(1:72)
01277       SORT3D    = MOTCAR(ADRESS(4, 2))(1:72)
01278       CALL MAJUS(SORT3D)
01279       SORT2D    = MOTCAR(ADRESS(4, 3))(1:72)
01280       CALL MAJUS(SORT2D)
01281 !
01282 ! FILENAMES FROM THE STEERING FILE
01283 !
01284 !     4 TO 5 : READ AND USED BY LAUNCHING PROCEDURE
01285       T3D_FILES(T3DGEO)%NAME=MOTCAR( ADRESS(4, 6) )
01286 !     NOMFOR                =MOTCAR( ADRESS(4, 7) )
01287 !     NOMCAS                =MOTCAR( ADRESS(4, 8) )
01288       T3D_FILES(T3DCLI)%NAME=MOTCAR( ADRESS(4, 9) )
01289       T3D_FILES(T3DPRE)%NAME=MOTCAR( ADRESS(4,10) )
01290       T3D_FILES(T3DRES)%NAME=MOTCAR( ADRESS(4,11) )
01291       T3D_FILES(T3DFON)%NAME=MOTCAR( ADRESS(4,16) )
01292       T3D_FILES(T3DSCO)%NAME=MOTCAR( ADRESS(4,17) )
01293 !     2D RESULTS FILE
01294       T3D_FILES(T3DHYD)%NAME=MOTCAR( ADRESS(4,18) )
01295       T3D_FILES(T3DFO1)%NAME=MOTCAR( ADRESS(4,19) )
01296       T3D_FILES(T3DFO2)%NAME=MOTCAR( ADRESS(4,20) )
01297       T3D_FILES(T3DBI1)%NAME=MOTCAR( ADRESS(4,21) )
01298       T3D_FILES(T3DBI2)%NAME=MOTCAR( ADRESS(4,22) )
01299       T3D_FILES(T3DREF)%NAME=MOTCAR( ADRESS(4,55) )
01300 !     MIGRHYCAR STEERING FILE
01301       T3D_FILES(T3DMIG)%NAME=MOTCAR( ADRESS(4,57) )
01302 !     LIQUID BOUNDARY FILE
01303       T3D_FILES(T3DIMP)%NAME=MOTCAR( ADRESS(4,58) )
01304 !     HARMONIC CONSTANTS FILE
01305       T3D_FILES(T3DHAR)%NAME=MOTCAR( ADRESS(4,86) )
01306 !     TIDAL MODEL FILE
01307       T3D_FILES(T3DTID)%NAME=MOTCAR( ADRESS(4,87) )
01308 !     TIDE DATA BASE FILE
01309       T3D_FILES(T3DBDD)%NAME=MOTCAR( ADRESS(4,88) )
01310 !     BINARY TIDE DATABASE FILE 1 (FOR SATELLITE ALTIMETRY)
01311       T3D_FILES(T3DBB1)%NAME=MOTCAR( ADRESS(4,89) )
01312 !     BINARY TIDE DATABASE FILE 2 (FOR SATELLITE ALTIMETRY)
01313       T3D_FILES(T3DBB2)%NAME=MOTCAR( ADRESS(4,90) )
01314 !
01315 !     INITIAL CONDITIONS
01316       CDTINI    = MOTCAR(ADRESS(4,59))(1:72)
01317 !
01318       BINGEO    = MOTCAR(ADRESS(4,24))(1:3)
01319       CALL MAJUS(BINGEO)
01320       BINRES    = MOTCAR(ADRESS(4,25))(1:3)
01321       CALL MAJUS(BINRES)
01322       BINPRE    = MOTCAR(ADRESS(4,26))(1:3)
01323       CALL MAJUS(BINPRE)
01324       BINHYD    = MOTCAR(ADRESS(4,27))(1:3)
01325       CALL MAJUS(BINHYD)
01326 !     FORMAT OF THE GEOMETRY FILE
01327       T3D_FILES(T3DGEO)%FMT = MOTCAR( ADRESS(4,29) )(1:8)
01328       CALL MAJUS(T3D_FILES(T3DGEO)%FMT)
01329 !     FORMAT OF THE 3D RESULTS FILE
01330       T3D_FILES(T3DRES)%FMT = MOTCAR( ADRESS(4,30) )(1:8)
01331       CALL MAJUS(T3D_FILES(T3DRES)%FMT)
01332 !     FORMAT OF THE 2D RESULTS FILE
01333       T3D_FILES(T3DHYD)%FMT = MOTCAR( ADRESS(4,28) )(1:8)
01334       CALL MAJUS(T3D_FILES(T3DHYD)%FMT)
01335 !     FORMAT OF THE PREVIOUS COMPUTATION RESULTS FILE
01336       T3D_FILES(T3DPRE)%FMT = MOTCAR( ADRESS(4,31) )(1:8)
01337       CALL MAJUS(T3D_FILES(T3DPRE)%FMT)
01338 !
01339 !     INITIALISES AND READS THE NAMES OF TRACERS
01340 !
01341       IF(NTRAC.GT.0) THEN
01342         DO I=1,NTRAC
01343           IF(LNG.EQ.1) THEN
01344            NAMETRAC(I) =  'TRACEUR '//I_IN_2_LETTERS(I)//'      '
01345      &                   // '??              '
01346           ELSEIF(LNG.EQ.2) THEN
01347            NAMETRAC(I) =  'TRACER '//I_IN_2_LETTERS(I)//'       '
01348      &                   // '??              '
01349           ENDIF
01350         ENDDO
01351       ENDIF
01352       NTRTOT=DIMEN(4,56)
01353       IF(NTRTOT.GT.0.AND.NTRAC.GT.0) THEN
01354         DO I=1,NTRTOT
01355           NAMETRAC(I) = MOTCAR(ADRESS(4,56)+I-1)(1:32)
01356         ENDDO
01357       ENDIF
01358 !
01359       ELEMENT = MOTCAR(ADRESS(4,60))(1:72)
01360 !
01361 !     TELEMAC3D DISCRETISATION TYPES: 3D, 2D HORIZONTAL BOUNDARY,
01362 !     2D VERTICAL BOUNDARY
01363 !
01364       IF(ELEMENT(1:5).EQ.'PRISM') THEN
01365         IELM3  = 41     ! TELEMAC3D PRISMS
01366         IELM2H = 11     ! TRIANGULAR BOTTOM AND SURFACE
01367         IELM2V = 71     ! QUADRILATERAL LATERAL BOUNDARIES
01368       ELSEIF(ELEMENT(1:5).EQ.'TETRA') THEN
01369         IELM3  = 51     ! PRISMS CUT INTO TETRAHEDRONS
01370         IELM2H = 11     ! TRIANGULAR BOTTOM AND SURFACE
01371         IELM2V = 61     ! TRIANGULAR LATERAL BOUNDARIES
01372       ELSE
01373         IF(LNG.EQ.1) WRITE(LU,*) 'ELEMENT INCONNU : ',ELEMENT
01374         IF(LNG.EQ.2) WRITE(LU,*) 'UNKNOWN ELEMENT: ',ELEMENT
01375         CALL PLANTE(1)
01376         STOP
01377       ENDIF
01378 !
01379 !     61: SISYPHE STEERING FILE, NOT READ HERE
01380 !
01381 !     COUPLING IN BIEF DECLARATIONS
01382       COUPLING = MOTCAR(ADRESS(4,62))(1:74)
01383 !     63-71 : DELWAQ FILES
01384       T3D_FILES(T3DDL1)%NAME=MOTCAR( ADRESS(4,63) )
01385       T3D_FILES(T3DDL2)%NAME=MOTCAR( ADRESS(4,64) )
01386       T3D_FILES(T3DDL3)%NAME=MOTCAR( ADRESS(4,65) )
01387       T3D_FILES(T3DDL5)%NAME=MOTCAR( ADRESS(4,66) )
01388       T3D_FILES(T3DDL6)%NAME=MOTCAR( ADRESS(4,67) )
01389       T3D_FILES(T3DDL7)%NAME=MOTCAR( ADRESS(4,68) )
01390       T3D_FILES(T3DL11)%NAME=MOTCAR( ADRESS(4,69) )
01391       T3D_FILES(T3DDL4)%NAME=MOTCAR( ADRESS(4,70) )
01392       T3D_FILES(T3DDL8)%NAME=MOTCAR( ADRESS(4,71) )
01393 !
01394       T3D_FILES(T3DDL9)%NAME=MOTCAR( ADRESS(4,76) )
01395       T3D_FILES(T3DL10)%NAME=MOTCAR( ADRESS(4,77) )
01396 !     STAGE-DISCHARGE CURVES FILE
01397       T3D_FILES(T3DPAR)%NAME=MOTCAR( ADRESS(4,72) )
01398 !     SOURCES FILE (MUST BE ALSO NOMVEF IN TELEMAC-2D)
01399       T3D_FILES(T3DVEF)%NAME=MOTCAR( ADRESS(4,73) )
01400 !     BINARY RESULTS FILE
01401       T3D_FILES(T3DRBI)%NAME=MOTCAR( ADRESS(4,74) )
01402 !     FORMATTED RESULTS FILE
01403       T3D_FILES(T3DRFO)%NAME=MOTCAR( ADRESS(4,75) )
01404 !
01405 !     76 AND 77: SEE IN DELWAQ FILES ABOVE
01406 !
01407 !     FORMAT OF THE REFERENCE FILE
01408       T3D_FILES(T3DREF)%FMT = MOTCAR( ADRESS(4,78) )(1:8)
01409       CALL MAJUS(T3D_FILES(T3DREF)%FMT)
01410 !     FORMAT OF THE BINARY DATA FILE 1
01411       T3D_FILES(T3DBI1)%FMT = MOTCAR( ADRESS(4,79) )(1:8)
01412       CALL MAJUS(T3D_FILES(T3DBI1)%FMT)
01413 !     RESTART FILE
01414       T3D_FILES(T3DRST)%NAME=MOTCAR( ADRESS(4,85) )
01415 !     RESTART FILE FORMAT
01416       T3D_FILES(T3DRST)%FMT = MOTCAR( ADRESS(4,84) )(1:8)
01417 !     DROGUES FILE
01418       T3D_FILES(T3DFLO)%NAME=MOTCAR( ADRESS(4,91) )
01419 !     2D CONTINUATION FILE
01420       T3D_FILES(T3DS2D)%NAME=MOTCAR( ADRESS(4,92) )
01421 !     FORMAT OF THE 2D CONTINUATION FILE
01422       T3D_FILES(T3DS2D)%FMT = MOTCAR( ADRESS(4,93) )(1:8)
01423 !
01424 !-----------------------------------------------------------------------
01425 ! SEDIMENT - EX-LECSED.F
01426 !
01427 ! INTEGERS
01428 ! CV OBSOLETE FOR CONSILATION MODEL USE NCOUCH, NLAYMAX
01429 !
01430 !     NPFMAX        = MOTINT(ADRESS(1,51))
01431 !
01432       ITASS        = MOTINT(ADRESS(1,51))
01433 !
01434       SLVDSE%SLV    = MOTINT(ADRESS(1,52))
01435       SLVDSE%PRECON = MOTINT(ADRESS(1,53))
01436 !
01437 ! CV : VERTICAL SCHME
01438 !
01439         SETDEP = MOTINT( ADRESS(1,54))
01440 !
01441 ! REALS
01442 !
01443       RHOS      = MOTREA(ADRESS(2,51))
01444       TOCD      = MOTREA(ADRESS(2,52))
01445       EPAI0     = MOTREA(ADRESS(2,54))
01446       DTC       = MOTREA(ADRESS(2,55))
01447       CFMAX     = MOTREA(ADRESS(2,56))
01448       MPART     = MOTREA(ADRESS(2,57))
01449 !
01450       TURBA     = MOTREA(ADRESS(2,59))
01451       TURBB     = MOTREA(ADRESS(2,60))
01452       WCHU0     = MOTREA(ADRESS(2,61))
01453       IF(SEDI.AND.WCHU0.LT.0.D0) THEN
01454         PRINT*,'CHANGE SETTLING VELOCITY TO BECOME POSITIVE '
01455         CALL PLANTE(1)
01456         STOP
01457       ENDIF
01458 !
01459 !CV...
01460 !      TOCE      = MOTREA(ADRESS(2,58))
01461 !      CFDEP     = MOTREA(ADRESS(2,53))
01462       XKV =   MOTREA(ADRESS(2,63))
01463 !
01464 ! sediment bed layers initialization
01465 !
01466 
01467       DO K = 1, DIMEN(2,53)
01468         CONC_LAYER(K)=MOTREA( ADRESS(2,53) + K-1 )
01469         TOCE_LAYER(K)=MOTREA( ADRESS(2,58) + K-1 )
01470         ES_LAYER(K)=MOTREA( ADRESS(2,64) + K-1 )
01471 ! multilayer consolidation
01472         IF(TASSE) TREST(K) = MOTREA(ADRESS(2,62)+K-1)
01473       ENDDO
01474 !
01475 ! CFDEP no longer used, replaced by CONC(1)
01476 !
01477 !        IF(SEDCO) THEN
01478 !          CFDEP=CONC_LAYER(NCOUCH)
01479 !        ELSE
01480 !           CFDEP=(1.D0-XKV)* RHOS
01481 !        ENDIF
01482 !....CV
01483 !
01484 ! CHARACTERS
01485 !
01486       T3D_FILES(T3DSED)%NAME=MOTCAR( ADRESS(4,51) )
01487       T3D_FILES(T3DSUS)%NAME=MOTCAR( ADRESS(4,52) )
01488 !
01489       BIRSED    = MOTCAR(ADRESS(4,53))(1:3)
01490       CALL MAJUS(BIRSED)
01491       BISUIS    = MOTCAR(ADRESS(4,54))(1:3)
01492       CALL MAJUS(BISUIS)
01493 !
01494 !-----------------------------------------------------------------------
01495 ! INFORMS THE USER THAT NO LISTING WILL APPEAR
01496 !
01497       IF(LISTIN) THEN
01498         IF(LNG.EQ.1) WRITE(LU,103)
01499         IF(LNG.EQ.2) WRITE(LU,104)
01500       ELSE
01501         IF(LNG.EQ.1) WRITE(LU,*) '*** PAS DE LISTING DEMANDE ***'
01502         IF(LNG.EQ.2) WRITE(LU,*) '*** NO LISTING REQUIRED ***'
01503       ENDIF
01504 103   FORMAT(1X,/,19X, '********************************************',/,
01505      &            19X, '*               LECDON:                    *',/,
01506      &            19X, '*        APRES APPEL DE DAMOCLES           *',/,
01507      &            19X, '*     VERIFICATION DES DONNEES LUES        *',/,
01508      &            19X, '*     SUR LE FICHIER DES PARAMETRES        *',/,
01509      &            19X, '********************************************',/)
01510 104   FORMAT(1X,/,19X, '********************************************',/,
01511      &            19X, '*               LECDON:                    *',/,
01512      &            19X, '*        AFTER CALLING DAMOCLES            *',/,
01513      &            19X, '*        CHECKING OF DATA  READ            *',/,
01514      &            19X, '*         IN THE STEERING FILE             *',/,
01515      &            19X, '********************************************',/)
01516 !
01517 !-----------------------------------------------------------------------
01518 ! DEDUCES OTHER PARAMETERS
01519 !-----------------------------------------------------------------------
01520 ! SEDIMENT CONCENTRATION IS THE LAST ACTIVE TRACER BY DEFINITION
01521 !
01522 ! SEDIMENT CONCENTRATION IS ONE OF ACTIVE TRACERS
01523 ! TA(1,NTRAC) --> SEDIMENT CONCENTRATION IF SEDIMENTOLOGY
01524 !
01525       IF (SEDI) THEN
01526         IF (LNG.EQ.1) WRITE(LU,111)
01527         IF (LNG.EQ.2) WRITE(LU,112)
01528 111   FORMAT(/,'ATTENTION: LA CONCENTRATION EN SEDIMENT EST LE DERNIER',
01529      &       /,'=========  TRACEUR DU TABLEAU DES TRACEURS ACTIFS')
01530 112   FORMAT(/,'ATTENTION: THE SEDIMENT CONCENTRATION IS THE LAST',
01531      &       /,'=========  TRACER OF THE ARRAY OF ACTIVE TRACERS')
01532 !
01533       ENDIF
01534 !
01535 !-----------------------------------------------------------------------
01536 ! SPECIAL TREATMENT IF PARALLELISM
01537 !
01538       IF(NCSIZE.GT.1.AND.BANDEC.AND.OPTBAN.EQ.2) THEN
01539         OPTBAN=1
01540         IF (LNG.EQ.1) WRITE(LU,121)
01541         IF (LNG.EQ.2) WRITE(LU,122)
01542 121     FORMAT(/,'ATTENTION: VOUS AVEZ CHOISI LE MODE PARALLELE,',
01543      &         /,'=========  L''OPTION DE TRAITEMENT DES BANCS',
01544      &         /,'           DECOUVRANTS EST MISE A 1')
01545 !
01546 122     FORMAT(/,'ATTENTION: YOU HAVE CHOSEN PARALLEL MODE,',
01547      &         /,'=========  THE TIDAL FLATS TREATMENT IS SET TO 1')
01548 !
01549       ENDIF
01550 !
01551 !-----------------------------------------------------------------------
01552 !
01553       IF(OPTBAN.EQ.1.AND.OPT_HNEG.EQ.2) THEN
01554         IF(ABS(AGGLOH-1.D0).GT.0.01D0) THEN
01555           IF(LNG.EQ.1) THEN
01556             WRITE(LU,*) 'TRAITEMENT DES HAUTEURS NEGATIVES=2'
01557             WRITE(LU,*) 'MASS-LUMPING POUR LA HAUTEUR DOIT VALOIR 1.'
01558           ENDIF
01559           IF(LNG.EQ.2) THEN
01560             WRITE(LU,*) 'TREATMENT OF NEGATIVE DEPTHS=2'
01561             WRITE(LU,*) 'MASS-LUMPING FOR DEPTH MUST BE EQUAL TO 1.'
01562           ENDIF
01563           CALL PLANTE(1)
01564           STOP
01565         ENDIF
01566       ENDIF
01567 !
01568 !     TIDAL FLATS VERSIONS OF FINITE VOLUME ADVECTION SCHEMES
01569 !     REQUEST POSITIVE DEPTHS
01570 !
01571       IF(BANDEC.AND.OPTBAN.EQ.1.AND.OPT_HNEG.NE.2) THEN
01572         IF(SCHCVI.EQ.ADV_NSC_TF.OR.SCHCKE.EQ.ADV_NSC_TF
01573      & .OR.SCHCVI.EQ.ADV_LPO_TF.OR.SCHCKE.EQ.ADV_LPO_TF
01574      & .OR.SCHCVI.EQ.ADV_PSI_TF.OR.SCHCKE.EQ.ADV_PSI_TF) THEN
01575           IF(LNG.EQ.1) THEN
01576             WRITE(LU,*) 'AVEC LES SCHEMAS POUR LA CONVECTION'
01577             WRITE(LU,*) ADV_LPO_TF,ADV_NSC_TF,' OU ',ADV_PSI_TF
01578             WRITE(LU,*) 'TRAITEMENT DES HAUTEURS NEGATIVES'
01579             WRITE(LU,*) 'DOIT ETRE EGAL A 2'
01580           ENDIF
01581           IF(LNG.EQ.2) THEN
01582             WRITE(LU,*) 'WITH ADVECTION SCHEMES'
01583             WRITE(LU,*) ADV_LPO_TF,ADV_NSC_TF,' OR ',ADV_PSI_TF
01584             WRITE(LU,*) 'TREATMENT OF NEGATIVE DEPTHS'
01585             WRITE(LU,*) 'MUST BE EQUAL TO 2'
01586           ENDIF
01587           CALL PLANTE(1)
01588           STOP
01589         ENDIF
01590         IF(NTRAC.GT.0) THEN
01591           DO K=1,NTRAC
01592             IF(SCHCTA(K).EQ.ADV_NSC_TF.OR.SCHCTA(K).EQ.ADV_LPO_TF
01593      &                                .OR.SCHCTA(K).EQ.ADV_PSI_TF) THEN
01594               IF(LNG.EQ.1) THEN
01595                 WRITE(LU,*) 'AVEC LES SCHEMAS POUR LA CONVECTION'
01596                 WRITE(LU,*) ADV_LPO_TF,ADV_NSC_TF,' OU ',ADV_PSI_TF
01597                 WRITE(LU,*) 'TRAITEMENT DES HAUTEURS NEGATIVES'
01598                 WRITE(LU,*) 'DOIT ETRE EGAL A 2'
01599               ENDIF
01600               IF(LNG.EQ.2) THEN
01601                 WRITE(LU,*) 'WITH ADVECTION SCHEMES'
01602                 WRITE(LU,*) ADV_LPO_TF,ADV_NSC_TF,' OR ',ADV_PSI_TF
01603                 WRITE(LU,*) 'TREATMENT OF NEGATIVE DEPTHS'
01604                 WRITE(LU,*) 'MUST BE EQUAL TO 2'
01605               ENDIF
01606               CALL PLANTE(1)
01607               STOP
01608             ENDIF
01609           ENDDO
01610         ENDIF
01611       ENDIF
01612 !
01613 !     WITH TETRAHEDRA, LEO POSTMA SCHEME IS REPLACED BY N-SCHEME
01614 !
01615       IF(IELM3.EQ.51) THEN
01616         IF(SCHCVI.EQ.ADV_LPO.OR.SCHCVI.EQ.ADV_LPO_TF) THEN
01617           IF(LNG.EQ.1) THEN
01618             WRITE(LU,*) 'AVEC TETRAEDRES'
01619             WRITE(LU,*) 'LE SCHEMA POUR LA CONVECTION DES VITESSES'
01620             WRITE(LU,*) ADV_LPO,' OU ',ADV_LPO_TF
01621             WRITE(LU,*) 'EST REMPLACE PAR'
01622             WRITE(LU,*) ADV_NSC,' OU ',ADV_NSC_TF
01623           ENDIF
01624           IF(LNG.EQ.2) THEN
01625             WRITE(LU,*) 'WITH TETRAHEDRA ADVECTION SCHEME'
01626             WRITE(LU,*) ADV_LPO,' OR ',ADV_LPO_TF
01627             WRITE(LU,*) 'IS REPLACED BY'
01628             WRITE(LU,*) ADV_NSC,' OR ',ADV_NSC_TF
01629           ENDIF
01630           SCHCVI=SCHCVI+1
01631         ENDIF
01632         IF(SCHCKE.EQ.ADV_LPO.OR.SCHCKE.EQ.ADV_LPO_TF) THEN
01633           IF(LNG.EQ.1) THEN
01634             WRITE(LU,*) 'AVEC TETRAEDRES'
01635             WRITE(LU,*) 'LE SCHEMA POUR LA CONVECTION DU K-EPSILON'
01636             WRITE(LU,*) ADV_LPO,' OU ',ADV_LPO_TF
01637             WRITE(LU,*) 'EST REMPLACE PAR'
01638             WRITE(LU,*) ADV_NSC,' OU ',ADV_NSC_TF
01639           ENDIF
01640           IF(LNG.EQ.2) THEN
01641             WRITE(LU,*) 'WITH TETRAHEDRA ADVECTION SCHEME'
01642             WRITE(LU,*) ADV_LPO,' OR ',ADV_LPO_TF
01643             WRITE(LU,*) 'IS REPLACED BY'
01644             WRITE(LU,*) ADV_NSC,' OR ',ADV_NSC_TF
01645           ENDIF
01646           SCHCKE=SCHCKE+1
01647         ENDIF
01648         IF(NTRAC.GT.0) THEN
01649           DO K=1,NTRAC
01650             IF(SCHCTA(K).EQ.ADV_LPO.OR.SCHCTA(K).EQ.ADV_LPO_TF) THEN
01651               IF(LNG.EQ.1) THEN
01652                 WRITE(LU,*) 'AVEC TETRAEDRES'
01653                 WRITE(LU,*) 'LE SCHEMA POUR LA CONVECTION DES TRACEURS'
01654                 WRITE(LU,*) ADV_LPO,' OU ',ADV_LPO_TF
01655                 WRITE(LU,*) 'EST REMPLACE PAR'
01656                 WRITE(LU,*) ADV_NSC,' OU ',ADV_NSC_TF
01657               ENDIF
01658               IF(LNG.EQ.2) THEN
01659                 WRITE(LU,*) 'WITH TETRAHEDRA ADVECTION SCHEME'
01660                 WRITE(LU,*) ADV_LPO,' OR ',ADV_LPO_TF
01661                 WRITE(LU,*) 'IS REPLACED BY'
01662                 WRITE(LU,*) ADV_NSC,' OR ',ADV_NSC_TF
01663               ENDIF
01664               SCHCTA(K)=SCHCTA(K)+1
01665             ENDIF
01666           ENDDO
01667         ENDIF
01668       ENDIF
01669 !
01670 !-----------------------------------------------------------------------
01671 ! GENERALISED SIGMA TRANSFORMATION REQUIRES SPECIAL TREATMENT
01672 ! OF ADVECTION TERMS
01673 !
01674       SIGMAG=.TRUE.
01675       IF(TRANSF.EQ.1.OR.TRANSF.EQ.2) SIGMAG=.FALSE.
01676 !
01677 !-----------------------------------------------------------------------
01678 !
01679       IELMH = 11
01680 !
01681       PROP=.FALSE.
01682 !
01683       IELMU = IELMH
01684 !
01685       PRODUC = 1
01686 !
01687       IF(.NOT.BANDEC) THEN
01688         OPTBAN = 0
01689         OPT_HNEG = 0
01690       ENDIF
01691       IF(OPTBAN.EQ.2) THEN
01692         MSK  = .TRUE.
01693 !       WITH A NEGATIVE HMIN, MASKBD WILL FAIL
01694         HMIN = MAX(HMIN,0.D0)
01695       ELSEIF(MSKUSE) THEN
01696         MSK  = .TRUE.
01697       ELSE
01698 !       NOTE JMH : MASKING BY THE USER DOES NOT APPEAR TO HAVE
01699 !                  BEEN ENVISAGED
01700         MSK = .FALSE.
01701       ENDIF
01702 !
01703 !     TO KEEP DHN FREE FOR CALLING CONTIN
01704 !
01705       IF(IORDRH.EQ.2.AND.NONHYD) IORDRH=1
01706 !
01707 !     SUPG OPTIONS
01708 !
01709       IF(SCHCH.EQ.5) THEN
01710         OPTSUP(2) = 0
01711       ELSE
01712         IF(LNG.EQ.1) THEN
01713           WRITE(LU,*) 'SCHEMA POUR LA CONVECTION DE LA HAUTEUR'
01714           WRITE(LU,*) 'EST MAINTENANT OBLIGATOIREMENT 5'
01715         ENDIF
01716         IF(LNG.EQ.2) THEN
01717           WRITE(LU,*) 'SCHEME FOR ADVECTION OF DEPTH'
01718           WRITE(LU,*) 'MUST NOW ALWAYS BE EQUAL TO 5'
01719         ENDIF
01720         CALL PLANTE(1)
01721         STOP
01722       ENDIF
01723 !
01724 !     OPTION FOR DIFFUSION OF VELOCITY
01725 !
01726       OPDVIT = 1
01727 !     OPTSOU : TREATMENT OF SOURCES, NORMAL (1) OR DIRAC (2)
01728 !     HERE 2 BECAUSE IT WILL AVOID AN INTEGRATION OF SMH IN PROPAG
01729       OPTSOU = 2
01730       TETAD  = 1.D0
01731 !
01732 !-----------------------------------------------------------------------
01733 ! SETS VARIABLES WHEN THE ADVECTION STEP IS NOT REQUIRED
01734 !
01735       IF(.NOT.CONVEC) THEN
01736         SCHCVI = 0
01737         SCHCKE = 0
01738       ENDIF
01739       IF(NTRAC.GT.0.AND..NOT.CONVEC) THEN
01740         DO K=1,NTRAC
01741           SCHCTA(K) = 0
01742         ENDDO
01743       ENDIF
01744 !
01745 !-----------------------------------------------------------------------
01746 !
01747 !     IF K-E IS SELECTED FOR VERTICAL TURBULENCE
01748 !     K-E IS MANDATORY FOR HORIZONTAL TURBULENCE (AND REVERSE)
01749 !
01750       IF(ITURBV.EQ.3.AND.ITURBH.NE.3) THEN
01751         ITURBH = 3
01752         IF (LNG.EQ.1) WRITE(LU,*)
01753      &   'LECDON: MODELE DE TURBULENCE HORIZONTAL FORCE A 3'
01754         IF (LNG.EQ.2) WRITE(LU,*)
01755      &   'LECDON: HORIZONTAL TURBULENCE MODEL SET TO 3'
01756       ENDIF
01757       IF(ITURBH.EQ.3.AND.ITURBV.NE.3) THEN
01758         ITURBV = 3
01759         IF (LNG.EQ.1) WRITE(LU,*)
01760      &   'LECDON: MODELE DE TURBULENCE VERTICAL FORCE A 3'
01761         IF (LNG.EQ.2) WRITE(LU,*)
01762      &   'LECDON: VERTICAL TURBULENCE MODEL SET TO 3'
01763       ENDIF
01764 !
01765 !     IF K-W IS SELECTED FOR VERTICAL TURBULENCE
01766 !     K-W IS MANDATORY FOR HORIZONTAL TURBULENCE (AND REVERSE)
01767 !
01768       IF(ITURBV.EQ.7.AND.ITURBH.NE.7) THEN
01769         ITURBH = 7
01770         IF (LNG.EQ.1) WRITE(LU,*)
01771      &   'LECDON: MODELE DE TURBULENCE HORIZONTAL FORCE A 7'
01772         IF (LNG.EQ.2) WRITE(LU,*)
01773      &   'LECDON: HORIZONTAL TURBULENCE MODEL SET TO 7'
01774       ENDIF
01775       IF(ITURBH.EQ.7.AND.ITURBV.NE.7) THEN
01776         ITURBV = 7
01777         IF (LNG.EQ.1) WRITE(LU,*)
01778      &   'LECDON: MODELE DE TURBULENCE VERTICAL FORCE A 7'
01779         IF (LNG.EQ.2) WRITE(LU,*)
01780      &   'LECDON: VERTICAL TURBULENCE MODEL SET TO 7'
01781       ENDIF
01782 !
01783       IF(ITURBV.NE.3.AND.ITURBV.NE.7) SCHCKE = 0
01784 !
01785 !-----------------------------------------------------------------------
01786 !
01787 !     IF SMAGORINSKI IS SELECTED FOR VERTICAL TURBULENCE
01788 !     IT IS MANDATORY FOR HORIZONTAL TURBULENCE
01789 !     AND NOT REVERSE !!!!!!!!!!!
01790 !
01791       IF(ITURBV.EQ.4.AND.ITURBH.NE.4) THEN
01792         ITURBH = 4
01793         IF (LNG.EQ.1) WRITE(LU,*)
01794      &   'LECDON: MODELE DE TURBULENCE HORIZONTAL FORCE A 4'
01795         IF (LNG.EQ.2) WRITE(LU,*)
01796      &   'LECDON: HORIZONTAL TURBULENCE MODEL SET TO 4'
01797       ENDIF
01798 !
01799       IF(ITURBH.NE.1.AND.ITURBH.NE.3.AND.
01800      &   ITURBH.NE.4.AND.ITURBH.NE.7) THEN
01801         IF (LNG.EQ.1) WRITE(LU,*)
01802      &  'LECDON: MODELE DE TURBULENCE HORIZONTAL INCONNU : ',ITURBH
01803         IF (LNG.EQ.2) WRITE(LU,*)
01804      &  'LECDON: UNKNOWN HORIZONTAL TURBULENCE MODEL: ',ITURBH
01805         CALL PLANTE(1)
01806         STOP
01807       ENDIF
01808 !
01809       IF(ITURBV.NE.1.AND.ITURBV.NE.2.AND.ITURBV.NE.3.AND.
01810      &   ITURBV.NE.4.AND.ITURBV.NE.7) THEN
01811         IF (LNG.EQ.1) WRITE(LU,*)
01812      &  'LECDON: MODELE DE TURBULENCE VERTICAL INCONNU : ',ITURBV
01813         IF (LNG.EQ.2) WRITE(LU,*)
01814      &  'LECDON: UNKNOWN VERTICAL TURBULENCE MODEL: ',ITURBV
01815         CALL PLANTE(1)
01816         STOP
01817       ENDIF
01818 !
01819 !-----------------------------------------------------------------------
01820 !
01821 ! BUILDS ARRAY CONV INDICATING IF THERE ARE VARIABLES TO BE TREATED
01822 ! FOR EACH ADVECTION SCHEME (15 IS THE MAXIMUM CONVENTION)
01823 !
01824 !     SIZE OF N_ADV GIVEN IN DECLARATIONS_TELEMAC3D
01825       DO I=0,15
01826         N_ADV(I)=0
01827       ENDDO
01828 !
01829       IF(SCHCVI.EQ.8.OR.SCHCKE.EQ.8) THEN
01830         WRITE(LU,*) 'ADVECTION SCHEME 8 IS NOW NUMBER ',ADV_LPO
01831       ENDIF
01832       IF(SCHCVI.EQ.9.OR.SCHCKE.EQ.9) THEN
01833         WRITE(LU,*) 'ADVECTION SCHEME 9 IS NOW NUMBER ',ADV_LPO_TF
01834       ENDIF
01835       IF(NTRAC.GT.0) THEN
01836         DO K=1,NTRAC
01837           IF(SCHCTA(K).EQ.8) THEN
01838             WRITE(LU,*) 'ADVECTION SCHEME 8 IS NOW NUMBER ',ADV_LPO
01839           ENDIF
01840           IF(SCHCTA(K).EQ.9) THEN
01841             WRITE(LU,*) 'ADVECTION SCHEME 9 IS NOW NUMBER ',ADV_LPO_TF
01842           ENDIF
01843         ENDDO
01844       ENDIF
01845 !
01846       IF(  SCHCVI.NE.0      .AND.SCHCVI.NE.ADV_CAR.AND.SCHCVI.NE.ADV_SUP
01847      &.AND.SCHCVI.NE.ADV_LPO.AND.SCHCVI.NE.ADV_NSC.AND.SCHCVI.NE.ADV_PSI
01848      &.AND.SCHCVI.NE.ADV_LPO_TF.AND.SCHCVI.NE.ADV_NSC_TF) THEN
01849         IF(LNG.EQ.1) WRITE(LU,*)
01850      &  'LECDON: SCHEMA POUR LA CONVECTION DES VITESSES INCONNU : ',
01851      &                                                            SCHCVI
01852         IF (LNG.EQ.2) WRITE(LU,*)
01853      &  'LECDON: SCHEME FOR ADVECTION OF VELOCITIES UNKNOWN: ',   SCHCVI
01854         CALL PLANTE(1)
01855         STOP
01856       ENDIF
01857       IF(NTRAC.GT.0) THEN
01858       DO K=1,NTRAC
01859         IF(  SCHCTA(K).NE.0         .AND.SCHCTA(K).NE.ADV_CAR
01860      &  .AND.SCHCTA(K).NE.ADV_SUP   .AND.SCHCTA(K).NE.ADV_LPO
01861      &  .AND.SCHCTA(K).NE.ADV_NSC   .AND.SCHCTA(K).NE.ADV_PSI
01862      &  .AND.SCHCTA(K).NE.ADV_LPO_TF.AND.SCHCTA(K).NE.ADV_NSC_TF) THEN
01863            IF(LNG.EQ.1) WRITE(LU,*)
01864      &    'LECDON: SCHEMA POUR LA CONVECTION DES TRACEURS INCONNU : ',
01865      &                                                        SCHCTA(K)
01866           IF (LNG.EQ.2) WRITE(LU,*)
01867      &    'LECDON: SCHEME FOR ADVECTION OF TRACERS UNKNOWN: ', SCHCTA(K)
01868           CALL PLANTE(1)
01869           STOP
01870         ENDIF
01871       ENDDO
01872       ENDIF
01873       IF(  SCHCKE.NE.0      .AND.SCHCKE.NE.ADV_CAR.AND.SCHCKE.NE.ADV_SUP
01874      &.AND.SCHCKE.NE.ADV_LPO.AND.SCHCKE.NE.ADV_NSC.AND.SCHCKE.NE.ADV_PSI
01875      &.AND.SCHCKE.NE.ADV_LPO_TF.AND.SCHCKE.NE.ADV_NSC_TF) THEN
01876         IF(LNG.EQ.1) WRITE(LU,*)
01877      &  'LECDON: SCHEMA DE CONVECTION DU K-EPSILON INCONNU : ',SCHCKE
01878         IF (LNG.EQ.2) WRITE(LU,*)
01879      &  'LECDON: SCHEME FOR ADVECTION OF K-EPSILON UNKNOWN: ', SCHCKE
01880         CALL PLANTE(1)
01881         STOP
01882       ENDIF
01883       IF(OPTASS.NE.3) THEN
01884         IF(SCHCVI.NE.0.AND.(SCHCVI.EQ.ADV_LPO.OR.
01885      &                      SCHCVI.EQ.ADV_LPO_TF.OR.
01886      &                      SCHCVI.EQ.ADV_NSC_TF)) THEN
01887           IF(LNG.EQ.1) THEN
01888           WRITE(LU,*) 'LECDON :'
01889           WRITE(LU,*) 'SCHEMA POUR LA CONVECTION DES VITESSES : ',SCHCVI
01890           WRITE(LU,*) 'STOCKAGE DES MATRICES = 3 OBLIGATOIRE'
01891           ENDIF
01892           IF(LNG.EQ.2) THEN
01893           WRITE(LU,*) 'LECDON:'
01894           WRITE(LU,*) 'SCHEME FOR ADVECTION OF VELOCITIES: ',SCHCVI
01895           WRITE(LU,*) 'MATRIX STORAGE = 3 MANDATORY'
01896           ENDIF
01897           CALL PLANTE(1)
01898           STOP
01899         ENDIF
01900         IF(NTRAC.GT.0) THEN
01901         DO K=1,NTRAC
01902           IF(SCHCTA(K).NE.0.AND.(SCHCTA(K).EQ.ADV_LPO.OR.
01903      &                           SCHCTA(K).EQ.ADV_LPO_TF.OR.
01904      &                           SCHCTA(K).EQ.ADV_NSC_TF)) THEN
01905             IF(LNG.EQ.1) THEN
01906               WRITE(LU,*) 'LECDON :'
01907               WRITE(LU,*) 'SCHEMA POUR LA CONVECTION DES TRACEURS : ',
01908      &                    SCHCTA(K)
01909               WRITE(LU,*) 'STOCKAGE DES MATRICES = 3 OBLIGATOIRE'
01910             ENDIF
01911             IF(LNG.EQ.2) THEN
01912               WRITE(LU,*) 'LECDON:'
01913               WRITE(LU,*) 'SCHEME FOR ADVECTION OF TRACERS: ',SCHCTA(K)
01914               WRITE(LU,*) 'MATRIX STORAGE = 3 MANDATORY'
01915             ENDIF
01916             CALL PLANTE(1)
01917             STOP
01918           ENDIF
01919         ENDDO
01920         ENDIF
01921         IF(SCHCKE.NE.0.AND.(SCHCKE.EQ.ADV_LPO.OR.
01922      &                      SCHCKE.EQ.ADV_LPO_TF.OR.
01923      &                      SCHCKE.EQ.ADV_NSC_TF)) THEN
01924           IF(LNG.EQ.1) THEN
01925           WRITE(LU,*) 'LECDON :'
01926           WRITE(LU,*) 'SCHEMA POUR LA CONVECTION DU K-EPSILON : ',SCHCKE
01927           WRITE(LU,*) 'STOCKAGE DES MATRICES = 3 OBLIGATOIRE'
01928           ENDIF
01929           IF(LNG.EQ.2) THEN
01930           WRITE(LU,*) 'LECDON:'
01931           WRITE(LU,*) 'SCHEME FOR ADVECTION OF K-EPSILON: ',SCHCKE
01932           WRITE(LU,*) 'MATRIX STORAGE = 3 MANDATORY'
01933           ENDIF
01934           CALL PLANTE(1)
01935           STOP
01936         ENDIF
01937       ENDIF
01938 !
01939 !     LIST OF VARIABLES TO BE ADVECTED BY A SCHEME I (AT INDEX I IN LIST)
01940 !     LIST OF ALL VARIABLES TO BE ADVECTED (AT INDEX 0)
01941 !
01942       IF(SCHCVI.GT.0) THEN
01943         N_ADV(SCHCVI)=N_ADV(SCHCVI)+1
01944         N_ADV(0     )=N_ADV(0     )+1
01945         LIST_ADV(N_ADV(SCHCVI),SCHCVI)=1   ! U
01946         LIST_ADV(N_ADV(0     ),0     )=1   ! U
01947         N_ADV(SCHCVI)=N_ADV(SCHCVI)+1
01948         N_ADV(0     )=N_ADV(0     )+1
01949         LIST_ADV(N_ADV(SCHCVI),SCHCVI)=2   ! V
01950         LIST_ADV(N_ADV(0     ),0     )=2   ! V
01951         IF(NONHYD) THEN
01952           N_ADV(SCHCVI)=N_ADV(SCHCVI)+1
01953           N_ADV(0     )=N_ADV(0     )+1
01954           LIST_ADV(N_ADV(SCHCVI),SCHCVI)=3   ! W
01955           LIST_ADV(N_ADV(0     ),0     )=3   ! W
01956         ENDIF
01957       ENDIF
01958       IF(SCHCKE.GT.0.AND.(ITURBH.EQ.3.OR.ITURBH.EQ.7.OR.
01959      &                    ITURBV.EQ.3.OR.ITURBV.EQ.7)    ) THEN
01960         N_ADV(SCHCKE)=N_ADV(SCHCKE)+1
01961         N_ADV(0     )=N_ADV(0     )+1
01962         LIST_ADV(N_ADV(SCHCKE),SCHCKE)=4   ! AK
01963         LIST_ADV(N_ADV(0     ),0     )=4   ! AK
01964         N_ADV(SCHCKE)=N_ADV(SCHCKE)+1
01965         N_ADV(0     )=N_ADV(0     )+1
01966         LIST_ADV(N_ADV(SCHCKE),SCHCKE)=5   ! EP
01967         LIST_ADV(N_ADV(0     ),0     )=5   ! EP
01968       ENDIF
01969       IF(NTRAC.GT.0) THEN
01970         DO I=1,NTRAC
01971           IF(SCHCTA(I).GT.0) THEN
01972             N_ADV(SCHCTA(I))=N_ADV(SCHCTA(I))+1
01973             N_ADV(0        )=N_ADV(0        )+1
01974             LIST_ADV(N_ADV(SCHCTA(I)),SCHCTA(I))=5+I   ! TA%ADR(I)%P
01975             LIST_ADV(N_ADV(0        ),0        )=5+I   ! TA%ADR(I)%P
01976           ENDIF
01977         ENDDO
01978       ENDIF
01979 !
01980 !     ADVECTION SCHEME OF ALL ADVECTED VARIABLES, WITH THE NUMBERING
01981 !     GIVEN BY LIST
01982 !
01983       S_ADV(1) = SCHCVI
01984       S_ADV(2) = SCHCVI
01985       S_ADV(3) = SCHCVI
01986       S_ADV(4) = SCHCKE
01987       S_ADV(5) = SCHCKE
01988       IF(NTRAC.GT.0) THEN
01989         DO I=1,NTRAC
01990           S_ADV(5+I)=SCHCTA(I)
01991         ENDDO
01992       ENDIF
01993 !
01994 !-----------------------------------------------------------------------
01995 ! SETS VARIABLES WHEN THE DIFFUSION STEP IS NOT REQUIRED
01996 ! Q? WHAT HAPPENS WHEN SUPG ADVECTION IS REQUIRED, BUT NO DIFFUSION
01997 !
01998       IF(.NOT.DIFFUS) THEN
01999         SCHDVI = 0
02000         SCHDTA = 0
02001         SCHDKE = 0
02002       ENDIF
02003       IF(NTRAC.EQ.0) SCHDTA = 0
02004       IF(ITURBV.NE.3.AND.ITURBV.NE.7) SCHDKE = 0
02005 !
02006 !-----------------------------------------------------------------------
02007 !
02008 ! BUILDS ARRAY DIF INDICATING IF THERE ARE VARIABLES TO BE TREATED
02009 ! FOR EACH DIFFUSION SCHEME
02010 !
02011       DIF(0) = .FALSE.
02012       DIF(1) = .FALSE.
02013       DIF(2) = .FALSE.
02014 !
02015       DIF(SCHDVI) = .TRUE.
02016       DIF(SCHDTA) = .TRUE.
02017       DIF(SCHDKE) = .TRUE.
02018 !
02019 !-----------------------------------------------------------------------
02020 ! KRYLOV SPACE DIMENSION (VALID FOR GMRES, %SLV=7)
02021 !
02022       SLVDVI%KRYLOV = MOTINT(ADRESS(1,74))
02023       SLVDTA(1)%KRYLOV = MOTINT(ADRESS(1,75))
02024       IF(NTRAC.GT.1) THEN
02025         DO K=2,NTRAC
02026           SLVDTA(K)%KRYLOV = SLVDTA(1)%KRYLOV
02027         ENDDO
02028       ENDIF
02029       SLVDKE%KRYLOV = MOTINT(ADRESS(1,76))
02030       SLVPRO%KRYLOV = MOTINT(ADRESS(1,77))
02031 !     NO LONGER USED
02032       SLVW%KRYLOV   = 3
02033       SLVDSE%KRYLOV = MOTINT(ADRESS(1,84))
02034       SLVPOI%KRYLOV = MOTINT(ADRESS(1,81))
02035       SLVPRJ%KRYLOV = MOTINT(ADRESS(1,83))
02036 !
02037 !-----------------------------------------------------------------------
02038 !  NAMES OF THE VARIABLES FOR THE RESULTS AND GEOMETRY FILES:
02039 !-----------------------------------------------------------------------
02040 !
02041 ! TABLE OF LOGICAL FOR VARIABLES OUTPUT
02042 !
02043 !     FOR 2D
02044 !
02045       CALL NOMVAR_2D_IN_3D(TEXTE,TEXTPR,MNEMO,NTRAC,NAMETRAC)
02046       CALL SORTIE(SORT2D , MNEMO , MAXVAR , SORG2D )
02047 !     OUTPUTS WHICH ARE NOT RELEVANT OR NOT PROGRAMMED
02048       SORG2D( 9) = .FALSE.
02049       SORG2D(10) = .FALSE.
02050       SORG2D(11) = .FALSE.
02051       SORG2D(12) = .FALSE.
02052       SORG2D(20) = .FALSE.
02053       SORG2D(21) = .FALSE.
02054       SORG2D(22) = .FALSE.
02055       IF(.NOT.SEDI) THEN
02056         SORG2D(23) = .FALSE.
02057         SORG2D(24) = .FALSE.
02058         SORG2D(25) = .FALSE.
02059         SORG2D(26) = .FALSE.
02060         SORG2D(32) = .FALSE.
02061         SORG2D(33) = .FALSE.
02062         SORG2D(34) = .FALSE.
02063         SORG2D(37) = .FALSE.
02064       ENDIF
02065       IF(.NOT.VENT) THEN
02066         SORG2D(16) = .FALSE.
02067         SORG2D(17) = .FALSE.
02068       ENDIF
02069 !
02070 !     DIFFERENT HERE FROM TELEMAC-2D
02071 !     CALL SORTIE(VARIMP , MNEMO , MAXVAR , SORIMP )
02072 !     SORIMP NOT USED SO FAR
02073       DO I=1,MAXVAR
02074         SORIMP(I) = .FALSE.
02075       ENDDO
02076 !
02077 !     FOR 3D
02078 !
02079       CALL NOMVAR_TELEMAC3D(TEXT3,TEXTP3,MNEM3,NTRAC,NAMETRAC,
02080      &                      ADR_TRAC)
02081       CALL SORTIE(SORT3D , MNEM3 , MAXVA3 , SORG3D )
02082 !
02083 !     FOR RESTART FILE
02084 !
02085       DO I=1,MAXVA3
02086         SORIS3(I)=.FALSE.
02087         SOREST(I)=.FALSE.
02088       ENDDO
02089 !     Z
02090       SOREST(1)=.TRUE.
02091 !     U
02092       SOREST(2)=.TRUE.
02093 !     V
02094       SOREST(3)=.TRUE.
02095 !     W
02096       SOREST(4)=.TRUE.
02097 !     K AND EPSILON
02098       IF(ITURBH.EQ.3.OR.ITURBH.EQ.7) THEN
02099         SOREST(8)=.TRUE.
02100         SOREST(9)=.TRUE.
02101       ENDIF
02102 !     NON HYDROSTATIC PRESSURE
02103       IF(NONHYD) SOREST(12)=.TRUE.
02104 !     UCONV,VCONV,WCONV,DM1
02105       SOREST(14)=.TRUE.
02106       SOREST(15)=.TRUE.
02107       SOREST(16)=.TRUE.
02108       SOREST(18)=.TRUE.
02109 !     DH AND HN IN A SINGLE 3D ARRAY
02110       SOREST(19)=.TRUE.
02111       IF(N_ADV(ADV_CAR).GT.0) THEN
02112         SOREST(20)=.TRUE.
02113         SOREST(21)=.TRUE.
02114       ENDIF
02115 !     UD,VD,WD
02116       SOREST(22)=.TRUE.
02117       SOREST(23)=.TRUE.
02118       SOREST(24)=.TRUE.
02119 !     TRACERS
02120       IF(NTRAC.GT.0) THEN
02121         DO I=1,NTRAC
02122           SOREST(ADR_TRAC+I-1)=.TRUE.
02123         ENDDO
02124       ENDIF
02125 !
02126 !-----------------------------------------------------------------------
02127 !
02128 !     RESTART FILE
02129 !
02130       IF(RESTART_MODE) THEN
02131         IF(T3D_FILES(T3DRST)%NAME.EQ.' ') THEN
02132           IF(LNG.EQ.1) THEN
02133             WRITE(LU,*) 'LE FICHIER POUR SUITE MANQUE'
02134           ENDIF
02135           IF(LNG.EQ.2) THEN
02136             WRITE(LU,*) 'THE RESTART FILE IS MISSING'
02137           ENDIF
02138           CALL PLANTE(1)
02139           STOP
02140         ENDIF
02141       ENDIF
02142 !
02143 !-----------------------------------------------------------------------
02144 !
02145 !     NO K AND NO E IF NOT K-EPSILON OR K-OMEGA MODELS
02146 !
02147       IF(ITURBV.NE.3.AND.ITURBV.NE.7) THEN
02148         SORG3D(8)=.FALSE.
02149         SORG3D(9)=.FALSE.
02150       ENDIF
02151 !
02152 !-----------------------------------------------------------------------
02153 !
02154 !     NO RICHARDSON IF NO MIXING LENGTH AND NO K-EPSILON
02155 !
02156       IF(ITURBV.NE.2.AND.ITURBV.NE.3) THEN
02157         SORG3D(10)=.FALSE.
02158       ENDIF
02159 !
02160 !-----------------------------------------------------------------------
02161 !
02162 !     VARIABLES WHICH DO NOT EXIST WITHOUT NON-HYDROSTATIC OPTION
02163 !
02164       IF(.NOT.NONHYD) THEN
02165 !       NO DYNAMIC PRESSURE
02166         SORG3D(12)=.FALSE.
02167 !       NO HYDROSTATIC PRESSURE
02168         SORG3D(13)=.FALSE.
02169 !       NO W ADVECTION
02170         SORG3D(16)=.FALSE.
02171       ENDIF
02172 !
02173 !-----------------------------------------------------------------------
02174 !
02175 ! IN CASE OF A VALIDATION, A REFERENCE FILE SHOULD BE GIVEN
02176 !
02177       IF(VALID.AND.T3D_FILES(T3DREF)%NAME(1:1).EQ.' ') THEN
02178         IF(LISTIN) THEN
02179           IF(LNG.EQ.1) WRITE(LU,1004)
02180           IF(LNG.EQ.2) WRITE(LU,1005)
02181         ENDIF
02182 1004    FORMAT(1X,'LECDON : UNE VALIDATION EST DEMANDEE',/,10X,
02183      &  'IL FAUT DONNER UN FICHIER DE REFERENCE',/,10X,
02184      &  '(MOT-CLE : FICHIER DE REFERENCE)',/,10X,
02185      &  'QUI SERVIRA POUR LA COMPARAISON. ARRET DU PROGRAMME',
02186      &  ////)
02187 1005    FORMAT(1X,'LECDON: A VALIDATION IS ASKED, SO A',/,
02188      &         9X,'REFERENCE FILE IS NECESSARY',/,
02189      &         9X,'(KEY-WORD: REFERENCE FILE)',/,
02190      &         9X,'FOR COMPARISON. INTERRUPTION OF PROGRAM',
02191      &  ////)
02192         CALL PLANTE(1)
02193         STOP
02194       ENDIF
02195 !
02196 !-----------------------------------------------------------------------
02197 !
02198 !  CHECKS THE TRACERS USED IN THE DENSITY LAW
02199 !
02200       IF(DENLAW.NE.0.AND.NTRAC.EQ.0) THEN
02201         IF(LNG.EQ.1) THEN
02202           WRITE(LU,*) 'LECDON: AVEC LOI DE DENSITE # 0'
02203           WRITE(LU,*) '        IL FAUT AU MOINS UN TRACEUR'
02204         ENDIF
02205         IF(LNG.EQ.2) THEN
02206           WRITE(LU,*) 'LECDON: WITH DENSITY LAW # 0'
02207           WRITE(LU,*) '        AT LEAST 1 TRACER IS REQUIRED'
02208         ENDIF
02209         CALL PLANTE(1)
02210         STOP
02211       ENDIF
02212 !
02213 !  CHECKS THE MAX TRACER NUMBER
02214 !
02215       IF(NTRAC.GT.MAXTRA) THEN
02216         IF(LNG.EQ.1) THEN
02217           WRITE(LU,*) 'LECDON: DEPASSEMENT NOMBRE TRACEURS MAXI'
02218           WRITE(LU,*) '        MODIFIER BETAC DIM'
02219         ENDIF
02220         IF(LNG.EQ.2) THEN
02221           WRITE(LU,*) 'LECDON: TRACERS NUMBER BIGGER THAN MAX NUMBER'
02222           WRITE(LU,*) '        MODIFIY BETAC DIM'
02223         ENDIF
02224         CALL PLANTE(1)
02225         STOP
02226       ENDIF
02227 !
02228 !  LOOKS FOR TEMPERATURE AND SALINITY IN THE TRACERS
02229 !
02230       IND_T=0
02231       IND_S=0
02232       IF(NTRAC.GE.1) THEN
02233         DO I=1,NTRAC
02234           IF(NAMETRAC(I)(1:11).EQ.'TEMPERATURE') IND_T = I
02235           IF(NAMETRAC(I)(1: 7).EQ.'SALINIT')     IND_S = I
02236         ENDDO
02237       ENDIF
02238 !
02239 !  CHECKS THE EXISTENCE OF RELEVANT TRACERS FOR DELWAQ
02240 !
02241       IF(IND_T.EQ.0.AND.TEMP_DEL) THEN
02242         IF(LNG.EQ.1) THEN
02243           WRITE(LU,*) 'POUR DELWAQ IL MANQUE LA TEMPERATURE'
02244         ENDIF
02245         IF(LNG.EQ.2) THEN
02246           WRITE(LU,*) 'TEMPERATURE MISSING FOR DELWAQ'
02247         ENDIF
02248         CALL PLANTE(1)
02249         STOP
02250       ENDIF
02251       IF(IND_S.EQ.0.AND.SALI_DEL) THEN
02252         IF(LNG.EQ.1) THEN
02253           WRITE(LU,*) 'POUR DELWAQ IL MANQUE LA SALINITE'
02254         ENDIF
02255         IF(LNG.EQ.2) THEN
02256           WRITE(LU,*) 'SALINITY MISSING FOR DELWAQ'
02257         ENDIF
02258         CALL PLANTE(1)
02259         STOP
02260       ENDIF
02261 !
02262 !  CHECKS THE EXISTENCE OF RELEVANT TRACERS FOR THE DENSITY LAW
02263 !
02264       IF( (DENLAW.EQ.1.AND. IND_T.EQ.0                ) .OR.
02265      &    (DENLAW.EQ.2.AND.               IND_S.EQ.0  ) .OR.
02266      &    (DENLAW.EQ.3.AND.(IND_T.EQ.0.OR.IND_S.EQ.0) )      ) THEN
02267 !
02268         IF(LNG.EQ.1) THEN
02269           WRITE(LU,*) 'LECDON: AVEC LOI DE DENSITE = ',DENLAW
02270         ENDIF
02271         IF(LNG.EQ.2) THEN
02272           WRITE(LU,*) 'LECDON: WITH DENSITY LAW = ',DENLAW
02273         ENDIF
02274         IF(IND_T.EQ.0.AND.(DENLAW.EQ.1.OR.DENLAW.EQ.3)) THEN
02275           IF(LNG.EQ.1) THEN
02276             WRITE(LU,*) '        UN TRACEUR DOIT ETRE LA TEMPERATURE'
02277           ENDIF
02278           IF(LNG.EQ.2) THEN
02279             WRITE(LU,*) '        ONE TRACER MUST BE THE TEMPERATURE'
02280           ENDIF
02281         ENDIF
02282         IF(IND_S.EQ.0.AND.(DENLAW.EQ.2.OR.DENLAW.EQ.3)) THEN
02283           IF(LNG.EQ.1) THEN
02284             WRITE(LU,*) '        UN TRACEUR DOIT ETRE LA SALINITE'
02285           ENDIF
02286           IF(LNG.EQ.2) THEN
02287             WRITE(LU,*) '        ONE TRACER MUST BE THE SALINITY'
02288           ENDIF
02289         ENDIF
02290         CALL PLANTE(1)
02291         STOP
02292       ENDIF
02293 !
02294 !-----------------------------------------------------------------------
02295 !
02296 !  CROUT TYPE PRECONDITIONING WITH GMRES: NOT ON VECTOR MACHINES
02297 !
02298 161     FORMAT(1X,'LECDON: MOT-CLES SOLVEURS ET PRECONDITIONNEMENTS :',
02299      &            /,1X,'SUR MACHINE VECTORIELLE,',/,1X,
02300      &            'NE PAS UTILISER GMRES + CROUT',///)
02301 162     FORMAT(1X,'LECDON: KEY-WORDS SOLVERS AND PRECONDITONING:',/,1X,
02302      &            'ON VECTOR MACHINES,',/,1X,
02303      &            'DO NOT USE GMRES + CROUT',///)
02304       IF(LVMAC.NE.1) THEN
02305 !
02306         IF(SLVDVI%SLV.EQ.7.AND.SLVDVI%PRECON.NE.0) THEN
02307           IF(MOD(SLVDVI%PRECON, 7).EQ.0.OR.
02308      &       MOD(SLVDVI%PRECON,11).EQ.0.OR.
02309      &       MOD(SLVDVI%PRECON,13).EQ.0    ) THEN
02310             IF(LNG.EQ.1) WRITE(LU,161)
02311             IF(LNG.EQ.2) WRITE(LU,162)
02312             CALL PLANTE(1)
02313             STOP
02314           ENDIF
02315         ENDIF
02316         IF(SLVPRO%SLV.EQ.7.AND.SLVPRO%PRECON.NE.0) THEN
02317           IF(MOD(SLVPRO%PRECON, 7).EQ.0.OR.
02318      &       MOD(SLVPRO%PRECON,11).EQ.0.OR.
02319      &       MOD(SLVPRO%PRECON,13).EQ.0    ) THEN
02320             IF(LNG.EQ.1) WRITE(LU,161)
02321             IF(LNG.EQ.2) WRITE(LU,162)
02322             CALL PLANTE(1)
02323             STOP
02324           ENDIF
02325         ENDIF
02326         IF(NTRAC.GT.0) THEN
02327         DO K=1,NTRAC
02328         IF(SLVDTA(K)%SLV.EQ.7.AND.SLVDTA(K)%PRECON.NE.0) THEN
02329           IF(MOD(SLVDTA(K)%PRECON, 7).EQ.0.OR.
02330      &       MOD(SLVDTA(K)%PRECON,11).EQ.0.OR.
02331      &       MOD(SLVDTA(K)%PRECON,13).EQ.0    ) THEN
02332             IF(LNG.EQ.1) WRITE(LU,161)
02333             IF(LNG.EQ.2) WRITE(LU,162)
02334             CALL PLANTE(1)
02335             STOP
02336           ENDIF
02337         ENDIF
02338         ENDDO
02339         ENDIF
02340         IF(SLVDKE%SLV.EQ.7.AND.SLVDKE%PRECON.NE.0) THEN
02341           IF(MOD(SLVDKE%PRECON, 7).EQ.0.OR.
02342      &       MOD(SLVDKE%PRECON,11).EQ.0.OR.
02343      &       MOD(SLVDKE%PRECON,13).EQ.0    ) THEN
02344             IF(LNG.EQ.1) WRITE(LU,161)
02345             IF(LNG.EQ.2) WRITE(LU,162)
02346             CALL PLANTE(1)
02347             STOP
02348           ENDIF
02349         ENDIF
02350         IF(SLVW%SLV.EQ.7.AND.SLVW%PRECON.NE.0) THEN
02351           IF(MOD(SLVW%PRECON, 7).EQ.0.OR.
02352      &       MOD(SLVW%PRECON,11).EQ.0.OR.
02353      &       MOD(SLVW%PRECON,13).EQ.0    ) THEN
02354             IF(LNG.EQ.1) WRITE(LU,161)
02355             IF(LNG.EQ.2) WRITE(LU,162)
02356             CALL PLANTE(1)
02357             STOP
02358           ENDIF
02359         ENDIF
02360 !
02361       ENDIF
02362 !
02363 !  CROUT-TYPE PRECONDITIONING AND PARALLELISM :
02364 !
02365 171   FORMAT(1X,'AVEC PARALLELISME',/,1X,
02366      &          'PRECONDITIONNEMENT DE TYPE CROUT DEGRADE',///)
02367 172   FORMAT(1X,'WITH PARALLELISM = 2',/,1X,
02368      &          'CROUT-TYPE PRECONDITIONNING DOWNGRADED',///)
02369       IF(NCSIZE.GT.1) THEN
02370         IF(SLVDVI%PRECON.NE.0) THEN
02371           IF(MOD(SLVDVI%PRECON, 7).EQ.0.OR.
02372      &       MOD(SLVDVI%PRECON,11).EQ.0.OR.
02373      &       MOD(SLVDVI%PRECON,13).EQ.0    ) THEN
02374             IF(LNG.EQ.1) WRITE(LU,171)
02375             IF(LNG.EQ.2) WRITE(LU,172)
02376           ENDIF
02377         ENDIF
02378         IF(SLVPRO%PRECON.NE.0) THEN
02379           IF(MOD(SLVPRO%PRECON, 7).EQ.0.OR.
02380      &       MOD(SLVPRO%PRECON,11).EQ.0.OR.
02381      &       MOD(SLVPRO%PRECON,13).EQ.0    ) THEN
02382             IF(LNG.EQ.1) WRITE(LU,171)
02383             IF(LNG.EQ.2) WRITE(LU,172)
02384           ENDIF
02385         ENDIF
02386         IF(NTRAC.GT.0) THEN
02387         DO K=1,NTRAC
02388         IF(SLVDTA(K)%PRECON.NE.0) THEN
02389           IF(MOD(SLVDTA(K)%PRECON, 7).EQ.0.OR.
02390      &       MOD(SLVDTA(K)%PRECON,11).EQ.0.OR.
02391      &       MOD(SLVDTA(K)%PRECON,13).EQ.0    ) THEN
02392             IF(LNG.EQ.1) WRITE(LU,171)
02393             IF(LNG.EQ.2) WRITE(LU,172)
02394           ENDIF
02395         ENDIF
02396         ENDDO
02397         ENDIF
02398         IF(SLVDKE%PRECON.NE.0) THEN
02399           IF(MOD(SLVDKE%PRECON, 7).EQ.0.OR.
02400      &       MOD(SLVDKE%PRECON,11).EQ.0.OR.
02401      &       MOD(SLVDKE%PRECON,13).EQ.0    ) THEN
02402             IF(LNG.EQ.1) WRITE(LU,171)
02403             IF(LNG.EQ.2) WRITE(LU,172)
02404           ENDIF
02405         ENDIF
02406         IF(SLVW%PRECON.NE.0) THEN
02407           IF(MOD(SLVW%PRECON, 7).EQ.0.OR.
02408      &       MOD(SLVW%PRECON,11).EQ.0.OR.
02409      &       MOD(SLVW%PRECON,13).EQ.0    ) THEN
02410             IF(LNG.EQ.1) WRITE(LU,171)
02411             IF(LNG.EQ.2) WRITE(LU,172)
02412           ENDIF
02413         ENDIF
02414       ENDIF
02415 !
02416 !-----------------------------------------------------------------------
02417 !
02418       IF(.NOT.DIFFUS.AND.KFROT.NE.0) THEN
02419 !
02420           IF(LNG.EQ.1) WRITE(LU,173)
02421           IF(LNG.EQ.2) WRITE(LU,174)
02422  173      FORMAT(///,1X,'ATTENTION !  SANS ETAPE DE DIFFUSION',/,1X,
02423      &                    'LE FROTTEMENT N''EST PAS PRIS EN COMPTE',///)
02424  174      FORMAT(///,1X,'BEWARE ! WITHOUT DIFFUSION STEP',/,1X,
02425      &                    'FRICTION IS NOT TAKEN INTO ACCOUNT',///)
02426 !
02427       ENDIF
02428 !
02429 !-----------------------------------------------------------------------
02430 !
02431       IF(LISTIN) THEN
02432         IF(LNG.EQ.1) WRITE(LU,200) TITCAS
02433         IF(LNG.EQ.2) WRITE(LU,201) TITCAS
02434  200    FORMAT(/1X,'SORTIE DE LECDON. TITRE DE L''ETUDE :',/,1X,A72,/)
02435  201    FORMAT(/1X,'EXITING LECDON. NAME OF THE STUDY:',/,1X,A72,/)
02436       ENDIF
02437 !
02438 !-----------------------------------------------------------------------
02439 !
02440 ! BUOYANCY IS NOW IMPLICIT IN DIFFUSION JUST MAKE SURE YOU HAVE IT NOW
02441 !
02442       IF(NTRAC.NE.0.AND..NOT.DIFFUS) THEN
02443 !
02444           IF(LNG.EQ.1) WRITE(LU,177)
02445           IF(LNG.EQ.2) WRITE(LU,178)
02446  177      FORMAT(///,1X,'ATTENTION ! DIFFUSION OBLIGATOIRE AVEC',/,1X,
02447      &          'TRACEUR ACTIFS',///)
02448  178      FORMAT(///,1X,'BEWARE ! DIFFUSION STEP MANDATORY',/,1X,
02449      &         'WITH A BUOYANCY EFFECT',///)
02450           DIFFUS=.TRUE.
02451 !
02452       ENDIF
02453 !
02454 !-----------------------------------------------------------------------
02455 !
02456 ! EDGE-BASED STORAGE MANDATORY FOR DELWAQ
02457 !
02458       IF(INCLUS(COUPLING,'DELWAQ').AND.OPTASS.NE.3) THEN
02459         IF(LNG.EQ.1) WRITE(LU,2024)
02460         IF(LNG.EQ.2) WRITE(LU,2025)
02461 2024    FORMAT(1X,'AVEC COUPLAGE DELWAQ, STOCKAGE PAR SEGMENT',/,1X,
02462      &            'OBLIGATOIRE',///)
02463 2025    FORMAT(1X,'WITH COUPLING WITH DELWAQ, EDGE-BASED STORAGE',/,1X,
02464      &            'IS MANDATORY',///)
02465         CALL PLANTE(1)
02466         STOP
02467       ENDIF
02468 !
02469 !-----------------------------------------------------------------------
02470 !
02471 !     SUPG GIVES NON-SYMMETRIC MATRICES, HENCE NOT ALL SOLVERS POSSIBLE
02472 !
02473       IF(SCHCVI.EQ.ADV_SUP.AND.(SLVDVI%SLV.EQ.1.OR.
02474      &                          SLVDVI%SLV.EQ.2    ) ) THEN
02475         IF(LNG.EQ.1) WRITE(LU,2026)
02476         IF(LNG.EQ.2) WRITE(LU,2027)
02477 2026    FORMAT(1X,'GRADIENT CONJUGUE ET RESIDU CONJUGUE',/,1X,
02478      &            'POUR MATRICES SYMETRIQUES SEULEMENT',/,1X,
02479      &            'AVEC SUPG, LA MATRICE DE DIFFUSION DES',/,1X,
02480      &            'VITESSES EST NON SYMETRIQUE',/,1X,
02481      &            'CHOISIR SOLVEUR GMRES PAR EXEMPLE : 7')
02482 2027    FORMAT(1X,'CONJUGATE GRADIENT AND CONJUGATE RESIDUAL',/,1X,
02483      &            'ONLY FOR SYMMETRIC MATRICES',/,1X,
02484      &            'WITH SUPG, THE DIFFUSION MATRIX',/,1X,
02485      &            'FOR VELOCITIES IS NOT SYMMETRIC',/,1X,
02486      &            'CHOOSE SOLVER GMRES FOR EXAMPLE : 7')
02487         CALL PLANTE(1)
02488         STOP
02489       ENDIF
02490 !
02491       IF(SCHCKE.EQ.ADV_SUP.AND.(SLVDKE%SLV.EQ.1.OR.
02492      &                          SLVDKE%SLV.EQ.2    ) ) THEN
02493         IF(LNG.EQ.1) WRITE(LU,2028)
02494         IF(LNG.EQ.2) WRITE(LU,2029)
02495 2028    FORMAT(1X,'GRADIENT CONJUGUE ET RESIDU CONJUGUE',/,1X,
02496      &            'POUR MATRICES SYMETRIQUES SEULEMENT',/,1X,
02497      &            'AVEC SUPG, LA MATRICE DE DIFFUSION DE',/,1X,
02498      &            'K ET EPSILON EST NON SYMETRIQUE.',/,1X,
02499      &            'CHOISIR SOLVEUR GMRES PAR EXEMPLE : 7')
02500 2029    FORMAT(1X,'CONJUGATE GRADIENT AND CONJUGATE RESIDUAL',/,1X,
02501      &            'ONLY FOR SYMMETRIC MATRICES',/,1X,
02502      &            'WITH SUPG, THE DIFFUSION MATRIX',/,1X,
02503      &            'FOR K AND EPSILON IS NOT SYMMETRIC',/,1X,
02504      &            'CHOOSE SOLVER GMRES FOR EXAMPLE : 7')
02505         CALL PLANTE(1)
02506         STOP
02507       ENDIF
02508 !
02509       IF(NTRAC.GT.0) THEN
02510         DO K=1,NTRAC
02511           IF(SCHCTA(K).EQ.ADV_SUP.AND.(SLVDTA(K)%SLV.EQ.1.OR.
02512      &                                 SLVDTA(K)%SLV.EQ.2 )   ) THEN
02513           IF(LNG.EQ.1) WRITE(LU,2030)
02514           IF(LNG.EQ.2) WRITE(LU,2031)
02515 2030      FORMAT(1X,'GRADIENT CONJUGUE ET RESIDU CONJUGUE',/,1X,
02516      &              'POUR MATRICES SYMETRIQUES SEULEMENT',/,1X,
02517      &              'AVEC SUPG, LA MATRICE DE DIFFUSION DES',/,1X,
02518      &              'TRACEURS EST NON SYMETRIQUE',/,1X,
02519      &              'CHOISIR SOLVEUR GMRES PAR EXEMPLE : 7')
02520 2031      FORMAT(1X,'CONJUGATE GRADIENT AND CONJUGATE RESIDUAL',/,1X,
02521      &              'ONLY FOR SYMMETRIC MATRICES',/,1X,
02522      &              'WITH SUPG, THE DIFFUSION MATRIX OF TRACERS',/,1X,
02523      &              'IS NOT SYMMETRIC.',/,1X,
02524      &              'CHOOSE SOLVER GMRES FOR EXAMPLE : 7')
02525           CALL PLANTE(1)
02526           STOP
02527           ENDIF
02528         ENDDO
02529       ENDIF
02530 !
02531 !-----------------------------------------------------------------------
02532 !
02533 !  CHOICE FOR TIDAL DATA BASE TO DO BY THE USER
02534 !
02535       IF(TIDALTYPE.NE.0.AND.TIDALDB.EQ.-1) THEN
02536         IF(LNG.EQ.1) THEN
02537           WRITE(LU,*) 'CHOISIR LA BASE DE DONNEES DE MAREE'
02538           WRITE(LU,*) 'PARMI LES CHOIX POSSIBLES :'
02539           WRITE(LU,*) '  -1 : JMJ ;'
02540           WRITE(LU,*) '  -2 : TPXO ;'
02541           WRITE(LU,*) '  -3 : LEGOS-NEA.'
02542         ENDIF
02543         IF(LNG.EQ.2) THEN
02544           WRITE(LU,*) 'CHOOSE THE TIDAL DATA BASE'
02545           WRITE(LU,*) 'AMONG THE POSSIBLE CHOICES:'
02546           WRITE(LU,*) '  -1: JMJ,'
02547           WRITE(LU,*) '  -2: TPXO,'
02548           WRITE(LU,*) '  -3: LEGOS-NEA.'
02549         ENDIF
02550         CALL PLANTE(1)
02551         STOP
02552       ENDIF
02553 !
02554 !-----------------------------------------------------------------------
02555 !
02556 !  CHECKS THE EXISTENCE OF TIDAL DATA BASE FILES WHEN USING TPXO
02557 !
02558       IF(TIDALTYPE.NE.0.AND.TIDALDB.EQ.2
02559      &   .AND.T3D_FILES(T3DBB1)%NAME(1:1).EQ.' ') THEN
02560         IF(LNG.EQ.1) THEN
02561           WRITE(LU,*) 'POUR UTILISER LA BASE DE DONNEES DE MAREE TPXO'
02562           WRITE(LU,*) 'DONNER LE FICHIER'
02563           WRITE(LU,*) 'BASE BINAIRE 1 DE DONNEES DE MAREE'
02564         ENDIF
02565         IF(LNG.EQ.2) THEN
02566           WRITE(LU,*) 'TO USE TPXO TIDAL DATA BASE'
02567           WRITE(LU,*) 'PLEASE GIVE A BINARY DATABASE 1 FOR TIDE FILE'
02568         ENDIF
02569         CALL PLANTE(1)
02570         STOP
02571       ELSEIF(TIDALTYPE.NE.0.AND.TIDALDB.EQ.2
02572      &       .AND.T3D_FILES(T3DBB2)%NAME(1:1).EQ.' ') THEN
02573         IF(LNG.EQ.1) THEN
02574           WRITE(LU,*) 'POUR UTILISER LA BASE DE DONNEES DE MAREE TPXO'
02575           WRITE(LU,*) 'DONNER LE FICHIER'
02576           WRITE(LU,*) 'BASE BINAIRE 2 DE DONNEES DE MAREE'
02577         ENDIF
02578         IF(LNG.EQ.2) THEN
02579           WRITE(LU,*) 'TO USE TPXO TIDAL DATA BASE'
02580           WRITE(LU,*) 'PLEASE GIVE A BINARY DATABASE 2 FOR TIDE FILE'
02581         ENDIF
02582         CALL PLANTE(1)
02583         STOP
02584       ENDIF
02585 !
02586 !-----------------------------------------------------------------------
02587 !
02588 !  POSITIVE COEFFICIENT TO CALIBRATE TIDAL RANGE EXPECTED
02589 !
02590       IF(CTIDE.LT.0) THEN
02591         IF(LNG.EQ.1) THEN
02592           WRITE(LU,*) 'LE COEFFICIENT DE CALAGE DU MARNAGE'
02593           WRITE(LU,*) 'DOIT ETRE POSITIF OU NUL'
02594         ENDIF
02595         IF(LNG.EQ.2) THEN
02596           WRITE(LU,*) 'COEFFICIENT TO CALIBRATE TIDAL RANGE'
02597           WRITE(LU,*) 'HAVE TO BE GREATER OR EQUAL 0'
02598         ENDIF
02599         CALL PLANTE(1)
02600         STOP
02601       ENDIF
02602 !
02603 !-----------------------------------------------------------------------
02604 !
02605 !  POSITIVE COEFFICIENT TO CALIBRATE TIDAL VELOCITIES EXPECTED
02606 !
02607       IF(CTIDEV.LT.0) THEN
02608         IF(LNG.EQ.1) THEN
02609           WRITE(LU,*) 'LE COEFFICIENT DE CALAGE DES VITESSES DE COURANT'
02610           WRITE(LU,*) 'DOIT ETRE POSITIF OU NUL'
02611         ENDIF
02612         IF(LNG.EQ.2) THEN
02613           WRITE(LU,*) 'COEFFICIENT TO CALIBRATE TIDAL VELOCITIES'
02614           WRITE(LU,*) 'HAVE TO BE GREATER OR EQUAL 0'
02615         ENDIF
02616         CALL PLANTE(1)
02617         STOP
02618       ENDIF
02619 !
02620 !-----------------------------------------------------------------------
02621 !
02622 !  SPATIAL PROJECTION TYPE CHECKED IF SPHERICAL COORDINATES ASKED
02623 !
02624       IF(SPHERI) THEN
02625         IF(PROTYP.NE.2.AND.PROTYP.NE.3) THEN
02626           IF(LNG.EQ.1) THEN
02627             WRITE(LU,*) 'TYPE DE PROJECTION SPATIALE : ',PROTYP
02628             WRITE(LU,*) 'IMPOSSIBLE AVEC DES COORDONNEES SPHERIQUES'
02629           ENDIF
02630           IF(LNG.EQ.2) THEN
02631             WRITE(LU,*) 'SPATIAL PROJECTION TYPE: ',PROTYP
02632             WRITE(LU,*) 'IMPOSSIBLE WITH SPHERICAL COORDINATES'
02633           ENDIF
02634           CALL PLANTE(1)
02635           STOP
02636         ENDIF
02637       ENDIF
02638 !
02639 !-----------------------------------------------------------------------
02640 !
02641 !  CHECKING COHERENCE FOR 2D COMPUTATION CONTINUED
02642 !
02643       IF(SUIT2) THEN
02644         IF(T3D_FILES(T3DS2D)%NAME(1:1).EQ.' ') THEN
02645           IF(LNG.EQ.1) THEN
02646             WRITE(LU,*) 'SUITE 2D :'
02647             WRITE(LU,*) 'DONNER UN : FICHIER POUR SUITE 2D'
02648           ENDIF
02649           IF(LNG.EQ.2) THEN
02650             WRITE(LU,*) '2D CONTINUATION:'
02651             WRITE(LU,*) 'GIVE A: FILE FOR 2D CONTINUATION'
02652           ENDIF
02653           CALL PLANTE(1)
02654           STOP
02655         ENDIF
02656 !       OTHERWISE WOULD TRIGGER A 3D RESTART
02657         DEBU=.TRUE.
02658       ENDIF
02659 !
02660 !-----------------------------------------------------------------------
02661 !
02662 !   REACTS IF A PREVIOUS COMPUTATION FILE IS REQUIRED, BUT NOT PROVIDED
02663 !
02664       IF(.NOT.DEBU.AND.T3D_FILES(T3DPRE)%NAME(1:1).EQ.' ') THEN
02665         IF(LISTIN) THEN
02666           IF(LNG.EQ.1) WRITE(LU,151)
02667           IF(LNG.EQ.2) WRITE(LU,152)
02668         ENDIF
02669 151     FORMAT(1X,'LECDON : UNE SUITE DE CALCUL EST DEMANDEE',/,10X,
02670      &  'IL FAUT DONNER UN FICHIER DU CALCUL PRECEDENT',/)
02671 152     FORMAT(1X,'LECDON : A CONTINUED COMPUTATION REQUIRED, ',/,
02672      &         1X,' A PREVIOUS COMPUTATION FILE IS NECESSARY',/)
02673         CALL PLANTE(1)
02674         STOP
02675       ENDIF
02676 !
02677 !-----------------------------------------------------------------------
02678 ! This may not be useful anymore ..
02679 !      IF(SEDI.AND.SETDEP.EQ.1) THEN
02680 !        IF((SCHCTA(1).NE.ADV_LPO_TF).AND.(SCHCTA(1).NE.ADV_NSC_TF)) THEN
02681 ! error message
02682 !          IF(LNG.EQ.1) WRITE(LU,153) ADV_NSC_TF
02683 !          IF(LNG.EQ.2) WRITE(LU,154) ADV_NSC_TF
02684 ! change value
02685 !          SCHCTA(1)=ADV_NSC_TF
02686 !        ENDIF
02687 !      ENDIF
02688 !
02689 153      FORMAT(1X,'LECDON : FOR EXPLICIT SETTLING SCHEME',/,10X,
02690      &  'USE CONVECTION SCHEME ',I2/)
02691 154      FORMAT(1X,'LECDON : POUR SCHEMA EXPLICITE',/,10X,
02692      &  'UTILISER CONVECTION SCHEME ',I2/)
02693 !
02694 !-----------------------------------------------------------------------
02695 !
02696 !     ATMOSPHERE-WATER EXCHANGE MODEL AND WIND COMPATIBILITY
02697       IF((ATMOSEXCH.EQ.1.OR.ATMOSEXCH.EQ.2).AND..NOT.VENT) THEN
02698 !
02699         IF(LNG.EQ.1) WRITE(LU,181)
02700         IF(LNG.EQ.2) WRITE(LU,182)
02701  181    FORMAT(///,1X,'ATTENTION ! MODULE D''ECHANGES EAU-',/,1X,
02702      &                  'ATMOSPHERE ACTIVE MAIS PAS LE VENT.',/,1X,
02703      &                  'LES COMPOSANTES HORIZONTALES DE VENT',/,1X,
02704      &                  'NE SONT PAS PRISES EN COMPTE',/,1X,
02705      &                  'HORS DE CE MODULE',///)
02706  182    FORMAT(///,1X,'BEWARE! ATMOSPHERE-WATER EXCHANGE',/,1X,
02707      &                  'MODEL ACTIVATED, BUT NOT THE WIND.',/,1X,
02708      &                  'THE HORIZONTAL COMPONENTS OF WIND',/,1X,
02709      &                  'ARE NOT TAKEN INTO ACCOUNT',/,1X,
02710      &                  'OUTSIDE THIS MODULE',///)
02711       ENDIF
02712 !
02713 !-----------------------------------------------------------------------
02714 !
02715 !     ATMOSPHERE-WATER EXCHANGE MODEL AND WIND COMPATIBILITY
02716       IF((ATMOSEXCH.EQ.1.OR.ATMOSEXCH.EQ.2).AND..NOT.ATMOS) THEN
02717 !
02718         IF(LNG.EQ.1) WRITE(LU,183)
02719         IF(LNG.EQ.2) WRITE(LU,184)
02720  183    FORMAT(///,1X,'ATTENTION ! MODULE D''ECHANGES EAU-',/,1X,
02721      &                  'ATMOSPHERE ACTIVE MAIS PAS LA PRESSION,',/,1X,
02722      &                  'QUI N''EST PAS PRISE EN COMPTE HORS DE',/,1X,
02723      &                  'CE MODULE',///)
02724  184    FORMAT(///,1X,'BEWARE! ATMOSPHERE-WATER EXCHANGE',/,1X,
02725      &                  'MODEL ACTIVATED, BUT NOT THE PRESSURE,',/,1X,
02726      &                  'WHICH IS NOT TAKEN INTO ACCOUNT',/,1X,
02727      &                  'OUTSIDE THIS MODULE',///)
02728       ENDIF
02729 !
02730 !-----------------------------------------------------------------------
02731 !
02732 
02733       RETURN
02734       END

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