seagliderOG1
This repository converts Seaglider basestation files (pSSSDDDD*.nc) into OG1 format for standardized oceanographic glider data.
Code is based on votoutils.
Installation
Recommended: Using pip
For most users, pip installation is the simplest approach:
# Install from PyPI (when available)
pip install seagliderOG1
# Or install from source
pip install git+https://github.com/ocean-uhh/seagliderOG1.git
Development setup
For contributors and developers:
# Clone the repository
git clone https://github.com/ocean-uhh/seagliderOG1.git
cd seagliderOG1
# Install dependencies and package in development mode
pip install -r requirements-dev.txt
pip install -e .
Alternative: Using conda/micromamba
If you prefer conda environments:
# Using conda
conda env create -f environment.yml
conda activate TEST
# Using micromamba (faster)
micromamba env create -f environment.yml
micromamba activate TEST
Package Structure
Scripts within the seagliderOG1 package are organized by functionality:
- readers.py - Reads basestation files (
*.nc) from server or local directory - writers.py - Writes OG1
*.ncfiles to output directory (default:data/) - plotters.py - Basic plotting and data visualization functions
- convertOG1.py - Main conversion logic from basestation to OG1 format
- vocabularies.py - Vocabulary translation mappings for OG1 compliance
- tools.py - User-facing utility functions
- utilities.py - Internal helper functions for data processing
Configuration
The seagliderOG1/config/ directory contains YAML files that define OG1 format specifications:
OG1_global_attrs.yaml- Global attributes for OG1 formatOG1_var_names.yaml- Variable name mappingsOG1_sensor_attrs.yaml- Sensor attribute definitionsOG1_vocab_attrs.yaml- Vocabulary attribute mappingsOG1_author.yaml- Author information templatemission_yaml.yaml- Mission configuration template
Usage
Basic conversion
from seagliderOG1 import convertOG1, readers
# Load basestation files
datasets = readers.load_basestation_files("path/to/basestation/files/")
# Convert to OG1 format
og1_dataset, variable_list = convertOG1.convert_to_OG1(datasets)
# Save result
from seagliderOG1 import writers
writers.save_dataset(og1_dataset, "output_file.nc")
Examples
See the notebooks/ directory for detailed examples:
demo.ipynb- Basic usage demonstrationdev_notebooks/- Development and troubleshooting notebooks
Development
Running tests
pytest # Run all tests
pytest -v # Verbose output
pytest tests/test_*.py # Run specific test file
Code quality
black . # Format code
ruff check --fix # Lint and auto-fix
pre-commit run --all-files # Run all pre-commit hooks
Building documentation
cd docs
make clean html
Dependencies
The project uses different dependency files for different use cases:
- requirements.txt - Core runtime dependencies (recommended for most users)
- requirements-dev.txt - Additional development tools (testing, documentation, code quality)
- environment.yml - Complete conda/micromamba environment (alternative for conda users)
Core dependencies
- xarray & netCDF4 - NetCDF file handling and data manipulation
- numpy, pandas - Numerical operations and data structures
- gsw - Seawater property calculations (TEOS-10)
- matplotlib - Plotting and visualization
- pooch - Data downloading and caching
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests and ensure they pass
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Status
This project is under active development. Collaborations and contributions are welcome!
License
See LICENSE for details.
Metadata
Release files for seagliderOG1 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| seagliderog1-0.0.2.tar.gz | 9.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| seagliderog1-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.3 MB
Release files / seagliderog1-0.0.2.tar.gz
| Download URL | seagliderog1-0.0.2.tar.gz |
|---|---|
| Size | 9.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ac70d4807b7c814d3674a1f8f4e1c8e876f94d8d7cef23eb32522e43019068cf
|
|
BLAKE2b-256 checksum How to use checksums |
66bfff786f7e61bf00c2ecb994e1631eb551244e10e46884e3fdcc7797cb5452
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 21, 2025.
Transparency logRelease files / seagliderog1-0.0.2-py3-none-any.whl
| Download URL | seagliderog1-0.0.2-py3-none-any.whl |
|---|---|
| Size | 56.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
81b66ded26b9d556ed9b4194db405b0c00549bee0fbc163f10a90488e17f184d
|
|
BLAKE2b-256 checksum How to use checksums |
98bd796541e8f4e2f68b0d44cd74bf6915fdd82b5addf7dcd36df0f4d63d007d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 21, 2025.
Transparency log