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
  comment: "Calvert Island deployment"
  contributor_name: James Pegg, Tetjana Ross, Jody Klymak, Hayley Dosser, Seth Fleming-Alho
  contributor_role: Lead Technician, Principal Investigator, Co-PI, Ocean Glider Scientist,
    Aquatic Technician
  creator_email: jklymak@uvic.ca
  creator_name: Jody Klymak
  creator_url: http://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: '11'
  deployment_name: 'dfo-marvin1003-20240416'
  deployment_start: '2024-05-16'
  deployment_end: '2024-06-16'
  format_version: IOOS_Glider_NetCDF_v2.0.nc
  # id filled automatically...
  glider_name: dfo-marvin
  glider_serial: '1003'
  glider_model: Slocum G3 Deep
  glider_instrument_name: slocum
  glider_wmo: "8900997"
  institution: C-PROOF
  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: "This data may be redistributed and used without restriction or warranty"
  metadata_link: "https://cproof.uvic.ca"
  Metadata_Conventions: CF-1.6, Unidata Dataset Discovery v1.0
  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 Line
  project_url: https://hakai.org/location/calvert/
  publisher_email: jklymak@uvic.ca
  publisher_name: Jody Klymak
  publisher_url: http://cproof.uvic.ca
  references: cproof toolbox URL
  # https://www.nodc.noaa.gov/General/NODC-Archive/seanamelist.txt
  sea_name: Coastal Waters of Southeast Alaska and British Columbia
  source: Observational data from a profiling glider.
  standard_name_vocabulary: CF Standard Name Table v49
  summary: Glider deployed near Calvert Island BC and will travel along the repeat
    Calvert sampling line before returning to Calvert Island.
  transmission_system: IRIDIUM
  wmo_id: "8900997"
  deployment_vessel: "Good Hope III"
  deployment_station: "FZH08"
  deployment_latitude: "51.45"
  deployment_longitude: "-127.57"


glider_devices:
  pressure:
    make: Micron
    model: Pressure
    serial: '131919'
  ctd:
    make: RBR
    model: RBRlegato3 CTD
    serial: '208551'
    long_name: RBRlegato3 CTD
    make_model: RBR RBRlegato3 CTD
    calibration_date: "03-Feb-2022"
    calibration_report: " "
    comment: " "
  optics:
    make: Wetlabs
    model: FLBBCDSLC
    serial: '7033'
    calibration_date: " "
    calibration_report: " "
  oxygen:
    make: AADI
    model: Optode4831
    serial: '1186'
    calibration_date: '20240107'
    calibration_constants[c0,c1,c2,c3,c4,c5,c6] : [2.62215E-03,1.11155E-04,2.32215E-06,2.01229E02,-2.36789E-01,-4.42539E01,4.09616E00]
    Comment: 'Calibration constants from manufacturer' 
    internal_salinity: '35 PSU'

# 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_lat
    long_name: latitude
    standard_name: latitude
    units: degrees_north
    axis: Y
    coordinates: time depth latitude longitude
    comment: "Estimated between surface 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_lon
    long_name: longitude
    standard_name: longitude
    units: degrees_east
    axis: X
    coordinates: time depth latitude longitude
    comment: "Estimated between surface 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
    coordinates: time depth latitude longitude

  pitch:
    source: m_pitch
    long_name: glider pitch angle
    standard_name: platform_pitch_angle
    units: rad
    coordinates: time depth latitude longitude

  roll:
    source: m_roll
    long_name: glider roll angle
    standard_name: platform_roll_angle
    units: rad
    coordinates: time depth latitude longitude

  # profile info:
  waypoint_latitude:
    source: c_wpt_lat
    long_name: waypoint latitude
    standard_name: latitude
    units: degree_north
    coordinates: time depth latitude longitude

  waypoint_longitude:
    source: c_wpt_lon
    long_name: waypoint longitude
    standard_name: longitude
    units: degree_east
    coordinates: time depth latitude longitude

  # data parameters
  conductivity:
    source: sci_water_cond
    long_name: water conductivity
    standard_name: sea_water_electrical_conductivity
    units: S m-1
    coordinates: time depth latitude longitude
    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
    coordinates: time depth latitude longitude
    instrument: instrument_ctd
    valid_min: "-5"
    valid_max: "50"
    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
    coordinates: time depth latitude longitude
    conversion: bar2dbar
    valid_min: "0"
    valid_max: "2000"
    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
    coordinates: time depth latitude longitude

  cdom:
    source: sci_flbbcd_cdom_units
    long_name: CDOM
    units: ppb
    coordinates: time depth latitude longitude

  backscatter_700:
    source: sci_flbbcd_bb_units
    long_name: 700 nm wavelength backscatter
    units: "1"
    coordinates: time depth latitude longitude

# Oxygen  
  oxygen_concentration:
    source: sci_oxy4_oxygen
    long_name: oxygen concentration
    standard_name: mole_concentration_of_dissolved_molecular_oxygen_in_sea_water
    units: umol l-1
    coordinates: time depth latitude longitude

#  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

profile_variables:
# variables for extract_timeseries_profiles processing step...

# 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_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'

  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-02-03"
    calibration_report: " "
    factory_calibrated: "yes"
    long_name: RBRlegato3 CTD
    make_model: RBR RBRlegato3 CTD
    platform: platform
    serial_number: "208551"
    type: platform