Welcome, Guest
Username: Password: Remember me

TOPIC: Common wind definition in Tomawac-Telemac2D coupling?

Common wind definition in Tomawac-Telemac2D coupling? 11 years 2 months ago #10299

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
Hello,

I am setting up a Tomawac-Telemac2D coupled computation and I want to take a stationary wind into account. The wind XY constituents are defined in both the Tomawac and Telemac2D steering files. Do I need to enter both or one supersedes the other (like some other common variables)?

Best regards,
Costas
The administrator has disabled public write access.

Common wind definition in Tomawac-Telemac2D coupling? 11 years 2 months ago #10301

  • jmhervouet
  • jmhervouet's Avatar
Hello,

No, you need to define the wind on both sides. Actually many things like this could be shared, like the geometry file and a number of keywords, but we did not venture into this game yet, except the number of processors, that is decided by the calling program.

Regards,

Jean-Michel Hervouet
The administrator has disabled public write access.

Common wind definition in Tomawac-Telemac2D coupling? 11 years 2 months ago #10337

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
Hello JM, thank you for your reply.

What I need to do in the end, is read wind timeseries from a formatted file. I have found that the sub-routine meteo in Telemac2D (my_option=2) does pretty much what I am looking for. Suppose I setup the subroutine meteo in the telemac2d fortran file to read from a specific file. Can I call meteo from subroutine venuti to define wind for tomawac as well? Or should I repeat the, more or less, similar code in the venuti subroutine?

Regards,
Costas
The administrator has disabled public write access.

Common wind definition in Tomawac-Telemac2D coupling? 11 years 2 months ago #10338

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
I did a bit more of reading and I found out that the sub-routine meteo is called once at the beginning of the calculation. If the wind is changing with time, then meteo is not applicable. I have found in this post (2806) an example of a subroutine (lecent) that interpolates the wind for every timestep. Is this subroutine included somewhere in the sources of v6p3?

Regards,
Costas
The administrator has disabled public write access.

Common wind definition in Tomawac-Telemac2D coupling? 11 years 2 months ago #10340

  • jmhervouet
  • jmhervouet's Avatar
Hello,

In Telemac-2D, meteo is read at every iteration, there are two calls in the subroutine telemac2d.f, so do you mean in Tomawac ?

Regards,

JMH
The administrator has disabled public write access.

Common wind definition in Tomawac-Telemac2D coupling? 11 years 2 months ago #10349

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
Hello JM,

I admit, I am a bit confused :unsure: . In meteo.f, line 109 it says:
! BEWARE, HERE ONLY ONE COMPUTATION AT FIRST TIMESTEP
So I assumed it does one interpolation at the beginning of the computation and it remains constant thereafter.

If meteo.f is called at every timestep, then it is OK regarding wind definition in telemac2d. In tomawac, as you said before, I will try using meteo.f 'effectively' to begin with. :cheer:

Many thanks for your help.
Costas
The administrator has disabled public write access.

Common wind definition in Tomawac-Telemac2D coupling? 11 years 2 months ago #10353

  • jmhervouet
  • jmhervouet's Avatar
Hello Costas,

You are rignt, this message is confusing and obsolete, I'll remove it in the next version.

Regards,

Jean-Michel Hervouet
The administrator has disabled public write access.

Common wind definition in Tomawac-Telemac2D coupling? 11 years 2 months ago #10339

  • jmhervouet
  • jmhervouet's Avatar
Hello,

You may use the same subroutine meteo, but beware that the file containing wind will be duplicated under two different names, and that they will be opened with different logical units. You may have to use variable NAMECODE from declarations_telemac (24 characters) to know who has called meteo:

IF(NAMECODE(1:2).EQ.'TE') THEN
it is Telemac
Logical unit is... T2DBI1
ELSEIF(NAMECODE(1:2).EQ.'TO') THEN
it is Tomawac
Logical unit is... WACVEB
ENDIF

I hope it does not become too tricky, otherwise you can work on a copy of meteo, e.g. meteo_tomawac, that avoids this (not very elegant but effective...)

With best regards,

Jean-Michel Hervouet
The administrator has disabled public write access.

Common wind definition in Tomawac-Telemac2D coupling? 11 years 2 months ago #10364

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
Hi,

I am trying to adapt the example in meteo.f in venuti.f for tomawac, in order to read a timeseries in ASCII. Is there an example for venuti.f I can follow? What was the name of the subroutine that was employed to read the 'VENTS-WAM-Cycle 4' formatted file in the previous versions of tomawac?

Regards,
Costas
The administrator has disabled public write access.

Common wind definition in Tomawac-Telemac2D coupling? 11 years 2 months ago #10385

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
Hello,

I have adapted parts of the meteo.f code for venuti.f. If I have understood correctly, venuti is just for reading the first 2 entries in the winds file, and the interpolation is carried out by other sub-routines. Please correct me if I am wrong.

The code looks like this:
!+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
!
!     JUMPING TWO LINES OF COMMENTS
      READ(NVEN,*,ERR=100,END=200)
      READ(NVEN,*,ERR=100,END=200)
!     READING THE FIRST TWO LINES OF DATA
      READ(NVEN,*,ERR=100,END=200) TV1,U1(NPOIN),V1(NPOIN)
      READ(NVEN,*,ERR=100,END=200) TV2,U2(NPOIN),V2(NPOIN)
!
      RETURN
!-----------------------------------------------------------------------
! 
100   CONTINUE
      WRITE(LU,*) ' '
      WRITE(LU,*) 'VENUTI'
      IF(LNG.EQ.1) WRITE(LU,*) 'ERREUR DANS LE FICHIER DE VENT'
      IF(LNG.EQ.2) WRITE(LU,*) 'ERROR IN THE WIND FILE'
      CALL PLANTE(1)
      STOP  
200   CONTINUE
      WRITE(LU,*) ' '
      WRITE(LU,*) 'VENUTI'
      IF(LNG.EQ.1) WRITE(LU,*) 'FIN PREMATUREE DU FICHIER DE VENT'
      IF(LNG.EQ.2) WRITE(LU,*) 'WIND FILE TOO SHORT'
      CALL PLANTE(1)
      STOP           
!-----------------------------------------------------------------------
      RETURN
      END

The fortran file compiles OK, tomawac runs but the wind vectors in the results file present errors when I open in BlueKenue. Any hints on what I have done wrong?

Regards,
Costas
The administrator has disabled public write access.
Moderators: tfouquet

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