dymfile
Read and write DYM file format with xarray integration
DYM is a binary format used by the SEAPODYM project for oceanographic data. This package provides a modern Python interface with native xarray support.
Features
- ✅ Read DYM files as xarray Datasets
- ✅ Write xarray Datasets to DYM format
- ✅ Native xarray backend:
xr.open_dataset("file.dym", engine="dym") - ✅ Command-line tools for format conversion
- ✅ Fully typed with pyright
- ✅ Tested with pytest
Installation
git clone https://github.com/Ash12H/dymfile.git
cd dymfile
uv sync
Or with pip:
pip install git+https://github.com/Ash12H/dymfile.git
Quick Start
Reading
import xarray as xr
# Via xarray backend (recommended)
ds = xr.open_dataset("data.dym", engine="dym")
# Or high-level API
from dymfile import dym_to_dataset
ds = dym_to_dataset("data.dym")
Writing
from dymfile.writer import dataset_to_dym
ds = xr.open_dataset("input.nc")
dataset_to_dym(ds, "output.dym")
CLI Tools
# Convert DYM to NetCDF
dym-to-dataset input.dym -o output.nc
# Convert NetCDF to DYM
dataset-to-dym input.nc -o output.dym --variable temperature
Documentation
Full documentation available at: https://ash12h.github.io/dymfile
Development
Setup
# Install with dev dependencies
uv sync --extra dev --extra docs
# Install pre-commit hooks
pre-commit install
Testing
pytest tests/
Documentation
mkdocs serve
Project Structure
dymfile/
├── src/dymfile/ # Source code
│ ├── reader.py # Read DYM files
│ ├── writer.py # Write DYM files
│ ├── backend.py # Xarray backend
│ ├── cli.py # Command-line tools
│ ├── _formats.py # Data structures
│ └── _utils.py # Utilities
├── tests/ # Test suite
├── docs/ # Documentation
└── data/ # Sample files
Technologies
- Language: Python 3.10+
- Package manager: uv
- Linter/Formatter: ruff
- Type checker: pyright
- Testing: pytest
- Documentation: MkDocs + Material theme
License
MIT License - see LICENSE file
Acknowledgments
DYM format developed by the SEAPODYM project for oceanographic modeling.
Metadata
Release files for dymfile 0.2.0
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 |
|---|---|---|---|---|
| dymfile-0.2.0.tar.gz | 34.9 kB | Without provenance | Details for dymfile-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dymfile-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for dymfile-0.2.0-py3-none-any.whl |
Total release size: 47.9 kB
Release files / dymfile-0.2.0.tar.gz
| Download URL | dymfile-0.2.0.tar.gz |
|---|---|
| Size | 34.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fb63c298cb73c29e336e032bc01bb0c5169b17379e6798a21b928ffadf91a622
|
|
BLAKE2b-256 checksum How to use checksums |
0c0ae61af220025386118cfa2c34d6cbebf5eb2be8c7faf61b4d40e613fad806
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / dymfile-0.2.0-py3-none-any.whl
| Download URL | dymfile-0.2.0-py3-none-any.whl |
|---|---|
| Size | 13.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5a4c23c2f0318797ad96500eb0ae4a14ab7a315e3b1a246059bcfc9f4fcc0040
|
|
BLAKE2b-256 checksum How to use checksums |
fc48761e36a91491f4d59f8958596436424f22d32ac676429ffd0cf180514a6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for dymfile 0.2.0
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.