11  Integrated workflows

Begin every new workflow with a supported constructor or local reader, then validate and inspect before scientific selection. The scripts in handbook/scripts/ retain established executable patterns; the canonical 0.2.0 routes are summarized here.

flowchart TD
  A["read_nc() / ocean_cube()"] --> B["cube_validate() / cube_inspect()"]
  B --> C["cube_slice() / cube_crop() / cube_extract() / cube_transect()"]
  C --> V["viz.map() / viz.section() / viz.profile() / viz.transect() / viz.timeseries()"]
  C --> G["cube_aggregate_time()"]
  G --> H["cube_climatology()"]
  H --> I["cube_anomaly()"]
  C --> T["cube_trend()"]
  G --> T
  I --> T
  T --> M["viz.map()"]

11.1 Workflow A: inspect, crop, and map

local NetCDF -> read_nc() -> cube_validate() -> cube_inspect()
             -> cube_crop() -> viz.map()

viz.map() reads only the selected layer from a lazy NetCDF input and returns a ggplot object. Validation never repairs coordinates, and inspection only reads a full lazy payload when missing = "full" is explicitly requested.

11.2 Workflow B: aggregate, climatology, and anomaly

historical cube -> cube_aggregate_time() -> cube_climatology()
                -> cube_anomaly()

The climatology replaces historical time with a recurring reference cycle. Difference and standardized anomalies match source observations to that cycle using exact coordinates, variables, units, calendar, and time class.

11.3 Workflow C: descriptive trend and map

historical cube -> optional cube_aggregate_time() -> cube_trend() -> viz.map()

Raw, aggregated, anomaly, and signal_noise() cubes retain historical time and may enter cube_trend(). A cube_climatology() result has recurring pseudo-time and is rejected. Trend diagnostics such as R2 are descriptive; there is no significance inference, Sen slope, Mann–Kendall test, breakpoint, or regime detection.

11.4 Compatibility route

to_month(), clim_day(), clim_month(), anom_diff(), anom_z(), and signal_noise() remain available for established workflows. The climatology and anomaly wrappers delegate to the canonical engines. signal_noise() means standardized climatological anomaly magnitude, abs(z), by default or signed z with signed = TRUE; it is not a generic signal-to-noise ratio.

Prepared values, geometry, and weights can continue downstream to spatind, which owns spatial indicators, higher-level interpretation, uncertainty, and structural or regime analysis.