cube_validate() diagnoses the logical header, physical backend, metadata,
and coordinate contract of an ocean cube. Unlike cube_inspect(), it
returns one row per validation check and never reads a complete NetCDF data
payload.
Arguments
- x
An object to validate as an
<ocean_cube>.- strict
A non-missing logical scalar. If
TRUE, any failed check raises an error of classoceancube_validation_error; this includes duplicate or non-increasing time, non-UTC stored POSIXct, unsupported calendar metadata, and inconsistent temporal provenance. The condition includes the complete report in itsreportfield.
Value
A data frame with class oceancube_validation and columns check,
status, severity, component, message, repairable, and
suggested_action.
Details
Both modes diagnose temporal class, missing/non-finite values,
uniqueness, strict ordering, canonical UTC, supported calendar metadata,
and provenance consistency. strict = FALSE returns those failures as
rows; strict = TRUE raises after assembling the complete report. No
validation path sorts, deduplicates, or otherwise repairs scientific data.