condim.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\telemac3d\condim.f
00002 !
00138                      SUBROUTINE CONDIM
00139 !                    *****************
00140 !
00141 !
00142 !***********************************************************************
00143 ! TELEMAC3D   V6P3                                   21/08/2010
00144 !***********************************************************************
00145 !
00146 !
00147 !
00148 !
00149 !
00150 !
00151 !
00152 !
00153 !
00154 !
00155 !
00156 !
00157 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00158 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00159 !
00160       USE BIEF
00161       USE INTERFACE_TELEMAC3D, EX_CONDIM => CONDIM
00162       USE DECLARATIONS_TELEMAC
00163       USE DECLARATIONS_TELEMAC3D
00164       USE TPXO
00165 !
00166       IMPLICIT NONE
00167       INTEGER LNG,LU
00168       COMMON/INFO/LNG,LU
00169 !
00170 !-----------------------------------------------------------------------
00171 !
00172       INTEGER IPLAN, I,J
00173 !
00174 !***********************************************************************
00175 !
00176 !     ORIGIN OF TIME
00177 !
00178       IF(.NOT.SUIT2) AT  = 0.D0
00179 !
00180 !     INITIALISES H, THE WATER DEPTH
00181 !
00182       IF(.NOT.SUIT2) THEN
00183 !
00184       IF(CDTINI(1:10).EQ.'COTE NULLE'.OR.
00185      &   CDTINI(1:14).EQ.'ZERO ELEVATION') THEN
00186         CALL OS( 'X=C     ' ,X=H,C=0.D0)
00187         CALL OV( 'X=X-Y   ' , H%R , Z , Z , 0.D0 , NPOIN2 )
00188       ELSEIF(CDTINI(1:14).EQ.'COTE CONSTANTE'.OR.
00189      &       CDTINI(1:18).EQ.'CONSTANT ELEVATION') THEN
00190         CALL OS( 'X=C     ' ,X=H,C=COTINI)
00191         CALL OV( 'X=X-Y   ' , H%R , Z , Z , 0.D0 , NPOIN2 )
00192       ELSEIF(CDTINI(1:13).EQ.'HAUTEUR NULLE'.OR.
00193      &       CDTINI(1:10).EQ.'ZERO DEPTH') THEN
00194         CALL OS( 'X=C     ' ,X=H,C=0.D0)
00195       ELSEIF(CDTINI(1:17).EQ.'HAUTEUR CONSTANTE'.OR.
00196      &       CDTINI(1:14).EQ.'CONSTANT DEPTH') THEN
00197         CALL OS( 'X=C     ' ,X=H,C=HAUTIN)
00198       ELSEIF(CDTINI(1:25).EQ.'ALTIMETRIE SATELLITE TPXO'.OR.
00199      &       CDTINI(1:24).EQ.'TPXO SATELLITE ALTIMETRY') THEN
00200         CALL OS('X=-Y    ',X=H,Y=ZF)
00201         CALL CONDI_TPXO(NPOIN2,MESH2D%NPTFR,MESH2D%NBOR%I,
00202      &                  X2%R,Y2%R,H%R,U2D%R,V2D%R,
00203      &                  LIHBOR%I,LIUBOL%I,KENT,KENTU,
00204      &                  GEOSYST,NUMZONE,LATIT,LONGIT,
00205      &                  T3D_FILES,T3DBB1,T3DBB2,
00206      &                  MARDAT,MARTIM,INTMICON,MSL)
00207       ELSEIF(CDTINI(1:13).EQ.'PARTICULIERES'.OR.
00208      &       CDTINI(1:10).EQ.'PARTICULAR'.OR.
00209      &       CDTINI(1:07).EQ.'SPECIAL') THEN
00210 !     USER INPUT :
00211 !     PROGRAM HERE SPECIAL INITIAL CONDITIONS ON DEPTH
00212         IF(LNG.EQ.1) WRITE(LU,10)
00213         IF(LNG.EQ.2) WRITE(LU,11)
00214 10      FORMAT(1X,'CONDIM : AVEC DES CONDITIONS INITIALES PARTICULIERES'
00215      &      ,/,1X,'         VOUS DEVEZ MODIFIER CONDIM')
00216 11      FORMAT(1X,'CONDIM : WITH SPECIAL INITIAL CONDITIONS'
00217      &      ,/,1X,'         YOU HAVE TO MODIFY CONDIM')
00218         CALL PLANTE(1)
00219         STOP
00220 !     END OF SPECIAL INITIAL CONDITIONS
00221 !     END OF USER INPUT
00222       ELSE
00223         IF(LNG.EQ.1) THEN
00224         WRITE(LU,*) 'CONDIM : CONDITION INITIALE NON PREVUE : ',CDTINI
00225         ENDIF
00226         IF(LNG.EQ.2) THEN
00227         WRITE(LU,*) 'CONDIM: INITIAL CONDITION UNKNOWN: ',CDTINI
00228         ENDIF
00229         CALL PLANTE(1)
00230         STOP
00231       ENDIF
00232       ELSE
00233         IF(LNG.EQ.1) WRITE(LU,*) 'HAUTEUR LUE DANS LE FICHIER BINAIRE 1'
00234         IF(LNG.EQ.2) WRITE(LU,*) 'DEPTH IS READ IN THE BINARY FILE 1'
00235       ENDIF
00236 !
00237 !     CLIPS H
00238 !
00239       DO I=1,NPOIN2
00240         H%R(I)=MAX(H%R(I),0.D0)
00241       ENDDO
00242 !
00243       CALL OS ('X=Y     ',X=HN,Y=H)
00244 !
00245 !-----------------------------------------------------------------------
00246 !
00247 !     DATA TO BUILD VERTICAL COORDINATES IN CALCOT
00248 !
00249 !     TRANSF IS KEYWORD "MESH TRANSFORMATION"
00250 !     IF TRANSF = 0, SUBROUTINE CALCOT MUST BE IMPLEMENTED BY THE USER
00251 !
00252 !     AN EQUIVALENT OF TRANSF MUST BE GIVEN FOR EVERY PLANE:
00253 !
00254 !     POSSIBLE VALUES OF TRANSF_PLANE :
00255 !
00256 !     1 : SIGMA TRANSFORMATION WITH EVENLY SPACED PLANES
00257 !     2 : SIGMA TRANSFORMATION WITH PROPORTIONS GIVEN IN ZSTAR
00258 !     3 : PRESCRIBED ELEVATION GIVEN IN ZPLANE
00259 !
00260 !     STANDARD BELOW IS: EVENLY SPACED PLANES, NO OTHER DATA REQUIRED
00261 !
00262       DO IPLAN = 1,NPLAN
00263         TRANSF_PLANE%I(IPLAN)=1
00264       ENDDO
00265 !
00266 !     OTHER EXAMPLES:
00267 !
00268 !     EXAMPLE 1: ALL PLANES WITH PRESCRIBED ELEVATION
00269 !
00270 !     DO IPLAN = 1,NPLAN
00271 !       TRANSF_PLANE%I(IPLAN)=3
00272 !     ENDDO
00273 !     ZPLANE%R(2)=-7.D0
00274 !     ZPLANE%R(3)=-4.D0
00275 !     ...
00276 !     ZPLANE%R(NPLAN-1)=-0.05D0
00277 !
00278 !
00279 !     EXAMPLE 2: SIGMA TRANSFORMATION WITH GIVEN PROPORTIONS
00280 !
00281 !     DO IPLAN = 1,NPLAN
00282 !       TRANSF_PLANE%I(IPLAN)=2
00283 !     ENDDO
00284 !     ZSTAR%R(1)=0.D0
00285 !     ZSTAR%R(2)=0.02D0
00286 !     ZSTAR%R(3)=0.1D0
00287 !     ...
00288 !     ZSTAR%R(NPLAN-1)=0.95D0
00289 !     ZSTAR%R(NPLAN)=1.D0
00290 !
00291 !
00292 !     EXAMPLE 3: ONE PLANE (NUMBER 4) WITH PRESCRIBED ELEVATION
00293 !                AND SIGMA ELSEWHERE
00294 !
00295 !     DO IPLAN = 1,NPLAN
00296 !       TRANSF_PLANE%I(IPLAN)=1
00297 !     ENDDO
00298 !     TRANSF_PLANE%I(4)=3
00299 !     ZPLANE%R(4)=-3.D0
00300 !
00301 !
00302 !     EXAMPLE 4: ONE PLANE WITH PRESCRIBED ELEVATION
00303 !                AND 2 SIGMA TRANSFORMATIONS, WITH NPLAN=7
00304 !                SIGMA TRANSFORMATIONS ARE MEANT BETWEEN
00305 !                BOTTOM, FIXED ELEVATION PLANES AND FREE SURFACE
00306 !                THE VALUES OF ZSTAR ARE LOCAL FOR EVERY
00307 !                SIGMA TRANSFORMATION: 0. FOR LOWER FIXED PLANE
00308 !                                      1. FOR UPPER FIXED PLANE
00309 !
00310 !     DO IPLAN = 1,7
00311 !       TRANSF_PLANE%I(IPLAN)=2
00312 !     ENDDO
00313 !     TRANSF_PLANE%I(4)=3
00314 !     ZPLANE%R(4)=3.D0
00315 !     ZSTAR%R(2)=0.2D0
00316 !     ZSTAR%R(3)=0.8D0
00317 !     ZSTAR%R(5)=0.1D0
00318 !     ZSTAR%R(6)=0.9D0
00319 !
00320 !
00321 !***********************************************************************
00322 !
00323 !     COMPUTES ELEVATIONS
00324 !     IF IT IS A CONTINUATION, WILL BE DONE AFTER CALLING 'SUITE'
00325 !
00326       IF(DEBU) CALL CALCOT(Z,H%R)
00327 !
00328 !***********************************************************************
00329 !
00330 !     INITIALISES VELOCITIES
00331 !
00332       IF(SUIT2) THEN
00333         DO I=1,NPLAN
00334           DO J=1,NPOIN2
00335            U%R((I-1)*NPOIN2+J)=U2D%R(J)
00336            V%R((I-1)*NPOIN2+J)=V2D%R(J)
00337           ENDDO
00338         ENDDO
00339       ELSEIF(CDTINI(1:25).EQ.'ALTIMETRIE SATELLITE TPXO'.OR.
00340      &       CDTINI(1:24).EQ.'TPXO SATELLITE ALTIMETRY') THEN
00341         DO I=1,NPLAN
00342           DO J=1,NPOIN2
00343             U%R((I-1)*NPOIN2+J)=U2D%R(J)
00344             V%R((I-1)*NPOIN2+J)=V2D%R(J)
00345           ENDDO
00346         ENDDO
00347       ELSE
00348         CALL OS( 'X=0     ' , X=U )
00349         CALL OS( 'X=0     ' , X=V )
00350       ENDIF
00351 !
00352       CALL OS( 'X=0     ' , X=W )
00353 !
00354 !-----------------------------------------------------------------------
00355 !
00356 !     INITIALISES TRACERS
00357 !
00358       IF(NTRAC.GT.0) THEN
00359         DO I=1,NTRAC
00360           CALL OS( 'X=C     ', X=TA%ADR(I)%P, C=TRAC0(I))
00361         ENDDO
00362       ENDIF
00363 !
00364 !
00365 !-----------------------------------------------------------------------
00366 !   INITIALISES THE K-EPSILON MODEL (OPTIONAL)
00367 !   WHEN DONE: AKEP = .FALSE.
00368 !
00369       AKEP=.TRUE.
00370 !
00371 !     IF(ITURBV.EQ.3) THEN
00372 !
00373 !       HERE INITIALISES K AND EPSILON
00374 !
00375 !       AKEP = .FALSE.
00376 !     ENDIF
00377 !
00378 !-----------------------------------------------------------------------
00379 !
00380 ! INITIALISES THE PRESSURE FIELDS TO 0.0
00381 !
00382       IF(NONHYD) THEN
00383         CALL OS('X=C     ',X=DP,C=0.D0)
00384         WRITE (LU,*) 'CONDIM: DYNAMIC PRESSURE INITIALISED TO ZERO'
00385         CALL OS('X=C     ',X=PH,C=0.D0)
00386         WRITE (LU,*) '        HYDROSTATIC PRESSURE INITIALISED TO ZERO.'
00387       ENDIF
00388 !
00389 !-----------------------------------------------------------------------
00390 !
00391       RETURN
00392       END

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