metadata:
  # https://github.com/ioos/ioosngdac/wiki/NGDAC-NetCDF-File-Format-Version-2
  acknowledgement: Funding from Fisheries and Oceans Canada, Canadian Foundation
                   for Innovation, BC Knowledge Development Fund
  citation: "Klymak, J., & Ross, T. (2025). C-PROOF Underwater Glider Deployment Datasets [Data set]. Canadian-Pacific Robotic Ocean Observing Facility. doi:10.82534/44DS-K310"
  comment:        "Tofino to Calvert transect. Instrument bay is from Kitt. Note no optics."
  contributor_name: James Pegg, Tetjana Ross, Jody Klymak, Nicholas Harper
  contributor_role: Lead Technician, PI, PI
  contributor_email: cproof@uvic.ca
  creator_email: jklymak@uvic.ca
  creator_name:  Jody Klymak
  creator_url:   https://cproof.uvic.ca
  # R: real time. P: provisional
  data_mode:   'R'
  # date_created etc: added automatically
  # numbers must be enclosed by strings so YAML keeps as strings
  deployment_id: '3'
  deployment_name: 'dfo-maria997-20260622'
  deployment_start: '2026-06-22'
  deployment_end: '2026-09-20'
  format_version: IOOS_Glider_NetCDF_v2.0.nc
  # id filled automatically...
  glider_name: dfo-maria
  glider_serial: '997'
  glider_model: Slocum G3 Deep
  glider_instrument_name: slocum
  glider_wmo: "8900993"
  institution: C-PROOF
  line_id: Calvert
  line_id_vocabulary: https://cproof.uvic.ca/observatory/cproof_line_vocab.yml
  keywords: "AUVS, Autonomous Underwater Vehicles, Oceans, Ocean Pressure,
             Water Pressure, Oceans, Ocean Temperature, Water Temperature,
             Oceans, Salinity/Density, Conductivity, Oceans,
             Salinity/Density, Density, Oceans, Salinity/Density, Salinity"
  keywords_vocabulary: GCMD Science Keywords
  license: CC-BY-4.0
  metadata_link: https://cproof.uvic.ca
  Metadata_Conventions: CF-1.8, Unidata Dataset Discovery v1.0, IOOS 1.2
  naming_authority: "ca.uvic.cproof"
  network: OceanGliders > BOON > Northeast Pacific Ocean > C-PROOF, IOOS
  platform_type:    "Slocum Glider"
  processing_level: "Data provided as is with no expressed or implied
                     assurance of quality assurance or quality control."
  project: Calvert Island Line
  infoURl: https://cproof.uvic.ca
  project_url: https://cproof.uvic.ca
  publisher_email: jklymak@uvic.ca
  publisher_name:  Jody Klymak
  publisher_url:   https://cproof.uvic.ca
  references: https://doi.org/10.82534/44DS-K310
  # https://www.nodc.noaa.gov/General/NODC-Archive/seanamelist.txt
  sea_name: Northeast Pacific Ocean (limit-180)
  source:     Observational data from a profiling glider.
  standard_name_vocabulary: CF Standard Name Table v72
  summary: Glider deployed near Tofino BC as part of the C-PROOF glider program. Glider is enroute to Calvert Island with an along island track.
  transmission_system: IRIDIUM
  wmo_id: "8900993"
  deployment_vessel: "CCGS Cape Ann"
  deployment_station: "Offshore Tofino (50m isobath)"
  deployment_latitude: "48.97"
  deployment_longitude: "-125.96"

glider_devices:
  pressure:
    make: Micron
    model: Pressure
    serial: '137849'
  ctd:
    make: RBR
    model: RBRlegato3 CTD
    serial: '212378'
    long_name: RBRlegato3 CTD
    make_model: RBR RBRlegato3 CTD
    calibration_date: "20221214"
    Thermal_lag_constants_[alpha,tau] : [None,None]
    dTdC : 1
    comment: 'There is a 1s lag between temperature and conductivity. Thermal lag constants have yet to be found for RBRlegato3 CTDs. A detailed report of how the constants are defined can be found on https://cproof.uvic.ca. '
  oxygen:
    make: Rinko
    serial: '0070'
    model: ARO-CAR-Z10
    calibration_date: "20220208"
    calibration_constants[A,B,C,D,E,F,G,H] : [-3.973117e+01,2.021143e+06,-6.909537e+03,+1.048100e-02,+4.200000e-03,+7.240000e-05,0,+1.000000e+00]
    Comment: 'Calibration constants from manufacturer'

