Skip to main content

Slocum-AD2CP

Slocum-AD2CP is a package designed to process Nortek AD2CP data from Teledyne Webb Research Slocum gliders. The package is designed to walk through the steps to process AD2CP data in several Jupyter notebooks.

Please cite this package using this DOI. The intention for publishing this code on GitHub is twofold: 1) to make glider based acoustic current profiler data easier to work with and 2) to improve upon the processing workflow and make it more transparent. For these reasons, I encourage comments, questions, concerns, and for users of this code to report any potential bugs. Please do not hesitate to reach out to me at jgradone@marine.rutgers.edu.

Screen Shot 2022-11-30 at 1 01 27 PM

Installation

slocum_ad2cp can be install via:
pip install slocum_ad2cp

Processing Raw AD2CP Data

This package is built under the assumption that users are processing their AD2CP data to NetCDFs using the Nortek MIDAS software.

Changelog

2.1.0, 2026-10-02

  • Added a glider.py module with an interchangeable glider data backend: alongside the existing get_erddap_dataset path, load_glider_dbd/load_glider(source="dbd") reads raw Slocum dbd/ebd files (and their LZ4-compressed dcd/ecd counterparts, needs dbdreader>=0.6) directly, useful before a deployment is published to ERDDAP. Both backends return the same segment-table schema.
  • Added correct_ad2cp_mounting / detect_roll_offset to make_dataset.py. Some Slocum payload-bay AD2CP mounts report roll 180 degrees from the glider's own frame; left uncorrected, cell_vert returns negative cell depths and binmap_adcp silently drops every bin. Opt-in, not called by the existing pipeline.
  • Fixed a bug in beam2enu (make_dataset.py): the function computed a pitch-dependent 3-of-4-beam selection (dropping the aft beam on downcasts, the forward beam on upcasts, per the glider's actual attitude) and then unconditionally discarded that choice, always applying the beam 2/3/4 transform regardless of pitch. beam2enu now takes honour_pitch_selection (default True, the corrected behaviour); pass False to reproduce the pre-fix output. Verified against an independent AHRS rotation matrix and glider compass on a deployment where the beam-selection bug produced a horizontal-velocity direction scattered by 117 degrees against the glider's own heading versus 12 degrees corrected, and biased mean vertical velocity by -0.14 m/s.
    • This changes output for existing callers, including both example notebooks, which call beam2enu(subset_ad2cp) with no argument. processed_data/RU29_2024_Processed_AD2CP.nc and the per-segment CSVs have been regenerated with the fix; the pre-fix files are kept in processed_data/pre_beam2enu_fix_backup/ for reference. RMS difference across the regenerated grid is 0.02 m/s (u) and 0.017 m/s (v), with individual bins shifting up to 0.26 m/s; 97.5% of output bins changed at all. Coverage is unchanged (97.5%). These files were regenerated before the two beam2enu fixes below and do not include them yet.
  • Fixed the AHRS rotation in beam2enu: calcAHRS stores each 3x3 rotation matrix flattened column by column, but beam2enu read it back row by row, which gives the transpose (the inverse rotation). The horizontal velocity direction was off by roughly (constant - 2 x heading), up to 160 degrees on ru37 and uvi_01; corrected, the flow bearing agrees with the glider compass to within a few degrees. New argument ahrs_order (default 'F', corrected); pass 'C' to reproduce older output.
  • beam2enu now uses all four beams: the three-beam solution (a 3x3 slice of the 4x4 beam-to-XYZ matrix) drops one of the forward/aft pair that the along-glider velocity depends on, X = 0.678 (b1 - b3). That roughly halved the along-glider velocity (and its shear) and leaked it into a spurious vertical velocity. Because the four beams are redundant (b1 + b3 = r (b2 + b4)), the beam pointing the wrong way for the pitch is now rebuilt from the other three and the full matrix is applied, as gliderad2cp does. On uvi_01 this raises horizontal speed from 0.09 m/s to 0.36 m/s, matching dead reckoning. New argument redundant_beams (default True); raises an error if the instrument's matrix is not the standard Janus layout. Pass redundant_beams=False, honour_pitch_selection=False, ahrs_order='C' to reproduce 2.0.0 output.
    • This changes UVelocity, VVelocity and WVelocity for all existing callers. Reprocess any output made with 2.0.0.

Metadata

Release files for slocum-ad2cp 2.1.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 slocum-ad2cp 2.1.0
File Size Uploaded
slocum_ad2cp-2.1.0.tar.gz 33.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for slocum-ad2cp 2.1.0
File Interpreter ABI Platform
slocum_ad2cp-2.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 65.5 kB

Release files / slocum_ad2cp-2.1.0.tar.gz

Download URL slocum_ad2cp-2.1.0.tar.gz
Size 33.5 kB
Tags Source
SHA-256 checksum
How to use checksums
bda08e5402c59c6c5b6b40c930641f6d983f238b9ba73a8e2ffe62464a6d05d7
BLAKE2b-256 checksum
How to use checksums
1294a48a886c0d056bb156e146a6d397e6ed5a7034d1c99aa762c064b1487f67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.12

Release files / slocum_ad2cp-2.1.0-py3-none-any.whl

Download URL slocum_ad2cp-2.1.0-py3-none-any.whl
Size 32.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
10a674d47088e0fbcd52d936c3b48f2959f59ad5514dce9f6363106ee285d3e7
BLAKE2b-256 checksum
How to use checksums
c22c0264aad8dd754b523868ffda41d3580716d866fdd10e775f219947bd386d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.12

Release history Release notifications | RSS feed

This release

2.1.0 This release

2 release files

2.0.0

2 release files

0.1.0

2 release files

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