ADCP Tools (code/adcp/)
The adcp/ suite provides command-line utilities for ingesting, filtering, bottom-trimming, georeferencing, and harmonically analyzing Acoustic Doppler Current Profiler (ADCP) datasetsβincluding Teledyne RDI ASCII / WinADCP exports, VMDAS records, and Kongsberg EC150 / generic NetCDF-derived 3D velocity arrays (.N.r4, .E.r4, .D.r4).
For an end-to-end guide with architecture diagrams and command-line recipes, see the ADCP Processing & Tidal Current Analysis Workflow.
Tool Inventory by Stage
1. RDI & WinADCP Ingestion and Profile Mapping
readADCP(code/adcp/readADCP.c): Primary RDI ASCII and WinADCP processor. Integrates external.nav,.orientation,tide.nav, and multibeam.r4DTMs to produce bottom-trimmed.prof(8-bit),.r4(32-bit float),.nav(depth-averaged current vectors),.stack_prof, and georeferenced.map_prof/.map_r4sections across 7 display modes (-showMAG,-showBS,-showAZI,-showTAN,-showRAD,-showVERT,-showERR).readADCP_g(code/adcp/readADCP_g.c): Streamlined variant ofreadADCPwith-phase_zerotidal phase referencing and-ref_bottomheight-above-bottom binning.readADCP_mod(code/adcp/readADCP_mod.c): Modified variant ofreadADCPadding-min_vels_to_avfiltering for depth-averaged.navvector generation.readWinADCP(code/adcp/readWinADCP.c): Stacks tabular WinADCP ASCII exports into ensemble-averaged ASCII profiles (.stack####) and 8-bit velocity magnitude rasters (.mag).
2. Generic & Kongsberg EC150 3D Velocity Processing
readGenericADCP(code/adcp/readGenericADCP.c): Reads generic/EC150.N.r4,.E.r4, and.D.r4velocity component rasters plus.decXX.navnavigation, depth-averaging currents between-mindepthand-maxdepthinto ajcu_nav.navvector file.mapGenericADCP(code/adcp/mapGenericADCP.c): Projects generic/EC150.N.r4,.E.r4,.D.r4+.navonto a 2D rotated OMG mapsheet (-map), outputting.N.r4,.E.r4,.D.r4,.Mag.r4,.Azi.r4,.Rad.r4,.Tan.r4,.history, and.NED_av.txt.
3. Multi-Cycle M2 Tidal Phase Binning & Tidal Ellipse Fitting
combineMultiADCP(code/adcp/combineMultiADCP.c): Bins depth-averaged.navcurrent vectors from multiple M2 tidal cycles ($12.42\text{ hours} = 360^\circ$) onto a spatial grid (-grid) across stepping phase windows (.phase000,.phase020, β¦).combineMultiADCP_wshiftoption(code/adcp/combineMultiADCP_wshiftoption.c): ExtendscombineMultiADCPwith-tshift <sec>and-reftime <unix_sec>controls for multi-survey tidal epoch synchronization.combineMultiADCP_garret(code/adcp/combineMultiADCP_garret.c): Bay of Fundy / Garrett variant ofcombineMultiADCP.calc_ellipse(code/adcp/calc_ellipse.c): Computes M2 tidal current ellipse parameters (semi-major axis $a$, semi-minor axis $b$, orientation $\theta$, ellipticity $e$, and mean residual flow $N_{av}, E_{av}$) per grid cell and outputs CSV tables plus.phase###vector files.calc_ellipse1(code/adcp/calc_ellipse1.c): Computes M2 tidal current ellipses and writes binaryjcu_navvector files (<prefix>_ellipse.navand<prefix>_residual.nav) for direct plotting injview.calc_ellipse2(code/adcp/calc_ellipse2.c): Enhanced M2 tidal ellipse and residual current calculator supporting both binary_ellipse.nav/_residual.navoutputs and optional-asciiCSV export.
4. Section Visualization & CTD Co-Registration
makeVectorPlot(code/adcp/makeVectorPlot.c): Converts distance-averaged.r4velocity profiles into 8-bit JHC vertical stick-vector plots.makeTSmap(code/adcp/makeTSmap.c): Interpolates ASCII CTD profiles in depth and time onto an ADCP.stack_prof/.stack_ASCIIgrid to produce synchronized.Tprof(temperature) and.Sprof(salinity) rasters.