# map between glider variables and netcdf variables.  This shouldn't
# change too much.
netcdf_variables:
  # Time and Place:
  time:
    source:   sci_m_present_time
    long_name:     Time
    standard_name: time
    calendar:      gregorian
    units:         seconds since 1970-01-01T00:00:00Z
    axis:          T
    observation_type: "measured"
    coordinates:   time depth latitude longitude

  latitude:
    source:  m_gps_lat
    long_name:    latitude
    standard_name: latitude
    units:        degrees_north
    axis:         Y
    comment:     "values linearly interpolated between GPS fixes"
    observation_type: measured
    platform:     platform
    reference:    WGS84
    valid_max:    90.0
    valid_min:    -90.0
    coordinate_reference_frame:  urn:ogc:crs:EPSG::4326

  longitude:
    source:  m_gps_lon
    long_name:    longitude
    standard_name: longitude
    units:        degrees_east
    axis:         X
    comment:     "values linearly interpolated between GPS fixes"
    observation_type: measured
    platform:     platform
    reference:    WGS84
    valid_max:    180.0
    valid_min:    -180.0
    coordinate_reference_frame:  urn:ogc:crs:EPSG::4326

  heading:
    source:  m_heading
    long_name:    glider heading angle
    standard_name: platform_orientation
    units:        rad

  pitch:
    source:  m_pitch
    long_name:    glider pitch angle
    standard_name: platform_pitch_angle
    units:        rad

  roll:
    source:  m_roll
    long_name:    glider roll angle
    standard_name: platform_roll_angle
    units:        rad

  # profile info:
  waypoint_latitude:
    source:  c_wpt_lat
    long_name:    waypoint latitude
    standard_name: latitude
    units:        degree_north

  waypoint_longitude:
    source:  c_wpt_lon
    long_name:    waypoint longitude
    standard_name: longitude
    units:        degree_east

  # data parameters
  conductivity:
    source:  sci_water_cond
    long_name:    water conductivity
    standard_name: sea_water_electrical_conductivity
    units:        S m-1
    instrument:    instrument_ctd
    valid_min:    0.
    valid_max:    10.
    observation_type: "measured"
    accuracy:      "0.0003"
    precision:     "0.0001"
    resolution:     "0.0001"

  temperature:
    source:  sci_water_temp
    long_name:    water temperature
    standard_name: sea_water_temperature
    units:        Celsius
    instrument:   instrument_ctd
    valid_min:    -5.0
    valid_max:    50.0
    observation_type: "measured"
    accuracy:      "0.002"
    precision:     "0.00005"
    resolution:    "0.00005"

  pressure:
    source:  sci_water_pressure
    long_name:    water pressure
    standard_name:  sea_water_pressure
    units:        dbar
    conversion:   bar2dbar
    valid_min:    0.0
    valid_max:    2000.0
    positive:      "down"
    reference_datum:  "sea-surface"
    instrument:     "instrument_ctd"
    observation_type: "measured"
    accuracy:         "0.5"
    precision:        "0.01"
    resolution:       "0.01"
    comment:          "ctd pressure sensor"

# optics:
  chlorophyll:
    source:  sci_flbbcd_chlor_units
    long_name:    chlorophyll
    standard_name: concentration_of_chlorophyll_in_sea_water
    units:        mg m-3

  cdom:
    source:  sci_flbbcd_cdom_units
    long_name:    CDOM
    units:        ppb

  backscatter_700:
    source:  sci_flbbcd_bb_units
    long_name:    700 nm wavelength backscatter
    units:        "m-1 sr-1"
    description:  "units are per meter per sterradian"

# Oxygen
  oxygen_saturation:
    source:  sci_rinkoii_do
    long_name:    oxygen saturation
    standard_name: saturation_of_dissolved_molecular_oxygen_in_sea_water
    units:       percent

#  temperature_oxygen:
#    source:  sci_oxy4_temp
#    long_name:    oxygen sensor temperature
#    standard_name: temperature_of_sensor_for_oxygen_in_sea_water
#    units:        Celsius
#    coordinates:   time depth latitude longitude

