Hi all,
Sorry if this post is duplicating a previous one but I have searched the forum and can't find exactly what I need, though post #19749 comes close.
I have a large tidal domain and am trying to introduce a number of river inflow boundaries. I have discharge-time series for these though as I understand the cells must be initially wet at t=0 to impose a discharge boundary condition.
Rather than flood the domain to an unrealistic level and let water drain out (as I have had problems with this) am trying to modify condin.f to assign a small depth of water at the river boundary cells which are dry at the start of my computation.
I have attached my modified confin.f file though when I try and compile I get the following error:
!
! TO BE MODIFIED BY USER IF SPECIAL INITIAL CONDITIONS
!
! IF INITIAL WATER DEPTH <= 0: INITIAL ELEVATION (COTINI) - BOTTOM TOPOGRAPHY (ZF)
! .AND. IF POINT IS WITHIN SPECIFIED REGION THEN
! SET INITIAL WATER DEPTH 0.1M ABOVE BOTTOM TOPOGRAPHY (ZF)
! ELSE SET INITIAL WATER LEVEL TO INITIAL ELEVATION (CONTINI)
!
IF((COTINI-ZF<=0).AND.(INPOLY(X,Y,XSOM,YSOM,NSOM))) THEN
CALL OS( 'X=Y+C ' , H , ZF , H , 0.1DO )
ELSE
CALL OS( 'X=C ' , H , H , H , COTINI )
CALL OS( 'X=X-Y ' , H , ZF , H , 0.D0 )
END IF
IF(LNG.EQ.1) WRITE(LU,10)
IF(LNG.EQ.2) WRITE(LU,11)
10 FORMAT(1X,'CONDIN : AVEC DES CONDITIONS INITIALES PARTICULIERES'
& ,/,' VOUS DEVEZ MODIFIER CONDIN')
11 FORMAT(1X,'CONDIN : WITH SPECIAL INITIAL CONDITIONS'
& ,/,' YOU HAVE TO MODIFY CONDIN')
CALL PLANTE(1)
STOP
!
! END OF CODE TO BE MODIFIED BY USER
!
I have obviously made an error in calling X and Y which according to declarations_telemac.f are pointers to the node coordinates. Being fairly new to FORTRAN I'm not sure what I need to change to that for each cell the code performs the check I want and assigns the initial water level accordingly.
The other alternative is to explicitly assign an initial water level to the cells I want (there are only 8) but I'm even more unsure of how to do this.
Many thanks
Jon