{ "cells": [ { "cell_type": "markdown", "id": "c6a29764-f39c-431c-8e77-fbc6bfe20f01", "metadata": {}, "source": [ "# seagliderOG1 demo\n", "\n", "The purpose of this notebook is to demonstrate the functionality of `seagliderOG1` to convert from Seaglider basestation files to OG1 format.\n", "\n", "- OG1 format is a newly agreed format (since June 2024) for glider data sets from various platforms (e.g., Seaglider, Slocum, Seaexplorer). It lives on github here: (https://github.com/OceanGlidersCommunity/OG-format-user-manual).\n", "- OG1 manual: https://oceangliderscommunity.github.io/OG-format-user-manual/OG_Format.html\n", "\n", "The test case is to convert sg015 data from the Labrador Sea in September 2004.\n", "\n", "The demo is organised to show\n", "\n", "- Conversion of a single dive cycle (single `p*.nc` file)\n", "\n", "- Conversion for a folder of local dive-cycle files (full mission of `p*.nc` files)\n", "\n", "- Download from remote server + conversion (directory with full mission of `p*.nc` files)\n", "\n", "Options are provided to only load e.g. 10 files, but note that OG1 format expects a full mission.\n" ] }, { "cell_type": "code", "execution_count": 1, "id": "6a1920f3", "metadata": { "execution": { "iopub.execute_input": "2025-09-21T14:45:05.790307Z", "iopub.status.busy": "2025-09-21T14:45:05.790134Z", "iopub.status.idle": "2025-09-21T14:45:07.844541Z", "shell.execute_reply": "2025-09-21T14:45:07.844039Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "/home/runner/work/seagliderOG1/seagliderOG1\n", "['/home/runner/micromamba/envs/TEST/lib/python313.zip', '/home/runner/micromamba/envs/TEST/lib/python3.13', '/home/runner/micromamba/envs/TEST/lib/python3.13/lib-dynload', '', '/home/runner/micromamba/envs/TEST/lib/python3.13/site-packages', '/home/runner/work/seagliderOG1/seagliderOG1', '/home/runner/work/seagliderOG1/seagliderOG1/seagliderOG1']\n" ] } ], "source": [ "import pathlib\n", "import sys\n", "\n", "script_dir = pathlib.Path().parent.absolute()\n", "parent_dir = script_dir.parents[0]\n", "sys.path.append(str(parent_dir))\n", "sys.path.append(str(parent_dir) + '/seagliderOG1')\n", "print(parent_dir)\n", "print(sys.path)\n", "### silence future warnings\n", "import warnings\n", "warnings.simplefilter(action='ignore', category=FutureWarning)\n", "\n", "import xarray as xr\n", "import os\n", "from seagliderOG1 import readers, writers, plotters\n", "from seagliderOG1 import convertOG1, vocabularies\n" ] }, { "cell_type": "code", "execution_count": 2, "id": "1e070d18", "metadata": { "execution": { "iopub.execute_input": "2025-09-21T14:45:07.846423Z", "iopub.status.busy": "2025-09-21T14:45:07.846123Z", "iopub.status.idle": "2025-09-21T14:45:07.848469Z", "shell.execute_reply": "2025-09-21T14:45:07.848044Z" } }, "outputs": [], "source": [ "# Specify the path for writing datafiles\n", "data_path = os.path.join(parent_dir, 'data')" ] }, { "cell_type": "markdown", "id": "803e373a", "metadata": {}, "source": [ "## Reading basestation files\n", "\n", "This has three ways to load a glider dataset.\n", "\n", "Load an example dataset using `seagliderOG1.fetchers.load_sample_dataset`\n", "\n", "Alternatively, use your own with e.g. `ds = xr.open_dataset('/path/to/yourfile.nc')`" ] }, { "cell_type": "markdown", "id": "02c414b4", "metadata": {}, "source": [ "### Load single sample dataset" ] }, { "cell_type": "code", "execution_count": 3, "id": "05ca56cf", "metadata": { "execution": { "iopub.execute_input": "2025-09-21T14:45:07.849966Z", "iopub.status.busy": "2025-09-21T14:45:07.849815Z", "iopub.status.idle": "2025-09-21T14:45:08.256444Z", "shell.execute_reply": "2025-09-21T14:45:08.255916Z" } }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Downloading file 'p0330015_20100906.nc' from 'https://www.ncei.noaa.gov/data/oceans/glider/seaglider/uw/033/20100903/p0330015_20100906.nc' to '/home/runner/.cache/seagliderOG1'.\n" ] }, { "data": { "text/html": [ "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
<xarray.Dataset> Size: 290kB\n",
       "Dimensions:                                   (sg_data_point: 586,\n",
       "                                               gc_event: 36, gc_state: 10,\n",
       "                                               gps_info: 3, trajectory: 1)\n",
       "Coordinates:\n",
       "    ctd_time                                  (sg_data_point) datetime64[ns] 5kB ...\n",
       "    longitude                                 (sg_data_point) float64 5kB ...\n",
       "    latitude                                  (sg_data_point) float64 5kB ...\n",
       "    ctd_depth                                 (sg_data_point) float64 5kB ...\n",
       "  * trajectory                                (trajectory) int32 4B 15\n",
       "Dimensions without coordinates: sg_data_point, gc_event, gc_state, gps_info\n",
       "Data variables: (12/397)\n",
       "    salinity_qc                               (sg_data_point) |S1 586B ...\n",
       "    eng_depth                                 (sg_data_point) float64 5kB ...\n",
       "    eng_aa4330_Temp                           (sg_data_point) float64 5kB ...\n",
       "    eng_vbdCC                                 (sg_data_point) float64 5kB ...\n",
       "    north_displacement                        (sg_data_point) float64 5kB ...\n",
       "    east_displacement                         (sg_data_point) float64 5kB ...\n",
       "    ...                                        ...\n",
       "    sg_cal_optode_FoilCoefB0                  float64 8B ...\n",
       "    log_MISSION                               int32 4B ...\n",
       "    log_FG_AHR_24V                            float64 8B ...\n",
       "    log_ICE_FREEZE_MARGIN                     float64 8B ...\n",
       "    surface_curr_north                        float64 8B ...\n",
       "    log_RAFOS_DEVICE                          float64 8B ...\n",
       "Attributes: (12/59)\n",
       "    quality_control_version:         1.12\n",
       "    base_station_micro_version:      4935\n",
       "    time_coverage_resolution:        PT1S\n",
       "    geospatial_vertical_max:         511.8935394557861\n",
       "    sea_name:                        Caribbean Sea\n",
       "    mission:                         1\n",
       "    ...                              ...\n",
       "    source:                          Deepglider SG033\n",
       "    geospatial_vertical_min:         0.2601223952664329\n",
       "    creator_url:                     http://iop.apl.washington.edu/seaglider/...\n",
       "    geospatial_vertical_units:       meter\n",
       "    dive_number:                     15\n",
       "    disclaimer:                      Data has not been reviewed and is provid...
" ], "text/plain": [ " Size: 290kB\n", "Dimensions: (sg_data_point: 586,\n", " gc_event: 36, gc_state: 10,\n", " gps_info: 3, trajectory: 1)\n", "Coordinates:\n", " ctd_time (sg_data_point) datetime64[ns] 5kB ...\n", " longitude (sg_data_point) float64 5kB ...\n", " latitude (sg_data_point) float64 5kB ...\n", " ctd_depth (sg_data_point) float64 5kB ...\n", " * trajectory (trajectory) int32 4B 15\n", "Dimensions without coordinates: sg_data_point, gc_event, gc_state, gps_info\n", "Data variables: (12/397)\n", " salinity_qc (sg_data_point) |S1 586B ...\n", " eng_depth (sg_data_point) float64 5kB ...\n", " eng_aa4330_Temp (sg_data_point) float64 5kB ...\n", " eng_vbdCC (sg_data_point) float64 5kB ...\n", " north_displacement (sg_data_point) float64 5kB ...\n", " east_displacement (sg_data_point) float64 5kB ...\n", " ... ...\n", " sg_cal_optode_FoilCoefB0 float64 8B ...\n", " log_MISSION int32 4B ...\n", " log_FG_AHR_24V float64 8B ...\n", " log_ICE_FREEZE_MARGIN float64 8B ...\n", " surface_curr_north float64 8B ...\n", " log_RAFOS_DEVICE float64 8B ...\n", "Attributes: (12/59)\n", " quality_control_version: 1.12\n", " base_station_micro_version: 4935\n", " time_coverage_resolution: PT1S\n", " geospatial_vertical_max: 511.8935394557861\n", " sea_name: Caribbean Sea\n", " mission: 1\n", " ... ...\n", " source: Deepglider SG033\n", " geospatial_vertical_min: 0.2601223952664329\n", " creator_url: http://iop.apl.washington.edu/seaglider/...\n", " geospatial_vertical_units: meter\n", " dive_number: 15\n", " disclaimer: Data has not been reviewed and is provid..." ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ds = readers.load_sample_dataset()\n", "ds" ] }, { "cell_type": "markdown", "id": "5e1416e5", "metadata": {}, "source": [ "### Load datasets from a local directory" ] }, { "cell_type": "code", "execution_count": 4, "id": "83bba8ac", "metadata": { "execution": { "iopub.execute_input": "2025-09-21T14:45:08.258920Z", "iopub.status.busy": "2025-09-21T14:45:08.258762Z", "iopub.status.idle": "2025-09-21T14:45:08.400442Z", "shell.execute_reply": "2025-09-21T14:45:08.399960Z" } }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "\r", "Loading datasets: 0%| | 0/5 [00:00 `start_date`\n", " - Adds `date_modified`\n", " - Renames `comments`-->`history`, `site`-->`summary`\n", " - Adds `title`, `platform`, `platform_vocabulary`, `featureType`, `Conventions`, `rtqc_method*` according to OceanGliders format\n", " - Retains `naming_authority`, `institution`, `project`, `geospatial_*` as OG attributes\n", " - Retains extra attributes: `license`, `keywords`, `keywords_vocabulary`, `file_version`, `acknowledgement`, `date_created`, `disclaimer`\n", "\n", "Future behaviour to be added:\n", "\n", "6. Retain the variables starting with `sg_cal` and check whether they vary over the mission (shouldn't)\n", "6. Add sensors, using information in the `split_ds` with no dimensions\n", " - 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`)\n", " - 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`, \n", " `wlbb2f` - means sensor\n", " `sg_cal_mission_title`\n", " `sg_cal_id_str`\n", " `calibcomm_oxygen`\n", " `calibcomm`\n", " `sbe41` means ??\n", " `hdm_qc`\n", " `glider`\n", " \n", "### Convert a single (sample) dataset" ] }, { "cell_type": "code", "execution_count": 7, "id": "dd041858-c498-4654-a7c8-1731beb839fc", "metadata": { "execution": { "iopub.execute_input": "2025-09-21T14:45:10.500701Z", "iopub.status.busy": "2025-09-21T14:45:10.500533Z", "iopub.status.idle": "2025-09-21T14:45:11.341094Z", "shell.execute_reply": "2025-09-21T14:45:11.340556Z" } }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "\r", "Processing datasets: 0%| | 0/1 [00:00" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# Loads one dataset (p0150500_20050213.nc)\n", "ds = readers.load_sample_dataset()\n", "\n", "ds_OG1, var_list = convertOG1.convert_to_OG1(ds)\n", "\n", "# Check the results - uncomment the following lines to either generate a plot or show the variables.\n", "plotters.plot_profile_depth(ds_OG1)" ] }, { "cell_type": "code", "execution_count": 8, "id": "d5b0e357", "metadata": { "execution": { "iopub.execute_input": "2025-09-21T14:45:11.342849Z", "iopub.status.busy": "2025-09-21T14:45:11.342669Z", "iopub.status.idle": "2025-09-21T14:45:11.347778Z", "shell.execute_reply": "2025-09-21T14:45:11.347388Z" } }, "outputs": [ { "data": { "text/plain": [ "['gc_st_secs',\n", " 'eng_aa4330_Temp',\n", " 'log_D_FLARE',\n", " 'sg_cal_therm_expan',\n", " 'depth_avg_curr_east_gsm',\n", " 'log_RAFOS_CORR_THRESH',\n", " 'flight_avg_speed_north_gsm',\n", " 'eng_head',\n", " 'log_SIM_PITCH',\n", " 'log_MISSION',\n", " 'log_SENSORS',\n", " 'log_SPEED_FACTOR',\n", " 'sg_cal_mass_comp',\n", " 'temperature_raw_qc',\n", " 'log_FG_AHR_24Vo',\n", " 'latlong_qc',\n", " 'log_HD_C',\n", " 'log_COMM_SEQ',\n", " 'glide_angle_gsm',\n", " 'log_PHONE_SUPPLY',\n", " 'log_PITCH_MIN',\n", " 'gc_end_secs',\n", " 'sg_cal_optode_TempCoef2',\n", " 'sg_cal_optode_FoilCoefA5',\n", " 'log_TCM_TEMP',\n", " 'gc_gcphase',\n", " 'sg_cal_optode_FoilCoefA12',\n", " 'glide_angle',\n", " 'log_D_NO_BLEED',\n", " 'log_ICE_FREEZE_MARGIN',\n", " 'log_D_SURF',\n", " 'sg_cal_optode_TempCoef1',\n", " 'eng_rollCtl',\n", " 'log_COMPASS2_DEVICE',\n", " 'sg_cal_id_str',\n", " 'log_N_NOSURFACE',\n", " 'sg_cal_abs_compress',\n", " 'speed_gsm',\n", " 'sg_cal_optode_FoilCoefB12',\n", " 'log_CAPMAXSIZE',\n", " 'log__XMS_NAKs',\n", " 'log_SEABIRD_C_H',\n", " 'temperature',\n", " 'temperature_qc',\n", " 'log_PITCH_TIMEOUT',\n", " 'log_TCM_PITCH_OFFSET',\n", " 'log_TT8_MAMPS',\n", " 'log_PITCH_ADJ_GAIN',\n", " 'sg_cal_optode_FoilCoefA8',\n", " 'north_displacement_gsm',\n", " 'log_N_GPS',\n", " 'log_CFSIZE',\n", " 'sg_cal_optode_FoilCoefB11',\n", " 'gc_roll_secs',\n", " 'log_DATA_FILE_SIZE',\n", " 'log_SM_GC',\n", " 'log_STROBE',\n", " 'gc_pitch_secs',\n", " 'sg_cal_optode_FoilCoefA0',\n", " 'eng_rollAng',\n", " 'log_ESCAPE_HEADING_DELTA',\n", " 'log_LOGGERDEVICE4',\n", " 'sg_cal_temp_ref',\n", " 'sg_cal_sg_configuration',\n", " 'log_INTERNAL_PRESSURE',\n", " 'vert_speed',\n", " 'log_APOGEE_PITCH',\n", " 'log_RAFOS_PEAK_OFFSET',\n", " 'log_FG_AHR_10Vo',\n", " 'log_C_PITCH',\n", " 'eng_elaps_t',\n", " 'log_GPS_DEVICE',\n", " 'ctd_time',\n", " 'vert_speed_gsm',\n", " 'temperature_raw',\n", " 'GPS2_qc',\n", " 'log_FG_AHR_24V',\n", " 'gc_roll_errors',\n", " 'eng_vbdCC',\n", " 'depth_avg_curr_error',\n", " 'depth_avg_curr_north',\n", " 'sg_cal_optode_FoilCoefB2',\n", " 'gc_state_state',\n", " 'log_FERRY_MAX',\n", " 'surface_curr_east',\n", " 'sg_cal_optode_FoilCoefB13',\n", " 'sg_cal_optode_TempCoef3',\n", " 'log_NAV_MODE',\n", " 'sg_cal_optode_TempCoef5',\n", " 'sg_cal_optode_FoilCoefB8',\n", " 'log_SENSOR_MAMPS',\n", " 'log_ALTIM_BOTTOM_TURN_MARGIN',\n", " 'log_T_RSLEEP',\n", " 'sg_cal_optode_PhaseCoef3',\n", " 'eng_aa4330_AirSat',\n", " 'log_T_WATCHDOG',\n", " 'log_T_NO_W',\n", " 'log_SEABIRD_C_G',\n", " 'sg_cal_optode_PhaseCoef2',\n", " 'log_DEEPGLIDER',\n", " 'sg_cal_c_g',\n", " 'log_R_STBD_OVSHOOT',\n", " 'log_INT_PRESSURE_SLOPE',\n", " 'log_T_BOOST',\n", " 'log_SURFACE_URGENCY_FORCE',\n", " 'sg_cal_optode_FoilCoefB7',\n", " 'log_ROLL_ADJ_DBAND',\n", " 'speed',\n", " 'aanderaa4330_results_time',\n", " 'log_TGT_AUTO_DEFAULT',\n", " 'log_PHONE_DEVICE',\n", " 'sg_cal_optode_FoilCoefB6',\n", " 'eng_sbect_tempFreq',\n", " 'log_KALMAN_Y',\n", " 'sigma_t',\n", " 'log_SM_CCo',\n", " 'log_VBD_TIMEOUT',\n", " 'log__SM_DEPTHo',\n", " 'gc_pitch_i',\n", " 'log_MINV_10V',\n", " 'log_T_TURN',\n", " 'log_VBD_PUMP_AD_RATE_SURFACE',\n", " 'log_ALTIM_PULSE',\n", " 'log_ESCAPE_HEADING',\n", " 'log_MINV_24V',\n", " 'flight_avg_speed_east',\n", " 'sg_cal_optode_FoilCoefB9',\n", " 'log_SEABIRD_T_I',\n", " 'flight_avg_speed_north',\n", " 'log_CALL_TRIES',\n", " 'log_ROLL_MAX',\n", " 'latitude_gsm',\n", " 'log_AH0_24V',\n", " 'log_ERRORS',\n", " 'log_CAPUPLOAD',\n", " 'log_SPEED_LIMITS',\n", " 'hdm_qc',\n", " 'log_TGT_RADIUS',\n", " 'eng_sbect_condFreq',\n", " 'conductivity_raw',\n", " 'salinity_raw_qc',\n", " 'GPS1_qc',\n", " 'log_VBD_BLEED_AD_RATE',\n", " 'log_XPDR_VALID',\n", " 'reviewed',\n", " 'sound_velocity',\n", " 'log_24V_AH',\n", " 'eng_pitchAng',\n", " 'log_IRIDIUM_FIX',\n", " 'dissolved_oxygen_sat',\n", " 'log_D_BOOST',\n", " 'depth_avg_curr_qc',\n", " 'log_SEABIRD_C_J',\n", " 'log_KALMAN_X',\n", " 'gc_pitch_ad',\n", " 'log_T_GPS',\n", " 'log_GPS',\n", " 'log_DEVICE4',\n", " 'log_ROLL_MAXERRORS',\n", " 'log_COMPASS_USE',\n", " 'surface_curr_error',\n", " 'sg_cal_optode_FoilCoefB10',\n", " 'sg_cal_c_i',\n", " 'sg_cal_optode_FoilCoefB4',\n", " 'log_SENSOR_SECS',\n", " 'sg_cal_c_h',\n", " 'log_D_SAFE',\n", " 'log_KALMAN_CONTROL',\n", " 'log_RHO',\n", " 'log_FILEMGR',\n", " 'latitude',\n", " 'gc_vbd_retries',\n", " 'log_SEABIRD_T_G',\n", " 'log_PITCH_GAIN',\n", " 'log_MEM',\n", " 'conservative_temperature',\n", " 'log_ALTIM_PING_DELTA',\n", " 'gc_pitch_retries',\n", " 'sg_cal_t_g',\n", " 'log_T_TURN_SAMPINT',\n", " 'buoyancy',\n", " 'log_ALTIM_FREQUENCY',\n", " 'absolute_salinity',\n", " 'salinity',\n", " 'sg_cal_mass',\n", " 'sg_cal_optode_FoilCoefB5',\n", " 'gc_vbd_errors',\n", " 'time',\n", " 'log_USE_ICE',\n", " 'log_TGT_DEFAULT_LON',\n", " 'log_PITCH_AD_RATE',\n", " 'log_C_ROLL_DIVE',\n", " 'log_RELAUNCH',\n", " 'log_T_MISSION',\n", " 'log_TGT_LATLONG',\n", " 'log_SIM_W',\n", " 'log_DEVICES',\n", " 'log_ALTIM_PING_DEPTH',\n", " 'log__CALLS',\n", " 'log_T_LOITER',\n", " 'log_gps_lon',\n", " 'start_of_climb_time',\n", " 'log_AD7714Ch0Gain',\n", " 'log_SURFACE_URGENCY_TRY',\n", " 'log_VBD_CNV',\n", " 'log_HD_A',\n", " 'sg_cal_rho0',\n", " 'eng_aa4330_CalPhase',\n", " 'log_N_NOCOMM',\n", " 'log_MASS',\n", " 'log_PITCH_VBD_SHIFT',\n", " 'magnetic_variation',\n", " 'sg_cal_optode_FoilCoefA6',\n", " 'sg_cal_pitchbias',\n", " 'sg_cal_hd_b',\n", " 'log_SURFACE_URGENCY',\n", " 'sg_cal_optode_FoilCoefA13',\n", " 'log_TCM_ROLL_OFFSET',\n", " 'gc_state_eop_code',\n", " 'log_HEADING',\n", " 'log_COMPASS_DEVICE',\n", " 'log_D_OFFGRID',\n", " 'log_gps_time',\n", " 'sg_cal_optode_FoilCoefA10',\n", " 'log_ALTIM_SENSITIVITY',\n", " 'log_DEVICE5',\n", " 'log_ALTIM_TOP_PING_RANGE',\n", " 'log_C_ROLL_CLIMB',\n", " 'eng_elaps_t_0000',\n", " 'log_PITCH_MAX',\n", " 'log_DIVE',\n", " 'gc_state_secs',\n", " 'log_N_FILEKB',\n", " 'log_R_PORT_OVSHOOT',\n", " 'longitude_gsm',\n", " 'depth_avg_curr_north_gsm',\n", " 'ctd_depth',\n", " 'log_ROLL_TIMEOUT',\n", " 'sg_cal_mission_title',\n", " 'log_GPS1',\n", " 'log_ROLL_ADJ_GAIN',\n", " 'conductivity_qc',\n", " 'gc_vbd_secs',\n", " 'log_D_PITCH',\n", " 'conductivity_raw_qc',\n", " 'sg_cal_optode_TempCoef0',\n", " 'log_T_ABORT',\n", " 'log_INT_PRESSURE_YINT',\n", " 'gc_vbd_ctl',\n", " 'log_gps_lat',\n", " 'log_PITCH_MAXERRORS',\n", " 'sg_cal_optode_SVU_enabled',\n", " 'east_displacement',\n", " 'log_ROLL_AD_RATE',\n", " 'sg_cal_cpcor',\n", " 'log_CAP_FILE_SIZE',\n", " 'CTD_qc',\n", " 'gc_roll_ad',\n", " 'eng_rec',\n", " 'theta',\n", " 'sg_cal_hd_s',\n", " 'log_HD_B',\n", " 'log_FIX_MISSING_TIMEOUT',\n", " 'sg_cal_optode_FoilCoefA9',\n", " 'sg_cal_optode_PhaseCoef1',\n", " 'log_MHEAD_RNG_PITCHd_Wd',\n", " 'aanderaa4330_instrument_dissolved_oxygen',\n", " 'log_T_GPS_CHARGE',\n", " 'log_USE_BATHY',\n", " 'log_ALTIM_TOP_PING',\n", " 'log_UNCOM_BLEED',\n", " 'salinity_raw',\n", " 'log_D_GRID',\n", " 'log_RAFOS_DEVICE',\n", " 'log_TGT_DEFAULT_LAT',\n", " 'gc_pitch_errors',\n", " 'log_ALTIM_BOTTOM_PING_RANGE',\n", " 'pressure',\n", " 'log_CALL_WAIT',\n", " 'sigma_theta',\n", " 'sg_cal_ctcor',\n", " 'log__XMS_TOUTs',\n", " 'log_SEABIRD_T_H',\n", " 'log_VBD_MAX',\n", " 'log_P_OVSHOOT',\n", " 'gc_roll_i',\n", " 'salinity_qc',\n", " 'eng_depth',\n", " 'horz_speed',\n", " 'log_SM_CC',\n", " 'log_HEAPDBG',\n", " 'log__SM_ANGLEo',\n", " 'sg_cal_hd_c',\n", " 'surface_curr_north',\n", " 'log_DEVICE_SECS',\n", " 'log_D_ABORT',\n", " 'log_XPDR_INHIBIT',\n", " 'log_VBD_MIN',\n", " 'log_LOGGERDEVICE3',\n", " 'depth_avg_curr_east',\n", " 'log_ROLL_DEG',\n", " 'log_DEVICE6',\n", " 'horz_speed_gsm',\n", " 'sg_cal_vbd_cnts_per_cc',\n", " 'log_CALL_NDIVES',\n", " 'ctd_pressure',\n", " 'log_XPDR_PINGS',\n", " 'eng_pitchCtl',\n", " 'east_displacement_gsm',\n", " 'log_MOTHERBOARD',\n", " 'aanderaa4330_qc',\n", " 'flight_avg_speed_east_gsm',\n", " 'gc_ob_vertv',\n", " 'sg_cal_optode_FoilCoefB3',\n", " 'log_T_DIVE',\n", " 'log_UPLOAD_DIVES_MAX',\n", " 'log_C_VBD',\n", " 'longitude',\n", " 'eng_aa4330_TCPhase',\n", " 'aanderaa4330_dissolved_oxygen_qc',\n", " 'log_XPDR_DEVICE',\n", " 'log_DEVICE_MAMPS',\n", " 'sg_cal_optode_PhaseCoef0',\n", " 'log_T_GPS_ALMANAC',\n", " 'log_LOGGERDEVICE1',\n", " 'log_ALTIM_TOP_TURN_MARGIN',\n", " 'eng_aa4330_O2',\n", " 'density',\n", " 'log_VBD_PUMP_AD_RATE_APOGEE',\n", " 'gc_pitch_ctl',\n", " 'log_DEVICE2',\n", " 'trajectory',\n", " 'sg_cal_optode_FoilCoefA11',\n", " 'speed_qc',\n", " 'log_TGT_NAME',\n", " 'sg_cal_optode_FoilCoefA4',\n", " 'sg_cal_t_i',\n", " 'conductivity',\n", " 'log_KERMIT',\n", " 'log_ROLL_CNV',\n", " 'GPSE_qc',\n", " 'north_displacement',\n", " 'log_KALMAN_USE',\n", " 'sg_cal_calibcomm',\n", " 'sg_cal_t_j',\n", " 'log_DEVICE3',\n", " 'log_DEEPGLIDERMB',\n", " 'log_COURSE_BIAS',\n", " 'log_LOGGERS',\n", " 'log_AH0_10V',\n", " 'log_ROLL_MIN',\n", " 'sg_cal_calibcomm_optode',\n", " 'gc_roll_retries',\n", " 'log_HEAD_ERRBAND',\n", " 'log_DEVICE1',\n", " 'log_SEABIRD_C_I',\n", " 'aa4330',\n", " 'surface_curr_qc',\n", " 'log_ALTIM_TOP_MIN_OBSTACLE',\n", " 'glider',\n", " 'gc_vbd_i',\n", " 'log_LOGGERDEVICE2',\n", " 'gc_depth',\n", " 'log_ID',\n", " 'log_MAX_BUOY',\n", " 'log_PRESSURE_YINT',\n", " 'density_insitu',\n", " 'log_D_CALL',\n", " 'eng_GC_phase',\n", " 'log_GLIDE_SLOPE',\n", " 'avg_latitude',\n", " 'sg_cal_t_h',\n", " 'log_GPS2',\n", " 'log_PITCH_DBAND',\n", " 'log_SEABIRD_T_J',\n", " 'sg_cal_c_j',\n", " 'sg_cal_optode_FoilCoefA3',\n", " 'log_CF8_MAXERRORS',\n", " 'aanderaa4330_dissolved_oxygen',\n", " 'log_PITCH_CNV',\n", " 'gc_data_pts',\n", " 'sg_cal_hd_a',\n", " 'depth',\n", " 'sg_cal_optode_FoilCoefA2',\n", " 'sg_cal_optode_FoilCoefA1',\n", " 'sg_cal_volmax',\n", " 'gc_vbd_ad',\n", " 'log_RAFOS_HIT_WINDOW',\n", " 'log_FG_AHR_10V',\n", " 'log_D_TGT',\n", " 'sg_cal_optode_FoilCoefA7',\n", " 'log_10V_AH',\n", " 'sg_cal_optode_FoilCoefB0',\n", " 'log_D_FINISH',\n", " 'sg_cal_optode_FoilCoefB1',\n", " 'sg_cal_optode_TempCoef4',\n", " 'log_PRESSURE_SLOPE',\n", " 'log_VBD_MAXERRORS',\n", " 'log_HUMID',\n", " 'sbe41',\n", " 'log_VBD_DBAND',\n", " 'log_PITCH_ADJ_DBAND']" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "### print the list of inital variables of the dataset\n", "var_list" ] }, { "cell_type": "code", "execution_count": 9, "id": "b697a2f1", "metadata": { "execution": { "iopub.execute_input": "2025-09-21T14:45:11.349280Z", "iopub.status.busy": "2025-09-21T14:45:11.349106Z", "iopub.status.idle": "2025-09-21T14:45:11.358495Z", "shell.execute_reply": "2025-09-21T14:45:11.358065Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "information is based on xarray Dataset\n" ] }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
AttributeValueDType
0titleOceanGliders trajectory filestr
1idsg033_20100906T112156_delayedstr
2platformsub-surface glidersstr
3platform_vocabularyhttps://vocab.nerc.ac.uk/collection/L06/curren...str
4naming_authorityedu.washington.aplstr
5institutionSchool of Oceanography\\nUniversity of Washingt...str
6geospatial_lat_min18.516025675252838ndarray
7geospatial_lat_max18.524446699350996ndarray
8geospatial_lon_min-65.98221600599415ndarray
9geospatial_lon_max-65.97450004341222ndarray
10geospatial_vertical_min0.0ndarray
11geospatial_vertical_max511.71017477249814ndarray
12time_coverage_start20100906T111037str
13time_coverage_end20100906T142637str
14siteTest deployments of DeepGliders in the Puerto ...str
15projectRapid-Mocha San Juan 3 September 2010str
16contributor_nameCharlie Eriksenstr
17contributor_rolePIstr
18contributor_role_vocabularyhttp://vocab.nerc.ac.uk/search_nvs/W08str
19contributor_emailcharlie@ocean.washington.edustr
20contributing_institutionsUniversity of Washington - School of Oceanographystr
21contributing_institutions_vocabularyhttps://edmo.seadatanet.org/report/1434str
22contributing_institutions_rolePIstr
23contributing_institutions_role_vocabularyhttp://vocab.nerc.ac.uk/collection/W08/current/str
24uri569b1f80-1985-11e7-8a51-0026bb609360str
25rtqc_methodNo QC appliedstr
26rtqc_method_doin/astr
27commentProcessing start:\\nINFO: QC.py(418): Changed (...str
28start_date20100906T112156str
29date_created20170404T220433str
30featureTypetrajectoryProfilestr
31ConventionsCF-1.10,OG-1.0str
32date_modified20250921T144511str
33disclaimerData has not been reviewed and is provided AS-IS.str
34file_version2.71str
35keywordsWater Temperature, Conductivity, Salinity, Den...str
36keywords_vocabularyNASA/GCMD Earth Science Keywords Version 6.0.0.0str
37licenseThese data may be redistributed and used witho...str
38acknowledgmentNational Science Foundation OCE Division Grant...str
39contributer_emailnull@null.comstr
\n", "
" ], "text/plain": [ " Attribute \\\n", "0 title \n", "1 id \n", "2 platform \n", "3 platform_vocabulary \n", "4 naming_authority \n", "5 institution \n", "6 geospatial_lat_min \n", "7 geospatial_lat_max \n", "8 geospatial_lon_min \n", "9 geospatial_lon_max \n", "10 geospatial_vertical_min \n", "11 geospatial_vertical_max \n", "12 time_coverage_start \n", "13 time_coverage_end \n", "14 site \n", "15 project \n", "16 contributor_name \n", "17 contributor_role \n", "18 contributor_role_vocabulary \n", "19 contributor_email \n", "20 contributing_institutions \n", "21 contributing_institutions_vocabulary \n", "22 contributing_institutions_role \n", "23 contributing_institutions_role_vocabulary \n", "24 uri \n", "25 rtqc_method \n", "26 rtqc_method_doi \n", "27 comment \n", "28 start_date \n", "29 date_created \n", "30 featureType \n", "31 Conventions \n", "32 date_modified \n", "33 disclaimer \n", "34 file_version \n", "35 keywords \n", "36 keywords_vocabulary \n", "37 license \n", "38 acknowledgment \n", "39 contributer_email \n", "\n", " Value DType \n", "0 OceanGliders trajectory file str \n", "1 sg033_20100906T112156_delayed str \n", "2 sub-surface gliders str \n", "3 https://vocab.nerc.ac.uk/collection/L06/curren... str \n", "4 edu.washington.apl str \n", "5 School of Oceanography\\nUniversity of Washingt... str \n", "6 18.516025675252838 ndarray \n", "7 18.524446699350996 ndarray \n", "8 -65.98221600599415 ndarray \n", "9 -65.97450004341222 ndarray \n", "10 0.0 ndarray \n", "11 511.71017477249814 ndarray \n", "12 20100906T111037 str \n", "13 20100906T142637 str \n", "14 Test deployments of DeepGliders in the Puerto ... str \n", "15 Rapid-Mocha San Juan 3 September 2010 str \n", "16 Charlie Eriksen str \n", "17 PI str \n", "18 http://vocab.nerc.ac.uk/search_nvs/W08 str \n", "19 charlie@ocean.washington.edu str \n", "20 University of Washington - School of Oceanography str \n", "21 https://edmo.seadatanet.org/report/1434 str \n", "22 PI str \n", "23 http://vocab.nerc.ac.uk/collection/W08/current/ str \n", "24 569b1f80-1985-11e7-8a51-0026bb609360 str \n", "25 No QC applied str \n", "26 n/a str \n", "27 Processing start:\\nINFO: QC.py(418): Changed (... str \n", "28 20100906T112156 str \n", "29 20170404T220433 str \n", "30 trajectoryProfile str \n", "31 CF-1.10,OG-1.0 str \n", "32 20250921T144511 str \n", "33 Data has not been reviewed and is provided AS-IS. str \n", "34 2.71 str \n", "35 Water Temperature, Conductivity, Salinity, Den... str \n", "36 NASA/GCMD Earth Science Keywords Version 6.0.0.0 str \n", "37 These data may be redistributed and used witho... str \n", "38 National Science Foundation OCE Division Grant... str \n", "39 null@null.com str " ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Print to screen a table of attributes\n", "plotters.show_contents(ds_OG1,'attrs')" ] }, { "cell_type": "code", "execution_count": 10, "id": "a0c0c0ba", "metadata": { "execution": { "iopub.execute_input": "2025-09-21T14:45:11.359931Z", "iopub.status.busy": "2025-09-21T14:45:11.359785Z", "iopub.status.idle": "2025-09-21T14:45:11.409808Z", "shell.execute_reply": "2025-09-21T14:45:11.409343Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "information is based on xarray Dataset\n" ] }, { "data": { "text/html": [ "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
 dimsunitscommentstandard_namedtype
name     
CNDCN_MEASUREMENTSS/mConductivity corrected for anomaliessea_water_electrical_conductivityfloat32
CNDC_QCN_MEASUREMENTSWhether to trust each corrected conductivity valuestatus_flagfloat32
CNDC_RAWN_MEASUREMENTSS/mUncorrected conductivityfloat32
CNDC_RAW_QCN_MEASUREMENTSWhether to trust each raw conductivity valuestatus_flagfloat32
DAVG_CURR_EASTN_MEASUREMENTSm/sEastward component of the dive depth-average current based on hdmeastward_sea_water_velocityfloat32
DAVG_CURR_NORTHN_MEASUREMENTSm/sNorthward component of the dive depth-average current based on hdmnorthward_sea_water_velocityfloat32
DEPTHN_MEASUREMENTSmfrom science pressure and interpolateddepthfloat64
DEPTH_ZN_MEASUREMENTSmetersDepth calculated from pressure using gsw library, positive up.depthfloat64
DOXYN_MEASUREMENTSmicromoles/kgDissolved oxygen concentration, calculated from optode tcphase corrected for salininty and depthmole_concentration_of_dissolved_molecular_oxygen_in_sea_waterfloat32
DOXY_QCN_MEASUREMENTSWhether to trust each optode dissolved oxygen valuestatus_flagfloat32
EAST_DISPLACEMENTN_MEASUREMENTSmetersEastward displacement from hdmfloat32
GLIDER_HORZ_VELO_MODELN_MEASUREMENTScm/sVehicle horizontal speed based on hdmfloat32
GLIDER_VERT_VELO_MODELN_MEASUREMENTScm/sVehicle vertical speed based on hdmfloat32
GLIDE_ANGLEN_MEASUREMENTScm/sGlide angle based on hdmfloat32
GLIDE_SPEEDN_MEASUREMENTScm/sVehicle speed based on hdmfloat32
GLIDE_SPEED_QCN_MEASUREMENTSWhether to trust each hdm speed valuestatus_flagfloat32
HEADINGN_MEASUREMENTSdegreesVehicle heading (magnetic)float32
LATITUDEN_MEASUREMENTSdegrees_northLatitude of the sample based on hdm DAClatitudefloat64
LATITUDE_GPSN_MEASUREMENTSdegrees_northlatitudefloat64
LONGITUDEN_MEASUREMENTSdegrees_eastLongitude of the sample based on hdm DAClongitudefloat64
LONGITUDE_GPSN_MEASUREMENTSdegrees_eastlongitudefloat64
NORTH_DISPLACEMENTN_MEASUREMENTSmetersNorthward displacement from hdmfloat32
OXYSATN_MEASUREMENTSmicromoles/kgCalculated saturation value for oxygen given measured presure and corrected temperature, and salinityfloat32
PHASEN_MEASUREMENTSfloat64
PHASE_QCN_MEASUREMENTSint64
PITCHN_MEASUREMENTSdegreesVehicle pitchfloat32
PITCH_CTLN_MEASUREMENTSfloat32
PRESN_MEASUREMENTSdbarUncorrected sea-water pressure at pressure sensorfloat32
PROFILE_NUMBERN_MEASUREMENTSfloat64
PSALN_MEASUREMENTS1e-3Salinity corrected for thermal-inertia effects (PSU)sea_water_salinityfloat32
PSAL_QCN_MEASUREMENTSWhether to trust each corrected salinity valuestatus_flagfloat32
PSAL_RAWN_MEASUREMENTS1e-3Uncorrected salinity derived from temperature_raw and conductivity_raw (PSU)float32
PSAL_RAW_QCN_MEASUREMENTSWhether to trust each raw salinity valuestatus_flagfloat32
ROLLN_MEASUREMENTSdegreesVehicle rollfloat32
ROLL_CTLN_MEASUREMENTSfloat32
SIGMA_TN_MEASUREMENTSg/m^3Sigma based on densitysea_water_sigma_tfloat32
SIGTHETAN_MEASUREMENTSg/m^3sea_water_sigma_thetafloat32
TEMPN_MEASUREMENTSdegrees_CelsiusTermperature (in situ) corrected for thermistor first-order lagsea_water_temperaturefloat32
TEMP_QCN_MEASUREMENTSWhether to trust each corrected temperature valuestatus_flagfloat32
TEMP_RAWN_MEASUREMENTSdegrees_CelsiusUncorrected temperature (in situ)float32
TEMP_RAW_QCN_MEASUREMENTSWhether to trust each raw temperature valuestatus_flagfloat32
THETAN_MEASUREMENTSdegrees_CelsiusPotential temperature based on corrected salinitysea_water_potential_temperaturefloat32
TIMEN_MEASUREMENTSseconds since 1970-01-01T00:00:00ZTime of CTD sample in GMT epoch formattimedatetime64[ns]
TIME_DOXYN_MEASUREMENTStime for Aanderaa 4330 in GMT epoch formattimedatetime64[ns]
VBD_CCN_MEASUREMENTSfloat32
aanderaa4330_instrument_dissolved_oxygenN_MEASUREMENTSmicromoles/kgDissolved oxygen concentration reported from optode corrected for salinityfloat32
absolute_salinityN_MEASUREMENTSg/kgAbsolute salinity per TEOS-10float32
buoyancyN_MEASUREMENTSgBuoyancy of vehicle, corrected for compression effectsfloat32
conservative_temperatureN_MEASUREMENTSdegrees_CelsiusConservative termperature per TEOS-10float32
ctd_pressureN_MEASUREMENTSdbarPressure at CTD thermistorsea_water_pressurefloat32
density_insituN_MEASUREMENTSg/m^3Sea water in-situ density based on pressurefloat32
divenumN_MEASUREMENTSint32
eng_GC_phaseN_MEASUREMENTSfloat32
eng_aa4330_AirSatN_MEASUREMENTSAs reported by the instrumentfloat32
eng_aa4330_CalPhaseN_MEASUREMENTSAs reported by the instrumentfloat32
eng_aa4330_O2N_MEASUREMENTSmicromoles/LDissolved oxygen as reported by the instument, based on on-board calibration data, assuming optode temperature but without depth or salinity correctionfloat32
eng_aa4330_TCPhaseN_MEASUREMENTSAs reported by the instrumentfloat32
eng_aa4330_TempN_MEASUREMENTSdegrees_CelsiusAs reported by the instrumentfloat32
eng_recN_MEASUREMENTSfloat32
PLATFORM_MODELstring\n", "
PLATFORM_SERIAL_NUMBERstring\n", "
TRAJECTORYstring\n", "
WMO_IDENTIFIERstring\n", "
\n" ], "text/plain": [ "" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Print to screen a table of the variables and variable attributes\n", "plotters.show_contents(ds_OG1,'variables')" ] }, { "cell_type": "markdown", "id": "dc0a27f3", "metadata": {}, "source": [ "### Convert mission from a local directory of basestation files\n", "\n", "- For local data in the directory `input_dir`\n", "- Creates a plot of ctd_depth against ctd_time.\n" ] }, { "cell_type": "code", "execution_count": 11, "id": "9d202485", "metadata": { "execution": { "iopub.execute_input": "2025-09-21T14:45:11.411528Z", "iopub.status.busy": "2025-09-21T14:45:11.411260Z", "iopub.status.idle": "2025-09-21T14:45:14.248365Z", "shell.execute_reply": "2025-09-21T14:45:14.247896Z" } }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "\r", "Loading datasets: 0%| | 0/5 [00:00" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "information is based on xarray Dataset\n" ] }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
AttributeValueDType
0titleOceanGliders trajectory filestr
1idsg005_20080606T180738_delayedstr
2platformsub-surface glidersstr
3platform_vocabularyhttps://vocab.nerc.ac.uk/collection/L06/curren...str
4naming_authorityedu.washington.aplstr
5institutionSchool of Oceanography\\nUniversity of Washingt...str
6geospatial_lat_min61.41231666666666ndarray
7geospatial_lat_max61.57591666666667ndarray
8geospatial_lon_min-8.747133333333332ndarray
9geospatial_lon_max-8.273983333333332ndarray
10geospatial_vertical_min-0.3214989667970032ndarray
11geospatial_vertical_max845.8311973927603ndarray
12time_coverage_start20080606T180256str
13time_coverage_end20080607T080838str
14siteMultiple transects of Faroe-Iceland Ridge uppe...str
15projectIceland Scotland Ridge June 2008str
16contributor_nameCharlie Eriksen, Peter Rhinesstr
17contributor_rolePI, Principal investigatorstr
18contributor_role_vocabularyhttp://vocab.nerc.ac.uk/search_nvs/W08,str
19contributor_emaileriksen@uw.edu,str
20contributing_institutionsUniversity of Washington - School of Oceanogra...str
21contributing_institutions_vocabularyhttps://edmo.seadatanet.org/report/1434,str
22contributing_institutions_rolePI,str
23contributing_institutions_role_vocabularyhttp://vocab.nerc.ac.uk/collection/W08/current/,str
24uri9e33a22e-a959-11e3-b35f-0026bb609360str
25rtqc_methodNo QC appliedstr
26rtqc_method_doin/astr
27commentProcessing start:\\n20:13:32 11 Mar 2014 UTC: I...str
28start_date20080606T180738str
29date_created20140311T200332str
30featureTypetrajectoryProfilestr
31ConventionsCF-1.10,OG-1.0str
32date_modified20250921T144514str
33disclaimerData provided AS-IS.str
34file_version2.71float32
35keywordsWater Temperature, Conductivity, Salinity, Den...str
36keywords_vocabularyNASA/GCMD Earth Science Keywords Version 6.0.0.0str
37licenseThese data may be redistributed and used witho...str
38acknowledgmentNational Science Foundation, OCE Division, Gra...str
39contributer_emailnull@null.comstr
\n", "
" ], "text/plain": [ " Attribute \\\n", "0 title \n", "1 id \n", "2 platform \n", "3 platform_vocabulary \n", "4 naming_authority \n", "5 institution \n", "6 geospatial_lat_min \n", "7 geospatial_lat_max \n", "8 geospatial_lon_min \n", "9 geospatial_lon_max \n", "10 geospatial_vertical_min \n", "11 geospatial_vertical_max \n", "12 time_coverage_start \n", "13 time_coverage_end \n", "14 site \n", "15 project \n", "16 contributor_name \n", "17 contributor_role \n", "18 contributor_role_vocabulary \n", "19 contributor_email \n", "20 contributing_institutions \n", "21 contributing_institutions_vocabulary \n", "22 contributing_institutions_role \n", "23 contributing_institutions_role_vocabulary \n", "24 uri \n", "25 rtqc_method \n", "26 rtqc_method_doi \n", "27 comment \n", "28 start_date \n", "29 date_created \n", "30 featureType \n", "31 Conventions \n", "32 date_modified \n", "33 disclaimer \n", "34 file_version \n", "35 keywords \n", "36 keywords_vocabulary \n", "37 license \n", "38 acknowledgment \n", "39 contributer_email \n", "\n", " Value DType \n", "0 OceanGliders trajectory file str \n", "1 sg005_20080606T180738_delayed str \n", "2 sub-surface gliders str \n", "3 https://vocab.nerc.ac.uk/collection/L06/curren... str \n", "4 edu.washington.apl str \n", "5 School of Oceanography\\nUniversity of Washingt... str \n", "6 61.41231666666666 ndarray \n", "7 61.57591666666667 ndarray \n", "8 -8.747133333333332 ndarray \n", "9 -8.273983333333332 ndarray \n", "10 -0.3214989667970032 ndarray \n", "11 845.8311973927603 ndarray \n", "12 20080606T180256 str \n", "13 20080607T080838 str \n", "14 Multiple transects of Faroe-Iceland Ridge uppe... str \n", "15 Iceland Scotland Ridge June 2008 str \n", "16 Charlie Eriksen, Peter Rhines str \n", "17 PI, Principal investigator str \n", "18 http://vocab.nerc.ac.uk/search_nvs/W08, str \n", "19 eriksen@uw.edu, str \n", "20 University of Washington - School of Oceanogra... str \n", "21 https://edmo.seadatanet.org/report/1434, str \n", "22 PI, str \n", "23 http://vocab.nerc.ac.uk/collection/W08/current/, str \n", "24 9e33a22e-a959-11e3-b35f-0026bb609360 str \n", "25 No QC applied str \n", "26 n/a str \n", "27 Processing start:\\n20:13:32 11 Mar 2014 UTC: I... str \n", "28 20080606T180738 str \n", "29 20140311T200332 str \n", "30 trajectoryProfile str \n", "31 CF-1.10,OG-1.0 str \n", "32 20250921T144514 str \n", "33 Data provided AS-IS. str \n", "34 2.71 float32 \n", "35 Water Temperature, Conductivity, Salinity, Den... str \n", "36 NASA/GCMD Earth Science Keywords Version 6.0.0.0 str \n", "37 These data may be redistributed and used witho... str \n", "38 National Science Foundation, OCE Division, Gra... str \n", "39 null@null.com str " ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Specify the input directory on your local machine\n", "input_dir = data_path + '/demo_sg005' ### chose the input directory with your data\n", "\n", "# Load and concatenate all datasets in the input directory\n", "# Optionally, specify the range of profiles to load (start_profile, end_profile)\n", "list_datasets = readers.load_basestation_files(input_dir, start_profile=1, end_profile=5)\n", "\n", "# Convert the list of datasets to OG1\n", "ds_OG1, var_list = convertOG1.convert_to_OG1(list_datasets)\n", "\n", "# Generate a simple plot\n", "plotters.plot_profile_depth(ds_OG1)\n", "plotters.show_contents(ds_OG1,'attrs')" ] }, { "cell_type": "markdown", "id": "fa3f9e81", "metadata": {}, "source": [ "### Convert mission from the NCEI server (with p*nc files)\n", "\n", "- Data from the sg015 mission in the Labrador Sea (https://www.ncei.noaa.gov/access/metadata/landing-page/bin/iso?id=gov.noaa.nodc:0111844), dataset identifier gov.noaa.nodc:0111844.\n" ] }, { "cell_type": "code", "execution_count": 12, "id": "4ac290a2", "metadata": { "execution": { "iopub.execute_input": "2025-09-21T14:45:14.249952Z", "iopub.status.busy": "2025-09-21T14:45:14.249787Z", "iopub.status.idle": "2025-09-21T14:45:28.958719Z", "shell.execute_reply": "2025-09-21T14:45:28.958162Z" } }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "\r", "Loading datasets: 0%| | 0/19 [00:00" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# Load the data saved\n", "ds1 = xr.open_dataset(output_file)\n", "\n", "# Generate a simple plot\n", "#plotters.show_contents(ds_all,'attrs')\n", "plotters.plot_depth_colored(ds1, color_by='PROFILE_NUMBER')\n" ] }, { "cell_type": "markdown", "id": "7eaed738", "metadata": {}, "source": [ "## Run multiple missions" ] }, { "cell_type": "code", "execution_count": 15, "id": "12f47f0f", "metadata": { "execution": { "iopub.execute_input": "2025-09-21T14:45:29.360600Z", "iopub.status.busy": "2025-09-21T14:45:29.360443Z", "iopub.status.idle": "2025-09-21T14:45:29.363007Z", "shell.execute_reply": "2025-09-21T14:45:29.362613Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "{'contributor_name': 'Eleanor Frajka-Williams', 'contributor_email': 'eleanorfrajka@gmail.com', 'contributor_role': 'Data scientist', 'contributor_role_vocabulary': 'http://vocab.nerc.ac.uk/search_nvs/W08', 'contributing_institutions': 'University of Hamburg - Institute of Oceanography', 'contributing_institutions_vocabulary': 'https://edmo.seadatanet.org/report/1156', 'contributing_institutions_role': 'Data scientist', 'contributing_institutions_role_vocabulary': 'http://vocab.nerc.ac.uk/search_nvs/W08'}\n" ] } ], "source": [ "# Add these to existing attributes - update to your details\n", "contrib_to_append = vocabularies.contrib_to_append\n", "print(contrib_to_append)" ] }, { "cell_type": "code", "execution_count": 16, "id": "f6127a51", "metadata": { "execution": { "iopub.execute_input": "2025-09-21T14:45:29.364457Z", "iopub.status.busy": "2025-09-21T14:45:29.364309Z", "iopub.status.idle": "2025-09-21T14:45:30.280814Z", "shell.execute_reply": "2025-09-21T14:45:30.280345Z" } }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "\r", "Loading datasets: 0%| | 0/1 [00:00