{% import "_nav.html" as navm -%} {% import "_masthead.html" as mh -%}
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.
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.
| id | phase | Count | % | 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 %}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.
{%- if show_source and f.source %}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.
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 }}
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.
| Variable | Used for | In this file |
|---|---|---|
{{ r.name }} | {{ r.use }} | {{ r.present }} |
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.
| Transition | States | PHASE | Phase from | Count | Ended with | |
|---|---|---|---|---|---|---|
| {{ r.transition }} | {{ r.states }} | {{ r.phase }} | {{ r.source }} | {{ r.count }} | {{ r.eop }} |
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.
| Attribute | OG1 format table | This file | Why |
|---|---|---|---|
_FillValue | " " | none | a 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 |