Hello Telemac developers,
I'm using FONSTR to read initial salinity for the model. In order to avoid new declaration of variables, the salinity values are put into PRIVE2D by calling FIND_VARIABLE inside the subroutine FONSTR.
However, after my tests, I found the following code in subroutine TELEMAC3D and it actually erase all the values in PRIVE2D after using FONSTR.
! LOOKS FOR THE BOTTOM AND BOTTOM FRICTION VARIABLES IN THE GEOMETRY FILE
!
IF(DEBUG.GT.0) WRITE(LU,*) 'APPEL DE FONSTR'
CALL FONSTR(T2_01,ZF,T2_02,RUGOF,T3D_FILES(T3DGEO)%LU,
& T3D_FILES(T3DGEO)%FMT,
& T3D_FILES(T3DFON)%LU,T3D_FILES(T3DFON)%NAME,
& MESH2D,RUGOF0,LISTIN,
& N_NAMES_PRIV2D,NAMES_PRIVE2D,PRIVE2D)
IF(DEBUG.GT.0) WRITE(LU,*) 'RETOUR DE FONSTR'
I=11
IF(RUGOF%ELM.NE.I) CALL CHGDIS(RUGOF,I,RUGOF%ELM,MESH2D)
!
! INITIALISES PRIVATE VECTOR BLOCK
!
IF(NPRIV.GT.0) CALL OS('X=0 ',X=PRIVE)
IF(NPRIV2D.GT.0) CALL OS('X=0 ',X=PRIVE2D)
Currently I comment the last line to avoid the re-initialization of PRIVE2D. Is is possible to put the initialization block simply above the call to FONSTR in the next revision? Otherwise it seems not logical to use PRIVE2D in FONSTR as it is implemented at this moment...
Regards,
Qilong