Welcome, Guest
Username: Password: Remember me

TOPIC: TOMAWAC and SWAN

TOMAWAC and SWAN 9 years 4 months ago #17626

  • caiodalaqua
  • caiodalaqua's Avatar
Hello,

I am developing a very high resolution operational wave model for a portion of the Brazilian littoral.

There is a coarser SWAN domain that would provide boundary conditions to the nearshore simulations. My intention is to use TOMAWAC and SWAN in the exact same mesh to compare the models both regarding quality of the results and computational costs.

The main issue I found so far is how to input SWAN data as boundary conditions for TOMAWAC. I would rather use the full spectrum the coarser SWAN provides than integrated wave parameters (Hs, Tp, Dp, etc...).

I sure could use the integrated parameters for both SWAN and TOMAWAC, but from my experience with this approach (using SWAN) is that the results improve a lot when the whole spectrum is given at the boundaries.

The data flow would be something like this:

Atlantic Basin WaveWathc III -> Coarse SWAN domain -> Nearshore TOMAWAC/SWAN

Does anyone have accomplished something similar ? If so, from where should I start ?

Thank you very much

Caio
The administrator has disabled public write access.

TOMAWAC and SWAN 9 years 4 months ago #17642

  • tfouquet
  • tfouquet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 294
  • Thank you received: 112
Hello,

The first point would be to know the structure of the file resulting from swan in order to be able to read them in limwac and then to put their value on the nodes of the boundary conditions. Of course you have also to make the link between the number of the nodes you record on the corser swan and the ones of the boundary conditions in tomawac.

Then imagine that you have been able to read the spectrum of you NBC nodes of the boundary conditions at the current time step and to put in an array called BC, you could write something like this in limwac

DO IBC=1,NBC ! loop on your nodes of boundary conditions
IPTFR =NPBORD(ICL)! their number in the global mesh
DO IFF=1,NF ! loop on your nf frequency
DO I=1,NPLAN ! loop on your nplan directions
F(IPTFR,I,IFF)=BC(I,IFF,IBC)
ENDDO
ENDDO
ENDDO

Here i have considered that the recordings are at the same time steps as the ones of tomawac.

hope it helps.

T.
The administrator has disabled public write access.
The following user(s) said Thank You: caiodalaqua

TOMAWAC and SWAN 9 years 4 months ago #17651

  • caiodalaqua
  • caiodalaqua's Avatar
Thanks for your answer.

Extracting SWAN spectrum at the exact points of TOMAWAC boundary is not an issue, can be done quite easily.

The structure of SWAN spectrum for a given point, after processed, is an array [Time,Frequency,Direction].

I sure need to interpolate in the time dimension to have data at each time step.

Looking at your code snippet, SWAN and TOMAWAC need also to share the same spectral space, otherwise another interpolation must be done.

I will give it a try in the next weeks.

Cheers,

Caio
The administrator has disabled public write access.

TOMAWAC and SWAN 9 years 4 months ago #17652

  • tfouquet
  • tfouquet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 294
  • Thank you received: 112
Ok, let me know if you encounter problems.

I think that if you choose the same time step in tomawac than in Swan (hope they have a fixed time step)
and may be that you can choose the same space for frequency and direction too.
As for frequencies, in Tomawac the discretisation is f0 r^i with r generally 1.1 and i is from 1 to n the number of frequency
direction is simply 360 i/m (m the number of direction i from 1 to m)

Let me also know about your results, this comparison should be very interesting.

Thierry
The administrator has disabled public write access.

TOMAWAC and SWAN 7 years 5 months ago #26700

  • huyquangtran
  • huyquangtran's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 271
  • Thank you received: 23
Hello,

I am also interested in this topic. My question is that is it possible to impose spectrum data (1D or 2D SWAN spectrum file) for TOMAWAC open boundary? Has anyone tried to do that?


Thanks & Best Regards
Huy
The administrator has disabled public write access.

TOMAWAC and SWAN 7 years 5 months ago #26701

  • Phelype
  • Phelype's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 140
  • Thank you received: 64
Hello Huy!

Yes, it is possible! Indeed, in my opinion for better simulations, this is the solution.

In the limwac.f subroutine there is a secion where it says "TO BE MODIFIED BY USER". In this part of the code, there is an example that shows, as the last procedure, an assignment to the variable FBOR.

What you need to do is change that assignment. In the example, the value that enters FBOR is a frequency spectrum (SPEC) distributed over a few directions (FRA). What you will do is change the assignment to the actual value of the spectrum from SWAN.

A few cautions:
- Make sure you only assign spectra at liquid boundaries. That is, where LIBFOR is equal to KENT.
- Make sure the direction convention is correct. You can check that and the frequencies by looking at the variables FREQ (discretized frequencies) and TETA (discretized directions, nautical convention).
- And finally, the biggest problem (although yet pretty simple), possibly the spectrum returned by SWAN will not have the same discretization as the one being used by TOMAWAC, so you'll possibly have to resort to an interpolation.

Best Regards,

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

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