Welcome to oceanwaves’s documentation!

Oceanwaves is a Python package that provides a generic data storage object for ocean wave data (time series and/or spectral). The package provides a series of I/O functions to use with various file formats, like SWAN, Waverider buoys and WaveDroid.

Oceanwaves is based on the xarray DataSet object, but defines special variables for time, location, frequency and direction. Many of its functionalities are obtained from the pyswan toolbox, originally developed by Gerben de Boer, and the swantools toolbox, originally developed by Caio Eadi Stringari.

The source code of the oceanwaves package can be found at https://github.com/openearth/oceanwaves-python.

Usage examples can be found in this notebook https://github.com/openearth/oceanwaves-python/blob/master/notebooks/oceanwaves.ipynb.

Features

The OceanWaves object supports various standard conversions, like:

  • From significant wave height to spectral
  • From omnidirectional to directional
  • From directional to omnidirectional
  • From spectral to significant wave height
  • From spectral to spectral wave period
  • From spectral to peak wave period
  • From directional to peak wave direction
  • From degrees to radians
  • Automated unit conversion

The OceanWaves object supports various standard plotting methods, like:

  • Polar subplots for directional data on multiple locations/times
  • Polar subplots on a map
  • Plots supported by xarray.Dataset and Seaborn

The OceanWaves object can be instantiated from:

  • Raw data
  • SWaN 1D/2D spectral or table files
  • An xarray.Dataset object
  • Another OceanWaves object

The OceanWaves object can be written to:

  • SWaN 1D/2D spectral files
  • Output supported by xarray.Dataset (e.g. netcdf)

Indices and tables