# derived water speed:
#  u:
#    source: m_water_vx
#    comment:  The depth-averaged current is an estimate of the net current measured while the glider is underwater. The value is calculated over the entire underwater segment, which may consist of 1 or more dives.
#    long_name:     Depth-Averaged Eastward Sea Water Velocity
#    standard_name: eastward_sea_water_velocity
#    units:         m s-1
#    observation_type:  calculated
#    platform:          platform
#    valid_max:         "10.0"
#    valid_min:         "-10.0"
#    coordinates:   time latitude longitude

#  v:
#    source: m_water_vy
#    comment:  The depth-averaged current is an estimate of the net current measured while the glider is underwater. The value is calculated over the entire underwater segment, which may consist of 1 or more dives.
#    long_name:         Depth-Averaged Northward Sea Water Velocity
#    standard_name: northward_sea_water_velocity
#    units:         m s-1
#    observation_type:  calculated
#    platform:          platform
#    valid_max:         "10.0"
#    valid_min:         "-10.0"
#    coordinates:   time latitude longitude

profile_variables:
  # variables for extract_L1timeseries_profiles processing step...

  u:
    source: m_water_vx
    comment: The depth-averaged current is an estimate of the net current measured
      while the glider is underwater. The value is calculated over the entire underwater
      segment, which may consist of 1 or more dives.
    long_name: Depth-Averaged Eastward Sea Water Velocity
    standard_name: eastward_sea_water_velocity
    units: m s-1
    observation_type: calculated
    platform: platform
    valid_max: 10.0
    valid_min: -10.0

  v:
    source: m_water_vy
    comment: The depth-averaged current is an estimate of the net current measured
      while the glider is underwater. The value is calculated over the entire underwater
      segment, which may consist of 1 or more dives.
    long_name: Depth-Averaged Northward Sea Water Velocity
    standard_name: northward_sea_water_velocity
    units: m s-1
    observation_type: calculated
    platform: platform
    valid_max: 10.0
    valid_min: -10.0

  profile_id:
    comment: Sequential profile number within the trajectory.  This value is unique in each file that is part of a single trajectory/deployment.
    long_name: 'Profile ID'
    valid_max: 2147483647
    valid_min: 1
    _FillValue: -1

  profile_time:
    comment:           Timestamp corresponding to the mid-point of the profile
    long_name:         Profile Center Time
    observation_type:  calculated
    platform:          platform
    standard_name:     time
#    units:             seconds since 1970-01-01T00:00:00Z
    _FillValue:        -999

  profile_time_start:
    comment:           Timestamp corresponding to the start of the profile
    long_name:         Profile Start Time
    observation_type:  calculated
    platform:          platform
    standard_name:     time
    units:             seconds since 1970-01-01T00:00:00Z

  profile_time_end:
    comment:           Timestamp corresponding to the start of the profile
    long_name:         Profile Start Time
    observation_type:  calculated
    platform:          platform
    standard_name:     time
    units:             seconds since 1970-01-01T00:00:00Z

  profile_lat:
    comment:           Value is interpolated to provide an estimate of the latitude at the mid-point of the profile
    long_name:         Profile Center Latitude
    observation_type:  calculated
    platform:          platform
    standard_name:     latitude
    units:             degrees_north
    valid_max:         90.0
    valid_min:         -90.0

  profile_lon:
    comment:           Value is interpolated to provide an estimate of the latitude at the mid-point of the profile
    long_name:         Profile Center Longitude
    observation_type:  calculated
    platform:          platform
    standard_name:     longitude
    units:             degrees_east
    valid_max:         180.0
    valid_min:         -180.0

  lon_uv:
    comment:           Not computed
    long_name:         Longitude
    observation_type:  calculated
    platform:          platform
    standard_name:     longitude
    units:             degrees_east
    valid_max:         180.0
    valid_min:         -180.0

  lat_uv:
    comment:           Not computed
    long_name:         Latitude
    observation_type:  calculated
    platform:          platform
    standard_name:     latitude
    units:             degrees_north
    valid_max:         90.0
    valid_min:         -90.0

  time_uv:
    comment:       Not computed
    long_name:     Time
    standard_name: time
    calendar:      gregorian
    units:         seconds since 1970-01-01T00:00:00Z
    observation_type: calculated

  instrument_ctd:
    comment:    unpumped CTD
    calibration_date:     "2022-01-28"
    calibration_report:   " "
    comment:             unpumped CTD
    factory_calibrated:  "yes"
    long_name:           RBRlegato3 CTD
    make_model:          RBR RBRlegato3 CTD
    platform:            platform
    serial_number:       "208549"
    type:                platform
