Welcome, Guest
Username: Password: Remember me

TOPIC: Using FONSTR for reading values

Using FONSTR for reading values 7 years 5 months ago #26844

  • qilong
  • qilong's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 340
  • Thank you received: 33
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
The administrator has disabled public write access.

Using FONSTR for reading values 7 years 5 months ago #26845

  • riadh
  • riadh's Avatar
Hello Qilong

Yes you're right,we can do initialization before the call of fonstr.
I will do the change for the next release.

kind regards

Riadh
The administrator has disabled public write access.

Using FONSTR for reading values 7 years 5 months ago #26850

  • qilong
  • qilong's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 340
  • Thank you received: 33
Thanks, Riadh!
Look forward to the next release.

Kind regards,
Qilong
The administrator has disabled public write access.
Moderators: pham

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.