Skip to main content

Pelagic

Pelagic runs two-dimensional underwater acoustics models from familiar input files and writes results you can inspect, archive or pass to other tools. It is a Rust command-line program, so common workflows do not require a local Fortran Acoustics Toolbox build.

Pelagic includes two independent model families:

  • BELLHOP for rays, eigenrays, arrivals and sound fields.
  • KRAKEN / KRAKENC for normal modes and acoustic fields.

You can start from Acoustics Toolbox-style legacy inputs or from Pelagic's self-contained JSON. One calculation can write native numerical files, HDF5, or both.

Install

Windows x64

Download pelagic-vX.Y.Z-windows-x64.zip from Releases, extract it, and run pelagic.exe. No separate HDF5 installation or MSVC runtime is needed.

Each ZIP is accompanied by a SHA-256 checksum file. The archive includes license notices and build information identifying the exact source commit. It contains the CLI; the optional HTTP server is built separately.

macOS and Linux

Releases after v0.3.0 also include pelagic-vX.Y.Z-<platform>.tar.gz for macos-arm64, macos-x64, linux-x64 and linux-arm64. Download one, check it against its .sha256 file, extract it and run ./pelagic. The macOS binaries are not notarized: if Gatekeeper blocks a downloaded copy, run xattr -d com.apple.quarantine pelagic once. Linux binaries are built on Ubuntu 22.04 (x86-64) and 24.04 (ARM64).

Python wheels and MATLAB toolbox

Releases after v0.3.0 publish Python wheels to PyPI (python -m pip install pelagic) and attach the MATLAB/Octave toolbox pelagic-vX.Y.Z.mltbx, which bundles the matching CLI. Until then, build both from a checkout. See Python and MATLAB.

Build from source

Install Rust, a C/C++ build toolchain and CMake. Development and CI use the exact Rust version in rust-toolchain.toml (currently 1.99.0); the declared MSRV remains 1.88. HDF5 is built and linked statically.

git clone https://github.com/leihuang1/pelagic.git
cd pelagic
cargo install --locked --path crates/cli

For test and release-verification policy, see daily tests and pre-release acceptance.

Run a model

The repository includes small example inputs. From the repository root:

# Check a BELLHOP input before calculating.
pelagic bellhop validate examples/field-g.json

# Calculate a sound field and save native files alongside HDF5.
pelagic bellhop run examples/field-g.json --format both --output results/bellhop

# Solve a self-contained KRAKEN example.
pelagic kraken run examples/kraken-pekeris.json --format both --output results/pekeris

Using the Windows ZIP? Download the example JSON files and point the commands at your local copies. Use .\pelagic.exe instead of pelagic if the executable isn't on your PATH.

Legacy BELLHOP inputs use .env files. Legacy KRAKEN/KRAKENC runs use an .env file plus FIELD geometry in .flp; --solver krakenc selects KRAKENC. You can also export legacy inputs to portable JSON:

pelagic bellhop export path/to/case.env > case.json
pelagic kraken export path/to/case.env --solver krakenc > case.json

Use pelagic --help or a subcommand's --help for the full argument list.

Choose outputs

--format Result
legacy (default) Native numerical files for the selected model/run
hdf5 A structured HDF5 result
both Native files and HDF5 from the same solve

--output names a result directory, not a single file. If you omit it, Pelagic uses the input filename's stem in the current directory.

Rerunning a model updates only Pelagic's verified, owned outputs. Unrelated files are left in place; modified outputs and input files are protected from replacement. See the CLI guide and output formats and directory safety for details.

Model support and limits

Pelagic uses Acoustics Toolbox v2023.5 as its fixed numerical reference. Pinned reference results document the cases that have been checked; they do not imply support for every Toolbox option or every option combination.

Start with the model-specific compatibility guide before preparing a new study:

For output schemas and examples, use the documentation index. For how numerical comparisons are made and reproduced, see reference verification.

Python and MATLAB

Python calls the Rust solvers in-process and returns immutable NumPy results; native files can be written from those results without a CLI or HDF5 dependency. Build the current checkout with python -m pip install .:

import pelagic as pg
result = pg.bellhop.load("examples/field-g.json").run()
pressure = result.field.pressure  # [source, depth, range], complex64
result.write_native("results/python")

The MATLAB/Octave adapter under matlab/ drives a version-matched CLI and reads its HDF5 products. See the bindings guide for installation, JSON struct encoding, array axes, diagnostics, parallel sweeps and release status. The executable gallery includes pinned Fortran comparisons. Use CITATION.cff to cite a release.

