SWAN wave spectrum funwave spectrum

103 views
Skip to first unread message

João Ribeiro

unread,
Aug 20, 2024, 10:19:12 AM8/20/24
to funwave-tvd

Hello,

I am trying to convert a SWAN wave spectrum file (1D and 2D) to Funwave.

I have tried many methods to achieve this, but I seem to be missing a step. Could anyone share some information on how to do this correctly?

Is the Funwave spectrum in m²/Hz/degrees?

I can only generate a wave with a few centimetres!

My files are attached.

Also, how are the frequencies calculated for the JONSWAP options?

What is the correct way to configure the input.txt file for these cases?

Regards,


input_JonSwap1D_Sines.txt
WMK03.chr
WMK03_1D.spc
WMK03_2D.spc
wave1d.txt

Fengyan Shi

unread,
Aug 20, 2024, 10:29:10 AM8/20/24
to João Ribeiro, funwave-tvd
--
You received this message because you are subscribed to the Google Groups "funwave-tvd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to funwave-tvd...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/funwave-tvd/df182de2-39bd-420e-ab45-6001cecf26b9n%40googlegroups.com.
<input_JonSwap1D_Sines.txt><WMK03.chr><WMK03_1D.spc><WMK03_2D.spc><wave1d.txt>

Rafael Guedes

unread,
Aug 20, 2024, 5:13:32 PM8/20/24
to Fengyan Shi, João Ribeiro, funwave-tvd
Another option is to use the  wavespectra python library. We have reader and writer methods for SWAN and FUNWAVE spectra there, you could use the read_swan method to read your swan file, and then write the FUNWAVE one using the to_funwave method to write one or multiple funwave files. There is a Notebook here with some usage examples.

Rafael

João Ribeiro

unread,
Aug 21, 2024, 5:10:56 AM8/21/24
to funwave-tvd
Than you for the quick replies, I will check out the wavespectra library.

Regards,

Reply all
Reply to author
Forward
0 new messages