-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
17d1e1a
commit b9c95b0
Showing
3 changed files
with
25 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
''' | ||
These functions are provided only to make fake data to test the workflow of the framework they are not validated and have no | ||
scientific validations to support the accuracy of the algorithms. | ||
''' | ||
|
||
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) | ||
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) | ||
return sal_value | ||
|