Demo notebook

The purpose of this notebook is to demonstrate the functionality of seagliderOG1 to convert from Seaglider basestation files to OG1 format.

The bundled sample is sg271 from the Drygalski Trough (PycnMix), March 2026, shipped inside the package (seagliderOG1/data/sg271/).

The demo is organised to show

  • Conversion of a single dive cycle (single p*.nc file)

  • Conversion for a folder of local dive-cycle files (full mission of p*.nc files)

  • Download from remote server + conversion (directory with full mission of p*.nc files)

Options are provided to only load e.g. 10 files, but note that OG1 format expects a full mission.

[1]:
import pathlib
import warnings

import xarray as xr

import seagliderOG1 as sg
from seagliderOG1 import plotters, readers, writers

warnings.simplefilter(action="ignore", category=FutureWarning)

# Repo root, used to locate the bundled sample data under data/.
parent_dir = pathlib.Path().absolute().parents[0]
print(parent_dir)
/home/runner/work/seagliderOG1/seagliderOG1
[2]:
# Specify the path for writing datafiles
data_path = parent_dir / "data"

Reading basestation files

This has three ways to load a glider dataset.

Load an example dataset using seagliderOG1.readers.load_sample_basestation

Alternatively, use your own with e.g. ds = xr.open_dataset('/path/to/yourfile.nc')

Load single sample dataset

[3]:
ds = readers.load_sample_basestation()
ds
[3]:
<xarray.Dataset> Size: 218kB
Dimensions:                                       (gc_event: 3, gc_state: 5,
                                                   gps_info: 3,
                                                   legato_data_point: 492,
                                                   tridentebb700chla470fdom365_data_point: 246,
                                                   depth_data_point: 89,
                                                   codaTODO_data_point: 246,
                                                   sg_data_point: 89,
                                                   ctd_data_point: 492,
                                                   magnetometer_data_point: 89,
                                                   trajectory: 1)
Coordinates:
    ctd_time                                      (ctd_data_point) datetime64[ns] 4kB ...
    ctd_depth                                     (ctd_data_point) float64 4kB ...
    latitude                                      (ctd_data_point) float64 4kB ...
    longitude                                     (ctd_data_point) float64 4kB ...
  * trajectory                                    (trajectory) int32 4B 1
Dimensions without coordinates: gc_event, gc_state, gps_info,
                                legato_data_point,
                                tridentebb700chla470fdom365_data_point,
                                depth_data_point, codaTODO_data_point,
                                sg_data_point, ctd_data_point,
                                magnetometer_data_point
Data variables: (12/509)
    sg_cal_id_str                                 |S3 3B ...
    sg_cal_mission_title                          |S17 17B ...
    sg_cal_mass                                   float64 8B ...
    sg_cal_sg_ct_type                             int32 4B ...
    sg_cal_calibcomm                              |S42 42B ...
    sg_cal_legato_sealevel                        float64 8B ...
    ...                                            ...
    eng_mag_z                                     (magnetometer_data_point) float64 712B ...
    glider                                        |S15 15B ...
    codaTODO                                      |S8 8B ...
    tridentebb700chla470fdom365                   |S27 27B ...
    legato                                        |S6 6B ...
    magnetometer                                  |S12 12B ...
Attributes: (12/48)
    time_coverage_start:             2026-03-02T19:03:07Z
    time_coverage_end:               2026-03-02T19:03:53Z
    geospatial_lat_min:              -72.97984082491809
    geospatial_lat_max:              -72.97946730813256
    geospatial_lon_min:              171.40895
    geospatial_lon_max:              171.41208246924162
    ...                              ...
    Metadata_Conventions:            Unidata Dataset Discovery v1.0
    Conventions:                     CF-1.6
    standard_name_vocabulary:        CF-1.6
    featureType:                     trajectory
    cdm_data_type:                   Trajectory
    nodc_template_version:           NODC_NetCDF_Trajectory_Template_v0.9

Load datasets from a local directory

[4]:
# Point at a directory of basestation files. Here, the bundled sg271 sample inside the package.
input_dir = readers.sample_mission_dir()

# Load and concatenate all datasets in the input directory
# Optionally, specify the range of profiles to load (start_profile, end_profile)
list_datasets = readers.read_mission(input_dir, start_profile=1, end_profile=3)

# Where list_datasets is a list of xarray datasets.  A single dataset can be accessed as
ds = list_datasets[0]
Loading datasets: 100%|██████████| 3/3 [00:00<00:00, 17.93file/s]
[5]:
ds = readers.load_sample_basestation()

Load datasets from a remote directory (URL)

[6]:
# Specify the server where data are located
# server = "https://www.ncei.noaa.gov/data/oceans/glider/seaglider/uw/033/20100903/"

# Load and concatenate all datasets from the server, optionally specifying the range of profiles to load
# list_datasets = readers.read_mission(server, start_profile=1, end_profile=10)

Convert to OG1 format

Process:

  1. For one basestation dataset, split the dataset by dimension (split_ds)

  2. Transform into OG1 format: dataset with dims sg_data_point

    • Change the dimension to N_MEASUREMENTS

    • Rename variables according to vocabularies.standard_names

    • Assign variable attributes according to vocabularies.vocab_attrs. (Note: This could go wrong since it makes assumptions about the input variables. May need additional handling.)

  3. Add missing mandatory variables:

    • From split_ds[(gps_info,)], add the LATITUDE_GPS, LONGITUDE_GPS and TIME_GPS (Note: presently TIME_GPS is stripped before saving, but TIME values contain TIME_GPS)

    • Create PROFILE_NUMBER and PHASE

    • Calculate DEPTH_Z which is positive up

  4. Update attributes for the file.

    • Combines creator and contributor from original attributes into contributor

    • Adds contributing_institutions based on institution

    • Reformats time in time_coverage_* and start_time–> start_date

    • Adds date_modified

    • Renames comments–>history, site–>summary

    • Adds title, platform, platform_vocabulary, featureType, Conventions, rtqc_method* according to OceanGliders format

    • Retains naming_authority, institution, project, geospatial_* as OG attributes

    • Retains extra attributes: license, keywords, keywords_vocabulary, file_version, acknowledgement, disclaimer

Future behaviour to be added:

  1. Retain the variables starting with sg_cal and check whether they vary over the mission (shouldn’t)

  2. Add sensors, using information in the split_ds with no dimensions

    • Need (from sg_cal_constants: sg_cal plus volmax, vbd_cnts_per_cc, therm_expan, t_*, mass, hd_*, ctcor, cpcor, c_*, abs_compress, a, Tcor, Soc, Pcor, Foffset)

    • Maybe also reviewed, magnetic_variation (which will change with position), log_D_FLARE, flight_avg_speed_north and flight_avg_speed_east also with _gsm, depth_avg_curr_north and depth_avg_curr_east also with _gsm, wlbb2f - means sensor sg_cal_mission_title sg_cal_id_str calibcomm_oxygen calibcomm sbe41 means ?? hdm_qc glider

Convert a single (sample) dataset

[7]:
# Loads the bundled sg271 sample (first dive) via load_sample_basestation()
ds = readers.load_sample_basestation()

ds_OG1 = sg.convert(
    [ds],
    contributors=[{"name": "Jane Doe", "role": "PI", "email": "jane@example.org"}],
    institutions=[{"name": "University of Hamburg", "role": "Operator"}],
)

