Welcome, Guest
Username: Password: Remember me

TOPIC: Wave series as boundary condition

Wave series as boundary condition 3 years 6 months ago #38490

  • taoan
  • taoan's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 52
  • Thank you received: 9
Hello Nikos,

Here are the files


drive.google.com/file/d/1LROngjM5JphjjrN...9QU/view?usp=sharing


Regards
The administrator has disabled public write access.

Wave series as boundary condition 3 years 5 months ago #38590

  • taoan
  • taoan's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 52
  • Thank you received: 9
Hello friends,

After some time fighting with fortran codes I changed the strategy and write a python script that can read a netcdf time series of wavewatch3 and write a jonswap sprectra over a previous .spe file generated from a static time simulation.

This manner I can force my tomawac simulation with wavewatch3 data using the same method from "impose_spectra" example case.

You also can use this python strategy to generate multiple .spe files varying on space and time along model boundary to force cases on large domain models.

With best regards,

Taoan



File Attachment:

File Name: pputilspectra.zip
File Size: 564 KB
The administrator has disabled public write access.
The following user(s) said Thank You: tomsail

Wave series as boundary condition 3 years 2 months ago #39062

  • shangguan
  • shangguan's Avatar
Hi, Do you have the right limwac.f of the v8p2 ?

what i need change the file of follow
Attachments:
The administrator has disabled public write access.

Wave series as boundary condition 3 years 2 months ago #39065

  • taoan
  • taoan's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 52
  • Thank you received: 9
Hello,

I do not have to use any limwac.f adaptation for my case.

Take a look at 7.2.7 session of tomawac v8p2 user guide to understand the method to impose spectra.
I attached my tomawac .cas and wave spectra files to help you.

With best regards,

Taoan


File Attachment:

File Name: spectro.zip
File Size: 25 KB
The administrator has disabled public write access.
The following user(s) said Thank You: tomsail, elise_dlmp

Wave series as boundary condition 2 years 7 months ago #40137

  • irsine
  • irsine's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
Dear all,
I’m new to TOMAWAC (and to Fortran as well). I’m trying to impose a time varying time series of wave height, period and direction at the offshore boundary of my domain. Reading previous posts in this discussion, I modified the subroutine LIMWAC.f to read the time series in the file offshoreWaves.txt.
It seems to be correctly compiled, but the computation stops at the first time step, with this error:

================================================================================
TEMPS : 0.0000 SECONDES 0IEME ITERATION
NFO1 4322488
At line 220 of file C:\Users\..\Desktop\TOM_Crav\TOM_Carv.cas_2022-04-02-16h10min55s\user_fortran\user_limwac.f (unit = 4322488, file = 'fort.4322488')
Fortran runtime error: End of file
Traceback (most recent call last):
File "C:\opentelemac-mascaret\v8p1r1\scripts\python3\tomawac.py", line 7, in <module>
main('tomawac')
File "C:\opentelemac-mascaret\v8p1r1\scripts\python3\runcode.py", line 272, in main
run_study(cas_file, code_name, options)
File "C:\opentelemac-mascaret\v8p1r1\scripts\python3\execution\run_cas.py", line 157, in run_study
run_local_cas(my_study, options)
File "C:\opentelemac-mascaret\v8p1r1\scripts\python3\execution\run_cas.py", line 65, in run_local_cas
my_study.run(options)
File "C:\opentelemac-mascaret\v8p1r1\scripts\python3\execution\study.py", line 610, in run
self.run_local()
File "C:\opentelemac-mascaret\v8p1r1\scripts\python3\execution\study.py", line 445, in run_local
run_code(self.run_cmd, self.sortie_file)
File "C:\opentelemac-mascaret\v8p1r1\scripts\python3\execution\run.py", line 182, in run_code
raise TelemacException('Fail to run\n'+exe)
utils.exceptions.TelemacException: Fail to run

I see the “Fortran runtime error: End of file”, but I don’t know how to resolve it.
Enclose the entire test case, in case you have suggestions
Thanks in advance
Irene

File Attachment:

File Name: TOM_Crav.zip
File Size: 1,417 KB
The administrator has disabled public write access.

Wave series as boundary condition 2 years 7 months ago #40140

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi
As NFO1 is fixed by tomawac when you mention formatted file in the steering file, you don't have to declare it in the subroutine (which leads to the value seen and the crash as there is no openning of this file number...)
Have a look to the manual specially on the use of file in the telemac system.
You could also have a look to all the example
Regards
Christophe
The administrator has disabled public write access.
The following user(s) said Thank You: irsine

Wave series as boundary condition 2 years 7 months ago #40147

  • irsine
  • irsine's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
Dear Christophe,
Thanks for your answer. Indeed, I removed the declaration of NFO1 in the subroutine, and used LUFO1 variable to access the file, and it correctly identifies the file to read now.
However, I still have some problems since it only read the value at time step 0, and does not update the boundary values according to the formatted file. I suspect something trivial due to my Fortran incompetence (and I’m in advance sorry about this!)
I attached again the case, in case you have suggestions
Regards

Irene

File Attachment:

File Name: TOM_Crav04.zip
File Size: 1,417 KB
The administrator has disabled public write access.

Wave series as boundary condition 2 years 7 months ago #40150

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi
The only thing I could say after a quick look to your fortran file is there is no interpolation in time so if I understand well the imposed values are just changed every hour...
Is your simulation run more than 1 hour.
Did you see the print indicating the change of boundary values at t=3600s?
Hope this helps
Christophe
The administrator has disabled public write access.

Wave series as boundary condition 2 years 7 months ago #40153

  • irsine
  • irsine's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
Dear Christophe,
Indeed the simulation lasts more than 1h, but I don't see the printing indicating changing in the boundary value at t=3600s.
Thanks for your time and help

Thanks
The administrator has disabled public write access.

Wave series as boundary condition 2 years 7 months ago #40154

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
you could maybe try to change the AT.EQ.xxx by AT.GT.xxx to avoid rounding problem in comparison of real values...
Christophe
The administrator has disabled public write access.
Moderators: tfouquet

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