fengyanshi / FUNWAVE-TVD

43 stars 51 forks source link

Funwave wavemaker reader / writer in wavespectra #49

Open rafa-guedes opened 3 years ago

rafa-guedes commented 3 years ago

We wrote some time ago an open-source python library for ocean wave spectra, wavespectra, it now sits in:

https://github.com/wavespectra/wavespectra

In the latest release 3.9.0 we have added support to read and write Funwave spectrum format. They should help for example seamless conversion between spectra from other wave models such as WW3 or SWAN to Funwave. This notebook shows examples on how to use these:

https://github.com/wavespectra/notebooks/blob/master/funwave.ipynb

One difference between spectra written using this library and the file produced by this matlab script in simple_cases folder is that wavespectra calculates Tp from a parabolic fit of the direction-integrated spectrum (as in WW3 and SWAN), rather than the period of maximum energy density in the 2D matrix so the value for PeakPeriod in the Funwave files are a bit different. Is this value actually used by Funwave or it is only there for reference?

Please feel free to use it, any comment or feedback would be appreciated.

fengyanshi commented 3 years ago

Nice work. I will provide a link from the funwave documentation page to your github page. For your last question, yes, the model uses the peak period to estimate the wave-maker width. But it's not necessarily exact. Your approach is good enough.