increase_ntrac.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\telemac2d\increase_ntrac.f
00002 !
00049                         SUBROUTINE INCREASE_NTRAC
00050 !                       **************************
00051      &  (ADDTR,WAQ,WAQPROCESS,SECCURRENT,MOTCAR,NTRTOT,NTRAC)
00052 !
00053 !
00054 !***********************************************************************
00055 ! TELEMAC2D   V7P0
00056 !***********************************************************************
00057 !
00058 !brieF INCREASE NTRAC DEPENDING ON THE WAQ QUALITY MODULES
00059 !
00060 !
00061 !
00062 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00063 !| ADDTR          |<--| NUMBER OF TRACERS TO BE INCREASED
00064 !| MOTCAR         |-->| KEY-WORDS OF TYPE CHARACTER
00065 !| NTRAC          |-->| NUMBER OF TRACERS
00066 !| NTRTOT         |-->| TOTAL NUMBER OF TRACERS
00067 !| WAQ            |-->| THERE IS WAQ OR NOT
00068 !| SECCURRENT     |-->| THERE IS SECONDARY CURRENTS OR NOT
00069 !| WAQPROCESS     |-->| WAQ PROCESS ()
00070 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00071 !
00072       USE DECLARATIONS_TELEMAC2D, ONLY: MAXKEY,IND_T,IND_SEC
00073 !
00074       IMPLICIT NONE
00075       INTEGER LNG,LU
00076       COMMON/INFO/LNG,LU
00077 !
00078 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00079 !
00080 !
00081       INTEGER, INTENT(INOUT)::  ADDTR
00082       INTEGER, INTENT(IN)   ::  WAQPROCESS,NTRTOT,NTRAC
00083       LOGICAL, INTENT(IN)   ::  WAQ, SECCURRENT
00084       CHARACTER(LEN=144), INTENT(IN) :: MOTCAR(MAXKEY)
00085 !
00086       INTEGER I
00087 !
00088 !
00089 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00090 !
00091 !
00092       ADDTR   = 0
00093       IND_T   = 0
00094       IND_SEC = 0
00095 !     IF SECONDARY CUURRENT
00096       IF(SECCURRENT)THEN
00097         ADDTR   = ADDTR +1
00098         IND_SEC = NTRAC + 1
00099       ENDIF
00100 !     WATER QUALAITY
00101       IF(WAQ)THEN
00102 !       LOOKS FOR TEMPERATURE IN TRACER NAMES
00103         IF(WAQPROCESS.EQ.5)THEN
00104           IF(NTRTOT.GT.0.AND.NTRAC.GT.0) THEN
00105             DO I=1,NTRTOT
00106               IF(MOTCAR(NTRTOT+I-1)(1:8).EQ.'TEMPERAT')THEN
00107                 IND_T = I
00108               ENDIF
00109             ENDDO
00110           ENDIF
00111         ENDIF
00112 !
00113         SELECT CASE(WAQPROCESS)
00114 !         O2 MODULE
00115           CASE(1)
00116             ADDTR = ADDTR + 3
00117 !         BIOMASS MODULE
00118           CASE(2)
00119             ADDTR = ADDTR + 5
00120 !         EUTRO MODULE
00121           CASE(3)
00122             ADDTR = ADDTR + 8
00123 !         MICROPOL MODULE
00124           CASE(4)
00125             ADDTR = ADDTR + 5
00126 !         THERMIC MODULE
00127           CASE(5)
00128             IF(IND_T.EQ.0)THEN
00129               ADDTR = ADDTR + 1
00130               IND_T = NTRAC + 1
00131             ENDIF
00132           CASE DEFAULT
00133             IF(LNG.EQ.1) THEN
00134               WRITE(LU,10)WAQPROCESS
00135             ELSE
00136               WRITE(LU,20)WAQPROCESS
00137             ENDIF
00138             CALL PLANTE(1)
00139             STOP
00140 !
00141         END SELECT
00142       ENDIF
00143 !
00144       RETURN
00145 !-----------------------------------------------------------------------
00146 !     MESSAGES
00147 10    FORMAT(1X,'INCREASE_NTRAC: MODULE WAQ INCONNU : ',I4)
00148 20    FORMAT(1X,'INCREASE_NTRAC: UNKNOWN WAQ MODULE : ',I4)
00149 !-----------------------------------------------------------------------
00150 !
00151       RETURN
00152       END

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