Optional HTTP API

pelagic-server is a separate BELLHOP-only HTTP service. It accepts self-contained JSON cases and returns HDF5 or focused JSON responses.

cargo install --locked --path crates/server
pelagic-server

Open http://localhost:8080/docs, or submit a case directly:

curl --fail-with-body -H 'Content-Type: application/json' \
  --data-binary @examples/field-g.json http://localhost:8080/v1/run --output result.h5

Building the server also downloads Swagger UI assets. Before exposing it to a network, review authentication, configuration and limits.

Documentation map

License

GPL-3.0. See LICENSE and NOTICE.

Metadata

Release files for pelagic 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pelagic 0.4.0
File Size Uploaded Provenance
pelagic-0.4.0.tar.gz 2.1 MB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for pelagic 0.4.0
File
pelagic-0.4.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
pelagic-0.4.0-cp39-abi3-manylinux_2_28_x86_64.whl CPython 3.9 abi3 Linux glibc 2.28+ x86-64 Details
pelagic-0.4.0-cp39-abi3-manylinux_2_28_aarch64.whl CPython 3.9 abi3 Linux glibc 2.28+ ARM64 Details
pelagic-0.4.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
pelagic-0.4.0-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details

Total release size: 8.3 MB

Release files / pelagic-0.4.0.tar.gz

Download URL pelagic-0.4.0.tar.gz
Size 2.1 MB
Tags Source
SHA-256 checksum
How to use checksums
278fc804f7968359fdbc6a7058a7ceae1e15b60e7edc09a7d1b9083df459527e
BLAKE2b-256 checksum
How to use checksums
e22f1688ce9f6339eec02d2abbb8170d651a15eb0c594c206e252e10e08bde27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 23, 2026.

Transparency log

Release files / pelagic-0.4.0-cp39-abi3-win_amd64.whl

Download URL pelagic-0.4.0-cp39-abi3-win_amd64.whl
Size 1.1 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
ea026d069839624e97a42c463c25218ef084cde76e6e2cff1793cfad7180353f
BLAKE2b-256 checksum
How to use checksums
ed9e516ddba2571b38fe27bdfad85174248686c95ded69d26ab3cae56c8f38b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 23, 2026.

Transparency log

Release files / pelagic-0.4.0-cp39-abi3-manylinux_2_28_x86_64.whl

Download URL pelagic-0.4.0-cp39-abi3-manylinux_2_28_x86_64.whl
Size 1.3 MB
Tags CPython 3.9 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
868b4697d010f9510b043c4562d45c7ede9ab410b5ffbfd407f3f3d1811b11bd
BLAKE2b-256 checksum
How to use checksums
3883ea5908c19ca78eb31e26b813d1ccf7afe3385ef7834c97f74ce615f333e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 23, 2026.

Transparency log

Release files / pelagic-0.4.0-cp39-abi3-manylinux_2_28_aarch64.whl

Download URL pelagic-0.4.0-cp39-abi3-manylinux_2_28_aarch64.whl
Size 1.3 MB
Tags CPython 3.9 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
da721d1c27e9040b3bf9823a2d5711d44976c2f0599d0236ddb0c86b26260dac
BLAKE2b-256 checksum
How to use checksums
fad23212a162dfd4a9c43ab540984128a4a89c810fddff3cb0ffe63d536af29e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 23, 2026.

Transparency log

Release files / pelagic-0.4.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL pelagic-0.4.0-cp39-abi3-macosx_11_0_arm64.whl
Size 1.2 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
292ddc25612c4109b876618dd9ae6f4783fe2bac50beebc6f25ff57876cda9cb
BLAKE2b-256 checksum
How to use checksums
eb9cc12193efc280b21409a35e1bc811eba3b3c1971728039636c422b1181bb1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 23, 2026.

Transparency log

Release files / pelagic-0.4.0-cp39-abi3-macosx_10_12_x86_64.whl

Download URL pelagic-0.4.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 1.2 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
b1d2f86d4f77d6274e8db17bac36e19adddd7d693b7c62e1457f822a3ef4bb13
BLAKE2b-256 checksum
How to use checksums
d5d4c3f44820d893a7497ebc43cac462ab8d5d26c9e795f87504b996c9852eec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 23, 2026.

Transparency log

Security for pelagic 0.4.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.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for pelagic-0.4.0.tar.gz

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 Oct 23, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.4.0 This release

6 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page