Skip to content

Commit

Permalink
Adds L2_salinity
Browse files Browse the repository at this point in the history
  • Loading branch information
lukecampbell committed Mar 12, 2013
1 parent 79e02b3 commit 17d1e1a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ion_functions/data/data_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,10 @@ def data_l2_density(conductivity, temp,pressure, lat, lon):
rho = gsw.rho(sa, temp, pressure)
return rho

def data_l2_salinity(conductivity, temp, pressure):
'''
Based on calculations done here: https://github.com/ooici/coi-services/blob/master/ion/processes/data/transforms/ctd/ctd_L2_salinity.py#L58
'''
import pygsw.vectors as gsw
sal_value = gsw.sp_from_c(conductivity/42.914, temp, pressure)
return sal_value

0 comments on commit 17d1e1a

Please sign in to comment.