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
- Fork & clone the repo.
- Create a feature branch:
git checkout -b feature/my-improvement - Install dev dependencies:
pip install -e ".[dev]" - Run tests before pushing:
pytest - 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
faeb718c05f6b37ed4b96be5cc15d2fe6a483d394cc7192562f862709dcd429d
|
|
| MD5 |
9539625eef5ba76d78a5629b5e58ab93
|
|
| BLAKE2b-256 |
113ea472e1cf35e41c91de243a2e2fddb234e5c7f38a952ee1d078247af83c1b
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a44eaf02aff5751b370fec3784d66730f3224b20d82ce0f42b2a48f66357b76
|
|
| MD5 |
6f95f4b437962793dc66aacaa352f382
|
|
| BLAKE2b-256 |
845695d2d528216ebe97ee5ec1c0f3e0be7caeb8edc63d76026c17dc45d7e753
|