{% import "_nav.html" as navm -%} {{ title }} — phase

{{ title }}

phase

{{ title }}generated {{ generated_at }}

{{ navm.page_nav(page_nav) }} seagliderOG1

PHASE says what the glider was doing at each data point, in the OG1 phase vocabulary. How phase should be assigned is under discussion in the OceanGliders community.

1. OG1 phase counts

Every OG1 phase id, with the number of data points (entries on N_MEASUREMENTS) assigned it over the {{ p.n_dives }} dive{{ "s" if p.n_dives != 1 }}, its share of all data points, and the number of dives it appears in. We use the OG1 phase translation table to determine how to assign phase for Seagliders. 6 (propelled) and 7 (transition) are never assigned to a Seaglider.

{%- for r in p.rows %} {%- endfor %}
idphaseCount%dives
{{ r.id }}{{ r.name }}{{ r.rows }}{{ r.share }}{{ r.dives }}

Dive fraction in each phase. Top: the fraction of data points from each dive spent in each phase. Bottom: the dive's maximum pressure (gray bars, left axis) and duration from first to last data points (dots, right axis).

{%- if p.bars_png %} Per-dive share of data points in each phase, with maximum pressure and duration {%- if show_source and p.bars_source %}
source: {{ p.bars_source }}
{% endif %} {%- endif %}

2. Example dive cycles

Plots below show how phase is assigned against dive cycles. Up to three are chosen to demonstrate how the rules apply. The x-axis is time and the panels show the pressure (each data point colored by its PHASE, with some of the commanded depths in dashed horizontal lines), pitch, the guidance and control (G&C) events' VBD setting, the glider's state table (gc_state_state, if available), and PHASE as a band. Dotted lines show the start of each G&C event. Yellow vertical lines are the GPS fixes. Note that when the CTD does not sample at the surface, there is no colored pressure line.

{%- for f in p.dive_figures %}

Dive {{ f.dive }}{% if not f.complete %} (no descent, inflection and ascent){% endif %}

{%- if f.png %}
Dive {{ f.dive }}: pressure, pitch, G&C VBD, state table and PHASE {%- if show_source and f.source %}
source: {{ f.source }}
{% endif %}
{%- endif %} {%- endfor %}
{%- if p.scatter_png %}

3. Pitch and dP/dt

Dive {{ p.dives|join(", ") }}: pitch against the rate of pressure change, colored by PHASE. Descent sits at negative pitch and positive dP/dt (i.e., increasing pressure), ascent at positive pitch and negative dP/dt; inflection lies between them. Descent points at steep negative pitch and dP/dt near zero are the glider bleeding at the surface before the flare; ascent points at positive pitch with dP/dt still positive are the glider still sinking after the apogee ends. Pitch is interpolated in time onto the pressure data points.

Pitch against dP/dt colored by PHASE {%- if show_source and p.scatter_source %}
source: {{ p.scatter_source }}
{% endif %}
{%- endif %}

{{ 4 if p.scatter_png else 3 }}. Algorithm

The code: PHASE is assigned by assign() in seagliderOG1/_phase.py, called through the public wrapper seagliderOG1.tools.add_phase(); PROFILE_NUMBER, PROFILE_DIRECTION and SEGMENT_NUMBER follow from it in tools.add_profiles().

The file's phase_calculation_method:

{{ p.method }}

The algorithm as the code runs it, per dive. Step 2 overrides step 1; step 3 fills what is left.

{{ p.pseudocode }}

Variables used by the algorithm

Each variable the algorithm reads, and whether this file has it. "Check only" variables are drawn on the figures above but never set a phase.

{%- for r in p.inputs %} {%- endfor %}
VariableUsed forIn this file
{{ r.name }}{{ r.use }}{{ r.present }}

{{ 5 if p.scatter_png else 4 }}. Seaglider state table

Every state the Seaglider basestation numbers in gc_state_state, in begin/end pairs. Each begin state of a pair sets the PHASE the OG1 phase translation table specifies the transition, held until the next listed pair begins; a pair the table does not list is ignored, so the phase before it holds. Count: how many times the begin state appears in this file. Ended with: the end-of-phase codes (gc_state_eop_code) the end state carried. Names and numbers: the basestation's own list.

{%- for r in p.states %} {%- endfor %}
TransitionStatesPHASEPhase fromCountEnded with
{{ r.transition }}{{ r.states }}{{ r.phase }}{{ r.source }}{{ r.count }}{{ r.eop }}

{{ 6 if p.scatter_png else 5 }}. PHASE_QC differences from OG1

PHASE_QC is 0 (no QC performed) on every data point. Amber: an attribute this file writes differently from the OG1 format table, following the CF conventions for flags instead; the reason is given for each, and both are points to take to the OG1 format group.

AttributeOG1 format tableThis fileWhy
_FillValue" "nonea string fill value cannot be stored on a byte variable; every data point has a value (0), so none is needed
flag_meanings"No QC has been applied, Good data, Probably good data, Probably bad data, Bad data"{{ p.qc_meanings }}CF pairs flag_meanings with flag_values by space-separated words; the OG1 phrase splits into 15 words for 5 values
{{ js_top_links | safe }}