The code/ianc/ directory contains hydrographic, physical oceanography, and hydrodynamic ocean-model integration software developed by Ian Church within the Ocean Mapping Group (OMG). Built atop the core OMG libj libraries (jcu_nav.h, j_watercolumn.h, j_adcp.h, array.h, soundspeed.h, stdtime.h, and wgs.h) as well as libnetcdf (with OPeNDAP/DAP client support) and PROJ, this suite bridges operational 3D hydrodynamic ocean models (FVCOM, NEGOFS, HYCOM, NRL CONCORDE) and in-situ oceanographic sensors (MVP .m1 profilers, CARIS .svp casts, vessel-mounted RDI ADCPs, ISIIS towed vehicles, and GNSS .pos/.nav streams) with multibeam echosounder ray-tracing and uncertainty analysis.
Command-Line Applications (code/ianc/)
Hydrodynamic Ocean Model Integration & Synthetic SVP Extraction
Connects via OPeNDAP to operational ocean models (-NEGOFS, -GOM_HYCOM_2014, -GOM_HYCOM_2015, -GOM_NRL_CONCORDE) along a .nav track or time window to extract synthetic CARIS .svp casts, .tid tide files, grid geometries, and hybrid model-observation dynamic SVPs.
Queries global or regional HYCOM OPeNDAP/NetCDF servers (-modelPath, e.g., GLBv0.08) with automatic connection retry and nearest-wet-node search (-use_nearest) to generate CARIS .svp profiles, .tid tides, .nav SSH records, surface current maxima (-outVel), and ODV spreadsheets.
Inspects OMG/JHC binary navigation files (.nav), reporting record fields, geographic bounding boxes (-minmax), mean and standard deviation of azimuth/elevation (-stdev), time-of-day filtered records (-time), and Grace-compatible plotting tables (-grace).
Converts NRCan GPSpace ASCII PPP position files (.pos) into OMG binary .nav files (storing ellipsoidal height HGT in the azi field), with support for record decimation (-skip) and chronological reversal (-flip).
Flags navigation records in an OMG binary .nav file that fall outside a specified latitude/longitude bounding box (-lat1, -lat2, -lon1, -lon2) by setting flag[3] = 1.
Calculates the valid surveyed area (in $\text{m}^2$, $\text{km}^2$, and percentage of bounding sheet) for one or more projected OMG .r4 floating-point or .8bit/.mos raster map sheets.
Fast shell utility that scans an OMG raster grid (.r4, .8bit, .mos, or 16-bit short) past the 1024-byte header and exits immediately upon finding the first non-empty pixel (NotEmpty = exit 1, Empty = exit 0).
Subroutine Library Modules (code/ianc/subr/)
The code/ianc/subr/ directory builds libiwc.a, providing shared data structures, equations of state, binary format parsers, and spatial/statistical algorithms across the ianc applications:
Provides fixADCPBinVel() to adjust ADCP bin velocity directions by an external compass heading bias (azi_bias) and recompute eastward and northward velocity components.
Defines oceanObs and iwc_watercol structures; implements UNESCO 1983 (EOS-80) seawater density (density0, calcDensity), buoyancy frequency (calcBuoy), Richardson number (calcRichard), Froude number (calcFroude), Reynolds number (calcReynolds), uniform depth binning (binOceanObs), and jwc2iwc / iwc2jwc conversions.
LLNL VisIt VTK Legacy (# vtk DataFile Version 2.0) mesh writer supporting point, unstructured, regular, rectilinear, and curvilinear 3D meshes in ASCII or big-endian binary format.
Typical End-to-End Workflows
GNSS & Navigation Preparation: Convert PPP .pos solutions to OMG binary .nav using POStoNav, clip out-of-bounds turns or transits with areaNavEdit, and verify timestamps, bounding coordinates, and vertical height statistics with Check_Nav.
In-Situ MVP & ADCP Water-Column Analysis: Process raw .m1 MVP casts and .adcp ensembles with oceanReader (using iwc_water and iwc_adcp) to generate .svp casts, correct ADCP gyro bias from .orientation files, and compute stratification and turbulence metrics (Ri, Fr, Re, $N$) for Ocean Data View.
Operational Model Assimilation & Uncertainty Evaluation: Extract synthetic or model-dynamics-adjusted .svp and .tid files along the survey track from HYCOM, NEGOFS, or NRL CONCORDE using HycomSSP or modelMerge, or evaluate 3D FVCOM model skill and multibeam ray-tracing depth uncertainty against IHO standards using modelAnalysis.
Bathymetric Sheet Coverage Auditing: Filter empty gridded tiles in batch scripts with checkEmpty and compute total surveyed area in $\text{m}^2$ and $\text{km}^2$ with calcArea.