Skip to main content

Python Toolkit for Ocean, Atmospheric, and Surface-wave Turbulence

Project description

pyTOAST: Python Toolkit for Ocean, Atmospheric, and Surface-wave Turbulence

A pure-Python toolkit for analyzing observations of ocean and atmospheric turbulence and related bulk variables.


Overview

pytoast is a library for physical oceanographers and meteorologists processing field observations, with a focus on turbulence statistics. It provides classes for common ocean and atmospheric sensors -- Acoustic Doppler Velocimeters (ADV), Acoustic Doppler Current Profilers (ADCP), sonic anemometers, CTDs, and bulk meteorological instruments -- along with a shared preprocessing pipeline (despiking, coordinate rotations) and derived calculations. These include TKE dissipation, Reynolds stresses with wave-turbulence decomposition, directional wave statistics, seawater and air thermodynamics (TEOS-10), and boundary-layer flux parameterizations (both air-sea and bottom boundary layer).


Installation

pip install pytoast-core

For development:

git clone git@github.com:galenegan/pytoast.git
cd pytoast
pip install -e ".[dev]"

Requirements

  • Python >= 3.11
  • Core dependencies (numpy, scipy, pandas, xarray, matplotlib, h5py, netCDF4, mat73) are installed automatically.

Quick start

The notebooks/ folder contains Jupyter notebooks demonstrating initialization of each main instrument class, along with example calculations. Each of those looks something like:

from pytoast.ocean.adv import ADV

name_map = {
    "u1": "u", "u2": "v", "u3": "w",
    "p": "pressure", "time": "time",
}

adv = ADV(files="burst.mat", name_map=name_map, fs=16, z=[1.0])

adv.set_preprocess_opts({
    "despike": {"method": "goring_nikora"},
    "rotate":  {"flow_rotation": "align_streamwise"},
})

burst = adv.load_burst(0)
diss  = adv.dissipation(burst, f_low=1.0, f_high=4.0)
print(diss["eps"])     # TKE dissipation rate (m^2/s^3) at each height

See the documentation for the full API reference.


Running tests

pytest
pytest --cov=src    # with coverage report

Contributing

  1. Fork & clone the repo.
  2. Create a feature branch: git checkout -b feature/my-improvement
  3. Install dev dependencies: pip install -e ".[dev]"
  4. Run tests before pushing: pytest
  5. Open a pull request.

Citation

If you use this software in published work, please cite:

@software{pytoast,
  author  = {Galen Egan},
  title   = {pyTOAST: Python Toolkit for Ocean, Atmospheric, and Surface-wave Turbulence},
  year    = {2026},
  url     = {https://github.com/galenegan/pytoast},
}

License

This project is licensed under the MIT License -- see LICENSE for details.

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

pytoast_core-0.1.0b1.tar.gz (96.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytoast_core-0.1.0b1-py3-none-any.whl (101.9 kB view details)

Uploaded Python 3

File details

Details for the file pytoast_core-0.1.0b1.tar.gz.

File metadata

  • Download URL: pytoast_core-0.1.0b1.tar.gz
  • Upload date:
  • Size: 96.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.4

File hashes

Hashes for pytoast_core-0.1.0b1.tar.gz
Algorithm Hash digest
SHA256 faeb718c05f6b37ed4b96be5cc15d2fe6a483d394cc7192562f862709dcd429d
MD5 9539625eef5ba76d78a5629b5e58ab93
BLAKE2b-256 113ea472e1cf35e41c91de243a2e2fddb234e5c7f38a952ee1d078247af83c1b

See more details on using hashes here.

File details

Details for the file pytoast_core-0.1.0b1-py3-none-any.whl.

File metadata

  • Download URL: pytoast_core-0.1.0b1-py3-none-any.whl
  • Upload date:
  • Size: 101.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.4

File hashes

Hashes for pytoast_core-0.1.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 6a44eaf02aff5751b370fec3784d66730f3224b20d82ce0f42b2a48f66357b76
MD5 6f95f4b437962793dc66aacaa352f382
BLAKE2b-256 845695d2d528216ebe97ee5ec1c0f3e0be7caeb8edc63d76026c17dc45d7e753

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