Skip to main content

EWDM: A package for a wavelet-based directional wave spectra

Project description

Documentation Status Python package

EWDM: Extended Wavelet Directional Method

Welcome to the GitHub repository for the Extended Wavelet Directional Method (EWDM) - a toolkit for estimating directional spectra of ocean waves using the Continuous Wavelet Transform (CWT).

This algorithm is an extension of the original WDM proposed by Donelan et al. (1985) that was only suitable for spatially-distributed arrays of wave staffs. This extension allows the estimation of the directional wave spectrum for GPS wave buoys, pitch-roll-heave buoys and Acoustic Doppler Current Profilers.

The wavelet-based methods have emerged as a practical alternative to the conventional Fourier-based techniques, particularly well-suited for the analysis of data from Spotter buoys as demonstrated by Peláez-Zapata et al. 2024 and from other triplet data such as wave slopes as shown by Krogstad et al. 2006.

Key features of the EWDM include:

  • Implementation of the wavelet-based algorithms for extracting directional information from wave time series.
  • Tools for processing and visualising directional wave data.
  • Powered by xarray labelled multi-dimensional arrays.
  • Helper functions to handle commonly used data sources such as Spotter buoys and CDIP.
  • Documentation, examples, and comparison with conventional methods.

Whether you are a researcher, student, or engineer in physical oceanography, the Extended Wavelet Directional Method provides a powerful, user-friendly toolkit for in-depth analysis of directional ocean wave spectra. Join us in exploring the fascinating world of directional wave analysis and making meaningful contributions to the understanding of ocean wave dynamics. We welcome contributions, feedback, and collaboration from the community to further enhance the capabilities of the Extended Wavelet Directional Method.

Getting Started

Installation

Package installation can be done using pip. First, make sure you have Python 3.8 or higher installed.

pip install ewdm

This will install the ewdm package along with its dependencies.

Usage

After installation, you can import and use the ewdm package in your Python code:

import ewdm

Quick example

This example uses a CDIP buoy time series of wave-induced displacements to estimate the directional wave spectrum.

import numpy as np
import xarray as xr
from matplotlib import pyplot as plt

import ewdm
from ewdm.sources import CDIPDataSourceRealTime
from ewdm.plots import plot_directional_spectrum
plt.ion()

cdip =  CDIPDataSourceRealTime(166)
dataset = cdip.read_dataset(time_start='2024-06-09T08:30')
spec = ewdm.Triplets(dataset)
output = spec.compute()

fig, ax = plt.subplots()
plot_directional_spectrum(
    output["directional_spectrum"], ax=ax, levels=None
)

This will produce a plot like this:

Further examples

Consult the full documentation on extended-wdm.readthedocs.io/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ewdm-0.3.tar.gz (32.9 kB view details)

Uploaded Source

File details

Details for the file ewdm-0.3.tar.gz.

File metadata

  • Download URL: ewdm-0.3.tar.gz
  • Upload date:
  • Size: 32.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for ewdm-0.3.tar.gz
Algorithm Hash digest
SHA256 bffd2b1aecd4a4420891ac87453a66fe76173b2f804640e021c5cd874b26d48f
MD5 1360064deef27aa2ae97c14a939081b6
BLAKE2b-256 d51d60f2f7bff88eae4ef8408bb30881d8cb5d36d7d2fb93a47d0691907ef658

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page