This release is a pre-release and may not be stable for production use.
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 notebook shows slight variations on initialization and processing
procedures:
adcp.ipynb: Traversing nested keys in source files, coordinate transformations, plotting output of two different stress estimation methodsadv.ipynb: Specifying instrument deployment depths, rotating and despiking during preprocessing, adding turbulent stresses, directional wave statistics, and dissipation to anxarraydataset fornetCDFexportctd.ipynb: Loading a single data file with (multidimensional) data from two deployment depths, callingCTD.derivefor seawater thermodynamics calculationsmet.ipynb: Loading a single data file with instruments at different heights stored under different keys, callingMet.derivefor atmospheric thermodynamics calculationssonic.ipynb: Forwarding arguments topd.read_csvfor non-standard data loading, alternate despiking method, calculation of dissipation and buoyancy flux.
In the simplest cases, these will look 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.
Metadata
Release files for pytoast-core 0.1.0b3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pytoast_core-0.1.0b3.tar.gz | 99.0 kB | Without provenance | Details for pytoast_core-0.1.0b3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytoast_core-0.1.0b3-py3-none-any.whl | Python 3 | none | any | Details for pytoast_core-0.1.0b3-py3-none-any.whl |
Total release size: 203.1 kB
Release files / pytoast_core-0.1.0b3.tar.gz
| Download URL | pytoast_core-0.1.0b3.tar.gz |
|---|---|
| Size | 99.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c11d81aa94b412f36f569ef58ebc37fe233a807156449ff077d743cba1fdda26
|
|
BLAKE2b-256 checksum How to use checksums |
33d9a1c6a534672a183ec24c7666df58bf078951e0c6d21a64c274e731a40d8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.4
|
Release files / pytoast_core-0.1.0b3-py3-none-any.whl
| Download URL | pytoast_core-0.1.0b3-py3-none-any.whl |
|---|---|
| Size | 104.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1d0b4301c5c9a778178f0b3ea3822bfbf71386433d632920fd80798e1daf10a1
|
|
BLAKE2b-256 checksum How to use checksums |
be22944ac7fe2f3a0f99f344d488968b5f9b7d842715018edb2a8bd3f9f67951
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.4
|
Security for pytoast-core 0.1.0b3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.