Conventions#
Wavespectra takes advantage of xarray’s labelled coordinates to abstract n-dimensional wave spectra datasets. This requires some conventions around special coordinates and variables. The convention adopted is based on that of the netcdf output from the WAVEWATCH III spectral wave model.
Coordinates#
Wave frequency#
Wave frequency coordinate with name freq, defined in \(Hz\) (required).
Wave direction#
Wave direction coordinate in coming-from convention, with name dir,
defined in \(degree\) (required for 2D spectra and directional methods).
Time#
Time coordinate with name time (required by a few methods).
Data variables#
Wave energy density#
Wave energy density array named with name efth, defined in:
2D spectra \(E(\sigma,\theta)\): \(m^{2}{degree^{-1}}{s}\).
1D spectra \(E(\sigma)\): \(m^{2}{s}\).
Wind speed#
Wind speed array named with name wspd, defined in \(ms^{-1}\) (required for the
watershed partitioning).
Wind direction#
Wind direction array with wdir, defined in \(degree\) (required for the
watershed partitioning).
Water depth#
Water depth array with name dpt, defined in \(m\) (required for the watershed
partitioning and wavenumber-based methods).
Attributes#
Pre-defined names and units for these and other coordinates and variables are
provided in the wavespectra.core.attributes module:
In [1]: from wavespectra.core.attributes import attrs
In [2]: attrs.SPECNAME
Out[2]: 'efth'
In [3]: attrs.ATTRS.hs
Out[3]:
{'standard_name': 'sea_surface_wave_significant_height',
'units': 'm',
'_ipython_canary_method_should_not_exist_': {}}