Skip to content

Commit

Permalink
Removes PSS78 constant
Browse files Browse the repository at this point in the history
See PSS78 algorithm for details.
  • Loading branch information
lukecampbell committed Mar 14, 2013
1 parent b9c95b0 commit 364d35b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ion_functions/workflow_tests/fake_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,18 @@

def data_l2_density(conductivity, temp,pressure, lat, lon):
'''
Based on calculations done here: https://github.com/ooici/coi-services/blob/master/ion/processes/data/transforms/ctd/ctd_L2_density.py#L55
'''
from pygsw import vectors as gsw
sp = gsw.sp_from_c(conductivity/42.914, temp, pressure)
#
sp = gsw.sp_from_c(conductivity, temp, pressure)
sa = gsw.sa_from_sp(sp, pressure, lon, lat)
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)
sal_value = gsw.sp_from_c(conductivity, temp, pressure)
return sal_value

0 comments on commit 364d35b

Please sign in to comment.