You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to use wot.waves.long_crested_wave to create a wave based on an empirical spectrum. In the docstring for wot.waves.long_crested_wave it says you should pass an Omnidirection wave spectrum in units of m^2/Hz, in the format used by :py:class:wavespectra.SpecArray.
I was able to resolve the problem by doing just passing my raw xr.DataArray (not the wavespectra.SpecArray):
# continuing from abovewot.waves.long_crested_wave(da)
This is OK I guess, but if so our docstring is misleading.
Suggested options:
Update the docstring for wot.waves.long_crested_wave to make it clear that you should pass a xr.DataArray with a specific structure (don't love this one)
Update the source for wot.waves.long_crested_wave to use a wavespectra.SpecArray as the input argument (preferred)
The text was updated successfully, but these errors were encountered:
I was trying to use
wot.waves.long_crested_wave
to create a wave based on an empirical spectrum. In the docstring forwot.waves.long_crested_wave
it says you should pass anOmnidirection wave spectrum in units of m^2/Hz, in the format used by :py:class:wavespectra.SpecArray
.WecOptTool/wecopttool/waves.py
Lines 197 to 227 in 598e875
So I did something like the following:
This produces an error:
I was able to resolve the problem by doing just passing my raw
xr.DataArray
(not thewavespectra.SpecArray
):This is OK I guess, but if so our docstring is misleading.
Suggested options:
wot.waves.long_crested_wave
to make it clear that you should pass axr.DataArray
with a specific structure (don't love this one)wot.waves.long_crested_wave
to use awavespectra.SpecArray
as the input argument (preferred)The text was updated successfully, but these errors were encountered: