1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
This python module is incomplete and should be used with caution.
=================================================================
python gsw
==========
| |Build|
| |Build|
| |Downloads|
Python implementation of the Thermodynamic Equation Of Seawater - 2010 (TEOS-10)[http://www.teos-10.org/\ ]
-----------------------------------------------------------------------------------------------------------
gsw vs. csiro
-------------
This table shows some function names in the gibbs library and the
corresponding function names in the csiro library.
+-----------------------------------------------------------+----------------------------------------------------+--------------------------------------------------------------+
| **Variable** | **SeaWater (EOS 80)** | **Gibbs SeaWater (GSW TEOS 10)** |
+===========================================================+====================================================+==============================================================+
| Absolute Salinity | NA | gsw.SA\_from\_SP(SP,p,long,lat) |
+-----------------------------------------------------------+----------------------------------------------------+--------------------------------------------------------------+
| Conservative Temperature | NA | gsw.CT\_from\_t(SA,t,p) |
+-----------------------------------------------------------+----------------------------------------------------+--------------------------------------------------------------+
| density (i.e. in situ density) | sw.dens(SP,t,p) | gsw.rho\_CT(SA,CT,p), or gsw.rho(SA,t,p) |
+-----------------------------------------------------------+----------------------------------------------------+--------------------------------------------------------------+
| potential density | sw.pden(SP,t,p,pr) | gsw.rho\_CT(SA,CT,pr) |
+-----------------------------------------------------------+----------------------------------------------------+--------------------------------------------------------------+
| potential temperature | sw.ptmp(SP,t,p,pr) | gsw.pt\_from\_t(SA,t,p,pr) |
+-----------------------------------------------------------+----------------------------------------------------+--------------------------------------------------------------+
| $\\sigma\_0$, using $\\theta\_o$ = sw.ptmp(SP,t,p,0) | sw.dens(SP, $\\theta\_o$, 0) -1000 kg m$^{-3}$ | gsw.sigma0\_CT(SA,CT) |
+-----------------------------------------------------------+----------------------------------------------------+--------------------------------------------------------------+
| $\\sigma\_2$, using $\\theta\_2$ = sw.ptmp(SP,t,p,2000) | sw.dens(SP,$\\theta\_2$, 2000) -1000 kg m$^{-3}$ | gsw.sigma2\_CT(SA,CT) |
+-----------------------------------------------------------+----------------------------------------------------+--------------------------------------------------------------+
| $\\sigma\_4$, using $\\theta\_4$ = sw.ptmp(SP,t,p,2000) | sw.dens(SP,$\\theta\_4$, 4000) -1000 kg m$^{-3}$ | gsw.sigma2\_CT(SA,CT) |
+-----------------------------------------------------------+----------------------------------------------------+--------------------------------------------------------------+
| specific volume anomaly | sw.svan(SP,t,p) | gsw.specvol\_anom\_CT(SA,CT,p) |
+-----------------------------------------------------------+----------------------------------------------------+--------------------------------------------------------------+
| dynamic height anomaly | -sw.gpan(SP,t,p) | gsw.geo\_strf\_dyn\_height(SA,CT,p,delta\_p,interp\_style) |
+-----------------------------------------------------------+----------------------------------------------------+--------------------------------------------------------------+
| geostrophic velocity | sw.gvel(ga,lat,long) | gsw.geostrophic\_velocity(geo\_str,long,lat,p) |
+-----------------------------------------------------------+----------------------------------------------------+--------------------------------------------------------------+
| N$^2$ | sw.bfrq(SP,t,p,lat) | gsw.Nsquared(SA,CT,p,lat) |
+-----------------------------------------------------------+----------------------------------------------------+--------------------------------------------------------------+
| pressure from height (SW uses depth, not height) | sw.pres(-z,lat) | gsw.p\_from\_z(z,lat) |
+-----------------------------------------------------------+----------------------------------------------------+--------------------------------------------------------------+
| height from pressure (SW outputs depth, not height) | z = -sw.dpth(p,lat) | gsw.z\_from\_p(p,lat) |
+-----------------------------------------------------------+----------------------------------------------------+--------------------------------------------------------------+
| in situ temperature from pt | sw.temp(SP,pt,p,pr) | gsw.pt\_from\_t(SA,pt,pr,p) |
+-----------------------------------------------------------+----------------------------------------------------+--------------------------------------------------------------+
| sound speed | sw.svel(SP,t,p) | gsw.sound\_speed(SA,t,p) |
+-----------------------------------------------------------+----------------------------------------------------+--------------------------------------------------------------+
| isobaric heat capacity | sw.cp(SP,t,p) | gsw.cp(SA,t,p) |
+-----------------------------------------------------------+----------------------------------------------------+--------------------------------------------------------------+
| adiabatic lapse rate\* | sw.adtg(SP,t,p) | gsw.adiabatic\_lapse\_rate(SA,t,p) |
+-----------------------------------------------------------+----------------------------------------------------+--------------------------------------------------------------+
| SP from cndr, (PSS 78) | sw.salt(cndr,t,p) | gsw.SP\_from\_cndr(cndr,t,p) |
+-----------------------------------------------------------+----------------------------------------------------+--------------------------------------------------------------+
| cndr from SP, (PSS 78) | sw.cndr(SP,t,p) | gsw.cndr\_from\_SP(SP,t,p) |
+-----------------------------------------------------------+----------------------------------------------------+--------------------------------------------------------------+
| distance | sw.dist(lat,long,units) | gsw.distance(long,lat,p) |
+-----------------------------------------------------------+----------------------------------------------------+--------------------------------------------------------------+
| gravitational acceleration | sw.g(lat,z) | gsw.grav(lat,p) |
+-----------------------------------------------------------+----------------------------------------------------+--------------------------------------------------------------+
| Coriolis parameter | sw.f(lat) | gsw.f(lat) |
+-----------------------------------------------------------+----------------------------------------------------+--------------------------------------------------------------+
| Note that the SW and GSW functions output the adiabatic lapse rate in
different units, being K (dbar)$^{-1}$ and K Pa$^{-1}$
| respectively.
Authors
-------
- Bjørn Ådlandsvik
- Eric Firing
- Filipe Fernandes
Thanks
------
- Bjørn Ådlandsvik - Testing unit and several bug fixes.
- Eric Firing - Support for masked arrays, re-write of *delta*\ SA.
- Trevor J. McDougall (and all of SCOR/IAPSO WG127) for making
available the Matlab version of this software.
Acknowledgments
---------------
- SCOR/IAPSO WG127.
Caveats
-------
- This python module is incomplete and should be used with caution.
- The database used in ``_delta_SA`` comes from the MatlabTM gsw
version.
.. |Build| image:: https://badge.fury.io/py/gsw.png
:target: http://badge.fury.io/py/gsw
.. |Build| image:: https://api.travis-ci.org/ocefpaf/python-gsw.png?branch=master
:target: https://travis-ci.org/ocefpaf/python-gsw
.. |Downloads| image:: https://pypip.in/d/gsw/badge.png
:target: https://crate.io/packages/gsw/
|