Hi everyone,
I have an issue with boundary condition file when running in parallel mode. I have an open sea liquid boundary which is programmed with SL function to read a liquid boundary file for each node and at each time step there is a value for water elevation. When I am running in scalar mode, everything is fine and correct; however, when running in parallel mode, it gives wrong value to the liquid boundary nodes.
here is the function:
! ****************************
DOUBLE PRECISION FUNCTION SL
! ****************************
!
&( I , N )
!
!***********************************************************************
! TELEMAC2D V6P2 08/11/2011
!***********************************************************************
!
!brief PRESCRIBES THE FREE SURFACE ELEVATION FOR LEVEL IMPOSED
!+ LIQUID BOUNDARIES.
!
!history J-M HERVOUET (LNHE)
!+ 17/08/1994
!+ V6P0
!+
!
!history N.DURAND (HRW), S.E.BOURBAN (HRW)
!+ 13/07/2010
!+ V6P0
!+ Translation of French comments within the FORTRAN sources into
!+ English comments
!
!history N.DURAND (HRW), S.E.BOURBAN (HRW)
!+ 21/08/2010
!+ V6P0
!+ Creation of DOXYGEN tags for automated documentation and
!+ cross-referencing of the FORTRAN sources
!
!history C. COULET (ARTELIA GROUP)
!+ 08/11/2011
!+ V6P2
!+ Modification size FCT due to modification of TRACER numbering
!
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!| I |-->| NUMBER OF LIQUID BOUNDARY
!| N |-->| GLOBAL NUMBER OF POINT
!| | | IN PARALLEL NUMBER IN THE ORIGINAL MESH
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
USE BIEF
USE DECLARATIONS_TELEMAC
USE DECLARATIONS_TELEMAC2D
USE INTERFACE_TELEMAC2D, EX_SL => SL
!
IMPLICIT NONE
INTEGER LNG,LU
COMMON/INFO/LNG,LU
!
!+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
!
INTEGER, INTENT(IN) :: I,N
!
!+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
!
CHARACTER*12 FCT !(changed)
INTEGER J
INTEGER M ! (ADDED)
LOGICAL, SAVE :: DEJA=.FALSE.
LOGICAL, DIMENSION(MAXFRO), SAVE :: OK
!
! FIRST CALL, OK INITIALISED TO .TRUE.
!
IF(.NOT.DEJA) THEN
DO J=1,MAXFRO ! INTEGER, parameter MAXFRO = 3000 BY DEFAULT
OK(J)=.TRUE.
ENDDO
! DEJA=.TRUE. (changed)
ENDIF
!
!
!
! IF THE LIQUID BOUNDARY FILE EXISTS, ATTEMPTS TO FIND
! THE VALUE IN IT. IF YES, OK REMAINS TO .TRUE. FOR NEXT CALLS
! IF NO, OK IS SET TO .FALSE.
!
IF(OK(I).AND.T2D_FILES(T2DIMP)%NAME(1:1).NE.' ') THEN
!
IF (NCSIZE.GT.1) THEN
M=MESH%KNOLG%I(N)
ELSE
M=N
ENDIF
! M=N
! FCT WILL BE SL(1), SL(2), ETC, SL(99), DEPENDING ON I
FCT(1:4)='ETA('
IF(M.LT.10) THEN
WRITE(FCT(5:5),FMT='(I1)') M
FCT(6:12)=')'
ELSEIF(M.LT.100) THEN
WRITE(FCT(5:6),FMT='(I2)') M
FCT(7:12)=')'
ELSEIF(M.LT.1000) THEN
WRITE(FCT(5:7),FMT='(I3)') M
FCT(8:12)=')'
ELSEIF(M.LT.10000) THEN
WRITE(FCT(5:8),FMT='(I4)') M
FCT(9:12)=')'
ELSEIF(M.LT.100000) THEN
WRITE(FCT(5:9),FMT='(I5)') M
FCT(10:12)=')'
ELSEIF(M.LT.1000000) THEN
WRITE(FCT(5:10),FMT='(I6)') M
FCT(11:12)=')'
ELSE
WRITE(LU,*) 'SL NOT PROGRAMMED FOR MORE THAN 99999 BOUNDARIES'
CALL PLANTE(1)
STOP
ENDIF
CALL READ_FIC_FRLIQ(SL,FCT,AT,T2D_FILES(T2DIMP)%LU,ENTET,OK(I))
!
ENDIF
!
IF(.NOT.OK(I).OR.T2D_FILES(T2DIMP)%NAME(1:1).EQ.' ') THEN
!
! PROGRAMMABLE PART
! SL IS READ FROM THE STEERING FILE, BUT MAY BE CHANGED
!
IF(NCOTE.GE.I) THEN
SL = COTE(I)
ELSE
IF(LNG.EQ.1) WRITE(LU,100) I
100 FORMAT(1X,/,1X,'SL : COTES IMPOSEES EN NOMBRE INSUFFISANT'
& ,/,1X,' DANS LE FICHIER DES PARAMETRES'
& ,/,1X,' IL EN FAUT AU MOINS : ',1I6)
IF(LNG.EQ.2) WRITE(LU,101) I
101 FORMAT(1X,/,1X,'SL: MORE PRESCRIBED ELEVATIONS ARE REQUIRED'
& ,/,1X,' IN THE PARAMETER FILE'
& ,/,1X,' AT LEAST ',1I6,' MUST BE GIVEN')
CALL PLANTE(1)
STOP
ENDIF
!
ENDIF
!
!
!
RETURN
END
I also have a subroutine SUBROUTINE READ_FIC_FRLIQ which is as standard mode in Telemac.
my liquid file looks like:
look at the picture
The ETA( ) here is the global node no at liquid boundary in scalar mode.
any help?
Thanks,
AMANJ