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.
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.pymodule with an interchangeable glider data backend: alongside the existingget_erddap_datasetpath,load_glider_dbd/load_glider(source="dbd") reads raw Slocum dbd/ebd files (and their LZ4-compressed dcd/ecd counterparts, needsdbdreader>=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_offsettomake_dataset.py. Some Slocum payload-bay AD2CP mounts report roll 180 degrees from the glider's own frame; left uncorrected,cell_vertreturns negative cell depths andbinmap_adcpsilently 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.beam2enunow takeshonour_pitch_selection(defaultTrue, the corrected behaviour); passFalseto 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.ncand the per-segment CSVs have been regenerated with the fix; the pre-fix files are kept inprocessed_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 twobeam2enufixes below and do not include them yet.
- This changes output for existing callers, including both example notebooks, which call
- Fixed the AHRS rotation in
beam2enu:calcAHRSstores each 3x3 rotation matrix flattened column by column, butbeam2enuread 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 argumentahrs_order(default'F', corrected); pass'C'to reproduce older output. beam2enunow 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, asgliderad2cpdoes. On uvi_01 this raises horizontal speed from 0.09 m/s to 0.36 m/s, matching dead reckoning. New argumentredundant_beams(defaultTrue); raises an error if the instrument's matrix is not the standard Janus layout. Passredundant_beams=False, honour_pitch_selection=False, ahrs_order='C'to reproduce 2.0.0 output.- This changes
UVelocity,VVelocityandWVelocityfor all existing callers. Reprocess any output made with 2.0.0.
- This changes
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)
| File | Size | Uploaded | |
|---|---|---|---|
| slocum_ad2cp-2.1.0.tar.gz | 33.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|