Metadata-Version: 2.4
Name: pytoast-core
Version: 0.1.0b1
Summary: Python Toolkit for Ocean, Atmospheric, and Surface-wave Turbulence
Author-email: Galen Egan <galenegan@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/galenegan/pytoast
Project-URL: Documentation, https://galenegan.github.io/pytoast/
Project-URL: Repository, https://github.com/galenegan/pytoast.git
Project-URL: Bug Tracker, https://github.com/galenegan/pytoast/issues
Keywords: oceanography,atmospheric,turbulence,scientific-computing
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.20.0
Requires-Dist: scipy>=1.7.0
Requires-Dist: pandas>=1.3.0
Requires-Dist: xarray>=0.19.0
Requires-Dist: matplotlib>=3.5.0
Requires-Dist: h5py>=3.7.0
Requires-Dist: netCDF4>=1.6
Requires-Dist: mat73>=0.65
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: ruff>=0.4; extra == "dev"
Requires-Dist: isort>=5.10.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Provides-Extra: docs
Requires-Dist: mkdocs>=1.6; extra == "docs"
Requires-Dist: mkdocs-material>=9.0; extra == "docs"
Requires-Dist: mkdocstrings[python]>=0.25; extra == "docs"
Requires-Dist: mkdocs-jupyter>=0.24; extra == "docs"
Provides-Extra: jupyter
Requires-Dist: jupyter>=1.0.0; extra == "jupyter"
Requires-Dist: ipython>=8.0.0; extra == "jupyter"
Requires-Dist: nbconvert>=7.0.0; extra == "jupyter"
Requires-Dist: matplotlib>=3.5.0; extra == "jupyter"
Provides-Extra: all
Requires-Dist: pytest>=7.0.0; extra == "all"
Requires-Dist: pytest-cov>=4.0.0; extra == "all"
Requires-Dist: ruff>=0.4; extra == "all"
Requires-Dist: isort>=5.10.0; extra == "all"
Requires-Dist: mypy>=1.0.0; extra == "all"
Requires-Dist: mkdocs>=1.6; extra == "all"
Requires-Dist: mkdocs-material>=9.0; extra == "all"
Requires-Dist: mkdocstrings[python]>=0.25; extra == "all"
Requires-Dist: mkdocs-jupyter>=0.24; extra == "all"
Requires-Dist: jupyter>=1.0.0; extra == "all"
Requires-Dist: ipython>=8.0.0; extra == "all"
Requires-Dist: nbconvert>=7.0.0; extra == "all"
Requires-Dist: matplotlib>=3.5.0; extra == "all"
Dynamic: license-file

# 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

```bash
pip install pytoast-core
```

For development:

```bash
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:

```python
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](https://galenegan.github.io/pytoast/) for the full
API reference.

---

## Running tests

```bash
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:

```bibtex
@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](LICENSE) for
details.
