Skip to content

Commit

Permalink
spectral mean period is zero-crossing period
Browse files Browse the repository at this point in the history
  • Loading branch information
dionhaefner committed Mar 12, 2021
1 parent 160476e commit e83e2c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fowd/operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def compute_nth_moment(frequencies, wave_spectral_density, n):


def compute_mean_wave_period_spectral(zeroth_moment, frequencies, wave_spectral_density):
"""Compute mean wave period from wave spectral density."""
"""Compute mean zero-crossing period from wave spectral density."""
second_moment = compute_nth_moment(frequencies, wave_spectral_density, 2)
return np.sqrt(zeroth_moment / second_moment)

Expand Down
2 changes: 1 addition & 1 deletion fowd/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@
dims=('wave_id_local',),
dtype='float32',
attrs=dict(
long_name='Mean wave period estimated from spectral density spectrum',
long_name='Mean zero-crossing period estimated from spectral density spectrum',
units='seconds',
)
),
Expand Down

0 comments on commit e83e2c6

Please sign in to comment.