# Check the results - uncomment the following lines to either generate a plot or show the variables.
plotters.plot_profile_depth(ds_OG1)
Processing datasets:   0%|          | 0/1 [00:00<?, ?dataset/s]CNDC_RAW: S/m -> mS cm-1 x10
CNDC: S/m -> mS cm-1 x10
GLIDE_SPEED: cm/s -> m s-1 x0.01
GLIDER_HORZ_VELO_MODEL: cm/s -> m s-1 x0.01
GLIDER_VERT_VELO_MODEL: cm/s -> m s-1 x0.01
units on 'SIGMA_T' set to 'kg m-3' by a correction (label as written: 'g/m^3')
units on 'density' set to 'kg m-3' by a correction (label as written: 'g/m^3')
units on 'DENSITY' set to 'kg m-3' by a correction (label as written: 'g/m^3')
units on 'OXYSAT' set to 'percent' by a correction (label as written: None)
units on 'VBD_CC' set to 'cm3' by a correction (label as written: None)
Processing datasets: 100%|██████████| 1/1 [00:00<00:00,  2.72dataset/s]
/tmp/ipykernel_2264/880012321.py:4: UserWarning: PLATFORM_MODEL not set in the mission config (platform.PLATFORM_MODEL); writing 'UNK'.
  ds_OG1 = sg.convert(
/tmp/ipykernel_2264/880012321.py:4: UserWarning: PLATFORM_MAKER not set in the mission config (platform.PLATFORM_MAKER); writing 'UNK'.
  ds_OG1 = sg.convert(
/tmp/ipykernel_2264/880012321.py:4: UserWarning: WMO_IDENTIFIER not set in the mission config (platform.WMO_IDENTIFIER) or the basestation file; writing 'UNK'.
  ds_OG1 = sg.convert(
/tmp/ipykernel_2264/880012321.py:4: UserWarning: PLATFORM_DEPTH_RATING not set in the mission config (platform.PLATFORM_DEPTH_RATING); it is numeric, so the variable is omitted rather than written as 'UNK'.
  ds_OG1 = sg.convert(
Dimensions not in the OG1 dataset: ['trajectory']; their variables are not written (see conversion_dimensions).
[7]:
(<Figure size 1000x600 with 1 Axes>,
 <Axes: title={'center': 'Profile Depth as a Function of Time'}, xlabel='Time (2026)', ylabel='Depth'>)
[8]:
### list the variables of the converted dataset
sorted(ds_OG1.variables)
[8]:
['BUOYANCY',
 'CDOM',
 'CHLA',
 'CNDC',
 'CNDC_QC',
 'CNDC_RAW',
 'CNDC_RAW_QC',
 'CT',
 'CTD_qc',
 'C_VBD',
 'DAVG_CURR_EAST',
 'DAVG_CURR_EAST_QC',
 'DAVG_CURR_NORTH',
 'DELTA_TIME_S',
 'DENSITY',
 'DEPLOYMENT_LATITUDE',
 'DEPLOYMENT_LONGITUDE',
 'DEPLOYMENT_TIME',
 'DEPTH',
 'DEPTH_2',
 'DEPTH_3',
 'DEPTH_Z',
 'DIVE_NUMBER',
 'EAST_DISPLACEMENT',
 'GLIDER_FIRMWARE_VERSION',
 'GLIDER_HORZ_VELO_MODEL',
 'GLIDER_VERT_VELO_MODEL',
 'GLIDE_ANGLE',
 'GLIDE_SPEED',
 'GLIDE_SPEED_QC',
 'GPS1_qc',
 'GPS2_qc',
 'GPSE_qc',
 'GPS_east_displacement_m',
 'GPS_north_displacement_m',
 'HD_A',
 'HD_B',
 'HD_C',
 'HEADING',
 'LANDSTATION_VERSION',
 'LATITUDE',
 'LATITUDE_GPS',
 'LONGITUDE',
 'LONGITUDE_GPS',
 'MASS',
 'NORTH_DISPLACEMENT',
 'OXYSAT',
 'PHASE',
 'PHASE_QC',
 'PITCH',
 'PLATFORM_MAKER',
 'PLATFORM_MODEL',
 'PLATFORM_SERIAL_NUMBER',
 'PRES',
 'PRES_2',
 'PRES_3',
 'PRES_QC',
 'PROFILE_NUMBER',
 'PSAL',
 'PSAL_QC',
 'PSAL_RAW',
 'PSAL_RAW_QC',
 'ROLL',
 'SA',
 'SENSOR_CTD_238007',
 'SENSOR_FLUOROMETER_237790',
 'SENSOR_OXYGEN_237790',
 'SIGMA_T',
 'SIGTHETA',
 'SOUND_VELOCITY',
 'TEMP',
 'TEMP_2',
 'TEMP_3',
 'TEMP_QC',
 'TEMP_RAW',
 'TEMP_RAW_QC',
 'THETA',
 'TIME',
 'TIME_GPS',
 'TRAJECTORY',
 'VBD_BIAS',
 'VBD_CC',
 'VBD_CC_PER_CNTS',
 'VOLMAX',
 'WMO_IDENTIFIER',
 'avg_latitude',
 'avg_longitude',
 'codaTODO',
 'codaTODO_compensated_O2',
 'codaTODO_ontime_a',
 'codaTODO_phase',
 'codaTODO_samples_a',
 'codaTODO_starttime_a',
 'codaTODO_stoptime_a',
 'codaTODO_timeouts_a',
 'codaTODO_uncompensated_O2',
 'density',
 'depth_avg_curr_east_gsm',
 'depth_avg_curr_error',
 'depth_avg_curr_north_gsm',
 'depth_depth',
 'depth_ontime_a',
 'depth_samples_a',
 'depth_starttime_a',
 'depth_stoptime_a',
 'depth_timeouts_a',
 'dissolved_oxygen_sat',
 'east_displacement_gsm',
 'eng_GC_state',
 'eng_elaps_t',
 'eng_elaps_t_0000',
 'eng_mag_x',
 'eng_mag_y',
 'eng_mag_z',
 'eng_rec',
 'flight_avg_speed_east',
 'flight_avg_speed_east_gsm',
 'flight_avg_speed_north',
 'flight_avg_speed_north_gsm',
 'gc_data_pts',
 'gc_depth',
 'gc_end_secs',
 'gc_flags',
 'gc_humid',
 'gc_intP',
 'gc_ob_vertv',
 'gc_pitch_ad',
 'gc_pitch_ad_start',
 'gc_pitch_ctl',
 'gc_pitch_end_time',
 'gc_pitch_errors',
 'gc_pitch_i',
 'gc_pitch_secs',
 'gc_pitch_st',
 'gc_pitch_start_time',
 'gc_pitch_volts',
 'gc_roll_ad',
 'gc_roll_ad_start',
 'gc_roll_ctl',
 'gc_roll_end_time',
 'gc_roll_errors',
 'gc_roll_i',
 'gc_roll_secs',
 'gc_roll_st',
 'gc_roll_start_time',
 'gc_roll_volts',
 'gc_state_eop_code',
 'gc_state_state',
 'gc_vbd_ad',
 'gc_vbd_ad_start',
 'gc_vbd_ctl',
 'gc_vbd_end_time',
 'gc_vbd_errors',
 'gc_vbd_i',
 'gc_vbd_pot1_ad',
 'gc_vbd_pot1_ad_start',
 'gc_vbd_pot2_ad',
 'gc_vbd_pot2_ad_start',
 'gc_vbd_secs',
 'gc_vbd_st',
 'gc_vbd_start_time',
 'gc_vbd_volts',
 'glide_angle_gsm',
 'glider',
 'gsw_sigma0',
 'gsw_sigma3',
 'gsw_sigma4',
 'hdm_qc',
 'horz_speed_gsm',
 'latitude_gsm',
 'latlong_qc',
 'legato',
 'legato_conduc',
 'legato_conducTemp',
 'legato_errors_a',
 'legato_ontime_a',
 'legato_samples_a',
 'legato_starttime_a',
 'legato_stoptime_a',
 'legato_timeouts_a',
 'log_10V_AH',
 'log_24V_AH',
 'log_AH0_10V',
 'log_AH0_24V',
 'log_ALTIM_BOTTOM_TURN_MARGIN',
 'log_ALTIM_FREQUENCY',
 'log_ALTIM_PING_DELTA',
 'log_ALTIM_PING_DEPTH',
 'log_ALTIM_PING_FIT',
 'log_ALTIM_PULSE',
 'log_ALTIM_SENSITIVITY',
 'log_ALTIM_TOP_MIN_OBSTACLE',
 'log_ALTIM_TOP_PING_RANGE',
 'log_ALTIM_TOP_TURN_MARGIN',
 'log_APOGEE_PITCH',
 'log_CALL_NDIVES',
 'log_CALL_TRIES',
 'log_CALL_WAIT',
 'log_CAPMAXSIZE',
 'log_CAPUPLOAD',
 'log_CAP_FILE_SIZE',
 'log_CF8_MAXERRORS',
 'log_COMM_SEQ',
 'log_COMPASS2_DEVICE',
 'log_COMPASS_DEVICE',
 'log_COMPASS_USE',
 'log_C_PITCH',
 'log_C_PITCH_AUTO_DELTA',
 'log_C_PITCH_AUTO_MAX',
 'log_C_ROLL_CLIMB',
 'log_C_ROLL_DIVE',
 'log_C_VBD_AUTO_DELTA',
 'log_C_VBD_AUTO_MAX',
 'log_DATA_FILE_SIZE',
 'log_DBDW',
 'log_DEEPGLIDER',
 'log_DEEPGLIDERMB',
 'log_DEVICE1',
 'log_DEVICE2',
 'log_DEVICE3',
 'log_DEVICE4',
 'log_DEVICE5',
 'log_DEVICE6',
 'log_DEVICES',
 'log_DEVICE_MAMPS',
 'log_DEVICE_MAX_MAMPS',
 'log_DEVICE_SECS',
 'log_DIVE',
 'log_D_ABORT',
 'log_D_BATHY_OFFSET',
 'log_D_BOOST',
 'log_D_CALL',
 'log_D_FINISH',
 'log_D_FLARE',
 'log_D_GRID',
 'log_D_NO_BLEED',
 'log_D_OFFGRID',
 'log_D_PITCH',
 'log_D_SAFE',
 'log_D_SURF',
 'log_D_TGT',
 'log_EOP_CODE',
 'log_ERRORS',
 'log_ESCAPE_HEADING',
 'log_ESCAPE_HEADING_DELTA',
 'log_FERRY_MAX',
 'log_FG_AHR_10V',
 'log_FG_AHR_10Vo',
 'log_FG_AHR_24V',
 'log_FG_AHR_24Vo',
 'log_FILEMGR',
 'log_FIX_MISSING_TIMEOUT',
 'log_GLIDE_SLOPE',
 'log_GPS',
 'log_GPS1',
 'log_GPS2',
 'log_GPS_DEVICE',
 'log_HD_A',
 'log_HD_B',
 'log_HD_C',
 'log_HEADING',
 'log_HEAD_ERRBAND',
 'log_HUMID',
 'log_ICE_FREEZE_MARGIN',
 'log_ID',
 'log_INTERNAL_PRESSURE',
 'log_INT_PRESSURE_SLOPE',
 'log_INT_PRESSURE_YINT',
 'log_IRIDIUM_FIX',
 'log_IRON',
 'log_KALMAN_CONTROL',
 'log_KALMAN_USE',
 'log_KALMAN_X',
 'log_KALMAN_Y',
 'log_LOGGERDEVICE1',
 'log_LOGGERDEVICE2',
 'log_LOGGERDEVICE3',
 'log_LOGGERDEVICE4',
 'log_LOGGERS',
 'log_LOITER_DBDW',
 'log_LOITER_D_BOTTOM',
 'log_LOITER_D_TOP',
 'log_LOITER_N_DIVE',
 'log_LOITER_W_DBAND',
 'log_MASS',
 'log_MAXI_10V',
 'log_MAXI_24V',
 'log_MAX_BUOY',
 'log_MEM0',
 'log_MEM1',
 'log_MEM2',
 'log_MHEAD_RNG_PITCHd_Wd',
 'log_MINV_10V',
 'log_MINV_24V',
 'log_MISSION',
 'log_MOTHERBOARD',
 'log_NAV2_DEVICE',
 'log_NAV3_DEVICE',
 'log_NAV4_DEVICE',
 'log_NAV_DEVICE',
 'log_NAV_MODE',
 'log_NETBOX',
 'log_NETWORK_DEVICE',
 'log_NOCOMM_ACTION',
 'log_N_DIVES',
 'log_N_FILEKB',
 'log_N_GPS',
 'log_N_NOCOMM',
 'log_N_NOSURFACE',
 'log_OPTIONS',
 'log_OSC',
 'log_PHONE_DEVICE',
 'log_PHONE_SUPPLY',
 'log_PITCH_ADJ_DBAND',
 'log_PITCH_ADJ_GAIN',
 'log_PITCH_CNV',
 'log_PITCH_DBAND',
 'log_PITCH_GAIN',
 'log_PITCH_GAIN_AUTO_DELTA',
 'log_PITCH_GAIN_AUTO_MAX',
 'log_PITCH_MAX',
 'log_PITCH_MAXERRORS',
 'log_PITCH_MIN',
 'log_PITCH_TIMEOUT',
 'log_PITCH_VBD_SHIFT',
 'log_PITCH_W_DBAND',
 'log_PITCH_W_GAIN',
 'log_PRESSURE_DEVICE',
 'log_PRESSURE_SLOPE',
 'log_PRESSURE_YINT',
 'log_PROTOCOL',
 'log_RAFOS_CORR_THRESH',
 'log_RAFOS_DEVICE',
 'log_RAFOS_HIT_WINDOW',
 'log_RAFOS_MMODEM',
 'log_RAFOS_PEAK_OFFSET',
 'log_RECOV_CODE',
 'log_RELAUNCH',
 'log_RHO',
 'log_ROLL_ADJ_DBAND',
 'log_ROLL_ADJ_GAIN',
 'log_ROLL_CNV',
 'log_ROLL_DEG',
 'log_ROLL_MAX',
 'log_ROLL_MAXERRORS',
 'log_ROLL_MIN',
 'log_ROLL_TIMEOUT',
 'log_SC_FREEKB',
 'log_SC_NDIVE',
 'log_SC_PROFILE',
 'log_SC_RECORDABOVE',
 'log_SC_XMITPROFILE',
 'log_SDFILEDIR',
 'log_SDSIZE',
 'log_SEABIRD_C_G',
 'log_SEABIRD_C_H',
 'log_SEABIRD_C_I',
 'log_SEABIRD_C_J',
 'log_SEABIRD_T_G',
 'log_SEABIRD_T_H',
 'log_SEABIRD_T_I',
 'log_SEABIRD_T_J',
 'log_SENSORS',
 'log_SENSOR_MAMPS',
 'log_SENSOR_SECS',
 'log_SIMULATE',
 'log_SIM_W',
 'log_SM_CC',
 'log_SM_CCo',
 'log_SM_GC',
 'log_SPEED_FACTOR',
 'log_SPEED_LIMITS',
 'log_STOP_T',
 'log_STROBE',
 'log_SUPER',
 'log_SURFACE_URGENCY',
 'log_SURFACE_URGENCY_FORCE',
 'log_SURFACE_URGENCY_TRY',
 'log_TCM_TEMP',
 'log_TEMP',
 'log_TGT_AUTO_DEFAULT',
 'log_TGT_DEFAULT_LAT',
 'log_TGT_DEFAULT_LON',
 'log_TGT_LATLONG',
 'log_TGT_NAME',
 'log_TGT_RADIUS',
 'log_T_ABORT',
 'log_T_BOOST',
 'log_T_DIVE',
 'log_T_EPIRB',
 'log_T_GPS',
 'log_T_LOITER',
 'log_T_MISSION',
 'log_T_NO_W',
 'log_T_RSLEEP',
 'log_T_TURN',
 'log_T_TURN_SAMPINT',
 'log_UNCOM_BLEED',
 'log_UPLOAD_DIVES_MAX',
 'log_USE_BATHY',
 'log_USE_ICE',
 'log_VBD_DBAND',
 'log_VBD_LP_IGNORE',
 'log_VBD_MAX',
 'log_VBD_MAXERRORS',
 'log_VBD_MIN',
 'log_VBD_TIMEOUT',
 'log_W_ADJ_DBAND',
 'log_XPDR_DEVICE',
 'log_XPDR_INHIBIT',
 'log_XPDR_INT',
 'log_XPDR_PINGS',
 'log_XPDR_REP',
 'log_XPDR_VALID',
 'log__CALLS',
 'log__SM_ANGLEo',
 'log__SM_DEPTHo',
 'log_dive',
 'log_glider',
 'log_gps_driftheading',
 'log_gps_driftspeed',
 'log_gps_final_fix_time',
 'log_gps_first_fix_time',
 'log_gps_hdop',
 'log_gps_hpe',
 'log_gps_lat',
 'log_gps_lon',
 'log_gps_magvar',
 'log_gps_n_satellites',
 'log_gps_qc',
 'log_mission',
 'log_start',
 'log_version',
 'longitude_gsm',
 'magnetic_variation',
 'magnetometer',
 'north_displacement_gsm',
 'polar_heading',
 'reviewed',
 'sg_cal_GPS_position_error',
 'sg_cal_QC_bound_action',
 'sg_cal_QC_cond_max',
 'sg_cal_QC_cond_min',
 'sg_cal_QC_cond_spike_deep',
 'sg_cal_QC_cond_spike_depth',
 'sg_cal_QC_cond_spike_shallow',
 'sg_cal_QC_high_freq_noise',
 'sg_cal_QC_overall_ctd_percentage',
 'sg_cal_QC_overall_speed_percentage',
 'sg_cal_QC_salin_max',
 'sg_cal_QC_salin_min',
 'sg_cal_QC_spike_action',
 'sg_cal_QC_temp_max',
 'sg_cal_QC_temp_min',
 'sg_cal_QC_temp_spike_deep',
 'sg_cal_QC_temp_spike_depth',
 'sg_cal_QC_temp_spike_shallow',
 'sg_cal_abs_compress',
 'sg_cal_calibcomm',
 'sg_cal_calibcomm_coda',
 'sg_cal_calibcomm_tridentebb700chla470fdom365',
 'sg_cal_cond_bias',
 'sg_cal_cpcor',
 'sg_cal_ctcor',
 'sg_cal_depth_bias',
 'sg_cal_depth_slope_correction',
 'sg_cal_glider_interstitial_length',
 'sg_cal_glider_interstitial_volume',
 'sg_cal_glider_length',
 'sg_cal_glider_r_en',
 'sg_cal_glider_r_fair',
 'sg_cal_glider_vol_wake',
 'sg_cal_glider_wake_entry_thickness',
 'sg_cal_glider_xP',
 'sg_cal_glider_xT',
 'sg_cal_glider_zP',
 'sg_cal_glider_zT',
 'sg_cal_hd_s',
 'sg_cal_id_str',
 'sg_cal_legato_alpha',
 'sg_cal_legato_cond_press_correction',
 'sg_cal_legato_ctcoeff',
 'sg_cal_legato_sealevel',
 'sg_cal_legato_tau',
 'sg_cal_legato_time_lag',
 'sg_cal_legato_use_truck_pressure',
 'sg_cal_mass_comp',
 'sg_cal_max_stall_speed',
 'sg_cal_min_stall_angle',
 'sg_cal_min_stall_speed',
 'sg_cal_mission_title',
 'sg_cal_pitchbias',
 'sg_cal_rho0',
 'sg_cal_rollbias',
 'sg_cal_sbe_cond_freq_offset',
 'sg_cal_sbe_temp_freq_offset',
 'sg_cal_sbect_modes',
 'sg_cal_sbect_tau_T',
 'sg_cal_sbect_unpumped',
 'sg_cal_sg_configuration',
 'sg_cal_sg_ct_geometry',
 'sg_cal_sg_ct_type',
 'sg_cal_sg_sensor_geometry',
 'sg_cal_sg_vehicle_geometry',
 'sg_cal_solve_flare_apogee_speed',
 'sg_cal_temp_bias',
 'sg_cal_temp_ref',
 'sg_cal_therm_expan',
 'sg_cal_use_adcppressure',
 'sg_cal_use_auxcompass',
 'sg_cal_use_auxpressure',
 'speed_gsm',
 'start_of_climb_time',
 'surface_curr_east',
 'surface_curr_error',
 'surface_curr_north',
 'surface_curr_qc',
 'total_flight_time_s',
 'tridentebb700chla470fdom365',
 'tridentebb700chla470fdom365_bb700',
 'tridentebb700chla470fdom365_ontime_a',
 'tridentebb700chla470fdom365_samples_a',
 'tridentebb700chla470fdom365_starttime_a',
 'tridentebb700chla470fdom365_stoptime_a',
 'tridentebb700chla470fdom365_timeouts_a',
 'vert_speed_gsm']
[9]:
# Print to screen a table of attributes
plotters.show_contents(ds_OG1, "attrs")
[9]:
Attribute Value DType
0 conversion_units {"CNDC_RAW": ["S/m", "mS cm-1", 10.0], "CNDC":... str
1 title OceanGliders trajectory file str
2 id sg271_20260302T193828_R str
3 platform sub-surface gliders str
4 platform_vocabulary https://vocab.nerc.ac.uk/collection/L06/curren... str
5 geospatial_lat_min -72.98065 ndarray
6 geospatial_lat_max -72.97946730813256 ndarray
7 geospatial_lon_min 171.4084666666667 ndarray
8 geospatial_lon_max 171.41705000000002 ndarray
9 geospatial_vertical_min 0.0 ndarray
10 geospatial_vertical_max 61.97918565237754 ndarray
11 time_coverage_start 20260302T193828 str
12 time_coverage_end 20260302T200530 str
13 project PycnMix_Drygalski str
14 contributor_name Jane Doe str
15 contributor_role PI str
16 contributor_role_vocabulary http://vocab.nerc.ac.uk/collection/W08/current... str
17 contributor_email jane@example.org str
18 contributing_institutions University of Hamburg str
19 contributing_institutions_vocabulary https://edmo.seadatanet.org/report/3323 str
20 contributing_institutions_role Operator str
21 contributing_institutions_role_vocabulary http://vocab.nerc.ac.uk/collection/W08/current... str
22 rtqc_method No QC applied str
23 rtqc_method_doi n/a str
24 start_date 20260302T193828 str
25 date_created 20261024T123542 str
26 featureType trajectory str
27 Conventions CF-1.10, ACDD-1.3, OG-1.0 str
28 date_modified 20261024T123542 str
29 keywords Water Temperature, Conductivity, Salinity, Den... str
30 keywords_vocabulary NASA/GCMD Earth Science Keywords Version 6.0.0.0 str
31 geospatial_bounds POLYGON ((-72.979467 171.408467, -72.979467 17... str
32 geospatial_vertical_positive down str
33 time_coverage_duration P0DT0H27M2S str
34 history 2026-10-24T12:35:42+00:00 seagliderOG1 0.1.0.p... str
35 conversion_dimensions {"codaTODO_data_point": {"fate": "merged", "va... str
36 conversion_derived_variables {"DEPLOYMENT_LATITUDE": [], "DEPLOYMENT_LONGIT... str
37 conversion_removed_variables [] str
38 conversion_input_variable_count 514 int
39 conversion_attribute_sources {"basestation": ["keywords", "keywords_vocabul... str
[10]:
# Print to screen a table of the variables and variable attributes
plotters.show_contents(ds_OG1, "variables")
[10]:
  dims units comment standard_name dtype
name          
BUOYANCY N_MEASUREMENTS g Buoyancy of vehicle, corrected for compression effects float32
CDOM N_MEASUREMENTS 1e-9 fDOM fluorescence (365nm excitation/450m emission) float32
CHLA N_MEASUREMENTS mg m-3 chlorophyll-a concentration (470nm excitation/695nm emission) scaled to the fluorescence response from a monoculture of Thalassiosira weissflogii. concentration_of_chlorophyll_in_sea_water float32
CNDC N_MEASUREMENTS mS cm-1 Conductivity corrected for anomalies converted from S/m (x10) sea_water_electrical_conductivity float32
CNDC_QC N_MEASUREMENTS Whether to trust each corrected conductivity value status_flag int8
CNDC_RAW N_MEASUREMENTS mS cm-1 Uncorrected conductivity converted from S/m (x10) sea_water_electrical_conductivity float32
CNDC_RAW_QC N_MEASUREMENTS Whether to trust each raw conductivity value status_flag int8
CT N_MEASUREMENTS degrees_Celsius Conservative termperature per TEOS-10 float32
DELTA_TIME_S N_MEASUREMENTS seconds Difference between sample times float64
DENSITY N_MEASUREMENTS kg m-3 raw, uncorrected salinity units label 'g/m^3' in the basestation file corrected to 'kg m-3' sea_water_density float32
DEPTH N_MEASUREMENTS m from science pressure and interpolated depth float32
DEPTH_2 N_MEASUREMENTS meters Depth below the surface, corrected for average latitude depth float32
DEPTH_3 N_MEASUREMENTS cm Measured vertical distance below the surface depth float32
DEPTH_Z N_MEASUREMENTS meters Depth calculated from pressure using gsw library, positive up. depth float32
DIVE_NUMBER N_MEASUREMENTS 1 int16
EAST_DISPLACEMENT N_MEASUREMENTS m Eastward displacement from hdm float32
GLIDER_HORZ_VELO_MODEL N_MEASUREMENTS m s-1 Vehicle horizontal speed based on hdm converted from cm/s (x0.01) horizontal_glider_speed float32
GLIDER_VERT_VELO_MODEL N_MEASUREMENTS m s-1 Vehicle vertical speed based on hdm converted from cm/s (x0.01) vertical_glider_speed float32
GLIDE_ANGLE N_MEASUREMENTS degrees Glide angle based on hdm float32
GLIDE_SPEED N_MEASUREMENTS m s-1 Vehicle speed based on hdm converted from cm/s (x0.01) float32
GLIDE_SPEED_QC N_MEASUREMENTS Whether to trust each hdm speed value status_flag int8
HEADING N_MEASUREMENTS degrees Vehicle heading (magnetic) float32
LATITUDE N_MEASUREMENTS degrees_north Latitude of the sample based on hdm DAC latitude float64
LATITUDE_GPS N_MEASUREMENTS degrees_north latitude float64
LONGITUDE N_MEASUREMENTS degrees_east Longitude of the sample based on hdm DAC longitude float64
LONGITUDE_GPS N_MEASUREMENTS degrees_east longitude float64
NORTH_DISPLACEMENT N_MEASUREMENTS m Northward displacement from hdm float32
OXYSAT N_MEASUREMENTS percent As reported by the instrument units from the OG1 vocabulary; the basestation file carried none mole_fraction_of_oxygen_in_sea_water float32
PHASE N_MEASUREMENTS 1 This is based only on splitting each dive cycle into the period before the glider reaches the maximum pressure of that cycle (descent, PHASE=2) and the period after the glider reaches the maximum pressure of that cycle (ascent, PHASE=1) int8
PHASE_QC N_MEASUREMENTS status_flag int8
PITCH N_MEASUREMENTS degrees Vehicle pitch float32
PRES N_MEASUREMENTS dbar ctd pressure sensor sea_water_pressure float32
PRES_2 N_MEASUREMENTS dbar CTD reported pressure sea_water_pressure float32
PRES_3 N_MEASUREMENTS dbar Uncorrected sea-water pressure at pressure sensor float32
PRES_QC N_MEASUREMENTS Whether to trust pressure - legato only status_flag int8
PROFILE_NUMBER N_MEASUREMENTS 1 int16
PSAL N_MEASUREMENTS 1e-3 Practical salinity of the water body by CTD and computation using UNESCO 1983 algorithm sea_water_practical_salinity float32
PSAL_QC N_MEASUREMENTS Whether to trust each corrected salinity value status_flag int8
PSAL_RAW N_MEASUREMENTS 1e-3 Practical salinity of the water body by CTD and computation using UNESCO 1983 algorithm sea_water_practical_salinity float32
PSAL_RAW_QC N_MEASUREMENTS Whether to trust each raw salinity value status_flag int8
ROLL N_MEASUREMENTS degrees Vehicle roll float32
SA N_MEASUREMENTS g kg-1 Absolute salinity of the water body by CTD and computation using TEOS-10 algorithm sea_water_absolute_salinity float32
SIGMA_T N_MEASUREMENTS kg m-3 Sigma based on density units label 'g/m^3' in the basestation file corrected to 'kg m-3' sea_water_sigma_t float32
SIGTHETA N_MEASUREMENTS kg m-3 sea_water_sigma_theta float32
SOUND_VELOCITY N_MEASUREMENTS m s-1 Sound velocity speed_of_sound_in_sea_water float32
TEMP N_MEASUREMENTS degree_Celsius Termperature (in situ) corrected for thermistor first-order lag sea_water_temperature float32
TEMP_2 N_MEASUREMENTS degrees_Celsius Termperature (in situ) as reported by the instrument sea_water_temperature float32
TEMP_3 N_MEASUREMENTS degrees_Celsius As reported by the instrument float32
TEMP_QC N_MEASUREMENTS Whether to trust each corrected temperature value status_flag int8
TEMP_RAW N_MEASUREMENTS degree_Celsius Uncorrected temperature (in situ) sea_water_temperature float32
TEMP_RAW_QC N_MEASUREMENTS Whether to trust each raw temperature value status_flag int8
THETA N_MEASUREMENTS degree_Celsius Potential temperature based on corrected salinity sea_water_potential_temperature float32
TIME N_MEASUREMENTS seconds since 1970-01-01T00:00:00Z Time of CTD sample in GMT epoch format time datetime64[ns]
TIME_GPS N_MEASUREMENTS datetime64[ns]
VBD_CC N_MEASUREMENTS cm3 units from the OG1 vocabulary; the basestation file carried none float32
codaTODO_compensated_O2 N_MEASUREMENTS micromoles/L Dissolved oxygen as reported by the instument, based on on-board calibration data, assuming coda temperature with fixed pressure and salinity correction float32
codaTODO_phase N_MEASUREMENTS As reported by the instrument float32
codaTODO_uncompensated_O2 N_MEASUREMENTS micromoles/L Dissolved oxygen as reported by the instument, based on on-board calibration data, assuming coda temperature but without pressure or salinity correction float32
density N_MEASUREMENTS kg m-3 Sea water potential density units label 'g/m^3' in the basestation file corrected to 'kg m-3' sea_water_density float32
depth_depth N_MEASUREMENTS cm Measured vertical distance below the surface depth float32
dissolved_oxygen_sat N_MEASUREMENTS micromoles/kg Calculated saturation value for oxygen given measured presure and corrected temperature, and salinity float32
east_displacement_gsm N_MEASUREMENTS meters Eastward displacement from gsm float32
eng_GC_state N_MEASUREMENTS Motor status byte float32
eng_elaps_t N_MEASUREMENTS seconds Elapsed seconds since start of dive time float32
eng_elaps_t_0000 N_MEASUREMENTS seconds Elapsed seconds since start of mission time float32
eng_mag_x N_MEASUREMENTS magnetometer x float32
eng_mag_y N_MEASUREMENTS magnetometer y float32
eng_mag_z N_MEASUREMENTS magnetometer z float32
eng_rec N_MEASUREMENTS float32
gc_data_pts N_MEASUREMENTS 1 float32
gc_depth N_MEASUREMENTS meters float32
gc_end_secs N_MEASUREMENTS End of GC time in GMT epoch format datetime64[ns]
gc_flags N_MEASUREMENTS float32
gc_humid N_MEASUREMENTS percent Internal relative humidity float32
gc_intP N_MEASUREMENTS psia Internal pressure float32
gc_ob_vertv N_MEASUREMENTS cm/s float32
gc_pitch_ad N_MEASUREMENTS 1 float32
gc_pitch_ad_start N_MEASUREMENTS 1 float32
gc_pitch_ctl N_MEASUREMENTS cm float32
gc_pitch_end_time N_MEASUREMENTS seconds End of pitch motor move time in GMT epoch format float64
gc_pitch_errors N_MEASUREMENTS 1 float32
gc_pitch_i N_MEASUREMENTS A float32
gc_pitch_secs N_MEASUREMENTS seconds Elapsed seconds since start of this pitch change float32
gc_pitch_st N_MEASUREMENTS seconds Time since st_secs for start of pitch move float32
gc_pitch_start_time N_MEASUREMENTS seconds Start of pitch motor move time in GMT epoch format float64
gc_pitch_volts N_MEASUREMENTS V float32
gc_roll_ad N_MEASUREMENTS 1 float32
gc_roll_ad_start N_MEASUREMENTS 1 float32
gc_roll_ctl N_MEASUREMENTS cm float32
gc_roll_end_time N_MEASUREMENTS seconds End of roll motor move time in GMT epoch format float64
gc_roll_errors N_MEASUREMENTS 1 float32
gc_roll_i N_MEASUREMENTS A float32
gc_roll_secs N_MEASUREMENTS seconds Elapsed seconds since start of this roll change float32
gc_roll_st N_MEASUREMENTS seconds Time since st_secs for start of roll move float32
gc_roll_start_time N_MEASUREMENTS seconds Start of roll motor move time in GMT epoch format float64
gc_roll_volts N_MEASUREMENTS V float32
gc_state_eop_code N_MEASUREMENTS GC states end of phase (EOP) code float32
gc_state_state N_MEASUREMENTS Name of the GC state float32
gc_vbd_ad N_MEASUREMENTS 1 float32
gc_vbd_ad_start N_MEASUREMENTS 1 float32
gc_vbd_ctl N_MEASUREMENTS cm float32
gc_vbd_end_time N_MEASUREMENTS seconds End of VBD motor move time in GMT epoch format float64
gc_vbd_errors N_MEASUREMENTS 1 float32
gc_vbd_i N_MEASUREMENTS A float32
gc_vbd_pot1_ad N_MEASUREMENTS 1 float32
gc_vbd_pot1_ad_start N_MEASUREMENTS 1 float32
gc_vbd_pot2_ad N_MEASUREMENTS 1 float32
gc_vbd_pot2_ad_start N_MEASUREMENTS 1 float32
gc_vbd_secs N_MEASUREMENTS seconds Elapsed seconds since start of this VBD change float32
gc_vbd_st N_MEASUREMENTS seconds Time since st_secs for start of VBD move float32
gc_vbd_start_time N_MEASUREMENTS seconds Start of VBD motor move time in GMT epoch format float64
gc_vbd_volts N_MEASUREMENTS V float32
glide_angle_gsm N_MEASUREMENTS degrees Glide angle based on gsm float32
gsw_sigma0 N_MEASUREMENTS kg/m^3 sea_water_sigma_theta float32
gsw_sigma3 N_MEASUREMENTS kg/m^3 sea_water_sigma_theta float32
gsw_sigma4 N_MEASUREMENTS kg/m^3 sea_water_sigma_theta float32
horz_speed_gsm N_MEASUREMENTS cm/s Vehicle horizontal speed based on gsm float32
latitude_gsm N_MEASUREMENTS degrees_north Latitude of the sample based on gsm DAC float64
legato_conduc N_MEASUREMENTS mS/cm Conductivity as reported by the instrument sea_water_electrical_conductivity float32
legato_conducTemp N_MEASUREMENTS degrees_Celsius As reported by the instrument float32
log_gps_driftheading N_MEASUREMENTS degrees true Estimated drift direction float32
log_gps_driftspeed N_MEASUREMENTS knots Estimated surface drift speed float32
log_gps_final_fix_time N_MEASUREMENTS seconds Time to fix float64
log_gps_first_fix_time N_MEASUREMENTS seconds Time to first fix float64
log_gps_hdop N_MEASUREMENTS Horizontal Dilution Of Precision float32
log_gps_hpe N_MEASUREMENTS meters Horizontal position error float32
log_gps_lat N_MEASUREMENTS degrees_north GPS latitudes latitude float32
log_gps_lon N_MEASUREMENTS degrees_east GPS longitudes longitude float32
log_gps_magvar N_MEASUREMENTS degrees Magnetic variance (degrees, positive E) float32
log_gps_n_satellites N_MEASUREMENTS Number of satellites contributing to the final fix float32
log_gps_qc N_MEASUREMENTS Whether to trust the GPS1 information object
longitude_gsm N_MEASUREMENTS degrees_east Longitude of the sample based on gsm DAC float64
north_displacement_gsm N_MEASUREMENTS meters Northward displacement from gsm float32
polar_heading N_MEASUREMENTS radians Vehicle heading from the east float32
speed_gsm N_MEASUREMENTS cm/s Vehicle speed based on gsm float32
tridentebb700chla470fdom365_bb700 N_MEASUREMENTS meter^-1 steradian^-1 total volume 700nm scattering coefficient float32
vert_speed_gsm N_MEASUREMENTS cm/s Vehicle vertical speed based on gsm float32
CTD_qc string Whether to trust the corrected CTD values |S1
C_VBD string int16
DAVG_CURR_EAST string m/s Eastward component of the dive depth-average current based on hdm eastward_sea_water_velocity float32
DAVG_CURR_EAST_QC string Whether to trust the dive depth-average current values and displacements status_flag int8
DAVG_CURR_NORTH string m/s Northward component of the dive depth-average current based on hdm northward_sea_water_velocity float32
DEPLOYMENT_LATITUDE string float64
DEPLOYMENT_LONGITUDE string float64
DEPLOYMENT_TIME string datetime64[ns]
GLIDER_FIRMWARE_VERSION string
GPS1_qc string Whether to trust the GPS1 information |S1
GPS2_qc string Whether to trust the GPS2 information |S1
GPSE_qc string Whether to trust the final GPS information |S1
GPS_east_displacement_m string m Total vehicle eastward displacement based on GPS2 and GPSE locations float32
GPS_north_displacement_m string m Total vehicle northward displacement based on GPS2 and GPSE locations float32
HD_A string Hydrodynamic lift factor for given hull shape (1/degrees of attack angle) float32
HD_B string Hydrodynamic drag factor for given hull shape (Pa^(-1/4)) float32
HD_C string Hydrodynamic induced drag factor for given hull shape (1/radians^2 of attack angle) float32
LANDSTATION_VERSION string
MASS string kg Mass of the glider float32
PLATFORM_MAKER string
PLATFORM_MODEL string
PLATFORM_SERIAL_NUMBER string
SENSOR_CTD_238007 string
SENSOR_FLUOROMETER_237790 string
SENSOR_OXYGEN_237790 string
TRAJECTORY string
VBD_BIAS string cc VBD bias float32
VBD_CC_PER_CNTS string float32
VOLMAX string m^3 Maximum displaced volume of the glider float32
WMO_IDENTIFIER string
avg_latitude string degrees_north The average latitude of the dive float64
avg_longitude string degrees_east The average longitude of the dive float64
codaTODO string |S8
codaTODO_ontime_a string secs codaTODO total time turned on dive float64
codaTODO_samples_a string codaTODO total number of samples taken dive int16
codaTODO_starttime_a string codaTODO epoch time for start of profile dive float64
codaTODO_stoptime_a string codaTODO epoch time for end of profile dive float64
codaTODO_timeouts_a string codaTODO total number of samples timed out on dive int32
depth_avg_curr_east_gsm string m/s Eastward component of depth-average current based on gsm float32
depth_avg_curr_error string m/s Expected error of depth-average current from GPS float32
depth_avg_curr_north_gsm string m/s Northward component of depth-average current based on gsm float32
depth_ontime_a string secs depth total time turned on dive float64
depth_samples_a string depth total number of samples taken dive int16
depth_starttime_a string depth epoch time for start of profile a float64
depth_stoptime_a string depth epoch time for end of profile a float64
depth_timeouts_a string depth total number of timeouts on dive int32
flight_avg_speed_east string m/s Eastward component of flight average speed based on hdm float32
flight_avg_speed_east_gsm string m/s Eastward component of flight average speed based on gsm float32
flight_avg_speed_north string m/s Northward component of flight average speed based on hdm float32
flight_avg_speed_north_gsm string m/s Northward component of flight average speed based on gsm float32
glider string |S15
hdm_qc string Whether corrected temperatures, salinities, and velocities from the hydrodynamic model converged on a consistent solution |S1
latlong_qc string Whether to trust the dive estimated latitude and longitude estimates |S1
legato string |S6
legato_errors_a string legato total number of samples errored out on dive int16
legato_ontime_a string secs legato total time turned on dive float64
legato_samples_a string legato total number of samples taken dive int16
legato_starttime_a string legato epoch time for start of profile dive float64
legato_stoptime_a string legato epoch time for end of profile dive float64
legato_timeouts_a string legato total number of samples timed out on dive int32
log_10V_AH string |S11
log_24V_AH string |S11
log_AH0_10V string float32
log_AH0_24V string float32
log_ALTIM_BOTTOM_TURN_MARGIN string float32
log_ALTIM_FREQUENCY string float32
log_ALTIM_PING_DELTA string float32
log_ALTIM_PING_DEPTH string float32
log_ALTIM_PING_FIT string float32
log_ALTIM_PULSE string float32
log_ALTIM_SENSITIVITY string float32
log_ALTIM_TOP_MIN_OBSTACLE string float32
log_ALTIM_TOP_PING_RANGE string float32
log_ALTIM_TOP_TURN_MARGIN string float32
log_APOGEE_PITCH string float32
log_CALL_NDIVES string int16
log_CALL_TRIES string int16
log_CALL_WAIT string int16
log_CAPMAXSIZE string int32
log_CAPUPLOAD string int16
log_CAP_FILE_SIZE string |S8
log_CF8_MAXERRORS string int16
log_COMM_SEQ string int16
log_COMPASS2_DEVICE string float32
log_COMPASS_DEVICE string float32
log_COMPASS_USE string int16
log_C_PITCH string int16
log_C_PITCH_AUTO_DELTA string float32
log_C_PITCH_AUTO_MAX string float32
log_C_ROLL_CLIMB string float32
log_C_ROLL_DIVE string float32
log_C_VBD_AUTO_DELTA string int16
log_C_VBD_AUTO_MAX string int16
log_DATA_FILE_SIZE string |S6
log_DBDW string float32
log_DEEPGLIDER string int16
log_DEEPGLIDERMB string int16
log_DEVICE1 string float32
log_DEVICE2 string float32
log_DEVICE3 string float32
log_DEVICE4 string float32
log_DEVICE5 string float32
log_DEVICE6 string float32
log_DEVICES string |S126
log_DEVICE_MAMPS string |S99
log_DEVICE_MAX_MAMPS string |S99
log_DEVICE_SECS string |S100
log_DIVE string int16
log_D_ABORT string float32
log_D_BATHY_OFFSET string float32
log_D_BOOST string float32
log_D_CALL string float32
log_D_FINISH string float32
log_D_FLARE string float32
log_D_GRID string float32
log_D_NO_BLEED string float32
log_D_OFFGRID string float32
log_D_PITCH string float32
log_D_SAFE string float32
log_D_SURF string float32
log_D_TGT string float32
log_EOP_CODE string |S20
log_ERRORS string |S37
log_ESCAPE_HEADING string float32
log_ESCAPE_HEADING_DELTA string float32
log_FERRY_MAX string float32
log_FG_AHR_10V string float32
log_FG_AHR_10Vo string float32
log_FG_AHR_24V string float32
log_FG_AHR_24Vo string float32
log_FILEMGR string int16
log_FIX_MISSING_TIMEOUT string float64
log_GLIDE_SLOPE string float32
log_GPS string String reported in logfile for GPS fix (first surface position after dive) |S54
log_GPS1 string String reported in logfile for GPS1 fix (first surface position before dive) |S67
log_GPS2 string String reported in logfile for GPS2 fix (last surface position before dive) |S67
log_GPS_DEVICE string float32
log_HD_A string Hydrodynamic lift factor for given hull shape (1/degrees of attack angle) float32
log_HD_B string Hydrodynamic drag factor for given hull shape (Pa^(-1/4)) float32
log_HD_C string Hydrodynamic induced drag factor for given hull shape (1/degrees^2 of attack angle) float32
log_HEADING string float32
log_HEAD_ERRBAND string float32
log_HUMID string float32
log_ICE_FREEZE_MARGIN string float32
log_ID string int16
log_INTERNAL_PRESSURE string |S15
log_INT_PRESSURE_SLOPE string float32
log_INT_PRESSURE_YINT string float32
log_IRIDIUM_FIX string |S31
log_IRON string |S118
log_KALMAN_CONTROL string |S11
log_KALMAN_USE string int16
log_KALMAN_X string |S19
log_KALMAN_Y string |S19
log_LOGGERDEVICE1 string float32
log_LOGGERDEVICE2 string float32
log_LOGGERDEVICE3 string float32
log_LOGGERDEVICE4 string float32
log_LOGGERS string float32
log_LOITER_DBDW string float32
log_LOITER_D_BOTTOM string float32
log_LOITER_D_TOP string float32
log_LOITER_N_DIVE string float32
log_LOITER_W_DBAND string float32
log_MASS string float32
log_MAXI_10V string float32
log_MAXI_24V string float32
log_MAX_BUOY string float32
log_MEM0 string |S11
log_MEM1 string |S11
log_MEM2 string |S18
log_MHEAD_RNG_PITCHd_Wd string |S43
log_MINV_10V string float32
log_MINV_24V string float32
log_MISSION string int16
log_MOTHERBOARD string int16
log_NAV2_DEVICE string int16
log_NAV3_DEVICE string int16
log_NAV4_DEVICE string int16
log_NAV_DEVICE string int16
log_NAV_MODE string int16
log_NETBOX string int16
log_NETWORK_DEVICE string |S2
log_NOCOMM_ACTION string int16
log_N_DIVES string int16
log_N_FILEKB string int16
log_N_GPS string int32
log_N_NOCOMM string int16
log_N_NOSURFACE string int16
log_OPTIONS string int16
log_OSC string int32
log_PHONE_DEVICE string float32
log_PHONE_SUPPLY string int16
log_PITCH_ADJ_DBAND string float32
log_PITCH_ADJ_GAIN string float32
log_PITCH_CNV string float32
log_PITCH_DBAND string float32
log_PITCH_GAIN string float32
log_PITCH_GAIN_AUTO_DELTA string float32
log_PITCH_GAIN_AUTO_MAX string float32
log_PITCH_MAX string float32
log_PITCH_MAXERRORS string int16
log_PITCH_MIN string int16
log_PITCH_TIMEOUT string float64
log_PITCH_VBD_SHIFT string float32
log_PITCH_W_DBAND string float32
log_PITCH_W_GAIN string float32
log_PRESSURE_DEVICE string |S2
log_PRESSURE_SLOPE string float32
log_PRESSURE_YINT string float32
log_PROTOCOL string int16
log_RAFOS_CORR_THRESH string float32
log_RAFOS_DEVICE string float32
log_RAFOS_HIT_WINDOW string float32
log_RAFOS_MMODEM string float32
log_RAFOS_PEAK_OFFSET string float32
log_RECOV_CODE string |S20
log_RELAUNCH string int16
log_RHO string gram/cc Expected density at deepest point over the deployment float32
log_ROLL_ADJ_DBAND string float32
log_ROLL_ADJ_GAIN string float32
log_ROLL_CNV string float32
log_ROLL_DEG string float32
log_ROLL_MAX string int16
log_ROLL_MAXERRORS string int16
log_ROLL_MIN string int16
log_ROLL_TIMEOUT string float64
log_SC_FREEKB string Free diskspace on Scicon, in kBytes float32
log_SC_NDIVE string Dive multiplier for Scicon float32
log_SC_PROFILE string Which part of the dive to record data for - 0 none, 1 dive, 2 climb, 3 both float32
log_SC_RECORDABOVE string meters Depth above above which data is recorded float32
log_SC_XMITPROFILE string Which profile to transmit back to the basestation - 0 none, 1 dive, 2 climb, 3 both float32
log_SDFILEDIR string |S4
log_SDSIZE string |S15
log_SEABIRD_C_G string float32
log_SEABIRD_C_H string float32
log_SEABIRD_C_I string float32
log_SEABIRD_C_J string float32
log_SEABIRD_T_G string float32
log_SEABIRD_T_H string float32
log_SEABIRD_T_I string float32
log_SEABIRD_T_J string float32
log_SENSORS string |S42
log_SENSOR_MAMPS string |S60
log_SENSOR_SECS string |S61
log_SIMULATE string int16
log_SIM_W string float32
log_SM_CC string float32
log_SM_CCo string |S46
log_SM_GC string |S93
log_SPEED_FACTOR string float32
log_SPEED_LIMITS string |S11
log_STOP_T string float32
log_STROBE string int16
log_SUPER string |S15
log_SURFACE_URGENCY string int16
log_SURFACE_URGENCY_FORCE string int16
log_SURFACE_URGENCY_TRY string int16
log_TCM_TEMP string float32
log_TEMP string C Temperature inside pressure hull float32
log_TGT_AUTO_DEFAULT string int16
log_TGT_DEFAULT_LAT string float32
log_TGT_DEFAULT_LON string float32
log_TGT_LATLONG string |S19
log_TGT_NAME string |S3
log_TGT_RADIUS string float32
log_T_ABORT string float32
log_T_BOOST string float32
log_T_DIVE string float32
log_T_EPIRB string float32
log_T_GPS string float32
log_T_LOITER string float32
log_T_MISSION string float32
log_T_NO_W string float32
log_T_RSLEEP string float32
log_T_TURN string float32
log_T_TURN_SAMPINT string float32
log_UNCOM_BLEED string int16
log_UPLOAD_DIVES_MAX string int16
log_USE_BATHY string int16
log_USE_ICE string int16
log_VBD_DBAND string float32
log_VBD_LP_IGNORE string float32
log_VBD_MAX string int16
log_VBD_MAXERRORS string int16
log_VBD_MIN string int16
log_VBD_TIMEOUT string float64
log_W_ADJ_DBAND string float32
log_XPDR_DEVICE string float32
log_XPDR_INHIBIT string float32
log_XPDR_INT string float32
log_XPDR_PINGS string |S12
log_XPDR_REP string float32
log_XPDR_VALID string float32
log__CALLS string float32
log__SM_ANGLEo string float32
log__SM_DEPTHo string float32
log_dive string Dive number int16
log_glider string Glider three digit id int16
log_mission string Mission number int16
log_start string Dive start time float32
log_version string Version of glider software float32
magnetic_variation string The magnetic variance from true north (degrees) float32
magnetometer string |S12
reviewed string Whether a scientist has reviewed and approved this profile int16
sg_cal_GPS_position_error string meters Assumed error of GPS fixes float32
sg_cal_QC_bound_action string What QC to assert when a bound is exceeded int16
sg_cal_QC_cond_max string mS/cm Maximum conductivity value float32
sg_cal_QC_cond_min string mS/cm Minimum conductivity value float32
sg_cal_QC_cond_spike_deep string mS/cm/m Allowable conductivity spike in deep water float32
sg_cal_QC_cond_spike_depth string meters Depth for deep conductivity spike test float32
sg_cal_QC_cond_spike_shallow string mS/cm/m Allowable conductivity spike in shallow deep water float32
sg_cal_QC_high_freq_noise string The smoothing window width (in samples) for QC noise on scicon int16
sg_cal_QC_overall_ctd_percentage string Maximum fraction of CTD data that can be QC_BAD float32
sg_cal_QC_overall_speed_percentage string Maximum fraction of CTD data that can be QC_BAD float32
sg_cal_QC_salin_max string 1e-3 Maximum salinity value (PSU) float32
sg_cal_QC_salin_min string 1e-3 Minimum salinity value (PSU) float32
sg_cal_QC_spike_action string What QC to assert when a spike is detected int16
sg_cal_QC_temp_max string degrees_Celsius Maximum allowable temperature float32
sg_cal_QC_temp_min string degrees_Celsius Minimum allowable temperature float32
sg_cal_QC_temp_spike_deep string degrees_Celsius/meter Allowable temperature spike in deep water float32
sg_cal_QC_temp_spike_depth string meters Depth for deep temperature spike test float32
sg_cal_QC_temp_spike_shallow string degrees_Celsius/meter Allowable temperature spike in shallow deep water float32
sg_cal_abs_compress string cc/dbar SG vehicle compressibility float32
sg_cal_calibcomm string |S42
sg_cal_calibcomm_coda string |S80
sg_cal_calibcomm_tridentebb700chla470fdom365 string |S129
sg_cal_cond_bias string mS/cm Conductivity bias float32
sg_cal_cpcor string Nominal compression factor of conductivity tube with pressure float32
sg_cal_ctcor string Nominal thermal expansion factor of a cube of boro-silicate glass float32
sg_cal_depth_bias string meters Depth bias of pressure sensor float32
sg_cal_depth_slope_correction string Correction factor to apply to truck depth to compensate for data with incorrect pressure slope float32
sg_cal_glider_interstitial_length string meters SG equivalent interstitial pipe length float32
sg_cal_glider_interstitial_volume string m^3 SG interstitial volume between fairing and hull float32
sg_cal_glider_length string meters Length of standard glider body (not including antenna mast) float32
sg_cal_glider_r_en string meters Nose entry hole radius float32
sg_cal_glider_r_fair string meters Maximum radius of fairing float32
sg_cal_glider_vol_wake string m^3 Attached wake volume float32
sg_cal_glider_wake_entry_thickness string meters Wake entry region thickness float32
sg_cal_glider_xP string meters Glider x coord of pressure gauge float32
sg_cal_glider_xT string meters Glider x coord of thermistor tip float32
sg_cal_glider_zP string meters Glider z coord of pressure gauge float32
sg_cal_glider_zT string meters Glider z coord of thermistor tip float32
sg_cal_hd_s string fraction How the drag scales by shape (-1/4 for SG per Eriksen, et al.) float32
sg_cal_id_str string Three digit vehicle identification string |S3
sg_cal_legato_alpha string float32
sg_cal_legato_cond_press_correction string Early legato units required a conductivity correction based on pressure (non-zero). Later units do this onboard (zero). float32
sg_cal_legato_ctcoeff string float32
sg_cal_legato_sealevel string dbar * 1000 Assumed value pressure reading at sealevel float32
sg_cal_legato_tau string Thermister response float32
sg_cal_legato_time_lag string float64
sg_cal_legato_use_truck_pressure string Use the seaglider's pressure trace for ctd corrections (non-zero). Use the legato's pressure trace for ctd corrections (zero). float32
sg_cal_mass_comp string kg Mass of the compressee float32
sg_cal_max_stall_speed string cm/s Maximum likely speed for vehicle, else stalled float32
sg_cal_min_stall_angle string degrees Minimum flight angle, else stalled float32
sg_cal_min_stall_speed string cm/s Minimum likely speed for vehicle, else stalled float32
sg_cal_mission_title string Description of mission |S17
sg_cal_pitchbias string degrees Pitch sensor bias float32
sg_cal_rho0 string kg/m^3 Typical expected density of seawater for this deployment float32
sg_cal_rollbias string degrees Roll sensor bias float32
sg_cal_sbe_cond_freq_offset string Hz Conductivity frequency offset float32
sg_cal_sbe_temp_freq_offset string Hz Temperature frequency offset float32
sg_cal_sbect_modes string Number of modes to use for thermal-inertia correction int16
sg_cal_sbect_tau_T string seconds Thermistor response (from Seabird) float32
sg_cal_sbect_unpumped string flag Whether the CTD is pumped or not int16
sg_cal_sg_configuration string The general configuration of the glider int16
sg_cal_sg_ct_geometry string The geometry of the CT sensor itself int16
sg_cal_sg_ct_type string flag The type of CT sensor (original, gun, pumped) int16
sg_cal_sg_sensor_geometry string How the CT is mounted with respect to the SG pressure sensor int16
sg_cal_sg_vehicle_geometry string Various size measurements of the vehicle itself int16
sg_cal_solve_flare_apogee_speed string Whether to solve for accelerated speeds during flare and apogee int16
sg_cal_temp_bias string degrees_Celsius Temperature bias float32
sg_cal_temp_ref string degrees_Celsius Reference temperature for SG thermal expansion calculation float32
sg_cal_therm_expan string cc/degrees_Celsius SG thermal expansion coeff float32
sg_cal_use_adcppressure string Whether to use the adcp pressure sensor over the truck pressure int16
sg_cal_use_auxcompass string Whether to use aux compass sensor data int16
sg_cal_use_auxpressure string Whether to use aux pressure sensor data int16
start_of_climb_time string seconds Elapsed seconds after dive start when second (positive) apogee pump starts float64
surface_curr_east string cm/s Eastward component of surface current surface_eastward_sea_water_velocity float32
surface_curr_error string m/s Expected error of surface drift current from GPS float32
surface_curr_north string cm/s Northward component of surface current surface_northward_sea_water_velocity float32
surface_curr_qc string Whether to trust the surface current values |S1
total_flight_time_s string s Total flight time seconds including surface maneuver drift time float64
tridentebb700chla470fdom365 string |S27
tridentebb700chla470fdom365_ontime_a string secs tridentebb700chla470fdom365 total time turned on dive float64
tridentebb700chla470fdom365_samples_a string tridentebb700chla470fdom365 total number of samples taken dive int16
tridentebb700chla470fdom365_starttime_a string tridentebb700chla470fdom365 epoch time for start of profile dive float64
tridentebb700chla470fdom365_stoptime_a string tridentebb700chla470fdom365 epoch time for end of profile dive float64
tridentebb700chla470fdom365_timeouts_a string tridentebb700chla470fdom365 total number of samples timed out on dive int32

Convert mission from a local directory of basestation files

  • For local data in the directory input_dir

  • Creates a plot of ctd_depth against ctd_time.

[11]:
# Point at a directory of basestation files (the bundled sg271 sample).
input_dir = readers.sample_mission_dir()

# Load and concatenate all datasets in the input directory
# Optionally, specify the range of profiles to load (start_profile, end_profile)
list_datasets = readers.read_mission(input_dir, start_profile=1, end_profile=3)

# Convert the list of datasets to OG1
ds_OG1 = sg.convert(
    list_datasets,
    contributors=[{"name": "Jane Doe", "role": "PI", "email": "jane@example.org"}],
    institutions=[{"name": "University of Hamburg", "role": "Operator"}],
)

# Generate a simple plot
plotters.plot_profile_depth(ds_OG1)
plotters.show_contents(ds_OG1, "attrs")
Loading datasets: 100%|██████████| 3/3 [00:00<00:00, 12.98file/s]
Processing datasets: 100%|██████████| 3/3 [00:01<00:00,  1.61dataset/s]
/tmp/ipykernel_2264/3117069022.py:9: UserWarning: PLATFORM_MODEL not set in the mission config (platform.PLATFORM_MODEL); writing 'UNK'.
  ds_OG1 = sg.convert(
/tmp/ipykernel_2264/3117069022.py:9: UserWarning: PLATFORM_MAKER not set in the mission config (platform.PLATFORM_MAKER); writing 'UNK'.
  ds_OG1 = sg.convert(
/tmp/ipykernel_2264/3117069022.py:9: UserWarning: WMO_IDENTIFIER not set in the mission config (platform.WMO_IDENTIFIER) or the basestation file; writing 'UNK'.
  ds_OG1 = sg.convert(
/tmp/ipykernel_2264/3117069022.py:9: UserWarning: PLATFORM_DEPTH_RATING not set in the mission config (platform.PLATFORM_DEPTH_RATING); it is numeric, so the variable is omitted rather than written as 'UNK'.
  ds_OG1 = sg.convert(
Dimensions not in the OG1 dataset: ['trajectory']; their variables are not written (see conversion_dimensions).
[11]:
Attribute Value DType
0 conversion_units {"CNDC_RAW": ["S/m", "mS cm-1", 10.0], "CNDC":... str
1 title OceanGliders trajectory file str
2 id sg271_20260302T193828_R str
3 platform sub-surface gliders str
4 platform_vocabulary https://vocab.nerc.ac.uk/collection/L06/curren... str
5 geospatial_lat_min -72.98122053363595 ndarray
6 geospatial_lat_max -72.97946730813256 ndarray
7 geospatial_lon_min 171.4084666666667 ndarray
8 geospatial_lon_max 171.43743333333333 ndarray
9 geospatial_vertical_min 0.0 ndarray
10 geospatial_vertical_max 107.54834100467674 ndarray
11 time_coverage_start 20260302T193828 str
12 time_coverage_end 20260302T214551 str
13 project PycnMix_Drygalski str
14 contributor_name Jane Doe str
15 contributor_role PI str
16 contributor_role_vocabulary http://vocab.nerc.ac.uk/collection/W08/current... str
17 contributor_email jane@example.org str
18 contributing_institutions University of Hamburg str
19 contributing_institutions_vocabulary https://edmo.seadatanet.org/report/3323 str
20 contributing_institutions_role Operator str
21 contributing_institutions_role_vocabulary http://vocab.nerc.ac.uk/collection/W08/current... str
22 rtqc_method No QC applied str
23 rtqc_method_doi n/a str
24 start_date 20260302T193828 str
25 date_created 20261024T123544 str
26 featureType trajectory str
27 Conventions CF-1.10, ACDD-1.3, OG-1.0 str
28 date_modified 20261024T123544 str
29 keywords Water Temperature, Conductivity, Salinity, Den... str
30 keywords_vocabulary NASA/GCMD Earth Science Keywords Version 6.0.0.0 str
31 geospatial_bounds POLYGON ((-72.979467 171.408467, -72.979467 17... str
32 geospatial_vertical_positive down str
33 time_coverage_duration P0DT2H7M23S str
34 history 2026-10-24T12:35:45+00:00 seagliderOG1 0.1.0.p... str
35 conversion_dimensions {"codaTODO_data_point": {"fate": "merged", "va... str
36 conversion_derived_variables {"DEPLOYMENT_LATITUDE": [], "DEPLOYMENT_LONGIT... str
37 conversion_removed_variables [] str
38 conversion_input_variable_count 542 int
39 conversion_attribute_sources {"basestation": ["keywords", "keywords_vocabul... str

Convert mission from the NCEI server (with p*.nc files)

  • Point server at an NCEI Seaglider mission directory and uncomment the cell below. A list of example missions is given further down.

[12]:
# Specify the server where data are located
# server = "https://www.ncei.noaa.gov/data/oceans/glider/seaglider/uw/033/20100903/"

# Load and concatenate all datasets from the server, optionally specifying the range of profiles to load
# list_datasets = readers.read_mission(server, start_profile=1, end_profile=19)

# Convert the list of datasets to OG1
# ds_OG1 = sg.convert(list_datasets)

Writing an output file

Due to problems with writing xarray datasets as netCDF when attributes are not of a specified type (str, Number, np.ndarray, np.number, list, tuple), a function was written write.

[13]:
# Write the file
# This writer catches errors in data types (DType errors) when using xr.to_netcdf()
# The solution is to convert them to strings, which may be undesired behaviour
output_file = data_path / "demo_test.nc"
if output_file.exists():
    output_file.unlink()

writers.write(ds_OG1, output_file);
[14]:
# Load the data saved
ds1 = xr.open_dataset(output_file)

# Generate a simple plot
# plotters.show_contents(ds_all,'attrs')
plotters.plot_depth_colored(ds1, color_by="PROFILE_NUMBER")
[14]:
(<Figure size 1000x600 with 2 Axes>,
 <Axes: title={'center': 'Depth as a Function of Time'}, xlabel='Time (2026)', ylabel='Depth'>)

One call per mission: process

sg.process runs the whole pipeline for one mission from its configuration — read, convert, write <output_dir>/<id>.nc — and with report=True also writes the HTML conversion page beside it. It is what seagliderOG1 process calls for each mission.

Here it takes the bundled sg271 sample’s configuration (readers.sample_mission_dir()), the same file seagliderOG1 init --example writes. Paths in it are resolved relative to the file; output_dir is overridden to ./outputs below so the file is written in the repository.

[15]:
# The bundled sg271 sample ships inside the package; process it, writing to ./outputs.
example = readers.sample_mission_dir() / "sg271_drygalski_2026.yaml"
path = sg.process(
    example, output_dir=parent_dir / "outputs", overwrite=True, report=True
)
print(path)
internal_mission_identifier: internal_mission_identifier is unset; it is OG1 highly desirable. Set it under global_attributes to improve discoverability.
site_vocabulary: site_vocabulary is unset; it is OG1 highly desirable. Set it under identity_and_discovery to improve discoverability.
program: program is unset; it is OG1 highly desirable. Set it under global_attributes to improve discoverability.
program_vocabulary: program_vocabulary is unset; it is OG1 highly desirable. Set it under global_attributes to improve discoverability.
data_url: data_url is unset; it is OG1 highly desirable. Set it under identity_and_discovery to improve discoverability.
doi: doi is unset; it is OG1 highly desirable. Set it under rights_and_access to improve discoverability.
Loading datasets: 100%|██████████| 3/3 [00:00<00:00, 20.58file/s]
Processing datasets: 100%|██████████| 3/3 [00:00<00:00,  4.85dataset/s]
/home/runner/work/seagliderOG1/seagliderOG1/seagliderOG1/_convert.py:1483: UserWarning: identity_and_discovery.project overrides the converter value 'PycnMix_Drygalski' with 'PycnMix'.
  _apply_deployment(ds_og1, deployment, attribute_sources)
Dimensions not in the OG1 dataset: ['trajectory']; their variables are not written (see conversion_dimensions).
/home/runner/work/seagliderOG1/seagliderOG1/outputs/sg271_20260302T193828_R.nc