Welcome, Guest
Username: Password: Remember me

TOPIC: Current timestep variable in VENUTI

Current timestep variable in VENUTI 10 years 7 months ago #13972

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

I would like to have the value of the current timestep (LT) within the subroutine VENUTI, like it is available in LIMWAC. The aim is to do a pass in the first timestep only to traverse the records up to the current time.

How can I import the current timestep (or any other parameter) in a subroutine?

Regards,
Costas
The administrator has disabled public write access.

Current timestep variable in VENUTI 10 years 7 months ago #13973

  • jmhervouet
  • jmhervouet's Avatar
Hello Costas,

The usual trick that you certainly already know is to add in your subroutine:

USE DECLARATIONS_TOMAWAC, ONLY : LT

but unfortunately LT is declared in wac.f and this is not possible. I conclude that we shall move this parameter to the declarations_tomawac in the next version, in the while you can try yourself and recompile... (it may trigger local name clashes and renaming or the use of ONLY will solve the matter), or add LT as a new argument to venuti.f, but then you will have to do it for all calls, and change venuti also in the interface_tomawac.f. More dangerous tricks : playing with the time which is in venuti, or counting the calls to venuti into venuti with a saved integer initially set to 0 by a data(assuming that venuti is called a fixed number of times per step, it will give you LT hopefully). A COMMON would also work but it is rather outdated.

With best regards,

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

Current timestep variable in VENUTI 10 years 7 months ago #13974

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3772
  • Thank you received: 1044
Hi
I think the easiest solution is to add "use declarations... , only : LT"

Best regards

PS: Think to update your profile
Christophe
The administrator has disabled public write access.

Current timestep variable in VENUTI 10 years 7 months ago #13978

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

USE DECLARATIONS_TOMAWAC, ONLY : LT

didn't work, as JMH said. At present I am thinking about adding LT as a new argument, similarly to what is done in LIMWAC. If I have understood correctly I must change VENUTI in interface_tomawac.f and the three subroutines that call VENUTI, i.e. LECDOI, LECDON and NOUDON.

Can I add these files on my project fortran file, or should I recompile the whole system?

Regards,
Costas
The administrator has disabled public write access.

Current timestep variable in VENUTI 10 years 7 months ago #13979

  • jmhervouet
  • jmhervouet's Avatar
Hello,

You can add these files to your project Fortran files, but the interface will raise a problem (it will see two different VENUTI with different arguments). The best is to take LECDOI, LECDON and NOUDON in your Fortran, and make them call a VENUTI2 with extra argument LT, that will not be protected by the interface.

Regards,

JMH
The administrator has disabled public write access.

Current timestep variable in VENUTI 10 years 7 months ago #13980

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

Thank you for you help. I have another question: If I want to pass LT to VENUTI, should I define it every 'link' in the calling chain from WAC.f, i.e. WAC->SEMIMP->NOUDON->VENUTI or is there a direct way?

Costas
The administrator has disabled public write access.

Current timestep variable in VENUTI 10 years 7 months ago #13982

  • jmhervouet
  • jmhervouet's Avatar
Hello Costas,

Unfortunately no direct way (except if you put LT in a COMMON in wac.f and declare the COMMON in the new venuti, but this is rather spaghetti programming...).

regards,

JMH
The administrator has disabled public write access.

Current timestep variable in VENUTI 10 years 7 months ago #13984

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

In the end it would be less complicated and easier for me to manipulate my winds file especially for TOMWAC so that it will not require a 'first pass', and thus LT is not needed. I will save my thoughts for the future, when LT is added to the declarations module.

It seems that the whole issue arises from the computation continued option, when computation time (AT) is not zero at the start and you cannot do a first pass like in METEO or LIMWAC subroutines.

Thank you for the insight,
Costas
Attachments:
The administrator has disabled public write access.

Current timestep variable in VENUTI 10 years 7 months ago #13991

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

As I modifying the VENUTI subroutine, I noticed that the comments I had programmed to show up in the listing, print only when I execute TOMAWAC alone. When I execute in coupled mode, the messages do not show up.

For example:
!     SKIP RECORDS IF COMPUTATION STARTS AT A LATER TIME
        IF (AT.GT.TV2) THEN
          IF(LNG.EQ.1) WRITE(LU,*) 'VENUTI: SAUTER RECORD DE VENT'
          IF(LNG.EQ.2) WRITE(LU,*) 'VENUTI: SKIPPING WIND RECORD'
What do I have to do in order for the messages to appear in both the single and the coupled listing?

Regards,
Costas
The administrator has disabled public write access.

Current timestep variable in VENUTI 10 years 7 months ago #13992

  • jmhervouet
  • jmhervouet's Avatar
Hello,

Hum, you should have nothing to do, LU is the logical unit that writes to the listing. In parallel only the processor 0 writes to the listing, for others LU is redirected to the log files in the temporary folder. You can check by adding another message without any condition.

Regards,

JMH
The administrator has disabled public write access.
Moderators: tfouquet

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