Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/glide/assets/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,20 @@ CT:
valid_max: 50.0
observation_type: calculated


sound_speed:
track_qc: True
dtype: f4
CF:
long_name: Sound speed
standard_name: speed_of_sound_in_sea_water
units: m s-1
instrument: instrument_ctd
valid_min: 1400.0
valid_max: 1600.0
observation_type: calculated


N2:
track_qc: True
dtype: f4
Expand Down
3 changes: 3 additions & 0 deletions src/glide/process_l1.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@ def calculate_thermodynamics(ds: xr.Dataset, config: dict) -> xr.Dataset:
CT = gsw.CT_from_t(ds.SA, ds.temperature, ds.pressure)
ds["CT"] = (dims, CT.values, variable_specs["CT"]["CF"])

sound_speed = gsw.sound_speed(ds.SA, ds.CT, ds.pressure)
ds["sound_speed"] = (dims, sound_speed.values, variable_specs["sound_speed"]["CF"])

new_variables = ["salinity", "SA", "density", "rho0", "CT"]
ds = qc.init_qc(ds, new_variables, ds.conductivity_qc.values, config)
ds = qc.apply_bounds(ds, new_variables)
Expand Down
Loading