Long/tidy, one row per (station, depth bin, variable) — the shape both the matrix builder and the climatology consume.
Usage
cc_transect_section(
con,
line,
cruise_key = NULL,
variables = "temperature_ave",
dataset_key = "calcofi_ctd-cast",
depth_max = 500,
depth_bin = 10,
x = c("occupied", "line")
)Arguments
- con
DuckDB connection to a release.
- line, cruise_key, dataset_key
as in
cc_transect_stations().- variables
measurement_types to return.- depth_max
deepest bin, m (default 500 — a handful of casts reach 5000 m, and letting them set the axis squashes every standard cast into the top tenth of the plot).
- depth_bin
bin width, m (default 10; floor bins).
- x
passed to
cc_transect_stations().
Details
Depth is binned because CTD sensors sample continuously (47.283 m, 47.916 m,
…), so grouping by exact depth deduplicates almost nothing and the
native-resolution profile is jagged with sensor precision rather than signal.
Bins are floor bins labelled by their shallow edge (floor(depth / bin) * bin: 0, 10, 20 …), the release's depth_bin convention and the grain of its
climatology table, so cc_anomaly() joins exactly. 10 m, not 5: the released
CTD series is thinned (a 10 m grid plus the profile's inflection points), so
finer bins are built only from where the profile happens to bend.