{# Instrument-summary intro prose + summary table + trailing dt-mismatch note and grid-pressure recommendation. The `instruments` panel payload (kind="html"). The `.vbadge` style block moved to mooring.html page_styles. The QC-flag cross-reference is link text without a number. #}

Variables and record length are read from stage 3 files where available, otherwise stage 2. The P badge is shown as present whether pressure was directly measured or interpolated from neighbouring instruments — see the QC flag summary to distinguish. Instruments marked skip: true are listed with the skip reason where provided.

{% for instr in instruments %} {% if instr.nc and instr.nc.get("error") %} {% elif instr.nc and instr.nc.get("t_start") %} {% for label, present in instr.nc.shorthands %} {% endfor %} {% elif instr.skipped %} {% else %} {% endif %} {% endfor %}
# Type S/N Hab (m) First sample Last sample N records Δt (s) P range (dbar) T C P U V
{{ loop.index }} {{ instr.instr_type }} {% if instr.report_exists %}{{ instr.serial }}{% else %}{{ instr.serial }}{% endif %} {{ "%.1f"|format(instr.hab) }}Error: {{ instr.nc.error }}{{ instr.nc.t_start }} {{ instr.nc.t_end }} {{ "{:,}".format(instr.nc.n_records) }} {% set dt = instr.nc.dt_s %} {% if dt == dt %}{# NaN check: NaN != NaN #} {{ "%.0f"|format(dt) }}{% if instr.dt_mismatch %} *{% endif %} {% else %} {% endif %} {% if instr.nc.p_min is not none and instr.nc.p_max is not none %} {% if instr.nc.get("pressure_interpolated") %} ({{ "%.0f"|format(instr.nc.p_min) }}, {{ "%.0f"|format(instr.nc.p_max) }}) {% else %} ({{ "%.0f"|format(instr.nc.p_min) }}, {{ "%.0f"|format(instr.nc.p_max) }}) {% endif %} {% else %} {% endif %} {% if label == "P" and present and instr.nc.get("pressure_interpolated") %} {{ label }} {% else %} {{ label }} {% endif %} skipped{% if instr.skip_reason %} — {{ instr.skip_reason }}{% endif %}no processed file
{% set dt_mismatches = instruments | selectattr("dt_mismatch") | list %} {% if dt_mismatches %}

* Δt mismatch (YAML vs observed p90): {% for instr in dt_mismatches %}
  {{ instr.serial }}: YAML gives Δt of {{ instr.yaml_interval_s }} s; stage file shows Δt of {{ "%.0f"|format(instr.nc.dt_s) }} s. {% endfor %}

{% endif %} {% if grid_p_start is not none and grid_p_end is not none %}

Recommended pressure range for oceanarray process --stage grid, derived from the min/max pressure across all instruments (rounded outward to the nearest 20 dbar):

--pmin {{ grid_p_start }} --pmax {{ grid_p_end }}
{% endif %}