Welcome, Guest
Username: Password: Remember me

TOPIC: PROBLEM WITH READ TEXT FILE IN TOMAWAC

PROBLEM WITH READ TEXT FILE IN TOMAWAC 10 years 4 months ago #13683

  • anh_siwrp
  • anh_siwrp's Avatar
I want to change boundary condition (HM0L vary in time). In steering file: I add key word "LIMIT SPECTRUM MODIFIED BY USER = TRUE' and FORMATTED FILE 1 = xxx.txt; in fortran file i use Read(*,26) to read data.
CASE 1: RUN ONLY TOMAWAC --> It is OK
CASE 2: Run coupling Telemac2d-Tomawac --> Error:
At line 1350 of file t2dfort.f (unit = 26,file = 'fort.26')
Fortran runtime error: End of time.

Anybody help me fix this problem?

Regard.
NgocAnh.
The administrator has disabled public write access.

PROBLEM WITH READ TEXT FILE IN TOMAWAC 10 years 4 months ago #13688

  • jmhervouet
  • jmhervouet's Avatar
Hello,

Yes, this is a classic. In coupling the unit numbers are changed because the two codes compete for the same numbers. So you cannot use hardcoded numbers like 26. The safe way to do it is:

Read(*,WAC_FILES(WACFO1)%LU)

If those variables are not seen by the subroutine, add at the beginning:

USE DECLARATIONS_TOMAWAC, ONLY : WAC_FILES,WACFO1

You can look at the Tomawac dictionary (tomawac.dico in the sources) to see that this file is parameterised by WACFO1.

With best regards,

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

PROBLEM WITH READ TEXT FILE IN TOMAWAC 10 years 4 months ago #13699

  • anh_siwrp
  • anh_siwrp's Avatar
Thanks for your respons quickly!
You are right. I fixed the problem.
One more time, thanks you so much.

Best regards.
The administrator has disabled public write access.

PROBLEM WITH READ TEXT FILE IN TOMAWAC 10 years 4 months ago #13721

  • anh_siwrp
  • anh_siwrp's Avatar
Hello,
One more question.
In case: Run coupling Telemac2d-Tomawac, How to read file in Telemac2d and Tomawac?
I tried USE DECLARATIONS_TOMAWAC, ONLY : WAC_FILES,WACFO1 and Read(*,WAC_FILES(WACFO1)%LU) to read file in Tomawac; in Telemac2d i used USE DECLARATIONS_TELEMAC2D, ONLY: T2DFO2,T2D_FILES and READ(*,T2D_FILES(T2DFO2)%LU) to read file. But i was not successfull.
The administrator has disabled public write access.

PROBLEM WITH READ TEXT FILE IN TOMAWAC 9 years 7 months ago #16635

  • SEBJAM
  • SEBJAM's Avatar
Hi,
I'm having the same problem as above, but I don't understand how I should apply the code above. I've tried to add it to .f file but I only get a numerous of errors.

I would be really grateful If anyone could clarify this for me.

(I'm running v-7.0.1)

Best regards,
The administrator has disabled public write access.

PROBLEM WITH READ TEXT FILE IN TOMAWAC 9 years 7 months ago #16636

  • jmhervouet
  • jmhervouet's Avatar
Hello,

In the message above, the instruction :

READ(*,T2D_FILES(T2DFO2)%LU)

should be READ(T2D_FILES(T2DFO2)%LU,*) SOMETHING_TO_BE_READ

depending of what you want to read. We would need to know in which subroutine you added the code and what are the errors that you get.

Regards,

JMH
The administrator has disabled public write access.

PROBLEM WITH READ TEXT FILE IN TOMAWAC 10 years 1 month ago #14502

  • Gaeta
  • Gaeta's Avatar
Hello,
actually, i'm trying to simulate similar problem, with time-varying wave spectrum.
I followed the suggestions by Jean and
with tomawac, the simulation runs;
with telemac2d coupled with tomawac, with the error messages in the attached file;
with telemac3d coupled with tomawac, no, with the message:
"***error limwac****
you did not modify the boundary spectrum whereas you ask for that"

This is the way I implemented the .f file:
USE DECLARATIONS_TOMAWAC,ONLY:WAC_FILES, WACFO1
...
READ(WAC_FILES(WACFO1)%LU,*)

...

rewind(WAC_FILES, WACFO1)
...
Any suggestions?
Thanks.

G
Schermata2014-10-15a18.05.31.png
The administrator has disabled public write access.

PROBLEM WITH READ TEXT FILE IN TOMAWAC 10 years 1 month ago #14505

  • Gaeta
  • Gaeta's Avatar
Actually I solved the previous problem, just adding the .f file also in the telemac2d steering file.
But now I got this error message:

"processECR: did not create out file:res_tel2d (T2DRES)"

and also in the temporary folder I dont'have any tel2d results, but just tomawac ones, and some other input tel2d file (t2dcas, t2dcli, etc).

Any help?
Thanks in advance.

G
The administrator has disabled public write access.

PROBLEM WITH READ TEXT FILE IN TOMAWAC 10 years 1 month ago #14528

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
Adding the .f in both file is not the solution as both fortran files are merged afterward anyway.
The error might be coming from the rewind the rewind should be:
rewind(WAC_FILES(WACFO1)%LU)

Hope it helps.
There are 10 types of people in the world: those who understand binary, and those who don't.
The administrator has disabled public write access.
The following user(s) said Thank You: Gaeta

PROBLEM WITH READ TEXT FILE IN TOMAWAC 10 years 1 month ago #14536

  • Gaeta
  • Gaeta's Avatar
Thanks yugi for your answer, but actually that was an error when I pasted the code lines on this forum.
It seems I found the problem: when coupling t2d with tom and in tom you define a modified .f file (as in this case), tel2d needs a f. file too (also empty).
It works in this way, I don't know why... I hope some developers will give me the answer.

Regards,

G
The administrator has disabled public write access.
Moderators: pham

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