diff --git a/.gitignore b/.gitignore
index 82f2a18..e869cf6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,6 +8,7 @@
*.kdev4
.project
.pydevproject
+*.orig
# Compiled source #
###################
diff --git a/gsw/_utilities.py b/gsw/_utilities.py
index 7366850..4d259b5 100644
--- a/gsw/_utilities.py
+++ b/gsw/_utilities.py
@@ -40,16 +40,18 @@ def wrapper(*args, **kw):
# Wrapped ufuncs are constructed with the "types" attribute from the
# underlying ufunc.
if hasattr(f, "types"):
- argtypes = f.types[0].split("->")[0]
+ argtypes, ret_types = f.types[0].split("->")
first_double = argtypes.index("d")
+ int_return = ret_types[0] == 'i'
else:
first_double = 0
+ int_return = False
def fixup(ret):
if hasduck:
return ret
- if hasmasked:
+ if hasmasked and not int_return:
ret = np.ma.masked_invalid(ret)
if not hasarray and isinstance(ret, np.ndarray) and ret.size == 1:
try:
diff --git a/gsw/_wrapped_ufuncs.py b/gsw/_wrapped_ufuncs.py
index 5ccfae1..2759e49 100644
--- a/gsw/_wrapped_ufuncs.py
+++ b/gsw/_wrapped_ufuncs.py
@@ -27,6 +27,15 @@ def adiabatic_lapse_rate_from_CT(SA, CT, p):
adiabatic lapse rate
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See Eqn. (2.22.1) of this TEOS-10 Manual.
+
+
"""
return _gsw_ufuncs.adiabatic_lapse_rate_from_ct(SA, CT, p)
adiabatic_lapse_rate_from_CT.types = _gsw_ufuncs.adiabatic_lapse_rate_from_ct.types
@@ -49,6 +58,14 @@ def adiabatic_lapse_rate_ice(t, p):
adiabatic lapse rate
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+
+
"""
return _gsw_ufuncs.adiabatic_lapse_rate_ice(t, p)
adiabatic_lapse_rate_ice.types = _gsw_ufuncs.adiabatic_lapse_rate_ice.types
@@ -76,6 +93,33 @@ def alpha(SA, CT, p):
with respect to Conservative Temperature
+ Notes
+ -----
+ Note that this 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See Eqn. (2.18.3) of this TEOS-10 manual.
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.alpha(SA, CT, p)
alpha.types = _gsw_ufuncs.alpha.types
@@ -107,6 +151,33 @@ def alpha_on_beta(SA, CT, p):
Temperature
+ Notes
+ -----
+ Note that the 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See appendix A.20 and appendix K of this TEOS-10 Manual.
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2014: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling.
+
+
"""
return _gsw_ufuncs.alpha_on_beta(SA, CT, p)
alpha_on_beta.types = _gsw_ufuncs.alpha_on_beta.types
@@ -133,6 +204,15 @@ def alpha_wrt_t_exact(SA, t, p):
with respect to in-situ temperature
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See Eqn. (2.18.1) of this TEOS-10 manual.
+
+
"""
return _gsw_ufuncs.alpha_wrt_t_exact(SA, t, p)
alpha_wrt_t_exact.types = _gsw_ufuncs.alpha_wrt_t_exact.types
@@ -157,6 +237,15 @@ def alpha_wrt_t_ice(t, p):
to in-situ temperature
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See Eqn. (2.18.1) of this TEOS-10 manual.
+
+
"""
return _gsw_ufuncs.alpha_wrt_t_ice(t, p)
alpha_wrt_t_ice.types = _gsw_ufuncs.alpha_wrt_t_ice.types
@@ -185,6 +274,33 @@ def beta(SA, CT, p):
at constant Conservative Temperature
+ Notes
+ -----
+ Note that the 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See Eqn. (2.19.3) of this TEOS-10 manual.
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.beta(SA, CT, p)
beta.types = _gsw_ufuncs.beta.types
@@ -211,6 +327,15 @@ def beta_const_t_exact(SA, t, p):
at constant in-situ temperature
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See Eqn. (2.19.1) of this TEOS-10 manual.
+
+
"""
return _gsw_ufuncs.beta_const_t_exact(SA, t, p)
beta_const_t_exact.types = _gsw_ufuncs.beta_const_t_exact.types
@@ -239,6 +364,44 @@ def C_from_SP(SP, t, p):
conductivity
+ Notes
+ -----
+ The conductivity ratio returned by this function is consistent with the
+ input value of Practical Salinity, SP, to 2x10^-14 psu over the full
+ range of input parameters (from pure fresh water up to SP = 42 psu).
+ This error of 2x10^-14 psu is machine precision at typical seawater
+ salinities. This accuracy is achieved by having four different
+ polynomials for the starting value of Rtx (the square root of Rt) in
+ four different ranges of SP, and by using one and a half iterations of
+ a computationally efficient modified Newton-Raphson technique (McDougall
+ and Wotherspoon, 2013) to find the root of the equation.
+
+ Note that strictly speaking PSS-78 (Unesco, 1983) defines Practical
+ Salinity in terms of the conductivity ratio, R, without actually
+ specifying the value of C(35,15,0) (which we currently take to be
+ 42.9140 mS/cm).
+
+
+ References
+ ----------
+ Hill, K.D., T.M. Dauphinee and D.J. Woods, 1986: The extension of the
+ Practical Salinity Scale 1978 to low salinities. IEEE J. Oceanic Eng.,
+ OE-11, 1, 109 - 112.
+
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See appendix E of this TEOS-10 Manual.
+
+ McDougall T. J. and S. J. Wotherspoon, 2013: A simple modification of
+ Newton's method to achieve convergence of order 1 + sqrt(2). Applied
+ Mathematics Letters, 29, 20-25.
+
+ Unesco, 1983: Algorithms for computation of fundamental properties of
+ seawater. Unesco Technical Papers in Marine Science, 44, 53 pp.
+
+
"""
return _gsw_ufuncs.c_from_sp(SP, t, p)
C_from_SP.types = _gsw_ufuncs.c_from_sp.types
@@ -267,6 +430,33 @@ def cabbeling(SA, CT, p):
Conservative Temperature.
+ Notes
+ -----
+ Note that the 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See Eqns. (3.9.2) and (P.4) of this TEOS-10 manual.
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.cabbeling(SA, CT, p)
cabbeling.types = _gsw_ufuncs.cabbeling.types
@@ -290,6 +480,14 @@ def chem_potential_water_ice(t, p):
chemical potential of ice
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.chem_potential_water_ice(t, p)
chem_potential_water_ice.types = _gsw_ufuncs.chem_potential_water_ice.types
@@ -314,6 +512,14 @@ def chem_potential_water_t_exact(SA, t, p):
chemical potential of water in seawater
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.chem_potential_water_t_exact(SA, t, p)
chem_potential_water_t_exact.types = _gsw_ufuncs.chem_potential_water_t_exact.types
@@ -336,6 +542,14 @@ def cp_ice(t, p):
heat capacity of ice
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.cp_ice(t, p)
cp_ice.types = _gsw_ufuncs.cp_ice.types
@@ -360,6 +574,14 @@ def cp_t_exact(SA, t, p):
heat capacity of seawater
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.cp_t_exact(SA, t, p)
cp_t_exact.types = _gsw_ufuncs.cp_t_exact.types
@@ -394,6 +616,17 @@ def CT_first_derivatives(SA, pt):
at constant SA. CT_pt is dimensionless.
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See Eqns. (A.12.3a,b) and (A.15.8) of this TEOS-10 Manual.
+
+ This software is available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.ct_first_derivatives(SA, pt)
CT_first_derivatives.types = _gsw_ufuncs.ct_first_derivatives.types
@@ -435,6 +668,26 @@ def CT_first_derivatives_wrt_t_exact(SA, t, p):
respect to pressure P (in Pa) at constant SA and t.
+ Notes
+ -----
+ This function uses the full Gibbs function. Note that this function
+ avoids the NaN that would exist in CT_SA_wrt_t at SA = 0 if it were
+ evaluated in the straightforward way from the derivatives of the Gibbs
+ function function.
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See Eqns. (A.15.3) and (A.15.8) of this TEOS-10 Manual for
+ CT_T_wrt_t and CT_SA_wrt_t respectively.
+
+ This software is available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.ct_first_derivatives_wrt_t_exact(SA, t, p)
CT_first_derivatives_wrt_t_exact.types = _gsw_ufuncs.ct_first_derivatives_wrt_t_exact.types
@@ -465,6 +718,26 @@ def CT_freezing(SA, p, saturation_fraction):
Conservative Temperature (ITS-90).
+ Notes
+ -----
+ An alternative GSW function, gsw_CT_freezing_poly, it is based on a
+ computationally-efficient polynomial, and is accurate to within -5e-4 K
+ and 6e-4 K, when compared with this function.
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See sections 3.33 and 3.34 of this TEOS-10 Manual.
+
+ McDougall, T.J., and S.J. Wotherspoon, 2014: A simple modification of
+ Newton's method to achieve convergence of order 1 + sqrt(2). Applied
+ Mathematics Letters, 29, 20-25.
+
+
"""
return _gsw_ufuncs.ct_freezing(SA, p, saturation_fraction)
CT_freezing.types = _gsw_ufuncs.ct_freezing.types
@@ -497,6 +770,14 @@ def CT_freezing_first_derivatives(SA, p, saturation_fraction):
fixed Absolute Salinity
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+
+
"""
return _gsw_ufuncs.ct_freezing_first_derivatives(SA, p, saturation_fraction)
CT_freezing_first_derivatives.types = _gsw_ufuncs.ct_freezing_first_derivatives.types
@@ -530,6 +811,19 @@ def CT_freezing_first_derivatives_poly(SA, p, saturation_fraction):
fixed Absolute Salinity
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See sections 3.33 and 3.34 of this TEOS-10 Manual.
+
+ McDougall, T.J., P.M. Barker, R. Feistel and B.K. Galton-Fenzi, 2014:
+ Melting of Ice and Sea Ice into Seawater and Frazil Ice Formation.
+ Journal of Physical Oceanography, 44, 1751-1775.
+
+
"""
return _gsw_ufuncs.ct_freezing_first_derivatives_poly(SA, p, saturation_fraction)
CT_freezing_first_derivatives_poly.types = _gsw_ufuncs.ct_freezing_first_derivatives_poly.types
@@ -562,6 +856,19 @@ def CT_freezing_poly(SA, p, saturation_fraction):
terms of Conservative Temperature (ITS-90).
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See sections 3.33 and 3.34 of this TEOS-10 Manual.
+
+ McDougall, T.J., P.M. Barker, R. Feistel and B.K. Galton-Fenzi, 2014:
+ Melting of Ice and Sea Ice into Seawater and Frazil Ice Formation.
+ Journal of Physical Oceanography, 44, 1751-1775.
+
+
"""
return _gsw_ufuncs.ct_freezing_poly(SA, p, saturation_fraction)
CT_freezing_poly.types = _gsw_ufuncs.ct_freezing_poly.types
@@ -590,6 +897,40 @@ def CT_from_enthalpy(SA, h, p):
Conservative Temperature ( ITS-90)
+ Notes
+ -----
+ Note that the 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+ McDougall, T.J., 2003: Potential enthalpy: A conservative oceanic
+ variable for evaluating heat content and heat fluxes. Journal of
+ Physical Oceanography, 33, 945-963.
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ McDougall, T.J., and S.J. Wotherspoon, 2014: A simple modification of
+ Newton's method to achieve convergence of order 1 + sqrt(2). Applied
+ Mathematics Letters, 29, 20-25.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.ct_from_enthalpy(SA, h, p)
CT_from_enthalpy.types = _gsw_ufuncs.ct_from_enthalpy.types
@@ -617,6 +958,35 @@ def CT_from_enthalpy_exact(SA, h, p):
Conservative Temperature ( ITS-90)
+ Notes
+ -----
+ Note that this function uses the full Gibbs function. There is an
+ alternative to calling this function, namely
+ gsw_CT_from_enthalpy(SA,h,p), which uses the computationally
+ efficient 75-term expression for specific volume in terms of SA, CT
+ and p (Roquet et al., 2015).
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+ McDougall, T.J., 2003: Potential enthalpy: A conservative oceanic
+ variable for evaluating heat content and heat fluxes. Journal of
+ Physical Oceanography, 33, 945-963.
+
+ McDougall T.J. and S.J. Wotherspoon, 2013: A simple modification of
+ Newton's method to achieve convergence of order 1 + sqrt(2). Applied
+ Mathematics Letters, 29, 20-25.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.ct_from_enthalpy_exact(SA, h, p)
CT_from_enthalpy_exact.types = _gsw_ufuncs.ct_from_enthalpy_exact.types
@@ -639,6 +1009,15 @@ def CT_from_entropy(SA, entropy):
Conservative Temperature (ITS-90)
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See appendix A.10 of this TEOS-10 Manual.
+
+
"""
return _gsw_ufuncs.ct_from_entropy(SA, entropy)
CT_from_entropy.types = _gsw_ufuncs.ct_from_entropy.types
@@ -662,6 +1041,15 @@ def CT_from_pt(SA, pt):
Conservative Temperature (ITS-90)
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See section 3.3 of this TEOS-10 Manual.
+
+
"""
return _gsw_ufuncs.ct_from_pt(SA, pt)
CT_from_pt.types = _gsw_ufuncs.ct_from_pt.types
@@ -691,6 +1079,32 @@ def CT_from_rho(rho, SA, p):
Conservative Temperature (ITS-90)
+ Notes
+ -----
+ Note that the 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling, 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.ct_from_rho(rho, SA, p)
CT_from_rho.types = _gsw_ufuncs.ct_from_rho.types
@@ -716,6 +1130,15 @@ def CT_from_t(SA, t, p):
Conservative Temperature (ITS-90)
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See section 3.3 of this TEOS-10 Manual.
+
+
"""
return _gsw_ufuncs.ct_from_t(SA, t, p)
CT_from_t.types = _gsw_ufuncs.ct_from_t.types
@@ -745,6 +1168,32 @@ def CT_maxdensity(SA, p):
given Absolute Salinity and pressure.
+ Notes
+ -----
+ Note that the 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See section 3.42 of this TEOS-10 Manual.
+
+ McDougall T. J. and S. J. Wotherspoon, 2013: A simple modification of
+ Newton's method to achieve convergence of order 1 + sqrt(2). Applied
+ Mathematics Letters, 29, 20-25.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.ct_maxdensity(SA, p)
CT_maxdensity.types = _gsw_ufuncs.ct_maxdensity.types
@@ -789,6 +1238,17 @@ def CT_second_derivatives(SA, pt):
0 dbar) at constant SA.
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See appendix A.12 of this TEOS-10 Manual.
+
+ This software is available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.ct_second_derivatives(SA, pt)
CT_second_derivatives.types = _gsw_ufuncs.ct_second_derivatives.types
@@ -815,6 +1275,28 @@ def deltaSA_atlas(p, lon, lat):
Absolute Salinity Anomaly atlas value
+ Notes
+ -----
+ The Absolute Salinity Anomaly atlas value in the Baltic Sea is
+ evaluated separately, since it is a function of Practical Salinity, not
+ of space. The present function returns a deltaSA_atlas of zero for
+ data in the Baltic Sea. The correct way of calculating Absolute
+ Salinity in the Baltic Sea is by calling gsw_SA_from_SP.
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+ McDougall, T.J., D.R. Jackett, F.J. Millero, R. Pawlowicz and
+ P.M. Barker, 2012: A global algorithm for estimating Absolute Salinity.
+ Ocean Science, 8, 1123-1134.
+ http://www.ocean-sci.net/8/1123/2012/os-8-1123-2012.pdf
+
+
"""
return _gsw_ufuncs.deltasa_atlas(p, lon, lat)
deltaSA_atlas.types = _gsw_ufuncs.deltasa_atlas.types
@@ -843,6 +1325,20 @@ def deltaSA_from_SP(SP, p, lon, lat):
Absolute Salinity Anomaly
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See section 2.5 and appendices A.4 and A.5 of this TEOS-10 Manual.
+
+ McDougall, T.J., D.R. Jackett, F.J. Millero, R. Pawlowicz and
+ P.M. Barker, 2012: A global algorithm for estimating Absolute Salinity.
+ Ocean Science, 8, 1117-1128.
+ http://www.ocean-sci.net/8/1117/2012/os-8-1117-2012.pdf
+
+
"""
return _gsw_ufuncs.deltasa_from_sp(SP, p, lon, lat)
deltaSA_from_SP.types = _gsw_ufuncs.deltasa_from_sp.types
@@ -870,6 +1366,14 @@ def dilution_coefficient_t_exact(SA, t, p):
dilution coefficient
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.dilution_coefficient_t_exact(SA, t, p)
dilution_coefficient_t_exact.types = _gsw_ufuncs.dilution_coefficient_t_exact.types
@@ -897,6 +1401,42 @@ def dynamic_enthalpy(SA, CT, p):
dynamic enthalpy
+ Notes
+ -----
+ Note that the 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See section 3.2 of this TEOS-10 Manual.
+
+ McDougall, T. J., 2003: Potential enthalpy: A conservative oceanic
+ variable for evaluating heat content and heat fluxes. Journal of
+ Physical Oceanography, 33, 945-963.
+ See Eqns. (18) and (22)
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+ Young, W.R., 2010: Dynamic enthalpy, Conservative Temperature, and the
+ seawater Boussinesq approximation. Journal of Physical Oceanography,
+ 40, 394-400.
+
+
"""
return _gsw_ufuncs.dynamic_enthalpy(SA, CT, p)
dynamic_enthalpy.types = _gsw_ufuncs.dynamic_enthalpy.types
@@ -923,6 +1463,38 @@ def enthalpy(SA, CT, p):
specific enthalpy
+ Notes
+ -----
+ Note that the 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See Eqn. (A.30.6) of this TEOS-10 Manual.
+
+ McDougall, T.J., 2003: Potential enthalpy: A conservative oceanic
+ variable for evaluating heat content and heat fluxes. Journal of
+ Physical Oceanography, 33, 945-963.
+ See Eqns. (18) and (22)
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.enthalpy(SA, CT, p)
enthalpy.types = _gsw_ufuncs.enthalpy.types
@@ -948,6 +1520,32 @@ def enthalpy_CT_exact(SA, CT, p):
specific enthalpy
+ Notes
+ -----
+ Note that this function uses the full Gibbs function. There is an
+ alternative to calling this function, namely gsw_enthalpy(SA,CT,p),
+ which uses the computationally-efficient 75-term expression for specific
+ volume in terms of SA, CT and p (Roquet et al., 2015).
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See appendix A.11 of this TEOS-10 Manual.
+
+ McDougall, T. J., 2003: Potential enthalpy: A conservative oceanic
+ variable for evaluating heat content and heat fluxes. Journal of
+ Physical Oceanography, 33, 945-963.
+ See Eqns. (18) and (22)
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.enthalpy_ct_exact(SA, CT, p)
enthalpy_CT_exact.types = _gsw_ufuncs.enthalpy_ct_exact.types
@@ -981,6 +1579,38 @@ def enthalpy_diff(SA, CT, p_shallow, p_deep):
(deep minus shallow)
+ Notes
+ -----
+ Note that the 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See Eqns. (3.32.2) and (A.30.6) of this TEOS-10 Manual.
+
+ McDougall, T.J., 2003: Potential enthalpy: A conservative oceanic
+ variable for evaluating heat content and heat fluxes. Journal of
+ Physical Oceanography, 33, 945-963.
+ See Eqns. (18) and (22)
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.enthalpy_diff(SA, CT, p_shallow, p_deep)
enthalpy_diff.types = _gsw_ufuncs.enthalpy_diff.types
@@ -1017,6 +1647,40 @@ def enthalpy_first_derivatives(SA, CT, p):
CT at constant SA and p.
+ Notes
+ -----
+ Note that the 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See Eqns. (A.11.18), (A.11.15) and (A.11.12) of this TEOS-10 Manual.
+
+ McDougall, T.J., 2003: Potential enthalpy: A conservative oceanic
+ variable for evaluating heat content and heat fluxes. Journal of
+ Physical Oceanography, 33, 945-963.
+ See Eqns. (18) and (22)
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling, 90, pp. 29-43.
+
+ This software is available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.enthalpy_first_derivatives(SA, CT, p)
enthalpy_first_derivatives.types = _gsw_ufuncs.enthalpy_first_derivatives.types
@@ -1051,6 +1715,35 @@ def enthalpy_first_derivatives_CT_exact(SA, CT, p):
CT at constant SA and p.
+ Notes
+ -----
+ Note that this function uses the full Gibbs function. There is an
+ alternative to calling this function, namely
+ gsw_enthalpy_first_derivatives(SA,CT,p) which uses the computationally
+ efficient 75-term expression for specific volume in terms of SA, CT and
+ p (Roquet et al., 2015).
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See Eqns. (A.11.18), (A.11.15) and (A.11.12) of this TEOS-10 Manual.
+
+ McDougall, T.J., 2003: Potential enthalpy: A conservative oceanic
+ variable for evaluating heat content and heat fluxes. Journal of
+ Physical Oceanography, 33, 945-963.
+ See Eqns. (18) and (22)
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling.
+
+ This software is available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.enthalpy_first_derivatives_ct_exact(SA, CT, p)
enthalpy_first_derivatives_CT_exact.types = _gsw_ufuncs.enthalpy_first_derivatives_ct_exact.types
@@ -1073,6 +1766,14 @@ def enthalpy_ice(t, p):
specific enthalpy of ice
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.enthalpy_ice(t, p)
enthalpy_ice.types = _gsw_ufuncs.enthalpy_ice.types
@@ -1112,6 +1813,39 @@ def enthalpy_second_derivatives(SA, CT, p):
CT at constant SA and p.
+ Notes
+ -----
+ Note that the 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+
+ McDougall, T.J., 2003: Potential enthalpy: A conservative oceanic
+ variable for evaluating heat content and heat fluxes. Journal of
+ Physical Oceanography, 33, 945-963.
+ See Eqns. (18) and (22)
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+ This software is available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.enthalpy_second_derivatives(SA, CT, p)
enthalpy_second_derivatives.types = _gsw_ufuncs.enthalpy_second_derivatives.types
@@ -1150,11 +1884,76 @@ def enthalpy_second_derivatives_CT_exact(SA, CT, p):
CT at constant SA and p.
+ Notes
+ -----
+ Note that this function uses the full Gibbs function. There is an
+ alternative to calling this function, namely
+ gsw_enthalpy_second_derivatives(SA,CT,p) which uses the computationally
+ efficient 75-term expression for specific volume in terms of SA, CT and
+ p (Roquet et al., 2015).
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+
+ McDougall, T. J., 2003: Potential enthalpy: A conservative oceanic
+ variable for evaluating heat content and heat fluxes. Journal of
+ Physical Oceanography, 33, 945-963.
+ See Eqns. (18) and (22)
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+ This software is available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.enthalpy_second_derivatives_ct_exact(SA, CT, p)
enthalpy_second_derivatives_CT_exact.types = _gsw_ufuncs.enthalpy_second_derivatives_ct_exact.types
enthalpy_second_derivatives_CT_exact = match_args_return(enthalpy_second_derivatives_CT_exact)
+def enthalpy_SSO_0(p):
+ """
+ enthalpy at (SSO,CT=0,p)
+
+ Parameters
+ ----------
+ p : array-like
+ Sea pressure (absolute pressure minus 10.1325 dbar), dbar
+
+ Returns
+ -------
+ double, array
+
+ Notes
+ -----
+ gsw_enthalpy_SSO_0 enthalpy at (SSO,CT=0,p)
+ (75-term eqn.)
+ This function calculates enthalpy at the Standard Ocean Salinity, SSO,
+ and at a Conservative Temperature of zero degrees C, as a function of
+ pressure, p, in dbar, using a streamlined version of the 75-term
+ computationally-efficient expression for specific volume, that is, a
+ streamlined version of the code "gsw_enthalpy(SA,CT,p)".
+
+ VERSION NUMBER: 3.06.12 (25th May, 2020)
+
+ References
+ ----------
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
+ """
+ return _gsw_ufuncs.enthalpy_sso_0(p)
+enthalpy_SSO_0.types = _gsw_ufuncs.enthalpy_sso_0.types
+enthalpy_SSO_0 = match_args_return(enthalpy_SSO_0)
+
def enthalpy_t_exact(SA, t, p):
"""
Calculates the specific enthalpy of seawater.
@@ -1174,6 +1973,14 @@ def enthalpy_t_exact(SA, t, p):
specific enthalpy
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.enthalpy_t_exact(SA, t, p)
enthalpy_t_exact.types = _gsw_ufuncs.enthalpy_t_exact.types
@@ -1206,6 +2013,17 @@ def entropy_first_derivatives(SA, CT):
Conservative Temperature at constant Absolute Salinity.
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See Eqns. (A.12.8) and (P.14a,c) of this TEOS-10 Manual.
+
+ This software is available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.entropy_first_derivatives(SA, CT)
entropy_first_derivatives.types = _gsw_ufuncs.entropy_first_derivatives.types
@@ -1228,6 +2046,15 @@ def entropy_from_CT(SA, CT):
specific entropy
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See appendix A.10 of this TEOS-10 Manual.
+
+
"""
return _gsw_ufuncs.entropy_from_ct(SA, CT)
entropy_from_CT.types = _gsw_ufuncs.entropy_from_ct.types
@@ -1251,6 +2078,15 @@ def entropy_from_pt(SA, pt):
specific entropy
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See appendix A.10 of this TEOS-10 Manual.
+
+
"""
return _gsw_ufuncs.entropy_from_pt(SA, pt)
entropy_from_pt.types = _gsw_ufuncs.entropy_from_pt.types
@@ -1275,6 +2111,14 @@ def entropy_from_t(SA, t, p):
specific entropy
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.entropy_from_t(SA, t, p)
entropy_from_t.types = _gsw_ufuncs.entropy_from_t.types
@@ -1297,15 +2141,95 @@ def entropy_ice(t, p):
specific entropy of ice
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.entropy_ice(t, p)
entropy_ice.types = _gsw_ufuncs.entropy_ice.types
entropy_ice = match_args_return(entropy_ice)
-def entropy_second_derivatives(SA, CT):
+def entropy_part(SA, t, p):
"""
- Calculates the following three second-order partial derivatives of
- specific entropy (eta)
+ entropy minus the terms that are a function of only SA
+
+ Parameters
+ ----------
+ SA : array-like
+ Absolute Salinity, g/kg
+ t : array-like
+ In-situ temperature (ITS-90), degrees C
+ p : array-like
+ Sea pressure (absolute pressure minus 10.1325 dbar), dbar
+
+ Returns
+ -------
+ double, array
+
+ Notes
+ -----
+ sw_entropy_part entropy minus the terms that are a function of only SA
+ This function calculates entropy, except that it does not evaluate any
+ terms that are functions of Absolute Salinity alone. By not calculating
+ these terms, which are a function only of Absolute Salinity, several
+ unnecessary computations are avoided (including saving the computation
+ of a natural logarithm). These terms are a necessary part of entropy,
+ but are not needed when calculating potential temperature from in-situ
+ temperature.
+
+ VERSION NUMBER: 3.06.12 (25th May, 2020)
+
+
+ """
+ return _gsw_ufuncs.entropy_part(SA, t, p)
+entropy_part.types = _gsw_ufuncs.entropy_part.types
+entropy_part = match_args_return(entropy_part)
+
+def entropy_part_zerop(SA, pt0):
+ """
+ entropy_part evaluated at the sea surface
+
+ Parameters
+ ----------
+ SA : array-like
+ Absolute Salinity, g/kg
+ pt0 : array-like
+ Potential temperature with reference pressure of 0 dbar, degrees C
+
+ Returns
+ -------
+ double, array
+
+ Notes
+ -----
+ gsw_entropy_part_zerop entropy_part evaluated at the sea surface
+ This function calculates entropy at a sea pressure of zero, except that
+ it does not evaluate any terms that are functions of Absolute Salinity
+ alone. By not calculating these terms, which are a function only of
+ Absolute Salinity, several unnecessary computations are avoided
+ (including saving the computation of a natural logarithm). These terms
+ are a necessary part of entropy, but are not needed when calculating
+ potential temperature from in-situ temperature.
+ The inputs to "gsw_entropy_part_zerop(SA,pt0)" are Absolute Salinity
+ and potential temperature with reference sea pressure of zero dbar.
+
+ VERSION NUMBER: 3.06.12 (25th May, 2020)
+
+
+ """
+ return _gsw_ufuncs.entropy_part_zerop(SA, pt0)
+entropy_part_zerop.types = _gsw_ufuncs.entropy_part_zerop.types
+entropy_part_zerop = match_args_return(entropy_part_zerop)
+
+def entropy_second_derivatives(SA, CT):
+ """
+ Calculates the following three second-order partial derivatives of
+ specific entropy (eta)
(1) eta_SA_SA, the second derivative with respect to Absolute
Salinity at constant Conservative Temperature, and
(2) eta_SA_CT, the derivative with respect to Absolute Salinity and
@@ -1334,6 +2258,17 @@ def entropy_second_derivatives(SA, CT):
to Conservative Temperature at constant Absolute
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See Eqns. (P.14b) and (P.15a,b) of this TEOS-10 Manual.
+
+ This software is available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.entropy_second_derivatives(SA, CT)
entropy_second_derivatives.types = _gsw_ufuncs.entropy_second_derivatives.types
@@ -1360,6 +2295,35 @@ def Fdelta(p, lon, lat):
ratio of SA to Sstar, minus 1
+ Notes
+ -----
+ Fdelta = (1 + r1)SAAR/(1 - r1*SAAR)
+ = (SA/Sstar) - 1
+
+ with r1 being the constant 0.35 based on the work of Pawlowicz et al.
+ (2011). Note that since SAAR is everywhere less than 0.001 in the global
+ ocean, Fdelta is only slightly different to 1.35*SAAR.
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See section 2.5 and appendices A.4 and A.5 of this TEOS-10 Manual.
+
+ McDougall, T.J., D.R. Jackett, F.J. Millero, R. Pawlowicz and
+ P.M. Barker, 2012: A global algorithm for estimating Absolute Salinity.
+ Ocean Science, 8, 1123-1134.
+ http://www.ocean-sci.net/8/1123/2012/os-8-1123-2012.pdf
+
+ Pawlawicz, R., D.G. Wright and F.J. Millero, 2011; The effects of
+ biogeochemical processes on oceanic conductivity/salinty/density
+ relationships and the characterization of real seawater. Ocean Science,
+ 7, 363-387. http://www.ocean-sci.net/7/363/2011/os-7-363-2011.pdf
+
+
"""
return _gsw_ufuncs.fdelta(p, lon, lat)
Fdelta.types = _gsw_ufuncs.fdelta.types
@@ -1402,6 +2366,45 @@ def frazil_properties(SA_bulk, h_bulk, p):
temperature.
+ Notes
+ -----
+ When the mass fraction w_Ih_final is calculated as being a positive
+ value, the seawater-ice mixture is at thermodynamic equilibrium.
+
+ This code returns w_Ih_final = 0 when the input bulk enthalpy, h_bulk,
+ is sufficiently large (i.e. sufficiently "warm") so that there is no ice
+ present in the final state. In this case the final state consists of
+ only seawater rather than being an equilibrium mixture of seawater and
+ ice which occurs when w_Ih_final is positive. Note that when
+ w_Ih_final = 0, the final seawater is not at the freezing temperature.
+
+ Note that there is another GSW code,
+ gsw_frazil_properties_potential_poly(SA_bulk,h_pot_bulk,p) which
+ treats potential enthalpy as the conservative variable, while, in
+ contrast, the present code treats in situ enthalpy as the conservative
+ variable during the interaction of seawater and ice Ih.
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See sections 3.33 and 3.34 of this TEOS-10 Manual.
+
+ McDougall, T.J., P.M. Barker, R. Feistel and B.K. Galton-Fenzi, 2014:
+ Melting of ice and sea ice into seawater, and frazil ice formation.
+ Journal of Physical Oceanography, 44, 1751-1775.
+
+ McDougall, T.J., and S.J. Wotherspoon, 2014: A simple modification of
+ Newton's method to achieve convergence of order 1 + sqrt(2). Applied
+ Mathematics Letters, 29, 20-25.
+
+ Anonymous, 2014: Modelling the interaction between seawater and frazil
+ ice. Manuscript, March 2015. See Eqns. (8) - (15) of this manuscript.
+
+
"""
return _gsw_ufuncs.frazil_properties(SA_bulk, h_bulk, p)
frazil_properties.types = _gsw_ufuncs.frazil_properties.types
@@ -1444,6 +2447,42 @@ def frazil_properties_potential(SA_bulk, h_pot_bulk, p):
temperature.
+ Notes
+ -----
+ When the mass fraction w_Ih_final is calculated as being a positive
+ value, the seawater-ice mixture is at thermodynamic equilibrium.
+
+ This code returns w_Ih_final = 0 when the input bulk enthalpy, h_bulk,
+ is sufficiently large (i.e. sufficiently "warm") so that there is no ice
+ present in the final state. In this case the final state consists of
+ only seawater rather than being an equilibrium mixture of seawater and
+ ice which occurs when w_Ih_final is positive. Note that when
+ w_Ih_final = 0, the final seawater is not at the freezing temperature.
+
+ Note that this code uses the exact forms of CT_freezing and
+ pot_enthalpy_ice_freezing.
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See sections 3.33 and 3.34 of this TEOS-10 Manual.
+
+ McDougall, T.J., P.M. Barker, R. Feistel and B.K. Galton-Fenzi, 2014:
+ Melting of ice and sea ice into seawater, and frazil ice formation.
+ Journal of Physical Oceanography, 44, 1751-1775.
+
+ McDougall, T.J., and S.J. Wotherspoon, 2014: A simple modification of
+ Newton's method to achieve convergence of order 1 + sqrt(2). Applied
+ Mathematics Letters, 29, 20-25.
+
+ Anonymous, 2014: Modelling the interaction between seawater and frazil
+ ice. Manuscript, March 2015. See Eqns. (8)-(15) of this manuscript.
+
+
"""
return _gsw_ufuncs.frazil_properties_potential(SA_bulk, h_pot_bulk, p)
frazil_properties_potential.types = _gsw_ufuncs.frazil_properties_potential.types
@@ -1486,6 +2525,43 @@ def frazil_properties_potential_poly(SA_bulk, h_pot_bulk, p):
temperature.
+ Notes
+ -----
+ When the mass fraction w_Ih_final is calculated as being a positive
+ value, the seawater-ice mixture is at thermodynamic equilibrium.
+
+ This code returns w_Ih_final = 0 when the input bulk enthalpy, h_bulk,
+ is sufficiently large (i.e. sufficiently "warm") so that there is no ice
+ present in the final state. In this case the final state consists of
+ only seawater rather than being an equilibrium mixture of seawater and
+ ice which occurs when w_Ih_final is positive. Note that when
+ w_Ih_final = 0, the final seawater is not at the freezing temperature.
+
+ Note that this code uses the polynomial forms of CT_freezing and
+ pot_enthalpy_ice_freezing. This code is intended to be used in ocean
+ models where the model prognostic variables are SA_bulk and h_pot_bulk.
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See sections 3.33 and 3.34 of this TEOS-10 Manual.
+
+ McDougall, T.J., P.M. Barker, R. Feistel and B.K. Galton-Fenzi, 2014:
+ Melting of ice and sea ice into seawater, and frazil ice formation.
+ Journal of Physical Oceanography, 44, 1751-1775.
+
+ McDougall, T.J., and S.J. Wotherspoon, 2014: A simple modification of
+ Newton's method to achieve convergence of order 1 + sqrt(2). Applied
+ Mathematics Letters, 29, 20-25.
+
+ Anonymous, 2014: Modelling the interaction between seawater and frazil
+ ice. Manuscript, March 2015. See Eqns. (8)-(15) of this manuscript.
+
+
"""
return _gsw_ufuncs.frazil_properties_potential_poly(SA_bulk, h_pot_bulk, p)
frazil_properties_potential_poly.types = _gsw_ufuncs.frazil_properties_potential_poly.types
@@ -1520,6 +2596,29 @@ def frazil_ratios_adiabatic(SA, p, w_Ih):
to that of pressure (in Pa)
+ Notes
+ -----
+ Note that the first output, dSA_dCT_frazil, is dSA/dCT rather than
+ dCT/dSA. This is done so that when SA = 0, the output, dSA/dCT, is zero
+ whereas dCT/dSA would then be infinite.
+
+ Also note that both dSA_dP_frazil and dCT_dP_frazil are the pressure
+ derivatives with the pressure measured in Pa not dbar.
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+
+ McDougall, T.J., P.M. Barker, R. Feistel and B.K. Galton-Fenzi, 2014:
+ Melting of Ice and Sea Ice into Seawater and Frazil Ice Formation.
+ Journal of Physical Oceanography, 44, 1751-1775.
+ See Eqns. (47), (48) and (49) of this manuscript.
+
+
"""
return _gsw_ufuncs.frazil_ratios_adiabatic(SA, p, w_Ih)
frazil_ratios_adiabatic.types = _gsw_ufuncs.frazil_ratios_adiabatic.types
@@ -1554,6 +2653,38 @@ def frazil_ratios_adiabatic_poly(SA, p, w_Ih):
to that of pressure (in Pa)
+ Notes
+ -----
+ Note that the first output, dSA_dCT_frazil, is dSA/dCT rather than
+ dCT/dSA. This is done so that when SA = 0, the output, dSA/dCT, is zero
+ whereas dCT/dSA would then be infinite.
+
+ Also note that both dSA_dP_frazil and dCT_dP_frazil are the pressure
+ derivatives with the pressure measured in Pa not dbar.
+
+ This function uses the computationally-efficient expression for specific
+ volume in terms of SA, CT and p (Roquet et al., 2015) and the polynomial
+ expression for freezing temperature based on Conservative Temperature
+ (McDougall et al., 2015).
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+
+ McDougall, T.J., P.M. Barker, R. Feistel and B.K. Galton-Fenzi, 2014:
+ Melting of Ice and Sea Ice into Seawater and Frazil Ice Formation.
+ Journal of Physical Oceanography, 44, 1751-1775.
+ See Eqns. (47), (48) and (49) of this manuscript.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.frazil_ratios_adiabatic_poly(SA, p, w_Ih)
frazil_ratios_adiabatic_poly.types = _gsw_ufuncs.frazil_ratios_adiabatic_poly.types
@@ -1597,6 +2728,44 @@ def gibbs(ns, nt, np, SA, t, p):
Note: The derivatives are taken with respect to pressure in Pa, not
withstanding that the pressure input into this routine is in dbar.
+ References
+ ----------
+ Feistel, R., 2003: A new extended Gibbs thermodynamic potential of
+ seawater, Progr. Oceanogr., 58, 43-114.
+
+ Feistel, R., 2008: A Gibbs function for seawater thermodynamics
+ for -6 to 80°C and salinity up to 120 g kg1, Deep-Sea Res. I,
+ 55, 1639-1671.
+
+ IAPWS, 2008: Release on the IAPWS Formulation 2008 for the
+ Thermodynamic Properties of Seawater. The International Association
+ for the Properties of Water and Steam. Berlin, Germany, September
+ 2008, available from http://www.iapws.org. This Release is referred
+ to as IAPWS-08.
+
+ IAPWS, 2009: Supplementary Release on a Computationally Efficient
+ Thermodynamic Formulation for Liquid Water for Oceanographic Use.
+ The International Association for the Properties of Water and Steam.
+ Doorwerth, The Netherlands, September 2009, available from
+ http://www.iapws.org. This Release is referred to as IAPWS-09.
+
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See section 2.6 and appendices A.6, G and H of this TEOS-10 Manual.
+
+ Millero, F.J., R. Feistel, D.G. Wright, and T.J. McDougall, 2008:
+ The composition of Standard Seawater and the definition of the
+ Reference-Composition Salinity Scale, Deep-Sea Res. I, 55, 50-72.
+
+ Reference page in Help browser
+ doc gsw_gibbs
+ Note that this reference page includes the code contained in gsw_gibbs.
+ We have opted to encode this programme as it is a global standard and
+ such we cannot allow anyone to change it.
+
+
"""
return _gsw_ufuncs.gibbs(ns, nt, np, SA, t, p)
gibbs.types = _gsw_ufuncs.gibbs.types
@@ -1628,6 +2797,25 @@ def gibbs_ice(nt, np, t, p):
Note. The derivatives are taken with respect to pressure in Pa, not
withstanding that the pressure input into this routine is in dbar.
+ References
+ ----------
+ IAPWS, 2009: Revised release on the Equation of State 2006 for H2O Ice
+ Ih. The International Association for the Properties of Water and
+ Steam. Doorwerth, The Netherlands, September 2009.
+
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See appendix I.
+
+ Reference page in Help browser
+ doc gsw_gibbs_ice
+ Note that this reference page includes the code contained in
+ gsw_gibbs_ice. We have opted to encode this programme as it is a global
+ standard and such we cannot allow anyone to change it.
+
+
"""
return _gsw_ufuncs.gibbs_ice(nt, np, t, p)
gibbs_ice.types = _gsw_ufuncs.gibbs_ice.types
@@ -1651,6 +2839,19 @@ def gibbs_ice_part_t(t, p):
part of temperature derivative
+ References
+ ----------
+ IAPWS, 2009: Revised Release on the Equation of State 2006 for H2O Ice
+ Ih. The International Association for the Properties of Water and
+ Steam. Doorwerth, The Netherlands, September 2009.
+
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See appendix I.
+
+
"""
return _gsw_ufuncs.gibbs_ice_part_t(t, p)
gibbs_ice_part_t.types = _gsw_ufuncs.gibbs_ice_part_t.types
@@ -1672,6 +2873,19 @@ def gibbs_ice_pt0(pt0):
part of temperature derivative
+ References
+ ----------
+ IAPWS, 2009: Revised Release on the Equation of State 2006 for H2O Ice
+ Ih. The International Association for the Properties of Water and
+ Steam. Doorwerth, The Netherlands, September 2009.
+
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See appendix I.
+
+
"""
return _gsw_ufuncs.gibbs_ice_pt0(pt0)
gibbs_ice_pt0.types = _gsw_ufuncs.gibbs_ice_pt0.types
@@ -1694,11 +2908,55 @@ def gibbs_ice_pt0_pt0(pt0):
temperature second derivative at pt0
+ References
+ ----------
+ IAPWS, 2009: Revised Release on the Equation of State 2006 for H2O Ice
+ Ih. The International Association for the Properties of Water and
+ Steam. Doorwerth, The Netherlands, September 2009.
+
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See appendix I.
+
+
"""
return _gsw_ufuncs.gibbs_ice_pt0_pt0(pt0)
gibbs_ice_pt0_pt0.types = _gsw_ufuncs.gibbs_ice_pt0_pt0.types
gibbs_ice_pt0_pt0 = match_args_return(gibbs_ice_pt0_pt0)
+def gibbs_pt0_pt0(SA, pt0):
+ """
+ gibbs_tt at (SA,pt,0)
+
+ Parameters
+ ----------
+ SA : array-like
+ Absolute Salinity, g/kg
+ pt0 : array-like
+ Potential temperature with reference pressure of 0 dbar, degrees C
+
+ Returns
+ -------
+ double, array
+
+ Notes
+ -----
+ gsw_gibbs_pt0_pt0 gibbs_tt at (SA,pt,0)
+ This function calculates the second derivative of the specific Gibbs
+ function with respect to temperature at zero sea pressure. The inputs
+ are Absolute Salinity and potential temperature with reference sea
+ pressure of zero dbar.
+
+ VERSION NUMBER: 3.06.13 (7th September, 2020)
+
+
+ """
+ return _gsw_ufuncs.gibbs_pt0_pt0(SA, pt0)
+gibbs_pt0_pt0.types = _gsw_ufuncs.gibbs_pt0_pt0.types
+gibbs_pt0_pt0 = match_args_return(gibbs_pt0_pt0)
+
def grav(lat, p):
"""
Calculates acceleration due to gravity as a function of latitude and as
@@ -1717,6 +2975,21 @@ def grav(lat, p):
gravitational acceleration
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See appendix D of this TEOS-10 Manual.
+
+ Moritz, H., 2000: Geodetic reference system 1980. J. Geodesy, 74,
+ pp. 128-133.
+
+ Saunders, P.M., and N.P. Fofonoff, 1976: Conversion of pressure to
+ depth in the ocean. Deep-Sea Res., pp. 109-111.
+
+
"""
return _gsw_ufuncs.grav(lat, p)
grav.types = _gsw_ufuncs.grav.types
@@ -1739,6 +3012,14 @@ def Helmholtz_energy_ice(t, p):
Helmholtz energy of ice
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.helmholtz_energy_ice(t, p)
Helmholtz_energy_ice.types = _gsw_ufuncs.helmholtz_energy_ice.types
@@ -1764,6 +3045,26 @@ def Hill_ratio_at_SP2(t):
Hill ratio at SP of 2
+ References
+ ----------
+ Hill, K.D., T.M. Dauphinee & D.J. Woods, 1986: The extension of the
+ Practical Salinity Scale 1978 to low salinities. IEEE J. Oceanic Eng.,
+ 11, 109 - 112.
+
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See appendix E of this TEOS-10 Manual.
+
+ McDougall T.J. and S.J. Wotherspoon, 2013: A simple modification of
+ Newton's method to achieve convergence of order 1 + sqrt(2). Applied
+ Mathematics Letters, 29, 20-25.
+
+ Unesco, 1983: Algorithms for computation of fundamental properties of
+ seawater. Unesco Technical Papers in Marine Science, 44, 53 pp.
+
+
"""
return _gsw_ufuncs.hill_ratio_at_sp2(t)
Hill_ratio_at_SP2.types = _gsw_ufuncs.hill_ratio_at_sp2.types
@@ -1807,11 +3108,84 @@ def ice_fraction_to_freeze_seawater(SA, CT, p, t_Ih):
This output must be between 0 and 1.
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See sections 3.33 and 3.34 of this TEOS-10 Manual.
+
+ McDougall, T.J., and S.J. Wotherspoon, 2013: A simple modification of
+ Newton's method to achieve convergence of order 1 + sqrt(2). Applied
+ Mathematics Letters, 29, 20-25.
+
+ McDougall, T.J., P.M. Barker, R. Feistel and B.K. Galton-Fenzi, 2014:
+ Melting of Ice and Sea Ice into Seawater and Frazil Ice Formation.
+ Journal of Physical Oceanography, 44, 1751-1775.
+ See Eqn. (9) of this manuscript.
+
+
"""
return _gsw_ufuncs.ice_fraction_to_freeze_seawater(SA, CT, p, t_Ih)
ice_fraction_to_freeze_seawater.types = _gsw_ufuncs.ice_fraction_to_freeze_seawater.types
ice_fraction_to_freeze_seawater = match_args_return(ice_fraction_to_freeze_seawater)
+def infunnel(SA, CT, p):
+ """
+ "oceanographic funnel" check for the 75-term equation
+
+ Parameters
+ ----------
+ SA : array-like
+ Absolute Salinity, g/kg
+ CT : array-like
+ Conservative Temperature (ITS-90), degrees C
+ p : array-like
+ Sea pressure (absolute pressure minus 10.1325 dbar), dbar
+
+ Returns
+ -------
+ in_funnel : array-like,
+ 0, if SA, CT and p are outside the "funnel"
+ = 1, if SA, CT and p are inside the "funnel"
+
+
+ Notes
+ -----
+ gsw_infunnel "oceanographic funnel" check for the 75-term equation
+
+ USAGE:
+ in_funnel = gsw_infunnel(SA,CT,p)
+
+ INPUT:
+ SA = Absolute Salinity [ g kg^-1 ]
+ CT = Conservative Temperature (ITS-90) [ deg C ]
+ p = sea pressure [ dbar ]
+ ( i.e. absolute pressure - 10.1325 dbar )
+
+ SA & CT need to have the same dimensions.
+ p may have dimensions 1x1 or Mx1 or 1xN or MxN, where SA & CT are MxN.
+
+ OUTPUT:
+ in_funnel = 0, if SA, CT and p are outside the "funnel"
+ = 1, if SA, CT and p are inside the "funnel"
+ Note. The term "funnel" (McDougall et al., 2003) describes the range of
+ SA, CT and p over which the error in the fit of the computationally
+ efficient 75-term expression for specific volume in terms of SA, CT
+ and p was calculated (Roquet et al., 2015).
+
+ AUTHOR:
+ Trevor McDougall and Paul Barker [ help@teos-10.org ]
+
+ VERSION NUMBER: 3.06.13 (23rd May, 2021)
+
+
+ """
+ return _gsw_ufuncs.infunnel(SA, CT, p)
+infunnel.types = _gsw_ufuncs.infunnel.types
+infunnel = match_args_return(infunnel)
+
def internal_energy(SA, CT, p):
"""
Calculates specific internal energy of seawater using the
@@ -1833,6 +3207,32 @@ def internal_energy(SA, CT, p):
specific internal energy
+ Notes
+ -----
+ Note that the 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.internal_energy(SA, CT, p)
internal_energy.types = _gsw_ufuncs.internal_energy.types
@@ -1855,6 +3255,14 @@ def internal_energy_ice(t, p):
specific internal energy (u)
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.internal_energy_ice(t, p)
internal_energy_ice.types = _gsw_ufuncs.internal_energy_ice.types
@@ -1882,6 +3290,33 @@ def kappa(SA, CT, p):
isentropic compressibility of seawater
+ Notes
+ -----
+ Note that this 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See Eqn. (2.17.1) of this TEOS-10 Manual.
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.kappa(SA, CT, p)
kappa.types = _gsw_ufuncs.kappa.types
@@ -1906,6 +3341,14 @@ def kappa_const_t_ice(t, p):
isothermal compressibility
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.kappa_const_t_ice(t, p)
kappa_const_t_ice.types = _gsw_ufuncs.kappa_const_t_ice.types
@@ -1928,6 +3371,14 @@ def kappa_ice(t, p):
isentropic compressibility
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.kappa_ice(t, p)
kappa_ice.types = _gsw_ufuncs.kappa_ice.types
@@ -1952,6 +3403,16 @@ def kappa_t_exact(SA, t, p):
isentropic compressibility
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See Eqns. (2.16.1) and the row for kappa in Table P.1 of appendix P
+ of this TEOS-10 Manual.
+
+
"""
return _gsw_ufuncs.kappa_t_exact(SA, t, p)
kappa_t_exact.types = _gsw_ufuncs.kappa_t_exact.types
@@ -1978,6 +3439,15 @@ def latentheat_evap_CT(SA, CT):
latent heat of evaporation
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See section 3.39 of this TEOS-10 Manual.
+
+
"""
return _gsw_ufuncs.latentheat_evap_ct(SA, CT)
latentheat_evap_CT.types = _gsw_ufuncs.latentheat_evap_ct.types
@@ -2003,6 +3473,15 @@ def latentheat_evap_t(SA, t):
latent heat of evaporation
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See section 3.39 of this TEOS-10 Manual.
+
+
"""
return _gsw_ufuncs.latentheat_evap_t(SA, t)
latentheat_evap_t.types = _gsw_ufuncs.latentheat_evap_t.types
@@ -2029,6 +3508,31 @@ def latentheat_melting(SA, p):
latent heat of melting
+ References
+ ----------
+ IAPWS, 2008: Release on the IAPWS Formulation 2008 for the Thermodynamic
+ Properties of Seawater. The International Association for the Properties
+ of Water and Steam. Berlin, Germany, September 2008. This Release is
+ known as IAPWS-09.
+
+ IAPWS, 2009a: Revised Release on the Equation of State 2006 for H2O Ice
+ Ih. The International Association for the Properties of Water and Steam.
+ Doorwerth, The Netherlands, September 2009. This Release is known as
+ IAPWS-06
+
+ IAPWS, 2009b: Supplementary Release on a Computationally Efficient
+ Thermodynamic Formulation for Liquid Water for Oceanographic Use. The
+ International Association for the Properties of Water and Steam.
+ Doorwerth, The Netherlands, September 2009. This Release is known as
+ IAPWS-09.
+
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See section 3.34 of this TEOS-10 Manual.
+
+
"""
return _gsw_ufuncs.latentheat_melting(SA, p)
latentheat_melting.types = _gsw_ufuncs.latentheat_melting.types
@@ -2062,6 +3566,26 @@ def melting_ice_equilibrium_SA_CT_ratio(SA, p):
freezing temperature.
+ Notes
+ -----
+ The output, melting_ice_equilibrium_SA_CT_ratio, is dSA/dCT rather than
+ dCT/dSA. This is done so that when SA = 0, the output, dSA/dCT is zero
+ whereas dCT/dSA would be infinite.
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+
+ McDougall, T.J., P.M. Barker, R. Feistel and B.K. Galton-Fenzi, 2014:
+ Melting of Ice and Sea Ice into Seawater and Frazil Ice Formation.
+ Journal of Physical Oceanography, 44, 1751-1775.
+ See Eqn. (16) of this manuscript.
+
+
"""
return _gsw_ufuncs.melting_ice_equilibrium_sa_ct_ratio(SA, p)
melting_ice_equilibrium_SA_CT_ratio.types = _gsw_ufuncs.melting_ice_equilibrium_sa_ct_ratio.types
@@ -2095,6 +3619,36 @@ def melting_ice_equilibrium_SA_CT_ratio_poly(SA, p):
freezing temperature.
+ Notes
+ -----
+ The output, melting_ice_equilibrium_SA_CT_ratio, is dSA/dCT rather than
+ dCT/dSA. This is done so that when SA = 0, the output, dSA/dCT is zero
+ whereas dCT/dSA would be infinite.
+
+ Note that the 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+
+ McDougall, T.J., P.M. Barker, R. Feistel and B.K. Galton-Fenzi, 2014:
+ Melting of Ice and Sea Ice into Seawater and Frazil Ice Formation.
+ Journal of Physical Oceanography, 44, 1751-1775.
+ See Eqn. (16) of this manuscript.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.melting_ice_equilibrium_sa_ct_ratio_poly(SA, p)
melting_ice_equilibrium_SA_CT_ratio_poly.types = _gsw_ufuncs.melting_ice_equilibrium_sa_ct_ratio_poly.types
@@ -2138,6 +3692,31 @@ def melting_ice_into_seawater(SA, CT, p, w_Ih, t_Ih):
temperature.
+ Notes
+ -----
+ When the mass fraction w_Ih_final is calculated as being a positive
+ value, the seawater-ice mixture is at thermodynamic equilibrium.
+
+ This code returns w_Ih_final = 0 when the input bulk enthalpy, h_bulk,
+ is sufficiently large (i.e. sufficiently "warm") so that there is no ice
+ present in the final state. In this case the final state consists of
+ only seawater rather than being an equilibrium mixture of seawater and
+ ice which occurs when w_Ih_final is positive. Note that when
+ w_Ih_final = 0, the final seawater is not at the freezing temperature.
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+
+ McDougall, T.J., P.M. Barker, R. Feistel and B.K. Galton-Fenzi, 2014:
+ Melting of ice and sea ice into seawater, and frazil ice formation.
+ Journal of Physical Oceanography, 44, 1751-1775.
+
+
"""
return _gsw_ufuncs.melting_ice_into_seawater(SA, CT, p, w_Ih, t_Ih)
melting_ice_into_seawater.types = _gsw_ufuncs.melting_ice_into_seawater.types
@@ -2168,6 +3747,26 @@ def melting_ice_SA_CT_ratio(SA, CT, p, t_Ih):
into a large mass of seawater
+ Notes
+ -----
+ The output, melting_seaice_SA_CT_ratio, is dSA/dCT rather than dCT/dSA.
+ This is done so that when SA = 0, the output, dSA/dCT is zero whereas
+ dCT/dSA would be infinite.
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+
+ McDougall, T.J., P.M. Barker, R. Feistel and B.K. Galton-Fenzi, 2014:
+ Melting of Ice and Sea Ice into Seawater and Frazil Ice Formation.
+ Journal of Physical Oceanography, 44, 1751-1775.
+ See Eqn. (13) of this manuscript.
+
+
"""
return _gsw_ufuncs.melting_ice_sa_ct_ratio(SA, CT, p, t_Ih)
melting_ice_SA_CT_ratio.types = _gsw_ufuncs.melting_ice_sa_ct_ratio.types
@@ -2198,6 +3797,36 @@ def melting_ice_SA_CT_ratio_poly(SA, CT, p, t_Ih):
into a large mass of seawater
+ Notes
+ -----
+ The output, melting_seaice_SA_CT_ratio, is dSA/dCT rather than dCT/dSA.
+ This is done so that when SA = 0, the output, dSA/dCT is zero whereas
+ dCT/dSA would be infinite.
+
+ Note that the 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+
+ McDougall, T.J., P.M. Barker, R. Feistel and B.K. Galton-Fenzi, 2014:
+ Melting of Ice and Sea Ice into Seawater and Frazil Ice Formation.
+ Journal of Physical Oceanography, 44, 1751-1775.
+ See Eqn. (13) of this manuscript.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.melting_ice_sa_ct_ratio_poly(SA, CT, p, t_Ih)
melting_ice_SA_CT_ratio_poly.types = _gsw_ufuncs.melting_ice_sa_ct_ratio_poly.types
@@ -2232,6 +3861,31 @@ def melting_seaice_equilibrium_SA_CT_ratio(SA, p):
freezing temperature.
+ Notes
+ -----
+ Note that the output of this function, dSA/dCT is independent of the
+ sea ice salinity, SA_seaice. That is, the output applies equally to
+ pure ice Ih and to sea ice with seaice salinity, SA_seaice. This result
+ is proven in McDougall et al. (2014).
+
+ The output, melting_seaice_equilibrium_SA_CT_ratio, is dSA/dCT rather
+ than dCT/dSA. This is done so that when SA = 0, the output, dSA/dCT is
+ zero whereas dCT/dSA would be infinite.
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+
+ McDougall, T.J., P.M. Barker, R. Feistel and B.K. Galton-Fenzi, 2014:
+ Melting of Ice and Sea Ice into Seawater and Frazil Ice Formation.
+ Journal of Physical Oceanography, 44, 1751-1775.
+ See Eqn. (29) of this manuscript.
+
+
"""
return _gsw_ufuncs.melting_seaice_equilibrium_sa_ct_ratio(SA, p)
melting_seaice_equilibrium_SA_CT_ratio.types = _gsw_ufuncs.melting_seaice_equilibrium_sa_ct_ratio.types
@@ -2266,6 +3920,41 @@ def melting_seaice_equilibrium_SA_CT_ratio_poly(SA, p):
freezing temperature.
+ Notes
+ -----
+ Note that the output of this function, dSA/dCT is independent of the
+ sea ice salinity, SA_seaice. That is, the output applies equally to
+ pure ice Ih and to sea ice with seaice salinity, SA_seaice. This result
+ is proven in McDougall et al. (2014).
+
+ The output, melting_seaice_equilibrium_SA_CT_ratio, is dSA/dCT rather
+ than dCT/dSA. This is done so that when SA = 0, the output, dSA/dCT is
+ zero whereas dCT/dSA would be infinite.
+
+ Note that the 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+
+ McDougall, T.J., P.M. Barker, R. Feistel and B.K. Galton-Fenzi, 2014:
+ Melting of Ice and Sea Ice into Seawater and Frazil Ice Formation.
+ Journal of Physical Oceanography, 44, 1751-1775.
+ See Eqn. (29) of this manuscript.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.melting_seaice_equilibrium_sa_ct_ratio_poly(SA, p)
melting_seaice_equilibrium_SA_CT_ratio_poly.types = _gsw_ufuncs.melting_seaice_equilibrium_sa_ct_ratio_poly.types
@@ -2304,6 +3993,40 @@ def melting_seaice_into_seawater(SA, CT, p, w_seaice, SA_seaice, t_seaice):
sea ice (or ice) and the original seawater
+ Notes
+ -----
+ If the ice contains no salt (e.g. if it is of glacial origin), then the
+ input 'SA_seaice' should be set to zero.
+
+ Ice formed at the sea surface (sea ice) typically contains between 2 g/kg
+ and 12 g/kg of salt (defined as the mass of salt divided by the mass of
+ ice Ih plus brine) and this programme returns NaN's if the input
+ SA_seaice is greater than 15 g/kg. If the SA_seaice input is not zero,
+ usually this would imply that the pressure p should be zero, as sea ice
+ only occurs near the sea surface. The code does not impose that p = 0
+ if SA_seaice is non-zero. Rather, this is left to the user.
+
+ The Absolute Salinity, SA_brine, of the brine trapped in little pockets
+ in the sea ice, is in thermodynamic equilibrium with the ice Ih that
+ surrounds these pockets. As the sea ice temperature, t_seaice, may be
+ less than the freezing temperature, SA_brine is usually greater than the
+ Absolute Salinity of the seawater at the time and place when and where
+ the sea ice was formed. So usually SA_brine will be larger than SA.
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+
+ McDougall, T.J., P.M. Barker, R. Feistel and B.K. Galton-Fenzi, 2014:
+ Melting of Ice and Sea Ice into Seawater and Frazil Ice Formation.
+ Journal of Physical Oceanography, 44, 1751-1775.
+ Eqns. (8) and (9) are the simplifications when SA_seaice = 0.
+
+
"""
return _gsw_ufuncs.melting_seaice_into_seawater(SA, CT, p, w_seaice, SA_seaice, t_seaice)
melting_seaice_into_seawater.types = _gsw_ufuncs.melting_seaice_into_seawater.types
@@ -2337,6 +4060,41 @@ def melting_seaice_SA_CT_ratio(SA, CT, p, SA_seaice, t_seaice):
sea ice melts into a large mass of seawater
+ Notes
+ -----
+ Ice formed at the sea surface (sea ice) typically contains between 2 g/kg
+ and 12 g/kg of salt (defined as the mass of salt divided by the mass of
+ ice Ih plus brine) and this programme returns NaN's if the input
+ SA_seaice is greater than 15 g/kg. If the SA_seaice input is not zero,
+ usually this would imply that the pressure p should be zero, as sea ice
+ only occurs near the sea surface. The code does not impose that p = 0
+ if SA_seaice is non-zero. Rather, this is left to the user.
+
+ The Absolute Salinity, SA_brine, of the brine trapped in little pockets
+ in the sea ice, is in thermodynamic equilibrium with the ice Ih that
+ surrounds these pockets. As the seaice temperature, t_seaice, may be
+ less than the freezing temperature, SA_brine is usually greater than the
+ Absolute Salinity of the seawater at the time and place when and where
+ the sea ice was formed. So usually SA_brine will be larger than SA.
+
+ The output, melting_seaice_SA_CT_ratio, is dSA/dCT rather than dCT/dSA.
+ This is done so that when (SA - seaice_SA) = 0, the output, dSA/dCT is
+ zero whereas dCT/dSA would be infinite.
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+
+ McDougall, T.J., P.M. Barker, R. Feistel and B.K. Galton-Fenzi, 2014:
+ Melting of Ice and Sea Ice into Seawater and Frazil Ice Formation.
+ Journal of Physical Oceanography, 44, 1751-1775.
+ See Eqn. (28) of this manuscript.
+
+
"""
return _gsw_ufuncs.melting_seaice_sa_ct_ratio(SA, CT, p, SA_seaice, t_seaice)
melting_seaice_SA_CT_ratio.types = _gsw_ufuncs.melting_seaice_sa_ct_ratio.types
@@ -2370,6 +4128,51 @@ def melting_seaice_SA_CT_ratio_poly(SA, CT, p, SA_seaice, t_seaice):
sea ice melts into a large mass of seawater
+ Notes
+ -----
+ Ice formed at the sea surface (sea ice) typically contains between 2 g/kg
+ and 12 g/kg of salt (defined as the mass of salt divided by the mass of
+ ice Ih plus brine) and this programme returns NaN's if the input
+ SA_seaice is greater than 15 g/kg. If the SA_seaice input is not zero,
+ usually this would imply that the pressure p should be zero, as sea ice
+ only occurs near the sea surface. The code does not impose that p = 0
+ if SA_seaice is non-zero. Rather, this is left to the user.
+
+ The Absolute Salinity, SA_brine, of the brine trapped in little pockets
+ in the sea ice, is in thermodynamic equilibrium with the ice Ih that
+ surrounds these pockets. As the seaice temperature, t_seaice, may be
+ less than the freezing temperature, SA_brine is usually greater than the
+ Absolute Salinity of the seawater at the time and place when and where
+ the sea ice was formed. So usually SA_brine will be larger than SA.
+
+ The output, melting_seaice_SA_CT_ratio, is dSA/dCT rather than dCT/dSA.
+ This is done so that when (SA - seaice_SA) = 0, the output, dSA/dCT is
+ zero whereas dCT/dSA would be infinite.
+
+ Note that the 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+
+ McDougall, T.J., P.M. Barker, R. Feistel and B.K. Galton-Fenzi, 2014:
+ Melting of Ice and Sea Ice into Seawater and Frazil Ice Formation.
+ Journal of Physical Oceanography, 44, 1751-1775.
+ See Eqn. (31) of this manuscript.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.melting_seaice_sa_ct_ratio_poly(SA, CT, p, SA_seaice, t_seaice)
melting_seaice_SA_CT_ratio_poly.types = _gsw_ufuncs.melting_seaice_sa_ct_ratio_poly.types
@@ -2402,6 +4205,33 @@ def O2sol(SA, CT, p, lon, lat):
solubility of oxygen in micro-moles per kg
+ Notes
+ -----
+ Note that this algorithm has not been approved by IOC and is not work
+ from SCOR/IAPSO Working Group 127. It is included in the GSW
+ Oceanographic Toolbox as it seems to be oceanographic best practice.
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+ Benson, B.B., and D. Krause, 1984: The concentration and isotopic
+ fractionation of oxygen dissolved in freshwater and seawater in
+ equilibrium with the atmosphere. Limnology and Oceanography, 29,
+ 620-632.
+
+ Garcia, H.E., and L.I. Gordon, 1992: Oxygen solubility in seawater:
+ Better fitting equations. Limnology and Oceanography, 37, 1307-1312.
+
+ Garcia, H.E., and L.I. Gordon, 1993: Erratum: Oxygen solubility in
+ seawater: better fitting equations. Limnology and Oceanography, 38,
+ 656.
+
+
"""
return _gsw_ufuncs.o2sol(SA, CT, p, lon, lat)
O2sol.types = _gsw_ufuncs.o2sol.types
@@ -2428,6 +4258,33 @@ def O2sol_SP_pt(SP, pt):
solubility of oxygen in micro-moles per kg
+ Notes
+ -----
+ Note that this algorithm has not been approved by IOC and is not work
+ from SCOR/IAPSO Working Group 127. It is included in the GSW
+ Oceanographic Toolbox as it seems to be oceanographic best practice.
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+ Benson, B.B., and D. Krause, 1984: The concentration and isotopic
+ fractionation of oxygen dissolved in freshwater and seawater in
+ equilibrium with the atmosphere. Limnology and Oceanography, 29,
+ 620-632.
+
+ Garcia, H.E., and L.I. Gordon, 1992: Oxygen solubility in seawater:
+ Better fitting equations. Limnology and Oceanography, 37, 1307-1312.
+
+ Garcia, H.E., and L.I. Gordon, 1993: Erratum: Oxygen solubility in
+ seawater: better fitting equations. Limnology and Oceanography, 38,
+ 656.
+
+
"""
return _gsw_ufuncs.o2sol_sp_pt(SP, pt)
O2sol_SP_pt.types = _gsw_ufuncs.o2sol_sp_pt.types
@@ -2462,6 +4319,47 @@ def p_from_z(z, lat, geo_strf_dyn_height, sea_surface_geopotential):
( i.e. absolute pressure - 10.1325 dbar )
+ Notes
+ -----
+ Note. Height (z) is NEGATIVE in the ocean. Depth is -z.
+ Depth is not used in the GSW computer software library.
+
+ Note that this 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ McDougall, T.J., and S.J. Wotherspoon, 2013: A simple modification of
+ Newton's method to achieve convergence of order 1 + sqrt(2). Applied
+ Mathematics Letters, 29, pp. 20-25.
+
+ Moritz, H., 2000: Geodetic reference system 1980. J. Geodesy, 74,
+ pp. 128-133.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling, 90, pp. 29-43.
+
+ Saunders, P.M., 1981: Practical conversion of pressure to depth.
+ Journal of Physical Oceanography, 11, pp. 573-574.
+
+ This software is available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.p_from_z(z, lat, geo_strf_dyn_height, sea_surface_geopotential)
p_from_z.types = _gsw_ufuncs.p_from_z.types
@@ -2483,6 +4381,14 @@ def pot_enthalpy_from_pt_ice(pt0_ice):
potential enthalpy of ice
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.pot_enthalpy_from_pt_ice(pt0_ice)
pot_enthalpy_from_pt_ice.types = _gsw_ufuncs.pot_enthalpy_from_pt_ice.types
@@ -2506,6 +4412,14 @@ def pot_enthalpy_from_pt_ice_poly(pt0_ice):
potential enthalpy of ice
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.pot_enthalpy_from_pt_ice_poly(pt0_ice)
pot_enthalpy_from_pt_ice_poly.types = _gsw_ufuncs.pot_enthalpy_from_pt_ice_poly.types
@@ -2529,6 +4443,19 @@ def pot_enthalpy_ice_freezing(SA, p):
of seawater
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See sections 3.33 and 3.34 of this TEOS-10 Manual.
+
+ McDougall, T.J., P.M. Barker, R. Feistel and B.K. Galton-Fenzi, 2014:
+ Melting of Ice and Sea Ice into Seawater and Frazil Ice Formation.
+ Journal of Physical Oceanography, 44, 1751-1775.
+
+
"""
return _gsw_ufuncs.pot_enthalpy_ice_freezing(SA, p)
pot_enthalpy_ice_freezing.types = _gsw_ufuncs.pot_enthalpy_ice_freezing.types
@@ -2559,6 +4486,19 @@ def pot_enthalpy_ice_freezing_first_derivatives(SA, p):
(in Pa) at fixed Absolute Salinity
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See sections 3.33 and 3.34 of this TEOS-10 Manual.
+
+ McDougall, T.J., P.M. Barker, R. Feistel and B.K. Galton-Fenzi, 2014:
+ Melting of Ice and Sea Ice into Seawater and Frazil Ice Formation.
+ Journal of Physical Oceanography, 44, 1751-1775.
+
+
"""
return _gsw_ufuncs.pot_enthalpy_ice_freezing_first_derivatives(SA, p)
pot_enthalpy_ice_freezing_first_derivatives.types = _gsw_ufuncs.pot_enthalpy_ice_freezing_first_derivatives.types
@@ -2590,6 +4530,21 @@ def pot_enthalpy_ice_freezing_first_derivatives_poly(SA, p):
(in Pa) at fixed Absolute Salinity
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See sections 3.33 and 3.34 of this TEOS-10 Manual.
+
+ McDougall, T.J., P.M. Barker, R. Feistel and B.K. Galton-Fenzi, 2014:
+ Melting of Ice and Sea Ice into Seawater and Frazil Ice Formation.
+ Journal of Physical Oceanography, 44, 1751-1775.
+
+ McDougall et al. 2015: A reference for this polynomial.
+
+
"""
return _gsw_ufuncs.pot_enthalpy_ice_freezing_first_derivatives_poly(SA, p)
pot_enthalpy_ice_freezing_first_derivatives_poly.types = _gsw_ufuncs.pot_enthalpy_ice_freezing_first_derivatives_poly.types
@@ -2622,6 +4577,19 @@ def pot_enthalpy_ice_freezing_poly(SA, p):
of seawater
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See sections 3.33 and 3.34 of this TEOS-10 Manual.
+
+ McDougall, T.J., P.M. Barker, R. Feistel and B.K. Galton-Fenzi, 2014:
+ Melting of Ice and Sea Ice into Seawater and Frazil Ice Formation.
+ Journal of Physical Oceanography, 44, 1751-1775.
+
+
"""
return _gsw_ufuncs.pot_enthalpy_ice_freezing_poly(SA, p)
pot_enthalpy_ice_freezing_poly.types = _gsw_ufuncs.pot_enthalpy_ice_freezing_poly.types
@@ -2650,6 +4618,15 @@ def pot_rho_t_exact(SA, t, p, p_ref):
potential density (not potential density anomaly)
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See section 3.4 of this TEOS-10 Manual.
+
+
"""
return _gsw_ufuncs.pot_rho_t_exact(SA, t, p, p_ref)
pot_rho_t_exact.types = _gsw_ufuncs.pot_rho_t_exact.types
@@ -2672,6 +4649,15 @@ def pressure_coefficient_ice(t, p):
pressure coefficient of ice
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See Eqn. (2.15.1) of this TEOS-10 Manual.
+
+
"""
return _gsw_ufuncs.pressure_coefficient_ice(t, p)
pressure_coefficient_ice.types = _gsw_ufuncs.pressure_coefficient_ice.types
@@ -2703,6 +4689,19 @@ def pressure_freezing_CT(SA, CT, saturation_fraction):
( i.e. absolute pressure - 10.1325 dbar )
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See section 3.33 of this TEOS-10 Manual.
+
+ McDougall T. J. and S. J. Wotherspoon, 2013: A simple modification of
+ Newton's method to achieve convergence of order 1 + sqrt(2). Applied
+ Mathematics Letters, 29, 20-25.
+
+
"""
return _gsw_ufuncs.pressure_freezing_ct(SA, CT, saturation_fraction)
pressure_freezing_CT.types = _gsw_ufuncs.pressure_freezing_ct.types
@@ -2733,6 +4732,19 @@ def pt0_from_t(SA, t, p):
with reference sea pressure (p_ref) = 0 dbar.
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See section 3.1 of this TEOS-10 Manual.
+
+ McDougall T. J. and S. J. Wotherspoon, 2013: A simple modification of
+ Newton's method to achieve convergence of order 1 + sqrt(2). Applied
+ Mathematics Letters, 29, 20-25.
+
+
"""
return _gsw_ufuncs.pt0_from_t(SA, t, p)
pt0_from_t.types = _gsw_ufuncs.pt0_from_t.types
@@ -2757,6 +4769,19 @@ def pt0_from_t_ice(t, p):
zero dbar (ITS-90)
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See appendix I of this TEOS-10 Manual.
+
+ McDougall T. J. and S. J. Wotherspoon, 2013: A simple modification of
+ Newton's method to achieve convergence of order 1 + sqrt(2). Applied
+ Mathematics Letters, 29, 20-25.
+
+
"""
return _gsw_ufuncs.pt0_from_t_ice(t, p)
pt0_from_t_ice.types = _gsw_ufuncs.pt0_from_t_ice.types
@@ -2790,6 +4815,17 @@ def pt_first_derivatives(SA, CT):
pt_CT is dimensionless.
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See Eqns. (A.12.6), (A.12.3), (P.6) and (P.8) of this TEOS-10 Manual.
+
+ This software is available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.pt_first_derivatives(SA, CT)
pt_first_derivatives.types = _gsw_ufuncs.pt_first_derivatives.types
@@ -2817,6 +4853,19 @@ def pt_from_CT(SA, CT):
of zero dbar (ITS-90)
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See sections 3.1 and 3.3 of this TEOS-10 Manual.
+
+ McDougall, T.J., and S.J. Wotherspoon, 2014: A simple modification of
+ Newton's method to achieve convergence of order 1 + sqrt(2). Applied
+ Mathematics Letters, 29, 20-25.
+
+
"""
return _gsw_ufuncs.pt_from_ct(SA, CT)
pt_from_CT.types = _gsw_ufuncs.pt_from_ct.types
@@ -2841,6 +4890,19 @@ def pt_from_entropy(SA, entropy):
with reference sea pressure (p_ref) = 0 dbar.
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See appendix A.10 of this TEOS-10 Manual.
+
+ McDougall T. J. and S. J. Wotherspoon, 2013: A simple modification of
+ Newton's method to achieve convergence of order 1 + sqrt(2). Applied
+ Mathematics Letters, 29, 20-25.
+
+
"""
return _gsw_ufuncs.pt_from_entropy(SA, entropy)
pt_from_entropy.types = _gsw_ufuncs.pt_from_entropy.types
@@ -2863,6 +4925,22 @@ def pt_from_pot_enthalpy_ice(pot_enthalpy_ice):
potential temperature of ice (ITS-90)
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+ McDougall, T.J., P.M. Barker, R. Feistel and B.K. Galton-Fenzi, 2014:
+ Melting of Ice and Sea Ice into Seawater and Frazil Ice Formation.
+ Journal of Physical Oceanography, 44, 1751-1775.
+
+ McDougall T. J. and S. J. Wotherspoon, 2014: A simple modification of
+ Newton's method to achieve convergence of order 1 + sqrt(2). Applied
+ Mathematics Letters, 29, 20-25.
+
+
"""
return _gsw_ufuncs.pt_from_pot_enthalpy_ice(pot_enthalpy_ice)
pt_from_pot_enthalpy_ice.types = _gsw_ufuncs.pt_from_pot_enthalpy_ice.types
@@ -2886,6 +4964,14 @@ def pt_from_pot_enthalpy_ice_poly(pot_enthalpy_ice):
potential temperature of ice (ITS-90)
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.pt_from_pot_enthalpy_ice_poly(pot_enthalpy_ice)
pt_from_pot_enthalpy_ice_poly.types = _gsw_ufuncs.pt_from_pot_enthalpy_ice_poly.types
@@ -2918,6 +5004,19 @@ def pt_from_t(SA, t, p, p_ref):
ITS-90 temperature scale
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See section 3.1 of this TEOS-10 Manual.
+
+ McDougall T. J. and S. J. Wotherspoon, 2013: A simple modification of
+ Newton's method to achieve convergence of order 1 + sqrt(2). Applied
+ Mathematics Letters, 29, 20-25.
+
+
"""
return _gsw_ufuncs.pt_from_t(SA, t, p, p_ref)
pt_from_t.types = _gsw_ufuncs.pt_from_t.types
@@ -2944,6 +5043,25 @@ def pt_from_t_ice(t, p, p_ref):
p_ref, on the ITS-90 temperature scale
+ Notes
+ -----
+ A faster gsw routine exists if p_ref is indeed zero dbar. This routine
+ is "gsw_pt0_from_t_ice(t,p)".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See appendix I of this TEOS-10 Manual.
+
+ McDougall T. J. and S. J. Wotherspoon, 2014: A simple modification of
+ Newton's method to achieve convergence of order 1 + sqrt(2). Applied
+ Mathematics Letters, 29, 20-25.
+
+
"""
return _gsw_ufuncs.pt_from_t_ice(t, p, p_ref)
pt_from_t_ice.types = _gsw_ufuncs.pt_from_t_ice.types
@@ -2984,6 +5102,17 @@ def pt_second_derivatives(SA, CT):
Conservative Temperature at constant SA.
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See Eqns. (A.12.9) and (A.12.10) of this TEOS-10 Manual.
+
+ This software is available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.pt_second_derivatives(SA, CT)
pt_second_derivatives.types = _gsw_ufuncs.pt_second_derivatives.types
@@ -3010,6 +5139,37 @@ def rho(SA, CT, p):
in-situ density
+ Notes
+ -----
+ Note that potential density with respect to reference pressure, pr, is
+ obtained by calling this function with the pressure argument being pr
+ (i.e. "gsw_rho(SA,CT,pr)").
+
+ Note that this 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See appendix A.20 and appendix K of this TEOS-10 Manual.
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling, 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.rho(SA, CT, p)
rho.types = _gsw_ufuncs.rho.types
@@ -3044,6 +5204,32 @@ def rho_alpha_beta(SA, CT, p):
coefficient at constant Conservative Temperature
+ Notes
+ -----
+ Note that potential density (pot_rho) with respect to reference pressure
+ p_ref is obtained by calling this function with the pressure argument
+ being p_ref as in [pot_rho, ~, ~] = gsw_rho_alpha_beta(SA,CT,p_ref).
+
+ Note that this 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See appendix A.20 and appendix K of this TEOS-10 Manual.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.rho_alpha_beta(SA, CT, p)
rho_alpha_beta.types = _gsw_ufuncs.rho_alpha_beta.types
@@ -3080,6 +5266,28 @@ def rho_first_derivatives(SA, CT, p):
with respect to pressure in Pa
+ Notes
+ -----
+ Note that this 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See appendix A.20 and appendix K of this TEOS-10 Manual.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.rho_first_derivatives(SA, CT, p)
rho_first_derivatives.types = _gsw_ufuncs.rho_first_derivatives.types
@@ -3112,6 +5320,40 @@ def rho_first_derivatives_wrt_enthalpy(SA, CT, p):
SA and CT at constant p.
+ Notes
+ -----
+ Note that this function uses the using the computationally-efficient
+ 75 term expression for specific volume (Roquet et al., 2015). There is
+ an alternative to calling this function, namely
+ gsw_specvol_first_derivatives_wrt_enthalpy_CT_exact(SA,CT,p) which uses
+ the full Gibbs function (IOC et al., 2010).
+
+ This 75-term equation has been fitted in a restricted range of parameter
+ space, and is most accurate inside the "oceanographic funnel" described
+ in McDougall et al. (2010). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+ This software is available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.rho_first_derivatives_wrt_enthalpy(SA, CT, p)
rho_first_derivatives_wrt_enthalpy.types = _gsw_ufuncs.rho_first_derivatives_wrt_enthalpy.types
@@ -3136,6 +5378,14 @@ def rho_ice(t, p):
in-situ density of ice (not density anomaly)
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.rho_ice(t, p)
rho_ice.types = _gsw_ufuncs.rho_ice.types
@@ -3183,6 +5433,40 @@ def rho_second_derivatives(SA, CT, p):
constant SA.
+ Notes
+ -----
+ Note that this function uses the using the computationally-efficient
+ expression for specific volume (Roquet et al., 2015). There is an
+ alternative to calling this function, namely
+ gsw_rho_second_derivatives_CT_exact(SA,CT,p) which uses the full Gibbs
+ function (IOC et al., 2010).
+
+ This 75-term equation has been fitted in a restricted range of parameter
+ space, and is most accurate inside the "oceanographic funnel" described
+ in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+ This software is available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.rho_second_derivatives(SA, CT, p)
rho_second_derivatives.types = _gsw_ufuncs.rho_second_derivatives.types
@@ -3221,6 +5505,40 @@ def rho_second_derivatives_wrt_enthalpy(SA, CT, p):
constant SA & p
+ Notes
+ -----
+ Note that this function uses the using the computationally-efficient
+ expression for specific volume (Roquet et al., 2015). There is an
+ alternative to calling this function, namely
+ gsw_rho_second_derivatives_wrt_enthalpy_CT_exact(SA,CT,p) which uses
+ the full Gibbs function (IOC et al., 2010).
+
+ This 75-term equation has been fitted in a restricted range of parameter
+ space, and is most accurate inside the "oceanographic funnel" described
+ in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+ This software is available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.rho_second_derivatives_wrt_enthalpy(SA, CT, p)
rho_second_derivatives_wrt_enthalpy.types = _gsw_ufuncs.rho_second_derivatives_wrt_enthalpy.types
@@ -3247,6 +5565,15 @@ def rho_t_exact(SA, t, p):
in-situ density (not density anomaly)
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See section 2.8 of this TEOS-10 Manual.
+
+
"""
return _gsw_ufuncs.rho_t_exact(SA, t, p)
rho_t_exact.types = _gsw_ufuncs.rho_t_exact.types
@@ -3279,6 +5606,23 @@ def SA_freezing_from_CT(CT, p, saturation_fraction):
pressure and air saturation fraction.
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See section 3.33 of this TEOS-10 Manual.
+
+ McDougall, T.J., P.M. Barker, R. Feistel and B.K. Galton-Fenzi, 2014:
+ Melting of Ice and Sea Ice into Seawater and Frazil Ice Formation.
+ Journal of Physical Oceanography, 44, 1751-1775.
+
+ McDougall, T.J., and S.J. Wotherspoon, 2014: A simple modification of
+ Newton's method to achieve convergence of order 1 + sqrt(2). Applied
+ Mathematics Letters, 29, 20-25.
+
+
"""
return _gsw_ufuncs.sa_freezing_from_ct(CT, p, saturation_fraction)
SA_freezing_from_CT.types = _gsw_ufuncs.sa_freezing_from_ct.types
@@ -3310,6 +5654,23 @@ def SA_freezing_from_CT_poly(CT, p, saturation_fraction):
pressure and air saturation fraction.
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See section 3.33 of this TEOS-10 Manual.
+
+ McDougall, T.J., P.M. Barker, R. Feistel and B.K. Galton-Fenzi, 2014:
+ Melting of Ice and Sea Ice into Seawater and Frazil Ice Formation.
+ Journal of Physical Oceanography, 44, 1751-1775.
+
+ McDougall T. J. and S. J. Wotherspoon, 2014: A simple modification of
+ Newton's method to achieve convergence of order 1 + sqrt(2). Applied
+ Mathematics Letters, 29, 20-25.
+
+
"""
return _gsw_ufuncs.sa_freezing_from_ct_poly(CT, p, saturation_fraction)
SA_freezing_from_CT_poly.types = _gsw_ufuncs.sa_freezing_from_ct_poly.types
@@ -3341,6 +5702,23 @@ def SA_freezing_from_t(t, p, saturation_fraction):
air saturation fraction.
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See section 3.33 of this TEOS-10 Manual.
+
+ McDougall, T.J., P.M. Barker, R. Feistel and B.K. Galton-Fenzi, 2014:
+ Melting of Ice and Sea Ice into Seawater and Frazil Ice Formation.
+ Journal of Physical Oceanography, 44, 1751-1775.
+
+ McDougall, T.J., and S.J. Wotherspoon, 2013: A simple modification of
+ Newton's method to achieve convergence of order 1 + sqrt(2). Applied
+ Mathematics Letters, 29, 20-25.
+
+
"""
return _gsw_ufuncs.sa_freezing_from_t(t, p, saturation_fraction)
SA_freezing_from_t.types = _gsw_ufuncs.sa_freezing_from_t.types
@@ -3372,6 +5750,23 @@ def SA_freezing_from_t_poly(t, p, saturation_fraction):
air saturation fraction.
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See section 3.33 of this TEOS-10 Manual.
+
+ McDougall, T.J., P.M. Barker, R. Feistel and B.K. Galton-Fenzi, 2014:
+ Melting of Ice and Sea Ice into Seawater and Frazil Ice Formation.
+ Journal of Physical Oceanography, 44, 1751-1775.
+
+ McDougall T. J. and S. J. Wotherspoon, 2014: A simple modification of
+ Newton's method to achieve convergence of order 1 + sqrt(2). Applied
+ Mathematics Letters, 29, 20-25.
+
+
"""
return _gsw_ufuncs.sa_freezing_from_t_poly(t, p, saturation_fraction)
SA_freezing_from_t_poly.types = _gsw_ufuncs.sa_freezing_from_t_poly.types
@@ -3399,6 +5794,37 @@ def SA_from_rho(rho, CT, p):
Absolute Salinity.
+ Notes
+ -----
+ Note that this 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See section 2.5 of this TEOS-10 Manual.
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ Millero, F.J., R. Feistel, D.G. Wright, and T.J. McDougall, 2008:
+ The composition of Standard Seawater and the definition of the
+ Reference-Composition Salinity Scale. Deep-Sea Res. I, 55, 50-72.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.sa_from_rho(rho, CT, p)
SA_from_rho.types = _gsw_ufuncs.sa_from_rho.types
@@ -3427,6 +5853,20 @@ def SA_from_SP(SP, p, lon, lat):
Absolute Salinity
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See section 2.5 and appendices A.4 and A.5 of this TEOS-10 Manual.
+
+ McDougall, T.J., D.R. Jackett, F.J. Millero, R. Pawlowicz and
+ P.M. Barker, 2012: A global algorithm for estimating Absolute Salinity.
+ Ocean Science, 8, 1123-1134.
+ http://www.ocean-sci.net/8/1123/2012/os-8-1123-2012.pdf
+
+
"""
return _gsw_ufuncs.sa_from_sp(SP, p, lon, lat)
SA_from_SP.types = _gsw_ufuncs.sa_from_sp.types
@@ -3455,6 +5895,24 @@ def SA_from_SP_Baltic(SP, lon, lat):
Absolute Salinity in the Baltic Sea
+ References
+ ----------
+ Feistel, R., S. Weinreben, H. Wolf, S. Seitz, P. Spitzer, B. Adel,
+ G. Nausch, B. Schneider and D. G. Wright, 2010: Density and Absolute
+ Salinity of the Baltic Sea 2006-2009. Ocean Science, 6, 3-24.
+ http://www.ocean-sci.net/6/3/2010/os-6-3-2010.pdf
+
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+ McDougall, T.J., D.R. Jackett, F.J. Millero, R. Pawlowicz and
+ P.M. Barker, 2012: A global algorithm for estimating Absolute Salinity.
+ Ocean Science, 8, 1123-1134.
+ http://www.ocean-sci.net/8/1123/2012/os-8-1123-2012.pdf
+
+
"""
return _gsw_ufuncs.sa_from_sp_baltic(SP, lon, lat)
SA_from_SP_Baltic.types = _gsw_ufuncs.sa_from_sp_baltic.types
@@ -3481,6 +5939,19 @@ def SA_from_Sstar(Sstar, p, lon, lat):
Absolute Salinity
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+ McDougall, T.J., D.R. Jackett, F.J. Millero, R. Pawlowicz and
+ P.M. Barker, 2012: A global algorithm for estimating Absolute Salinity.
+ Ocean Science, 8, 1123-1134.
+ http://www.ocean-sci.net/8/1123/2012/os-8-1123-2012.pdf
+
+
"""
return _gsw_ufuncs.sa_from_sstar(Sstar, p, lon, lat)
SA_from_Sstar.types = _gsw_ufuncs.sa_from_sstar.types
@@ -3507,6 +5978,38 @@ def SAAR(p, lon, lat):
Absolute Salinity Anomaly Ratio
+ Notes
+ -----
+ This function uses version 3.0 of the SAAR look up table (15th May 2011).
+
+ The Absolute Salinity Anomaly Ratio in the Baltic Sea is evaluated
+ separately, since it is a function of Practical Salinity, not of space.
+ The present function returns a SAAR of zero for data in the Baltic Sea.
+ The correct way of calculating Absolute Salinity in the Baltic Sea is by
+ calling gsw_SA_from_SP.
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+ McDougall, T.J., D.R. Jackett, F.J. Millero, R. Pawlowicz and
+ P.M. Barker, 2012: A global algorithm for estimating Absolute Salinity.
+ Ocean Science, 8, 1123-1134.
+ http://www.ocean-sci.net/8/1123/2012/os-8-1123-2012.pdf
+
+ See also gsw_SA_from_SP, gsw_deltaSA_atlas
+
+ Reference page in Help browser
+ doc gsw_SAAR
+ Note that this reference page includes the code contained in gsw_SAAR.
+ We have opted to encode this programme as it is a global standard and
+ such we cannot allow anyone to change it.
+
+
"""
return _gsw_ufuncs.saar(p, lon, lat)
SAAR.types = _gsw_ufuncs.saar.types
@@ -3553,6 +6056,24 @@ def seaice_fraction_to_freeze_seawater(SA, CT, p, SA_seaice, t_seaice):
This output is between 0 and 1.
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See sections 3.33 and 3.34 of this TEOS-10 Manual.
+
+ McDougall T.J. and S.J. Wotherspoon, 2013: A simple modification of
+ Newton's method to achieve convergence of order 1 + sqrt(2). Applied
+ Mathematics Letters, 29, 20-25.
+
+ McDougall, T.J., P.M. Barker, R. Feistel and B.K. Galton-Fenzi, 2014:
+ Melting of Ice and Sea Ice into Seawater and Frazil Ice Formation.
+ Journal of Physical Oceanography, 44, 1751-1775.
+ See Eqn. (23) of this manuscript.
+
+
"""
return _gsw_ufuncs.seaice_fraction_to_freeze_seawater(SA, CT, p, SA_seaice, t_seaice)
seaice_fraction_to_freeze_seawater.types = _gsw_ufuncs.seaice_fraction_to_freeze_seawater.types
@@ -3581,6 +6102,33 @@ def sigma0(SA, CT):
that is, this potential density - 1000 kg/m^3.
+ Notes
+ -----
+ Note that this 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See Eqn. (A.30.1) of this TEOS-10 Manual.
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.sigma0(SA, CT)
sigma0.types = _gsw_ufuncs.sigma0.types
@@ -3610,6 +6158,33 @@ def sigma1(SA, CT):
that is, this potential density - 1000 kg/m^3.
+ Notes
+ -----
+ Note that this 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See Eqn. (A.30.1) of this TEOS-10 Manual.
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.sigma1(SA, CT)
sigma1.types = _gsw_ufuncs.sigma1.types
@@ -3638,6 +6213,33 @@ def sigma2(SA, CT):
that is, this potential density - 1000 kg/m^3.
+ Notes
+ -----
+ Note that this 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See Eqn. (A.30.1) of this TEOS-10 Manual.
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.sigma2(SA, CT)
sigma2.types = _gsw_ufuncs.sigma2.types
@@ -3666,6 +6268,33 @@ def sigma3(SA, CT):
that is, this potential density - 1000 kg/m^3.
+ Notes
+ -----
+ Note that this 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See Eqn. (A.30.1) of this TEOS-10 Manual.
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.sigma3(SA, CT)
sigma3.types = _gsw_ufuncs.sigma3.types
@@ -3694,6 +6323,33 @@ def sigma4(SA, CT):
that is, this potential density - 1000 kg/m^3.
+ Notes
+ -----
+ Note that this 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See Eqn. (A.30.1) of this TEOS-10 Manual.
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.sigma4(SA, CT)
sigma4.types = _gsw_ufuncs.sigma4.types
@@ -3721,6 +6377,33 @@ def sound_speed(SA, CT, p):
speed of sound in seawater
+ Notes
+ -----
+ Note that this 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See Eqn. (2.17.1) of this TEOS-10 Manual.
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.sound_speed(SA, CT, p)
sound_speed.types = _gsw_ufuncs.sound_speed.types
@@ -3743,6 +6426,14 @@ def sound_speed_ice(t, p):
compression speed of sound in ice
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.sound_speed_ice(t, p)
sound_speed_ice.types = _gsw_ufuncs.sound_speed_ice.types
@@ -3767,6 +6458,15 @@ def sound_speed_t_exact(SA, t, p):
speed of sound in seawater
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See Eqn. (2.17.1) of this TEOS-10 Manual.
+
+
"""
return _gsw_ufuncs.sound_speed_t_exact(SA, t, p)
sound_speed_t_exact.types = _gsw_ufuncs.sound_speed_t_exact.types
@@ -3799,6 +6499,27 @@ def SP_from_C(C, t, p):
Practical Salinity on the PSS-78 scale
+ References
+ ----------
+ Culkin and Smith, 1980: Determination of the Concentration of Potassium
+ Chloride Solution Having the Same Electrical Conductivity, at 15C and
+ Infinite Frequency, as Standard Seawater of Salinity 35.0000
+ (Chlorinity 19.37394), IEEE J. Oceanic Eng, 5, 22-23.
+
+ Hill, K.D., T.M. Dauphinee & D.J. Woods, 1986: The extension of the
+ Practical Salinity Scale 1978 to low salinities. IEEE J. Oceanic Eng.,
+ 11, 109 - 112.
+
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See appendix E of this TEOS-10 Manual.
+
+ Unesco, 1983: Algorithms for computation of fundamental properties of
+ seawater. Unesco Technical Papers in Marine Science, 44, 53 pp.
+
+
"""
return _gsw_ufuncs.sp_from_c(C, t, p)
SP_from_C.types = _gsw_ufuncs.sp_from_c.types
@@ -3825,6 +6546,19 @@ def SP_from_SA(SA, p, lon, lat):
Practical Salinity (PSS-78)
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+ McDougall, T.J., D.R. Jackett, F.J. Millero, R. Pawlowicz and
+ P.M. Barker, 2012: A global algorithm for estimating Absolute Salinity.
+ Ocean Science, 8, 1123-1134.
+ http://www.ocean-sci.net/8/1123/2012/os-8-1123-2012.pdf
+
+
"""
return _gsw_ufuncs.sp_from_sa(SA, p, lon, lat)
SP_from_SA.types = _gsw_ufuncs.sp_from_sa.types
@@ -3852,6 +6586,24 @@ def SP_from_SA_Baltic(SA, lon, lat):
Practical Salinity
+ References
+ ----------
+ Feistel, R., S. Weinreben, H. Wolf, S. Seitz, P. Spitzer, B. Adel,
+ G. Nausch, B. Schneider and D. G. Wright, 2010c: Density and Absolute
+ Salinity of the Baltic Sea 2006-2009. Ocean Science, 6, 3-24.
+ http://www.ocean-sci.net/6/3/2010/os-6-3-2010.pdf
+
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+ McDougall, T.J., D.R. Jackett, F.J. Millero, R. Pawlowicz and
+ P.M. Barker, 2012: A global algorithm for estimating Absolute Salinity.
+ Ocean Science, 8, 1123-1134.
+ http://www.ocean-sci.net/8/1123/2012/os-8-1123-2012.pdf
+
+
"""
return _gsw_ufuncs.sp_from_sa_baltic(SA, lon, lat)
SP_from_SA_Baltic.types = _gsw_ufuncs.sp_from_sa_baltic.types
@@ -3872,6 +6624,15 @@ def SP_from_SK(SK):
Practical Salinity (PSS-78)
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See Appendix A.3 of this TEOS-10 Manual.
+
+
"""
return _gsw_ufuncs.sp_from_sk(SK)
SP_from_SK.types = _gsw_ufuncs.sp_from_sk.types
@@ -3892,6 +6653,14 @@ def SP_from_SR(SR):
Practical Salinity (PSS-78)
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.sp_from_sr(SR)
SP_from_SR.types = _gsw_ufuncs.sp_from_sr.types
@@ -3918,6 +6687,19 @@ def SP_from_Sstar(Sstar, p, lon, lat):
Practical Salinity (PSS-78)
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+ McDougall, T.J., D.R. Jackett, F.J. Millero, R. Pawlowicz and
+ P.M. Barker, 2012: A global algorithm for estimating Absolute Salinity.
+ Ocean Science, 8, 1123-1134.
+ http://www.ocean-sci.net/8/1123/2012/os-8-1123-2012.pdf
+
+
"""
return _gsw_ufuncs.sp_from_sstar(Sstar, p, lon, lat)
SP_from_Sstar.types = _gsw_ufuncs.sp_from_sstar.types
@@ -3947,6 +6729,31 @@ def SP_salinometer(Rt, t):
t may have dimensions 1x1 or Mx1 or 1xN or MxN, where Rt is MxN.
+ Notes
+ -----
+ A laboratory salinometer has the ratio of conductivities, Rt, as an
+ output, and the present function uses this conductivity ratio and the
+ temperature t of the salinometer bath as the two input variables.
+
+
+ References
+ ----------
+ Fofonoff, P. and R.C. Millard Jr. 1983: Algorithms for computation of
+ fundamental properties of seawater. Unesco Tech. Pap. in Mar. Sci., 44,
+ 53 pp.
+
+ Hill, K.D., T.M. Dauphinee & D.J. Woods, 1986: The extension of the
+ Practical Salinity Scale 1978 to low salinities. IEEE J. Oceanic Eng.,
+ 11, 109 - 112.
+
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See appendix E of this TEOS-10 Manual, and in particular,
+ Eqns. (E.2.1) and (E.2.6).
+
+
"""
return _gsw_ufuncs.sp_salinometer(Rt, t)
SP_salinometer.types = _gsw_ufuncs.sp_salinometer.types
@@ -3973,6 +6780,34 @@ def specvol(SA, CT, p):
specific volume
+ Notes
+ -----
+ Note that the 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmos. Ocean. Tech., 20,
+ 730-741.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+ This software is available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.specvol(SA, CT, p)
specvol.types = _gsw_ufuncs.specvol.types
@@ -4007,6 +6842,33 @@ def specvol_alpha_beta(SA, CT, p):
coefficient at constant Conservative Temperature
+ Notes
+ -----
+ Note that this 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See appendix A.20 and appendix K of this TEOS-10 Manual.
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.specvol_alpha_beta(SA, CT, p)
specvol_alpha_beta.types = _gsw_ufuncs.specvol_alpha_beta.types
@@ -4036,6 +6898,33 @@ def specvol_anom_standard(SA, CT, p):
specific volume anomaly
+ Notes
+ -----
+ Note that this 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See Eqn. (3.7.3) of this TEOS-10 Manual.
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.specvol_anom_standard(SA, CT, p)
specvol_anom_standard.types = _gsw_ufuncs.specvol_anom_standard.types
@@ -4074,6 +6963,40 @@ def specvol_first_derivatives(SA, CT, p):
P at constant SA and CT.
+ Notes
+ -----
+ Note that this function uses the using the computationally-efficient
+ 75-term expression for specific volume (Roquet et al., 2015). There is
+ an alternative to calling this function, namely
+ gsw_specvol_first_derivatives_CT_exact(SA,CT,p) which uses the full
+ Gibbs function (IOC et al., 2010).
+
+ This 75-term equation has been fitted in a restricted range of parameter
+ space, and is most accurate inside the "oceanographic funnel" described
+ in McDougall et al. (2010). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+ This software is available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.specvol_first_derivatives(SA, CT, p)
specvol_first_derivatives.types = _gsw_ufuncs.specvol_first_derivatives.types
@@ -4107,6 +7030,40 @@ def specvol_first_derivatives_wrt_enthalpy(SA, CT, p):
SA and CT at constant p.
+ Notes
+ -----
+ Note that this function uses the using the computationally-efficient
+ 75 term expression for specific volume (Roquet et al., 2015). There is
+ an alternative to calling this function, namely
+ gsw_specvol_first_derivatives_wrt_enthalpy_CT_exact(SA,CT,p) which uses
+ the full Gibbs function (IOC et al., 2010).
+
+ This 75-term equation has been fitted in a restricted range of parameter
+ space, and is most accurate inside the "oceanographic funnel" described
+ in McDougall et al. (2010). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+ This software is available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.specvol_first_derivatives_wrt_enthalpy(SA, CT, p)
specvol_first_derivatives_wrt_enthalpy.types = _gsw_ufuncs.specvol_first_derivatives_wrt_enthalpy.types
@@ -4129,6 +7086,14 @@ def specvol_ice(t, p):
specific volume
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.specvol_ice(t, p)
specvol_ice.types = _gsw_ufuncs.specvol_ice.types
@@ -4177,6 +7142,35 @@ def specvol_second_derivatives(SA, CT, p):
CT and P at constant SA.
+ Notes
+ -----
+ Note that this function uses the using the computationally-efficient
+ 75-term expression for specific volume (Roquet et al., 2015). There is
+ an alternative to calling this function, namely
+ gsw_specvol_second_derivatives_CT_exact(SA,CT,p) which uses the full
+ Gibbs function (IOC et al., 2010).
+
+ Note that the 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+ This software is available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.specvol_second_derivatives(SA, CT, p)
specvol_second_derivatives.types = _gsw_ufuncs.specvol_second_derivatives.types
@@ -4215,11 +7209,82 @@ def specvol_second_derivatives_wrt_enthalpy(SA, CT, p):
constant SA & p.
+ Notes
+ -----
+ Note that this function uses the using the computationally-efficient
+ 75 term expression for specific volume (Roquet et al., 2015). There is
+ an alternative to calling this function, namely
+ gsw_specvol_second_derivatives_wrt_enthalpy_CT_exact(SA,CT,p) which uses
+ the full Gibbs function (IOC et al., 2010).
+
+ This 75-term equation has been fitted in a restricted range of parameter
+ space, and is most accurate inside the "oceanographic funnel" described
+ in McDougall et al. (2010). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+ This software is available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.specvol_second_derivatives_wrt_enthalpy(SA, CT, p)
specvol_second_derivatives_wrt_enthalpy.types = _gsw_ufuncs.specvol_second_derivatives_wrt_enthalpy.types
specvol_second_derivatives_wrt_enthalpy = match_args_return(specvol_second_derivatives_wrt_enthalpy)
+def specvol_SSO_0(p):
+ """
+ specific volume at (SSO,CT=0,p)
+
+ Parameters
+ ----------
+ p : array-like
+ Sea pressure (absolute pressure minus 10.1325 dbar), dbar
+
+ Returns
+ -------
+ double, array
+
+ Notes
+ -----
+ sw_specvol_SSO_0 specific volume at (SSO,CT=0,p)
+ (75-term equation)
+ This function calculates specific volume at the Standard Ocean Salinity,
+ SSO, and at a Conservative Temperature of zero degrees C, as a function
+ of pressure, p, in dbar, using a streamlined version of the 75-term CT
+ version of specific volume, that is, a streamlined version of the code
+ "gsw_specvol(SA,CT,p)".
+
+ VERSION NUMBER: 3.06.12 (25th May, 2020)
+
+ References
+ ----------
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
+ """
+ return _gsw_ufuncs.specvol_sso_0(p)
+specvol_SSO_0.types = _gsw_ufuncs.specvol_sso_0.types
+specvol_SSO_0 = match_args_return(specvol_SSO_0)
+
def specvol_t_exact(SA, t, p):
"""
Calculates the specific volume of seawater.
@@ -4239,6 +7304,15 @@ def specvol_t_exact(SA, t, p):
specific volume
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See section 2.7 of this TEOS-10 Manual.
+
+
"""
return _gsw_ufuncs.specvol_t_exact(SA, t, p)
specvol_t_exact.types = _gsw_ufuncs.specvol_t_exact.types
@@ -4266,6 +7340,35 @@ def spiciness0(SA, CT):
i.e. the surface
+ Notes
+ -----
+ Note that this 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ McDougall, T.J., and O.A. Krzysik, 2015: Spiciness. Journal of Marine
+ Research, 73, 141-152.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.spiciness0(SA, CT)
spiciness0.types = _gsw_ufuncs.spiciness0.types
@@ -4292,6 +7395,35 @@ def spiciness1(SA, CT):
spiciness referenced to a pressure of 1000 dbar
+ Notes
+ -----
+ Note that this 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ McDougall, T.J., and O.A. Krzysik, 2015: Spiciness. Journal of Marine
+ Research, 73, 141-152.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.spiciness1(SA, CT)
spiciness1.types = _gsw_ufuncs.spiciness1.types
@@ -4318,6 +7450,35 @@ def spiciness2(SA, CT):
spiciness referenced to a pressure of 2000 dbar
+ Notes
+ -----
+ Note that this 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ McDougall, T.J., and O.A. Krzysik, 2015: Spiciness. Journal of Marine
+ Research, 73, 141-152.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.spiciness2(SA, CT)
spiciness2.types = _gsw_ufuncs.spiciness2.types
@@ -4338,6 +7499,14 @@ def SR_from_SP(SP):
Reference Salinity
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.sr_from_sp(SP)
SR_from_SP.types = _gsw_ufuncs.sr_from_sp.types
@@ -4364,6 +7533,19 @@ def Sstar_from_SA(SA, p, lon, lat):
Preformed Salinity
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+ McDougall, T.J., D.R. Jackett, F.J. Millero, R. Pawlowicz and
+ P.M. Barker, 2012: A global algorithm for estimating Absolute Salinity.
+ Ocean Science, 8, 1123-1134.
+ http://www.ocean-sci.net/8/1123/2012/os-8-1123-2012.pdf
+
+
"""
return _gsw_ufuncs.sstar_from_sa(SA, p, lon, lat)
Sstar_from_SA.types = _gsw_ufuncs.sstar_from_sa.types
@@ -4392,6 +7574,20 @@ def Sstar_from_SP(SP, p, lon, lat):
Preformed Salinity
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See section 2.5 and appendices A.4 and A.5 of this TEOS-10 Manual.
+
+ McDougall, T.J., D.R. Jackett, F.J. Millero, R. Pawlowicz and
+ P.M. Barker, 2012: A global algorithm for estimating Absolute Salinity.
+ Ocean Science, 8, 1123-1134.
+ http://www.ocean-sci.net/8/1123/2012/os-8-1123-2012.pdf
+
+
"""
return _gsw_ufuncs.sstar_from_sp(SP, p, lon, lat)
Sstar_from_SP.types = _gsw_ufuncs.sstar_from_sp.types
@@ -4418,6 +7614,14 @@ def t_deriv_chem_potential_water_t_exact(SA, t, p):
potential of water in seawater
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.t_deriv_chem_potential_water_t_exact(SA, t, p)
t_deriv_chem_potential_water_t_exact.types = _gsw_ufuncs.t_deriv_chem_potential_water_t_exact.types
@@ -4447,6 +7651,26 @@ def t_freezing(SA, p, saturation_fraction):
(ITS-90)
+ Notes
+ -----
+ An alternative GSW function, gsw_t_freezing_poly, it is based on a
+ computationally-efficient polynomial, and is accurate to within -5e-4 K
+ and 6e-4 K, when compared with this function.
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See sections 3.33 and 3.34 of this TEOS-10 Manual.
+
+ McDougall T.J., and S.J. Wotherspoon, 2013: A simple modification of
+ Newton's method to achieve convergence of order 1 + sqrt(2). Applied
+ Mathematics Letters, 29, 20-25.
+
+
"""
return _gsw_ufuncs.t_freezing(SA, p, saturation_fraction)
t_freezing.types = _gsw_ufuncs.t_freezing.types
@@ -4481,6 +7705,14 @@ def t_freezing_first_derivatives(SA, p, saturation_fraction):
Absolute Salinity
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+
+
"""
return _gsw_ufuncs.t_freezing_first_derivatives(SA, p, saturation_fraction)
t_freezing_first_derivatives.types = _gsw_ufuncs.t_freezing_first_derivatives.types
@@ -4515,6 +7747,18 @@ def t_freezing_first_derivatives_poly(SA, p, saturation_fraction):
Absolute Salinity
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+
+ McDougall, T.J., P.M. Barker, R. Feistel and B.K. Galton-Fenzi, 2014:
+ Melting of Ice and Sea Ice into Seawater and Frazil Ice Formation.
+ Journal of Physical Oceanography, 44, 1751-1775.
+
+
"""
return _gsw_ufuncs.t_freezing_first_derivatives_poly(SA, p, saturation_fraction)
t_freezing_first_derivatives_poly.types = _gsw_ufuncs.t_freezing_first_derivatives_poly.types
@@ -4541,6 +7785,19 @@ def t_freezing_poly(SA, p, saturation_fraction):
(ITS-90)
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org.
+ See sections 3.33 and 3.34 of this TEOS-10 Manual.
+
+ McDougall, T.J., P.M. Barker, R. Feistel and B.K. Galton-Fenzi, 2014:
+ Melting of Ice and Sea Ice into Seawater and Frazil Ice Formation.
+ Journal of Physical Oceanography, 44, 1751-1775.
+
+
"""
return _gsw_ufuncs.t_freezing_poly(SA, p, saturation_fraction)
t_freezing_poly.types = _gsw_ufuncs.t_freezing_poly.types
@@ -4566,6 +7823,15 @@ def t_from_CT(SA, CT, p):
in-situ temperature (ITS-90)
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See sections 3.1 and 3.3 of this TEOS-10 Manual.
+
+
"""
return _gsw_ufuncs.t_from_ct(SA, CT, p)
t_from_CT.types = _gsw_ufuncs.t_from_ct.types
@@ -4590,6 +7856,15 @@ def t_from_pt0_ice(pt0_ice, p):
in-situ temperature (ITS-90)
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See appendix I of this TEOS-10 Manual.
+
+
"""
return _gsw_ufuncs.t_from_pt0_ice(pt0_ice, p)
t_from_pt0_ice.types = _gsw_ufuncs.t_from_pt0_ice.types
@@ -4618,6 +7893,33 @@ def thermobaric(SA, CT, p):
respect to Conservative Temperature.
+ Notes
+ -----
+ Note that this 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+ See Eqns. (3.8.2) and (P.2) of this TEOS-10 manual.
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling., 90, pp. 29-43.
+
+
"""
return _gsw_ufuncs.thermobaric(SA, CT, p)
thermobaric.types = _gsw_ufuncs.thermobaric.types
@@ -4651,6 +7953,40 @@ def z_from_p(p, lat, geo_strf_dyn_height, sea_surface_geopotential):
height
+ Notes
+ -----
+ Note. Height z is NEGATIVE in the ocean. i.e. Depth is -z.
+ Depth is not used in the GSW computer software library.
+
+ Note that this 75-term equation has been fitted in a restricted range of
+ parameter space, and is most accurate inside the "oceanographic funnel"
+ described in McDougall et al. (2003). The GSW library function
+ "gsw_infunnel(SA,CT,p)" is available to be used if one wants to test if
+ some of one's data lies outside this "funnel".
+
+
+ References
+ ----------
+ IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
+ seawater - 2010: Calculation and use of thermodynamic properties.
+ Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
+ UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
+
+ McDougall, T.J., D.R. Jackett, D.G. Wright and R. Feistel, 2003:
+ Accurate and computationally efficient algorithms for potential
+ temperature and density of seawater. J. Atmosph. Ocean. Tech., 20,
+ pp. 730-741.
+
+ Moritz, H., 2000: Geodetic reference system 1980. J. Geodesy, 74,
+ pp. 128-133.
+
+ Roquet, F., G. Madec, T.J. McDougall, P.M. Barker, 2015: Accurate
+ polynomial expressions for the density and specific volume of seawater
+ using the TEOS-10 standard. Ocean Modelling, 90, pp. 29-43.
+
+ This software is available from http://www.TEOS-10.org
+
+
"""
return _gsw_ufuncs.z_from_p(p, lat, geo_strf_dyn_height, sea_surface_geopotential)
z_from_p.types = _gsw_ufuncs.z_from_p.types
diff --git a/gsw/tests/test_check_functions.py b/gsw/tests/test_check_functions.py
index 7268fac..f9166c7 100644
--- a/gsw/tests/test_check_functions.py
+++ b/gsw/tests/test_check_functions.py
@@ -14,7 +14,8 @@
# Most of the tests have some nan values, so we need to suppress the warning.
# Any more careful fix would likely require considerable effort.
-np.seterr(invalid='ignore')
+# We get an overflow from ct_from_enthalpy_exact, but the test passes.
+np.seterr(invalid='ignore', over='ignore')
root_path = os.path.abspath(os.path.dirname(__file__))
@@ -28,7 +29,6 @@
#'melting_ice_into_seawater', # OK now; fixed nargs mismatch.
]
-# We get an overflow from ct_from_enthalpy_exact, but the test passes.
cv = Bunch(np.load(os.path.join(root_path, 'gsw_cv_v3_0.npz')))
# Substitute new check values for the pchip interpolation version.
diff --git a/src/_ufuncs.c b/src/_ufuncs.c
index d34f140..4ea3cd8 100644
--- a/src/_ufuncs.c
+++ b/src/_ufuncs.c
@@ -93,6 +93,42 @@ static char types_dd_d[] = {
NPY_DOUBLE,
};
+/* 2 in, 1 out */
+static void loop1d_dd_i(char **args, npy_intp const *dimensions,
+ npy_intp const* steps, void* data)
+{
+ npy_intp i;
+ npy_intp n = dimensions[0];
+ char *in0 = args[0];
+ npy_intp in_step0 = steps[0];
+ char *in1 = args[1];
+ npy_intp in_step1 = steps[1];
+ char *out0 = args[2];
+ npy_intp out_step0 = steps[2];
+ int (*func)(double, double);
+ int outd0;
+ func = data;
+
+ for (i = 0; i < n; i++) {
+ if (isnan(*(double *)in0)||isnan(*(double *)in1)) {
+ *((int *)out0) = 0;
+ } else {
+ outd0 = func(*(double *)in0, *(double *)in1);
+ *((int *)out0) = outd0;
+ }
+ in0 += in_step0;
+ in1 += in_step1;
+ out0 += out_step0;
+ }
+}
+
+static PyUFuncGenericFunction funcs_dd_i[] = {&loop1d_dd_i};
+
+static char types_dd_i[] = {
+ NPY_DOUBLE, NPY_DOUBLE,
+ NPY_INT,
+};
+
/* 3 in, 1 out */
static void loop1d_ddd_d(char **args, npy_intp const *dimensions,
npy_intp const* steps, void* data)
@@ -132,6 +168,45 @@ static char types_ddd_d[] = {
NPY_DOUBLE,
};
+/* 3 in, 1 out */
+static void loop1d_ddd_i(char **args, npy_intp const *dimensions,
+ npy_intp const* steps, void* data)
+{
+ npy_intp i;
+ npy_intp n = dimensions[0];
+ char *in0 = args[0];
+ npy_intp in_step0 = steps[0];
+ char *in1 = args[1];
+ npy_intp in_step1 = steps[1];
+ char *in2 = args[2];
+ npy_intp in_step2 = steps[2];
+ char *out0 = args[3];
+ npy_intp out_step0 = steps[3];
+ int (*func)(double, double, double);
+ int outd0;
+ func = data;
+
+ for (i = 0; i < n; i++) {
+ if (isnan(*(double *)in0)||isnan(*(double *)in1)||isnan(*(double *)in2)) {
+ *((int *)out0) = 0;
+ } else {
+ outd0 = func(*(double *)in0, *(double *)in1, *(double *)in2);
+ *((int *)out0) = outd0;
+ }
+ in0 += in_step0;
+ in1 += in_step1;
+ in2 += in_step2;
+ out0 += out_step0;
+ }
+}
+
+static PyUFuncGenericFunction funcs_ddd_i[] = {&loop1d_ddd_i};
+
+static char types_ddd_i[] = {
+ NPY_DOUBLE, NPY_DOUBLE, NPY_DOUBLE,
+ NPY_INT,
+};
+
/* 4 in, 1 out */
static void loop1d_dddd_d(char **args, npy_intp const *dimensions,
npy_intp const* steps, void* data)
@@ -259,6 +334,50 @@ static char types_dd_dd[] = {
NPY_DOUBLE, NPY_DOUBLE,
};
+/* 2 in, 3 out */
+static void loop1d_dd_ddd(char **args, npy_intp const *dimensions,
+ npy_intp const* steps, void* data)
+{
+ npy_intp i;
+ npy_intp n = dimensions[0];
+ char *in0 = args[0];
+ npy_intp in_step0 = steps[0];
+ char *in1 = args[1];
+ npy_intp in_step1 = steps[1];
+ char *out0 = args[2];
+ npy_intp out_step0 = steps[2];
+ char *out1 = args[3];
+ npy_intp out_step1 = steps[3];
+ char *out2 = args[4];
+ npy_intp out_step2 = steps[4];
+ void (*func)(double, double, double *, double *, double *);
+ double outd0, outd1, outd2;
+ func = data;
+
+ for (i = 0; i < n; i++) {
+ if (isnan(*(double *)in0)||isnan(*(double *)in1)) {
+ *((double *)out0) = NAN;*((double *)out1) = NAN;*((double *)out2) = NAN;
+ } else {
+ func(*(double *)in0, *(double *)in1, &outd0, &outd1, &outd2);
+ *((double *)out0) = CONVERT_INVALID(outd0);
+ *((double *)out1) = CONVERT_INVALID(outd1);
+ *((double *)out2) = CONVERT_INVALID(outd2);
+ }
+ in0 += in_step0;
+ in1 += in_step1;
+ out0 += out_step0;
+ out1 += out_step1;
+ out2 += out_step2;
+ }
+}
+
+static PyUFuncGenericFunction funcs_dd_ddd[] = {&loop1d_dd_ddd};
+
+static char types_dd_ddd[] = {
+ NPY_DOUBLE, NPY_DOUBLE,
+ NPY_DOUBLE, NPY_DOUBLE, NPY_DOUBLE,
+};
+
/* 3 in, 2 out */
static void loop1d_ddd_dd(char **args, npy_intp const *dimensions,
npy_intp const* steps, void* data)
@@ -349,8 +468,8 @@ static char types_ddd_ddd[] = {
NPY_DOUBLE, NPY_DOUBLE, NPY_DOUBLE,
};
-/* 6 in, 2 out */
-static void loop1d_dddddd_dd(char **args, npy_intp const *dimensions,
+/* 3 in, 5 out */
+static void loop1d_ddd_ddddd(char **args, npy_intp const *dimensions,
npy_intp const* steps, void* data)
{
npy_intp i;
@@ -361,88 +480,47 @@ static void loop1d_dddddd_dd(char **args, npy_intp const *dimensions,
npy_intp in_step1 = steps[1];
char *in2 = args[2];
npy_intp in_step2 = steps[2];
- char *in3 = args[3];
- npy_intp in_step3 = steps[3];
- char *in4 = args[4];
- npy_intp in_step4 = steps[4];
- char *in5 = args[5];
- npy_intp in_step5 = steps[5];
- char *out0 = args[6];
- npy_intp out_step0 = steps[6];
- char *out1 = args[7];
- npy_intp out_step1 = steps[7];
- void (*func)(double, double, double, double, double, double, double *, double *);
- double outd0, outd1;
- func = data;
-
- for (i = 0; i < n; i++) {
- if (isnan(*(double *)in0)||isnan(*(double *)in1)||isnan(*(double *)in2)||isnan(*(double *)in3)||isnan(*(double *)in4)||isnan(*(double *)in5)) {
- *((double *)out0) = NAN;*((double *)out1) = NAN;
- } else {
- func(*(double *)in0, *(double *)in1, *(double *)in2, *(double *)in3, *(double *)in4, *(double *)in5, &outd0, &outd1);
- *((double *)out0) = CONVERT_INVALID(outd0);
- *((double *)out1) = CONVERT_INVALID(outd1);
- }
- in0 += in_step0;
- in1 += in_step1;
- in2 += in_step2;
- in3 += in_step3;
- in4 += in_step4;
- in5 += in_step5;
- out0 += out_step0;
- out1 += out_step1;
- }
-}
-
-static PyUFuncGenericFunction funcs_dddddd_dd[] = {&loop1d_dddddd_dd};
-
-static char types_dddddd_dd[] = {
- NPY_DOUBLE, NPY_DOUBLE, NPY_DOUBLE, NPY_DOUBLE, NPY_DOUBLE, NPY_DOUBLE,
- NPY_DOUBLE, NPY_DOUBLE,
-};
-
-/* 2 in, 3 out */
-static void loop1d_dd_ddd(char **args, npy_intp const *dimensions,
- npy_intp const* steps, void* data)
-{
- npy_intp i;
- npy_intp n = dimensions[0];
- char *in0 = args[0];
- npy_intp in_step0 = steps[0];
- char *in1 = args[1];
- npy_intp in_step1 = steps[1];
- char *out0 = args[2];
- npy_intp out_step0 = steps[2];
- char *out1 = args[3];
- npy_intp out_step1 = steps[3];
- char *out2 = args[4];
- npy_intp out_step2 = steps[4];
- void (*func)(double, double, double *, double *, double *);
- double outd0, outd1, outd2;
+ char *out0 = args[3];
+ npy_intp out_step0 = steps[3];
+ char *out1 = args[4];
+ npy_intp out_step1 = steps[4];
+ char *out2 = args[5];
+ npy_intp out_step2 = steps[5];
+ char *out3 = args[6];
+ npy_intp out_step3 = steps[6];
+ char *out4 = args[7];
+ npy_intp out_step4 = steps[7];
+ void (*func)(double, double, double, double *, double *, double *, double *, double *);
+ double outd0, outd1, outd2, outd3, outd4;
func = data;
for (i = 0; i < n; i++) {
- if (isnan(*(double *)in0)||isnan(*(double *)in1)) {
- *((double *)out0) = NAN;*((double *)out1) = NAN;*((double *)out2) = NAN;
+ if (isnan(*(double *)in0)||isnan(*(double *)in1)||isnan(*(double *)in2)) {
+ *((double *)out0) = NAN;*((double *)out1) = NAN;*((double *)out2) = NAN;*((double *)out3) = NAN;*((double *)out4) = NAN;
} else {
- func(*(double *)in0, *(double *)in1, &outd0, &outd1, &outd2);
+ func(*(double *)in0, *(double *)in1, *(double *)in2, &outd0, &outd1, &outd2, &outd3, &outd4);
*((double *)out0) = CONVERT_INVALID(outd0);
*((double *)out1) = CONVERT_INVALID(outd1);
*((double *)out2) = CONVERT_INVALID(outd2);
+ *((double *)out3) = CONVERT_INVALID(outd3);
+ *((double *)out4) = CONVERT_INVALID(outd4);
}
in0 += in_step0;
in1 += in_step1;
+ in2 += in_step2;
out0 += out_step0;
out1 += out_step1;
out2 += out_step2;
+ out3 += out_step3;
+ out4 += out_step4;
}
}
-static PyUFuncGenericFunction funcs_dd_ddd[] = {&loop1d_dd_ddd};
+static PyUFuncGenericFunction funcs_ddd_ddddd[] = {&loop1d_ddd_ddddd};
-static char types_dd_ddd[] = {
- NPY_DOUBLE, NPY_DOUBLE,
+static char types_ddd_ddddd[] = {
NPY_DOUBLE, NPY_DOUBLE, NPY_DOUBLE,
+ NPY_DOUBLE, NPY_DOUBLE, NPY_DOUBLE, NPY_DOUBLE, NPY_DOUBLE,
};
/* 4 in, 3 out */
@@ -548,8 +626,8 @@ static char types_ddddd_ddd[] = {
NPY_DOUBLE, NPY_DOUBLE, NPY_DOUBLE,
};
-/* 3 in, 5 out */
-static void loop1d_ddd_ddddd(char **args, npy_intp const *dimensions,
+/* 6 in, 2 out */
+static void loop1d_dddddd_dd(char **args, npy_intp const *dimensions,
npy_intp const* steps, void* data)
{
npy_intp i;
@@ -560,47 +638,44 @@ static void loop1d_ddd_ddddd(char **args, npy_intp const *dimensions,
npy_intp in_step1 = steps[1];
char *in2 = args[2];
npy_intp in_step2 = steps[2];
- char *out0 = args[3];
- npy_intp out_step0 = steps[3];
- char *out1 = args[4];
- npy_intp out_step1 = steps[4];
- char *out2 = args[5];
- npy_intp out_step2 = steps[5];
- char *out3 = args[6];
- npy_intp out_step3 = steps[6];
- char *out4 = args[7];
- npy_intp out_step4 = steps[7];
- void (*func)(double, double, double, double *, double *, double *, double *, double *);
- double outd0, outd1, outd2, outd3, outd4;
+ char *in3 = args[3];
+ npy_intp in_step3 = steps[3];
+ char *in4 = args[4];
+ npy_intp in_step4 = steps[4];
+ char *in5 = args[5];
+ npy_intp in_step5 = steps[5];
+ char *out0 = args[6];
+ npy_intp out_step0 = steps[6];
+ char *out1 = args[7];
+ npy_intp out_step1 = steps[7];
+ void (*func)(double, double, double, double, double, double, double *, double *);
+ double outd0, outd1;
func = data;
for (i = 0; i < n; i++) {
- if (isnan(*(double *)in0)||isnan(*(double *)in1)||isnan(*(double *)in2)) {
- *((double *)out0) = NAN;*((double *)out1) = NAN;*((double *)out2) = NAN;*((double *)out3) = NAN;*((double *)out4) = NAN;
+ if (isnan(*(double *)in0)||isnan(*(double *)in1)||isnan(*(double *)in2)||isnan(*(double *)in3)||isnan(*(double *)in4)||isnan(*(double *)in5)) {
+ *((double *)out0) = NAN;*((double *)out1) = NAN;
} else {
- func(*(double *)in0, *(double *)in1, *(double *)in2, &outd0, &outd1, &outd2, &outd3, &outd4);
+ func(*(double *)in0, *(double *)in1, *(double *)in2, *(double *)in3, *(double *)in4, *(double *)in5, &outd0, &outd1);
*((double *)out0) = CONVERT_INVALID(outd0);
*((double *)out1) = CONVERT_INVALID(outd1);
- *((double *)out2) = CONVERT_INVALID(outd2);
- *((double *)out3) = CONVERT_INVALID(outd3);
- *((double *)out4) = CONVERT_INVALID(outd4);
}
in0 += in_step0;
in1 += in_step1;
in2 += in_step2;
+ in3 += in_step3;
+ in4 += in_step4;
+ in5 += in_step5;
out0 += out_step0;
out1 += out_step1;
- out2 += out_step2;
- out3 += out_step3;
- out4 += out_step4;
}
}
-static PyUFuncGenericFunction funcs_ddd_ddddd[] = {&loop1d_ddd_ddddd};
+static PyUFuncGenericFunction funcs_dddddd_dd[] = {&loop1d_dddddd_dd};
-static char types_ddd_ddddd[] = {
- NPY_DOUBLE, NPY_DOUBLE, NPY_DOUBLE,
- NPY_DOUBLE, NPY_DOUBLE, NPY_DOUBLE, NPY_DOUBLE, NPY_DOUBLE,
+static char types_dddddd_dd[] = {
+ NPY_DOUBLE, NPY_DOUBLE, NPY_DOUBLE, NPY_DOUBLE, NPY_DOUBLE, NPY_DOUBLE,
+ NPY_DOUBLE, NPY_DOUBLE,
};
/* 2 int in, 2 double in, 1 out */
static void loop1d_iidd_d(char **args, npy_intp const *dimensions,
@@ -692,171 +767,173 @@ static char types_iiiddd_d[] = {
NPY_DOUBLE, NPY_DOUBLE, NPY_DOUBLE,
NPY_DOUBLE,
};
-static void *data_enthalpy_sso_0[] = {&gsw_enthalpy_sso_0};
-static void *data_gibbs_ice_pt0[] = {&gsw_gibbs_ice_pt0};
-static void *data_gibbs_ice_pt0_pt0[] = {&gsw_gibbs_ice_pt0_pt0};
-static void *data_hill_ratio_at_sp2[] = {&gsw_hill_ratio_at_sp2};
-static void *data_pot_enthalpy_from_pt_ice[] = {&gsw_pot_enthalpy_from_pt_ice};
-static void *data_pot_enthalpy_from_pt_ice_poly[] = {&gsw_pot_enthalpy_from_pt_ice_poly};
-static void *data_pt0_cold_ice_poly[] = {&gsw_pt0_cold_ice_poly};
-static void *data_pt_from_pot_enthalpy_ice[] = {&gsw_pt_from_pot_enthalpy_ice};
-static void *data_pt_from_pot_enthalpy_ice_poly[] = {&gsw_pt_from_pot_enthalpy_ice_poly};
-static void *data_pt_from_pot_enthalpy_ice_poly_dh[] = {&gsw_pt_from_pot_enthalpy_ice_poly_dh};
-static void *data_sp_from_sk[] = {&gsw_sp_from_sk};
-static void *data_sp_from_sr[] = {&gsw_sp_from_sr};
-static void *data_specvol_sso_0[] = {&gsw_specvol_sso_0};
-static void *data_sr_from_sp[] = {&gsw_sr_from_sp};
+static void *data_infunnel[] = {&gsw_infunnel};
+static void *data_adiabatic_lapse_rate_from_ct[] = {&gsw_adiabatic_lapse_rate_from_ct};
static void *data_adiabatic_lapse_rate_ice[] = {&gsw_adiabatic_lapse_rate_ice};
+static void *data_alpha[] = {&gsw_alpha};
+static void *data_alpha_on_beta[] = {&gsw_alpha_on_beta};
+static void *data_alpha_wrt_t_exact[] = {&gsw_alpha_wrt_t_exact};
static void *data_alpha_wrt_t_ice[] = {&gsw_alpha_wrt_t_ice};
+static void *data_beta_const_t_exact[] = {&gsw_beta_const_t_exact};
+static void *data_beta[] = {&gsw_beta};
+static void *data_cabbeling[] = {&gsw_cabbeling};
+static void *data_c_from_sp[] = {&gsw_c_from_sp};
static void *data_chem_potential_water_ice[] = {&gsw_chem_potential_water_ice};
+static void *data_chem_potential_water_t_exact[] = {&gsw_chem_potential_water_t_exact};
static void *data_cp_ice[] = {&gsw_cp_ice};
+static void *data_cp_t_exact[] = {&gsw_cp_t_exact};
+static void *data_ct_freezing[] = {&gsw_ct_freezing};
+static void *data_ct_freezing_poly[] = {&gsw_ct_freezing_poly};
+static void *data_ct_from_enthalpy[] = {&gsw_ct_from_enthalpy};
+static void *data_ct_from_enthalpy_exact[] = {&gsw_ct_from_enthalpy_exact};
static void *data_ct_from_entropy[] = {&gsw_ct_from_entropy};
static void *data_ct_from_pt[] = {&gsw_ct_from_pt};
+static void *data_ct_from_t[] = {&gsw_ct_from_t};
static void *data_ct_maxdensity[] = {&gsw_ct_maxdensity};
+static void *data_deltasa_atlas[] = {&gsw_deltasa_atlas};
+static void *data_deltasa_from_sp[] = {&gsw_deltasa_from_sp};
+static void *data_dilution_coefficient_t_exact[] = {&gsw_dilution_coefficient_t_exact};
+static void *data_dynamic_enthalpy[] = {&gsw_dynamic_enthalpy};
+static void *data_enthalpy_ct_exact[] = {&gsw_enthalpy_ct_exact};
+static void *data_enthalpy_diff[] = {&gsw_enthalpy_diff};
+static void *data_enthalpy[] = {&gsw_enthalpy};
static void *data_enthalpy_ice[] = {&gsw_enthalpy_ice};
+static void *data_enthalpy_sso_0[] = {&gsw_enthalpy_sso_0};
+static void *data_enthalpy_t_exact[] = {&gsw_enthalpy_t_exact};
static void *data_entropy_from_ct[] = {&gsw_entropy_from_ct};
static void *data_entropy_from_pt[] = {&gsw_entropy_from_pt};
+static void *data_entropy_from_t[] = {&gsw_entropy_from_t};
static void *data_entropy_ice[] = {&gsw_entropy_ice};
+static void *data_entropy_part[] = {&gsw_entropy_part};
static void *data_entropy_part_zerop[] = {&gsw_entropy_part_zerop};
+static void *data_fdelta[] = {&gsw_fdelta};
static void *data_gibbs_ice_part_t[] = {&gsw_gibbs_ice_part_t};
+static void *data_gibbs_ice_pt0[] = {&gsw_gibbs_ice_pt0};
+static void *data_gibbs_ice_pt0_pt0[] = {&gsw_gibbs_ice_pt0_pt0};
static void *data_gibbs_pt0_pt0[] = {&gsw_gibbs_pt0_pt0};
static void *data_grav[] = {&gsw_grav};
static void *data_helmholtz_energy_ice[] = {&gsw_helmholtz_energy_ice};
+static void *data_hill_ratio_at_sp2[] = {&gsw_hill_ratio_at_sp2};
+static void *data_internal_energy[] = {&gsw_internal_energy};
static void *data_internal_energy_ice[] = {&gsw_internal_energy_ice};
static void *data_kappa_const_t_ice[] = {&gsw_kappa_const_t_ice};
+static void *data_kappa[] = {&gsw_kappa};
static void *data_kappa_ice[] = {&gsw_kappa_ice};
+static void *data_kappa_t_exact[] = {&gsw_kappa_t_exact};
static void *data_latentheat_evap_ct[] = {&gsw_latentheat_evap_ct};
static void *data_latentheat_evap_t[] = {&gsw_latentheat_evap_t};
static void *data_latentheat_melting[] = {&gsw_latentheat_melting};
static void *data_melting_ice_equilibrium_sa_ct_ratio[] = {&gsw_melting_ice_equilibrium_sa_ct_ratio};
static void *data_melting_ice_equilibrium_sa_ct_ratio_poly[] = {&gsw_melting_ice_equilibrium_sa_ct_ratio_poly};
+static void *data_melting_ice_sa_ct_ratio[] = {&gsw_melting_ice_sa_ct_ratio};
+static void *data_melting_ice_sa_ct_ratio_poly[] = {&gsw_melting_ice_sa_ct_ratio_poly};
static void *data_melting_seaice_equilibrium_sa_ct_ratio[] = {&gsw_melting_seaice_equilibrium_sa_ct_ratio};
static void *data_melting_seaice_equilibrium_sa_ct_ratio_poly[] = {&gsw_melting_seaice_equilibrium_sa_ct_ratio_poly};
+static void *data_melting_seaice_sa_ct_ratio[] = {&gsw_melting_seaice_sa_ct_ratio};
+static void *data_melting_seaice_sa_ct_ratio_poly[] = {&gsw_melting_seaice_sa_ct_ratio_poly};
+static void *data_o2sol[] = {&gsw_o2sol};
static void *data_o2sol_sp_pt[] = {&gsw_o2sol_sp_pt};
+static void *data_pot_enthalpy_from_pt_ice[] = {&gsw_pot_enthalpy_from_pt_ice};
+static void *data_pot_enthalpy_from_pt_ice_poly[] = {&gsw_pot_enthalpy_from_pt_ice_poly};
static void *data_pot_enthalpy_ice_freezing[] = {&gsw_pot_enthalpy_ice_freezing};
static void *data_pot_enthalpy_ice_freezing_poly[] = {&gsw_pot_enthalpy_ice_freezing_poly};
+static void *data_pot_rho_t_exact[] = {&gsw_pot_rho_t_exact};
static void *data_pressure_coefficient_ice[] = {&gsw_pressure_coefficient_ice};
+static void *data_pressure_freezing_ct[] = {&gsw_pressure_freezing_ct};
+static void *data_pt0_cold_ice_poly[] = {&gsw_pt0_cold_ice_poly};
+static void *data_pt0_from_t[] = {&gsw_pt0_from_t};
static void *data_pt0_from_t_ice[] = {&gsw_pt0_from_t_ice};
static void *data_pt_from_ct[] = {&gsw_pt_from_ct};
static void *data_pt_from_entropy[] = {&gsw_pt_from_entropy};
-static void *data_rho_ice[] = {&gsw_rho_ice};
-static void *data_sigma0[] = {&gsw_sigma0};
-static void *data_sigma1[] = {&gsw_sigma1};
-static void *data_sigma2[] = {&gsw_sigma2};
-static void *data_sigma3[] = {&gsw_sigma3};
-static void *data_sigma4[] = {&gsw_sigma4};
-static void *data_sound_speed_ice[] = {&gsw_sound_speed_ice};
-static void *data_sp_salinometer[] = {&gsw_sp_salinometer};
-static void *data_specvol_ice[] = {&gsw_specvol_ice};
-static void *data_spiciness0[] = {&gsw_spiciness0};
-static void *data_spiciness1[] = {&gsw_spiciness1};
-static void *data_spiciness2[] = {&gsw_spiciness2};
-static void *data_t_from_pt0_ice[] = {&gsw_t_from_pt0_ice};
-static void *data_adiabatic_lapse_rate_from_ct[] = {&gsw_adiabatic_lapse_rate_from_ct};
-static void *data_alpha[] = {&gsw_alpha};
-static void *data_alpha_on_beta[] = {&gsw_alpha_on_beta};
-static void *data_alpha_wrt_t_exact[] = {&gsw_alpha_wrt_t_exact};
-static void *data_beta[] = {&gsw_beta};
-static void *data_beta_const_t_exact[] = {&gsw_beta_const_t_exact};
-static void *data_c_from_sp[] = {&gsw_c_from_sp};
-static void *data_cabbeling[] = {&gsw_cabbeling};
-static void *data_chem_potential_water_t_exact[] = {&gsw_chem_potential_water_t_exact};
-static void *data_cp_t_exact[] = {&gsw_cp_t_exact};
-static void *data_ct_freezing[] = {&gsw_ct_freezing};
-static void *data_ct_freezing_poly[] = {&gsw_ct_freezing_poly};
-static void *data_ct_from_enthalpy[] = {&gsw_ct_from_enthalpy};
-static void *data_ct_from_enthalpy_exact[] = {&gsw_ct_from_enthalpy_exact};
-static void *data_ct_from_t[] = {&gsw_ct_from_t};
-static void *data_deltasa_atlas[] = {&gsw_deltasa_atlas};
-static void *data_dilution_coefficient_t_exact[] = {&gsw_dilution_coefficient_t_exact};
-static void *data_dynamic_enthalpy[] = {&gsw_dynamic_enthalpy};
-static void *data_enthalpy[] = {&gsw_enthalpy};
-static void *data_enthalpy_ct_exact[] = {&gsw_enthalpy_ct_exact};
-static void *data_enthalpy_t_exact[] = {&gsw_enthalpy_t_exact};
-static void *data_entropy_from_t[] = {&gsw_entropy_from_t};
-static void *data_entropy_part[] = {&gsw_entropy_part};
-static void *data_fdelta[] = {&gsw_fdelta};
-static void *data_internal_energy[] = {&gsw_internal_energy};
-static void *data_kappa[] = {&gsw_kappa};
-static void *data_kappa_t_exact[] = {&gsw_kappa_t_exact};
-static void *data_pressure_freezing_ct[] = {&gsw_pressure_freezing_ct};
-static void *data_pt0_from_t[] = {&gsw_pt0_from_t};
+static void *data_pt_from_pot_enthalpy_ice[] = {&gsw_pt_from_pot_enthalpy_ice};
+static void *data_pt_from_pot_enthalpy_ice_poly_dh[] = {&gsw_pt_from_pot_enthalpy_ice_poly_dh};
+static void *data_pt_from_pot_enthalpy_ice_poly[] = {&gsw_pt_from_pot_enthalpy_ice_poly};
+static void *data_pt_from_t[] = {&gsw_pt_from_t};
static void *data_pt_from_t_ice[] = {&gsw_pt_from_t_ice};
static void *data_rho[] = {&gsw_rho};
+static void *data_rho_ice[] = {&gsw_rho_ice};
static void *data_rho_t_exact[] = {&gsw_rho_t_exact};
+static void *data_saar[] = {&gsw_saar};
static void *data_sa_freezing_from_ct[] = {&gsw_sa_freezing_from_ct};
static void *data_sa_freezing_from_ct_poly[] = {&gsw_sa_freezing_from_ct_poly};
static void *data_sa_freezing_from_t[] = {&gsw_sa_freezing_from_t};
static void *data_sa_freezing_from_t_poly[] = {&gsw_sa_freezing_from_t_poly};
static void *data_sa_from_rho[] = {&gsw_sa_from_rho};
static void *data_sa_from_sp_baltic[] = {&gsw_sa_from_sp_baltic};
-static void *data_saar[] = {&gsw_saar};
+static void *data_sa_from_sp[] = {&gsw_sa_from_sp};
+static void *data_sa_from_sstar[] = {&gsw_sa_from_sstar};
+static void *data_sa_p_inrange[] = {&gsw_sa_p_inrange};
+static void *data_sigma0[] = {&gsw_sigma0};
+static void *data_sigma1[] = {&gsw_sigma1};
+static void *data_sigma2[] = {&gsw_sigma2};
+static void *data_sigma3[] = {&gsw_sigma3};
+static void *data_sigma4[] = {&gsw_sigma4};
static void *data_sound_speed[] = {&gsw_sound_speed};
+static void *data_sound_speed_ice[] = {&gsw_sound_speed_ice};
static void *data_sound_speed_t_exact[] = {&gsw_sound_speed_t_exact};
-static void *data_sp_from_c[] = {&gsw_sp_from_c};
-static void *data_sp_from_sa_baltic[] = {&gsw_sp_from_sa_baltic};
-static void *data_specvol[] = {&gsw_specvol};
static void *data_specvol_anom_standard[] = {&gsw_specvol_anom_standard};
+static void *data_specvol[] = {&gsw_specvol};
+static void *data_specvol_ice[] = {&gsw_specvol_ice};
+static void *data_specvol_sso_0[] = {&gsw_specvol_sso_0};
static void *data_specvol_t_exact[] = {&gsw_specvol_t_exact};
+static void *data_sp_from_c[] = {&gsw_sp_from_c};
+static void *data_sp_from_sa_baltic[] = {&gsw_sp_from_sa_baltic};
+static void *data_sp_from_sa[] = {&gsw_sp_from_sa};
+static void *data_sp_from_sk[] = {&gsw_sp_from_sk};
+static void *data_sp_from_sr[] = {&gsw_sp_from_sr};
+static void *data_sp_from_sstar[] = {&gsw_sp_from_sstar};
+static void *data_sp_salinometer[] = {&gsw_sp_salinometer};
+static void *data_spiciness0[] = {&gsw_spiciness0};
+static void *data_spiciness1[] = {&gsw_spiciness1};
+static void *data_spiciness2[] = {&gsw_spiciness2};
+static void *data_sr_from_sp[] = {&gsw_sr_from_sp};
+static void *data_sstar_from_sa[] = {&gsw_sstar_from_sa};
+static void *data_sstar_from_sp[] = {&gsw_sstar_from_sp};
static void *data_t_deriv_chem_potential_water_t_exact[] = {&gsw_t_deriv_chem_potential_water_t_exact};
static void *data_t_freezing[] = {&gsw_t_freezing};
static void *data_t_freezing_poly[] = {&gsw_t_freezing_poly};
static void *data_t_from_ct[] = {&gsw_t_from_ct};
+static void *data_t_from_pt0_ice[] = {&gsw_t_from_pt0_ice};
static void *data_thermobaric[] = {&gsw_thermobaric};
-static void *data_deltasa_from_sp[] = {&gsw_deltasa_from_sp};
-static void *data_enthalpy_diff[] = {&gsw_enthalpy_diff};
-static void *data_melting_ice_sa_ct_ratio[] = {&gsw_melting_ice_sa_ct_ratio};
-static void *data_melting_ice_sa_ct_ratio_poly[] = {&gsw_melting_ice_sa_ct_ratio_poly};
-static void *data_p_from_z[] = {&gsw_p_from_z};
-static void *data_pot_rho_t_exact[] = {&gsw_pot_rho_t_exact};
-static void *data_pt_from_t[] = {&gsw_pt_from_t};
-static void *data_sa_from_sp[] = {&gsw_sa_from_sp};
-static void *data_sa_from_sstar[] = {&gsw_sa_from_sstar};
-static void *data_sp_from_sa[] = {&gsw_sp_from_sa};
-static void *data_sp_from_sstar[] = {&gsw_sp_from_sstar};
-static void *data_sstar_from_sa[] = {&gsw_sstar_from_sa};
-static void *data_sstar_from_sp[] = {&gsw_sstar_from_sp};
static void *data_z_from_p[] = {&gsw_z_from_p};
-static void *data_melting_seaice_sa_ct_ratio[] = {&gsw_melting_seaice_sa_ct_ratio};
-static void *data_melting_seaice_sa_ct_ratio_poly[] = {&gsw_melting_seaice_sa_ct_ratio_poly};
-static void *data_o2sol[] = {&gsw_o2sol};
+static void *data_p_from_z[] = {&gsw_p_from_z};
static void *data_ct_first_derivatives[] = {&gsw_ct_first_derivatives};
-static void *data_entropy_first_derivatives[] = {&gsw_entropy_first_derivatives};
-static void *data_pot_enthalpy_ice_freezing_first_derivatives[] = {&gsw_pot_enthalpy_ice_freezing_first_derivatives};
-static void *data_pot_enthalpy_ice_freezing_first_derivatives_poly[] = {&gsw_pot_enthalpy_ice_freezing_first_derivatives_poly};
-static void *data_pt_first_derivatives[] = {&gsw_pt_first_derivatives};
+static void *data_ct_first_derivatives_wrt_t_exact[] = {&gsw_ct_first_derivatives_wrt_t_exact};
static void *data_ct_freezing_first_derivatives[] = {&gsw_ct_freezing_first_derivatives};
static void *data_ct_freezing_first_derivatives_poly[] = {&gsw_ct_freezing_first_derivatives_poly};
static void *data_ct_from_rho[] = {&gsw_ct_from_rho};
-static void *data_enthalpy_first_derivatives[] = {&gsw_enthalpy_first_derivatives};
+static void *data_ct_second_derivatives[] = {&gsw_ct_second_derivatives};
static void *data_enthalpy_first_derivatives_ct_exact[] = {&gsw_enthalpy_first_derivatives_ct_exact};
-static void *data_rho_first_derivatives_wrt_enthalpy[] = {&gsw_rho_first_derivatives_wrt_enthalpy};
-static void *data_specvol_first_derivatives_wrt_enthalpy[] = {&gsw_specvol_first_derivatives_wrt_enthalpy};
-static void *data_t_freezing_first_derivatives[] = {&gsw_t_freezing_first_derivatives};
-static void *data_t_freezing_first_derivatives_poly[] = {&gsw_t_freezing_first_derivatives_poly};
-static void *data_ct_first_derivatives_wrt_t_exact[] = {&gsw_ct_first_derivatives_wrt_t_exact};
-static void *data_enthalpy_second_derivatives[] = {&gsw_enthalpy_second_derivatives};
+static void *data_enthalpy_first_derivatives[] = {&gsw_enthalpy_first_derivatives};
static void *data_enthalpy_second_derivatives_ct_exact[] = {&gsw_enthalpy_second_derivatives_ct_exact};
+static void *data_enthalpy_second_derivatives[] = {&gsw_enthalpy_second_derivatives};
+static void *data_entropy_first_derivatives[] = {&gsw_entropy_first_derivatives};
+static void *data_entropy_second_derivatives[] = {&gsw_entropy_second_derivatives};
static void *data_frazil_properties[] = {&gsw_frazil_properties};
static void *data_frazil_properties_potential[] = {&gsw_frazil_properties_potential};
static void *data_frazil_properties_potential_poly[] = {&gsw_frazil_properties_potential_poly};
static void *data_frazil_ratios_adiabatic[] = {&gsw_frazil_ratios_adiabatic};
static void *data_frazil_ratios_adiabatic_poly[] = {&gsw_frazil_ratios_adiabatic_poly};
+static void *data_ice_fraction_to_freeze_seawater[] = {&gsw_ice_fraction_to_freeze_seawater};
+static void *data_melting_ice_into_seawater[] = {&gsw_melting_ice_into_seawater};
+static void *data_melting_seaice_into_seawater[] = {&gsw_melting_seaice_into_seawater};
+static void *data_pot_enthalpy_ice_freezing_first_derivatives[] = {&gsw_pot_enthalpy_ice_freezing_first_derivatives};
+static void *data_pot_enthalpy_ice_freezing_first_derivatives_poly[] = {&gsw_pot_enthalpy_ice_freezing_first_derivatives_poly};
+static void *data_pt_first_derivatives[] = {&gsw_pt_first_derivatives};
+static void *data_pt_second_derivatives[] = {&gsw_pt_second_derivatives};
static void *data_rho_alpha_beta[] = {&gsw_rho_alpha_beta};
static void *data_rho_first_derivatives[] = {&gsw_rho_first_derivatives};
+static void *data_rho_first_derivatives_wrt_enthalpy[] = {&gsw_rho_first_derivatives_wrt_enthalpy};
+static void *data_rho_second_derivatives[] = {&gsw_rho_second_derivatives};
static void *data_rho_second_derivatives_wrt_enthalpy[] = {&gsw_rho_second_derivatives_wrt_enthalpy};
+static void *data_seaice_fraction_to_freeze_seawater[] = {&gsw_seaice_fraction_to_freeze_seawater};
static void *data_specvol_alpha_beta[] = {&gsw_specvol_alpha_beta};
static void *data_specvol_first_derivatives[] = {&gsw_specvol_first_derivatives};
-static void *data_specvol_second_derivatives_wrt_enthalpy[] = {&gsw_specvol_second_derivatives_wrt_enthalpy};
-static void *data_melting_seaice_into_seawater[] = {&gsw_melting_seaice_into_seawater};
-static void *data_ct_second_derivatives[] = {&gsw_ct_second_derivatives};
-static void *data_entropy_second_derivatives[] = {&gsw_entropy_second_derivatives};
-static void *data_pt_second_derivatives[] = {&gsw_pt_second_derivatives};
-static void *data_ice_fraction_to_freeze_seawater[] = {&gsw_ice_fraction_to_freeze_seawater};
-static void *data_melting_ice_into_seawater[] = {&gsw_melting_ice_into_seawater};
-static void *data_seaice_fraction_to_freeze_seawater[] = {&gsw_seaice_fraction_to_freeze_seawater};
-static void *data_rho_second_derivatives[] = {&gsw_rho_second_derivatives};
+static void *data_specvol_first_derivatives_wrt_enthalpy[] = {&gsw_specvol_first_derivatives_wrt_enthalpy};
static void *data_specvol_second_derivatives[] = {&gsw_specvol_second_derivatives};
+static void *data_specvol_second_derivatives_wrt_enthalpy[] = {&gsw_specvol_second_derivatives_wrt_enthalpy};
+static void *data_t_freezing_first_derivatives_poly[] = {&gsw_t_freezing_first_derivatives_poly};
+static void *data_t_freezing_first_derivatives[] = {&gsw_t_freezing_first_derivatives};
static void *data_gibbs_ice[] = {&gsw_gibbs_ice};
static void *data_gibbs[] = {&gsw_gibbs};
@@ -897,220 +974,232 @@ PyMODINIT_FUNC PyInit__gsw_ufuncs(void)
import_array();
import_umath();
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_d_d,
- data_enthalpy_sso_0,
- types_d_d,
- 1, 1, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_i,
+ data_infunnel,
+ types_ddd_i,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "enthalpy_sso_0",
- "enthalpy_sso_0_docstring",
+ "infunnel",
+ "infunnel_docstring",
0);
- PyDict_SetItemString(d, "enthalpy_sso_0", ufunc_ptr);
+ PyDict_SetItemString(d, "infunnel", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_d_d,
- data_gibbs_ice_pt0,
- types_d_d,
- 1, 1, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_adiabatic_lapse_rate_from_ct,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "gibbs_ice_pt0",
- "gibbs_ice_pt0_docstring",
+ "adiabatic_lapse_rate_from_ct",
+ "adiabatic_lapse_rate_from_ct_docstring",
0);
- PyDict_SetItemString(d, "gibbs_ice_pt0", ufunc_ptr);
+ PyDict_SetItemString(d, "adiabatic_lapse_rate_from_ct", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_d_d,
- data_gibbs_ice_pt0_pt0,
- types_d_d,
- 1, 1, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
+ data_adiabatic_lapse_rate_ice,
+ types_dd_d,
+ 1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "gibbs_ice_pt0_pt0",
- "gibbs_ice_pt0_pt0_docstring",
+ "adiabatic_lapse_rate_ice",
+ "adiabatic_lapse_rate_ice_docstring",
0);
- PyDict_SetItemString(d, "gibbs_ice_pt0_pt0", ufunc_ptr);
+ PyDict_SetItemString(d, "adiabatic_lapse_rate_ice", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_d_d,
- data_hill_ratio_at_sp2,
- types_d_d,
- 1, 1, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_alpha,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "hill_ratio_at_sp2",
- "hill_ratio_at_sp2_docstring",
+ "alpha",
+ "alpha_docstring",
0);
- PyDict_SetItemString(d, "hill_ratio_at_sp2", ufunc_ptr);
+ PyDict_SetItemString(d, "alpha", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_d_d,
- data_pot_enthalpy_from_pt_ice,
- types_d_d,
- 1, 1, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_alpha_on_beta,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "pot_enthalpy_from_pt_ice",
- "pot_enthalpy_from_pt_ice_docstring",
+ "alpha_on_beta",
+ "alpha_on_beta_docstring",
0);
- PyDict_SetItemString(d, "pot_enthalpy_from_pt_ice", ufunc_ptr);
+ PyDict_SetItemString(d, "alpha_on_beta", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_d_d,
- data_pot_enthalpy_from_pt_ice_poly,
- types_d_d,
- 1, 1, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_alpha_wrt_t_exact,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "pot_enthalpy_from_pt_ice_poly",
- "pot_enthalpy_from_pt_ice_poly_docstring",
- 0);
+ "alpha_wrt_t_exact",
+ "alpha_wrt_t_exact_docstring",
+ 0);
- PyDict_SetItemString(d, "pot_enthalpy_from_pt_ice_poly", ufunc_ptr);
+ PyDict_SetItemString(d, "alpha_wrt_t_exact", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_d_d,
- data_pt0_cold_ice_poly,
- types_d_d,
- 1, 1, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
+ data_alpha_wrt_t_ice,
+ types_dd_d,
+ 1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "pt0_cold_ice_poly",
- "pt0_cold_ice_poly_docstring",
+ "alpha_wrt_t_ice",
+ "alpha_wrt_t_ice_docstring",
0);
- PyDict_SetItemString(d, "pt0_cold_ice_poly", ufunc_ptr);
+ PyDict_SetItemString(d, "alpha_wrt_t_ice", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_d_d,
- data_pt_from_pot_enthalpy_ice,
- types_d_d,
- 1, 1, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_beta_const_t_exact,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "pt_from_pot_enthalpy_ice",
- "pt_from_pot_enthalpy_ice_docstring",
+ "beta_const_t_exact",
+ "beta_const_t_exact_docstring",
0);
- PyDict_SetItemString(d, "pt_from_pot_enthalpy_ice", ufunc_ptr);
+ PyDict_SetItemString(d, "beta_const_t_exact", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_d_d,
- data_pt_from_pot_enthalpy_ice_poly,
- types_d_d,
- 1, 1, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_beta,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "pt_from_pot_enthalpy_ice_poly",
- "pt_from_pot_enthalpy_ice_poly_docstring",
+ "beta",
+ "beta_docstring",
0);
- PyDict_SetItemString(d, "pt_from_pot_enthalpy_ice_poly", ufunc_ptr);
+ PyDict_SetItemString(d, "beta", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_d_d,
- data_pt_from_pot_enthalpy_ice_poly_dh,
- types_d_d,
- 1, 1, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_cabbeling,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "pt_from_pot_enthalpy_ice_poly_dh",
- "pt_from_pot_enthalpy_ice_poly_dh_docstring",
+ "cabbeling",
+ "cabbeling_docstring",
0);
- PyDict_SetItemString(d, "pt_from_pot_enthalpy_ice_poly_dh", ufunc_ptr);
+ PyDict_SetItemString(d, "cabbeling", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_d_d,
- data_sp_from_sk,
- types_d_d,
- 1, 1, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_c_from_sp,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "sp_from_sk",
- "sp_from_sk_docstring",
+ "c_from_sp",
+ "c_from_sp_docstring",
0);
- PyDict_SetItemString(d, "sp_from_sk", ufunc_ptr);
+ PyDict_SetItemString(d, "c_from_sp", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_d_d,
- data_sp_from_sr,
- types_d_d,
- 1, 1, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
+ data_chem_potential_water_ice,
+ types_dd_d,
+ 1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "sp_from_sr",
- "sp_from_sr_docstring",
+ "chem_potential_water_ice",
+ "chem_potential_water_ice_docstring",
0);
- PyDict_SetItemString(d, "sp_from_sr", ufunc_ptr);
+ PyDict_SetItemString(d, "chem_potential_water_ice", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_d_d,
- data_specvol_sso_0,
- types_d_d,
- 1, 1, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_chem_potential_water_t_exact,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "specvol_sso_0",
- "specvol_sso_0_docstring",
+ "chem_potential_water_t_exact",
+ "chem_potential_water_t_exact_docstring",
0);
- PyDict_SetItemString(d, "specvol_sso_0", ufunc_ptr);
+ PyDict_SetItemString(d, "chem_potential_water_t_exact", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_d_d,
- data_sr_from_sp,
- types_d_d,
- 1, 1, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
+ data_cp_ice,
+ types_dd_d,
+ 1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "sr_from_sp",
- "sr_from_sp_docstring",
+ "cp_ice",
+ "cp_ice_docstring",
0);
- PyDict_SetItemString(d, "sr_from_sp", ufunc_ptr);
+ PyDict_SetItemString(d, "cp_ice", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_adiabatic_lapse_rate_ice,
- types_dd_d,
- 1, 2, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_cp_t_exact,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "adiabatic_lapse_rate_ice",
- "adiabatic_lapse_rate_ice_docstring",
+ "cp_t_exact",
+ "cp_t_exact_docstring",
0);
- PyDict_SetItemString(d, "adiabatic_lapse_rate_ice", ufunc_ptr);
+ PyDict_SetItemString(d, "cp_t_exact", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_alpha_wrt_t_ice,
- types_dd_d,
- 1, 2, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_ct_freezing,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "alpha_wrt_t_ice",
- "alpha_wrt_t_ice_docstring",
+ "ct_freezing",
+ "ct_freezing_docstring",
0);
- PyDict_SetItemString(d, "alpha_wrt_t_ice", ufunc_ptr);
+ PyDict_SetItemString(d, "ct_freezing", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_chem_potential_water_ice,
- types_dd_d,
- 1, 2, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_ct_freezing_poly,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "chem_potential_water_ice",
- "chem_potential_water_ice_docstring",
+ "ct_freezing_poly",
+ "ct_freezing_poly_docstring",
0);
- PyDict_SetItemString(d, "chem_potential_water_ice", ufunc_ptr);
+ PyDict_SetItemString(d, "ct_freezing_poly", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_cp_ice,
- types_dd_d,
- 1, 2, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_ct_from_enthalpy,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "cp_ice",
- "cp_ice_docstring",
+ "ct_from_enthalpy",
+ "ct_from_enthalpy_docstring",
0);
- PyDict_SetItemString(d, "cp_ice", ufunc_ptr);
+ PyDict_SetItemString(d, "ct_from_enthalpy", ufunc_ptr);
+ Py_DECREF(ufunc_ptr);
+
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_ct_from_enthalpy_exact,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
+ PyUFunc_None,
+ "ct_from_enthalpy_exact",
+ "ct_from_enthalpy_exact_docstring",
+ 0);
+
+ PyDict_SetItemString(d, "ct_from_enthalpy_exact", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
@@ -1137,1012 +1226,1000 @@ PyMODINIT_FUNC PyInit__gsw_ufuncs(void)
PyDict_SetItemString(d, "ct_from_pt", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_ct_maxdensity,
- types_dd_d,
- 1, 2, 1, // ndatatypes, nin, nout
- PyUFunc_None,
- "ct_maxdensity",
- "ct_maxdensity_docstring",
- 0);
-
- PyDict_SetItemString(d, "ct_maxdensity", ufunc_ptr);
- Py_DECREF(ufunc_ptr);
-
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_enthalpy_ice,
- types_dd_d,
- 1, 2, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_ct_from_t,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "enthalpy_ice",
- "enthalpy_ice_docstring",
+ "ct_from_t",
+ "ct_from_t_docstring",
0);
- PyDict_SetItemString(d, "enthalpy_ice", ufunc_ptr);
+ PyDict_SetItemString(d, "ct_from_t", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_entropy_from_ct,
+ data_ct_maxdensity,
types_dd_d,
1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "entropy_from_ct",
- "entropy_from_ct_docstring",
+ "ct_maxdensity",
+ "ct_maxdensity_docstring",
0);
- PyDict_SetItemString(d, "entropy_from_ct", ufunc_ptr);
+ PyDict_SetItemString(d, "ct_maxdensity", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_entropy_from_pt,
- types_dd_d,
- 1, 2, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_deltasa_atlas,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "entropy_from_pt",
- "entropy_from_pt_docstring",
+ "deltasa_atlas",
+ "deltasa_atlas_docstring",
0);
- PyDict_SetItemString(d, "entropy_from_pt", ufunc_ptr);
+ PyDict_SetItemString(d, "deltasa_atlas", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_entropy_ice,
- types_dd_d,
- 1, 2, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dddd_d,
+ data_deltasa_from_sp,
+ types_dddd_d,
+ 1, 4, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "entropy_ice",
- "entropy_ice_docstring",
+ "deltasa_from_sp",
+ "deltasa_from_sp_docstring",
0);
- PyDict_SetItemString(d, "entropy_ice", ufunc_ptr);
+ PyDict_SetItemString(d, "deltasa_from_sp", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_entropy_part_zerop,
- types_dd_d,
- 1, 2, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_dilution_coefficient_t_exact,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "entropy_part_zerop",
- "entropy_part_zerop_docstring",
+ "dilution_coefficient_t_exact",
+ "dilution_coefficient_t_exact_docstring",
0);
- PyDict_SetItemString(d, "entropy_part_zerop", ufunc_ptr);
+ PyDict_SetItemString(d, "dilution_coefficient_t_exact", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_gibbs_ice_part_t,
- types_dd_d,
- 1, 2, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_dynamic_enthalpy,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "gibbs_ice_part_t",
- "gibbs_ice_part_t_docstring",
+ "dynamic_enthalpy",
+ "dynamic_enthalpy_docstring",
0);
- PyDict_SetItemString(d, "gibbs_ice_part_t", ufunc_ptr);
+ PyDict_SetItemString(d, "dynamic_enthalpy", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_gibbs_pt0_pt0,
- types_dd_d,
- 1, 2, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_enthalpy_ct_exact,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "gibbs_pt0_pt0",
- "gibbs_pt0_pt0_docstring",
+ "enthalpy_ct_exact",
+ "enthalpy_ct_exact_docstring",
0);
- PyDict_SetItemString(d, "gibbs_pt0_pt0", ufunc_ptr);
+ PyDict_SetItemString(d, "enthalpy_ct_exact", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_grav,
- types_dd_d,
- 1, 2, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dddd_d,
+ data_enthalpy_diff,
+ types_dddd_d,
+ 1, 4, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "grav",
- "grav_docstring",
+ "enthalpy_diff",
+ "enthalpy_diff_docstring",
0);
- PyDict_SetItemString(d, "grav", ufunc_ptr);
+ PyDict_SetItemString(d, "enthalpy_diff", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_helmholtz_energy_ice,
- types_dd_d,
- 1, 2, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_enthalpy,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "helmholtz_energy_ice",
- "helmholtz_energy_ice_docstring",
+ "enthalpy",
+ "enthalpy_docstring",
0);
- PyDict_SetItemString(d, "helmholtz_energy_ice", ufunc_ptr);
+ PyDict_SetItemString(d, "enthalpy", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_internal_energy_ice,
+ data_enthalpy_ice,
types_dd_d,
1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "internal_energy_ice",
- "internal_energy_ice_docstring",
+ "enthalpy_ice",
+ "enthalpy_ice_docstring",
0);
- PyDict_SetItemString(d, "internal_energy_ice", ufunc_ptr);
+ PyDict_SetItemString(d, "enthalpy_ice", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_kappa_const_t_ice,
- types_dd_d,
- 1, 2, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_d_d,
+ data_enthalpy_sso_0,
+ types_d_d,
+ 1, 1, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "kappa_const_t_ice",
- "kappa_const_t_ice_docstring",
+ "enthalpy_sso_0",
+ "enthalpy_sso_0_docstring",
0);
- PyDict_SetItemString(d, "kappa_const_t_ice", ufunc_ptr);
+ PyDict_SetItemString(d, "enthalpy_sso_0", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_kappa_ice,
- types_dd_d,
- 1, 2, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_enthalpy_t_exact,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "kappa_ice",
- "kappa_ice_docstring",
+ "enthalpy_t_exact",
+ "enthalpy_t_exact_docstring",
0);
- PyDict_SetItemString(d, "kappa_ice", ufunc_ptr);
+ PyDict_SetItemString(d, "enthalpy_t_exact", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_latentheat_evap_ct,
+ data_entropy_from_ct,
types_dd_d,
1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "latentheat_evap_ct",
- "latentheat_evap_ct_docstring",
+ "entropy_from_ct",
+ "entropy_from_ct_docstring",
0);
- PyDict_SetItemString(d, "latentheat_evap_ct", ufunc_ptr);
+ PyDict_SetItemString(d, "entropy_from_ct", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_latentheat_evap_t,
+ data_entropy_from_pt,
types_dd_d,
1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "latentheat_evap_t",
- "latentheat_evap_t_docstring",
+ "entropy_from_pt",
+ "entropy_from_pt_docstring",
0);
- PyDict_SetItemString(d, "latentheat_evap_t", ufunc_ptr);
+ PyDict_SetItemString(d, "entropy_from_pt", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_latentheat_melting,
- types_dd_d,
- 1, 2, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_entropy_from_t,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "latentheat_melting",
- "latentheat_melting_docstring",
+ "entropy_from_t",
+ "entropy_from_t_docstring",
0);
- PyDict_SetItemString(d, "latentheat_melting", ufunc_ptr);
+ PyDict_SetItemString(d, "entropy_from_t", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_melting_ice_equilibrium_sa_ct_ratio,
+ data_entropy_ice,
types_dd_d,
1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "melting_ice_equilibrium_sa_ct_ratio",
- "melting_ice_equilibrium_sa_ct_ratio_docstring",
+ "entropy_ice",
+ "entropy_ice_docstring",
0);
- PyDict_SetItemString(d, "melting_ice_equilibrium_sa_ct_ratio", ufunc_ptr);
+ PyDict_SetItemString(d, "entropy_ice", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_melting_ice_equilibrium_sa_ct_ratio_poly,
- types_dd_d,
- 1, 2, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_entropy_part,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "melting_ice_equilibrium_sa_ct_ratio_poly",
- "melting_ice_equilibrium_sa_ct_ratio_poly_docstring",
+ "entropy_part",
+ "entropy_part_docstring",
0);
- PyDict_SetItemString(d, "melting_ice_equilibrium_sa_ct_ratio_poly", ufunc_ptr);
+ PyDict_SetItemString(d, "entropy_part", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_melting_seaice_equilibrium_sa_ct_ratio,
+ data_entropy_part_zerop,
types_dd_d,
1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "melting_seaice_equilibrium_sa_ct_ratio",
- "melting_seaice_equilibrium_sa_ct_ratio_docstring",
+ "entropy_part_zerop",
+ "entropy_part_zerop_docstring",
0);
- PyDict_SetItemString(d, "melting_seaice_equilibrium_sa_ct_ratio", ufunc_ptr);
+ PyDict_SetItemString(d, "entropy_part_zerop", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_melting_seaice_equilibrium_sa_ct_ratio_poly,
- types_dd_d,
- 1, 2, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_fdelta,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "melting_seaice_equilibrium_sa_ct_ratio_poly",
- "melting_seaice_equilibrium_sa_ct_ratio_poly_docstring",
+ "fdelta",
+ "fdelta_docstring",
0);
- PyDict_SetItemString(d, "melting_seaice_equilibrium_sa_ct_ratio_poly", ufunc_ptr);
+ PyDict_SetItemString(d, "fdelta", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_o2sol_sp_pt,
+ data_gibbs_ice_part_t,
types_dd_d,
1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "o2sol_sp_pt",
- "o2sol_sp_pt_docstring",
+ "gibbs_ice_part_t",
+ "gibbs_ice_part_t_docstring",
0);
- PyDict_SetItemString(d, "o2sol_sp_pt", ufunc_ptr);
+ PyDict_SetItemString(d, "gibbs_ice_part_t", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_pot_enthalpy_ice_freezing,
- types_dd_d,
- 1, 2, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_d_d,
+ data_gibbs_ice_pt0,
+ types_d_d,
+ 1, 1, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "pot_enthalpy_ice_freezing",
- "pot_enthalpy_ice_freezing_docstring",
+ "gibbs_ice_pt0",
+ "gibbs_ice_pt0_docstring",
0);
- PyDict_SetItemString(d, "pot_enthalpy_ice_freezing", ufunc_ptr);
+ PyDict_SetItemString(d, "gibbs_ice_pt0", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_pot_enthalpy_ice_freezing_poly,
- types_dd_d,
- 1, 2, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_d_d,
+ data_gibbs_ice_pt0_pt0,
+ types_d_d,
+ 1, 1, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "pot_enthalpy_ice_freezing_poly",
- "pot_enthalpy_ice_freezing_poly_docstring",
+ "gibbs_ice_pt0_pt0",
+ "gibbs_ice_pt0_pt0_docstring",
0);
- PyDict_SetItemString(d, "pot_enthalpy_ice_freezing_poly", ufunc_ptr);
+ PyDict_SetItemString(d, "gibbs_ice_pt0_pt0", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_pressure_coefficient_ice,
+ data_gibbs_pt0_pt0,
types_dd_d,
1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "pressure_coefficient_ice",
- "pressure_coefficient_ice_docstring",
+ "gibbs_pt0_pt0",
+ "gibbs_pt0_pt0_docstring",
0);
- PyDict_SetItemString(d, "pressure_coefficient_ice", ufunc_ptr);
+ PyDict_SetItemString(d, "gibbs_pt0_pt0", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_pt0_from_t_ice,
+ data_grav,
types_dd_d,
1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "pt0_from_t_ice",
- "pt0_from_t_ice_docstring",
+ "grav",
+ "grav_docstring",
0);
- PyDict_SetItemString(d, "pt0_from_t_ice", ufunc_ptr);
+ PyDict_SetItemString(d, "grav", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_pt_from_ct,
+ data_helmholtz_energy_ice,
types_dd_d,
1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "pt_from_ct",
- "pt_from_ct_docstring",
+ "helmholtz_energy_ice",
+ "helmholtz_energy_ice_docstring",
0);
- PyDict_SetItemString(d, "pt_from_ct", ufunc_ptr);
+ PyDict_SetItemString(d, "helmholtz_energy_ice", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_pt_from_entropy,
- types_dd_d,
- 1, 2, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_d_d,
+ data_hill_ratio_at_sp2,
+ types_d_d,
+ 1, 1, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "pt_from_entropy",
- "pt_from_entropy_docstring",
+ "hill_ratio_at_sp2",
+ "hill_ratio_at_sp2_docstring",
0);
- PyDict_SetItemString(d, "pt_from_entropy", ufunc_ptr);
+ PyDict_SetItemString(d, "hill_ratio_at_sp2", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_rho_ice,
- types_dd_d,
- 1, 2, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_internal_energy,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "rho_ice",
- "rho_ice_docstring",
+ "internal_energy",
+ "internal_energy_docstring",
0);
- PyDict_SetItemString(d, "rho_ice", ufunc_ptr);
+ PyDict_SetItemString(d, "internal_energy", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_sigma0,
+ data_internal_energy_ice,
types_dd_d,
1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "sigma0",
- "sigma0_docstring",
+ "internal_energy_ice",
+ "internal_energy_ice_docstring",
0);
- PyDict_SetItemString(d, "sigma0", ufunc_ptr);
+ PyDict_SetItemString(d, "internal_energy_ice", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_sigma1,
+ data_kappa_const_t_ice,
types_dd_d,
1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "sigma1",
- "sigma1_docstring",
+ "kappa_const_t_ice",
+ "kappa_const_t_ice_docstring",
0);
- PyDict_SetItemString(d, "sigma1", ufunc_ptr);
+ PyDict_SetItemString(d, "kappa_const_t_ice", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_sigma2,
- types_dd_d,
- 1, 2, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_kappa,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "sigma2",
- "sigma2_docstring",
+ "kappa",
+ "kappa_docstring",
0);
- PyDict_SetItemString(d, "sigma2", ufunc_ptr);
+ PyDict_SetItemString(d, "kappa", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_sigma3,
+ data_kappa_ice,
types_dd_d,
1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "sigma3",
- "sigma3_docstring",
+ "kappa_ice",
+ "kappa_ice_docstring",
0);
- PyDict_SetItemString(d, "sigma3", ufunc_ptr);
+ PyDict_SetItemString(d, "kappa_ice", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_sigma4,
- types_dd_d,
- 1, 2, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_kappa_t_exact,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "sigma4",
- "sigma4_docstring",
+ "kappa_t_exact",
+ "kappa_t_exact_docstring",
0);
- PyDict_SetItemString(d, "sigma4", ufunc_ptr);
+ PyDict_SetItemString(d, "kappa_t_exact", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_sound_speed_ice,
+ data_latentheat_evap_ct,
types_dd_d,
1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "sound_speed_ice",
- "sound_speed_ice_docstring",
+ "latentheat_evap_ct",
+ "latentheat_evap_ct_docstring",
0);
- PyDict_SetItemString(d, "sound_speed_ice", ufunc_ptr);
+ PyDict_SetItemString(d, "latentheat_evap_ct", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_sp_salinometer,
+ data_latentheat_evap_t,
types_dd_d,
1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "sp_salinometer",
- "sp_salinometer_docstring",
+ "latentheat_evap_t",
+ "latentheat_evap_t_docstring",
0);
- PyDict_SetItemString(d, "sp_salinometer", ufunc_ptr);
+ PyDict_SetItemString(d, "latentheat_evap_t", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_specvol_ice,
+ data_latentheat_melting,
types_dd_d,
1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "specvol_ice",
- "specvol_ice_docstring",
+ "latentheat_melting",
+ "latentheat_melting_docstring",
0);
- PyDict_SetItemString(d, "specvol_ice", ufunc_ptr);
+ PyDict_SetItemString(d, "latentheat_melting", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_spiciness0,
+ data_melting_ice_equilibrium_sa_ct_ratio,
types_dd_d,
1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "spiciness0",
- "spiciness0_docstring",
+ "melting_ice_equilibrium_sa_ct_ratio",
+ "melting_ice_equilibrium_sa_ct_ratio_docstring",
0);
- PyDict_SetItemString(d, "spiciness0", ufunc_ptr);
+ PyDict_SetItemString(d, "melting_ice_equilibrium_sa_ct_ratio", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_spiciness1,
+ data_melting_ice_equilibrium_sa_ct_ratio_poly,
types_dd_d,
1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "spiciness1",
- "spiciness1_docstring",
+ "melting_ice_equilibrium_sa_ct_ratio_poly",
+ "melting_ice_equilibrium_sa_ct_ratio_poly_docstring",
0);
- PyDict_SetItemString(d, "spiciness1", ufunc_ptr);
+ PyDict_SetItemString(d, "melting_ice_equilibrium_sa_ct_ratio_poly", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_spiciness2,
- types_dd_d,
- 1, 2, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dddd_d,
+ data_melting_ice_sa_ct_ratio,
+ types_dddd_d,
+ 1, 4, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "spiciness2",
- "spiciness2_docstring",
+ "melting_ice_sa_ct_ratio",
+ "melting_ice_sa_ct_ratio_docstring",
0);
- PyDict_SetItemString(d, "spiciness2", ufunc_ptr);
+ PyDict_SetItemString(d, "melting_ice_sa_ct_ratio", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
- data_t_from_pt0_ice,
- types_dd_d,
- 1, 2, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dddd_d,
+ data_melting_ice_sa_ct_ratio_poly,
+ types_dddd_d,
+ 1, 4, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "t_from_pt0_ice",
- "t_from_pt0_ice_docstring",
+ "melting_ice_sa_ct_ratio_poly",
+ "melting_ice_sa_ct_ratio_poly_docstring",
0);
- PyDict_SetItemString(d, "t_from_pt0_ice", ufunc_ptr);
+ PyDict_SetItemString(d, "melting_ice_sa_ct_ratio_poly", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_adiabatic_lapse_rate_from_ct,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
+ data_melting_seaice_equilibrium_sa_ct_ratio,
+ types_dd_d,
+ 1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "adiabatic_lapse_rate_from_ct",
- "adiabatic_lapse_rate_from_ct_docstring",
+ "melting_seaice_equilibrium_sa_ct_ratio",
+ "melting_seaice_equilibrium_sa_ct_ratio_docstring",
0);
- PyDict_SetItemString(d, "adiabatic_lapse_rate_from_ct", ufunc_ptr);
+ PyDict_SetItemString(d, "melting_seaice_equilibrium_sa_ct_ratio", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_alpha,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
+ data_melting_seaice_equilibrium_sa_ct_ratio_poly,
+ types_dd_d,
+ 1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "alpha",
- "alpha_docstring",
+ "melting_seaice_equilibrium_sa_ct_ratio_poly",
+ "melting_seaice_equilibrium_sa_ct_ratio_poly_docstring",
0);
- PyDict_SetItemString(d, "alpha", ufunc_ptr);
+ PyDict_SetItemString(d, "melting_seaice_equilibrium_sa_ct_ratio_poly", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_alpha_on_beta,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddddd_d,
+ data_melting_seaice_sa_ct_ratio,
+ types_ddddd_d,
+ 1, 5, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "alpha_on_beta",
- "alpha_on_beta_docstring",
+ "melting_seaice_sa_ct_ratio",
+ "melting_seaice_sa_ct_ratio_docstring",
0);
- PyDict_SetItemString(d, "alpha_on_beta", ufunc_ptr);
+ PyDict_SetItemString(d, "melting_seaice_sa_ct_ratio", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_alpha_wrt_t_exact,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddddd_d,
+ data_melting_seaice_sa_ct_ratio_poly,
+ types_ddddd_d,
+ 1, 5, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "alpha_wrt_t_exact",
- "alpha_wrt_t_exact_docstring",
+ "melting_seaice_sa_ct_ratio_poly",
+ "melting_seaice_sa_ct_ratio_poly_docstring",
0);
- PyDict_SetItemString(d, "alpha_wrt_t_exact", ufunc_ptr);
+ PyDict_SetItemString(d, "melting_seaice_sa_ct_ratio_poly", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_beta,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddddd_d,
+ data_o2sol,
+ types_ddddd_d,
+ 1, 5, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "beta",
- "beta_docstring",
+ "o2sol",
+ "o2sol_docstring",
0);
- PyDict_SetItemString(d, "beta", ufunc_ptr);
+ PyDict_SetItemString(d, "o2sol", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_beta_const_t_exact,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
+ data_o2sol_sp_pt,
+ types_dd_d,
+ 1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "beta_const_t_exact",
- "beta_const_t_exact_docstring",
+ "o2sol_sp_pt",
+ "o2sol_sp_pt_docstring",
0);
- PyDict_SetItemString(d, "beta_const_t_exact", ufunc_ptr);
+ PyDict_SetItemString(d, "o2sol_sp_pt", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_c_from_sp,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_d_d,
+ data_pot_enthalpy_from_pt_ice,
+ types_d_d,
+ 1, 1, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "c_from_sp",
- "c_from_sp_docstring",
+ "pot_enthalpy_from_pt_ice",
+ "pot_enthalpy_from_pt_ice_docstring",
0);
- PyDict_SetItemString(d, "c_from_sp", ufunc_ptr);
+ PyDict_SetItemString(d, "pot_enthalpy_from_pt_ice", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_cabbeling,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_d_d,
+ data_pot_enthalpy_from_pt_ice_poly,
+ types_d_d,
+ 1, 1, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "cabbeling",
- "cabbeling_docstring",
+ "pot_enthalpy_from_pt_ice_poly",
+ "pot_enthalpy_from_pt_ice_poly_docstring",
0);
- PyDict_SetItemString(d, "cabbeling", ufunc_ptr);
+ PyDict_SetItemString(d, "pot_enthalpy_from_pt_ice_poly", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_chem_potential_water_t_exact,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
+ data_pot_enthalpy_ice_freezing,
+ types_dd_d,
+ 1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "chem_potential_water_t_exact",
- "chem_potential_water_t_exact_docstring",
+ "pot_enthalpy_ice_freezing",
+ "pot_enthalpy_ice_freezing_docstring",
0);
- PyDict_SetItemString(d, "chem_potential_water_t_exact", ufunc_ptr);
+ PyDict_SetItemString(d, "pot_enthalpy_ice_freezing", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_cp_t_exact,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
+ data_pot_enthalpy_ice_freezing_poly,
+ types_dd_d,
+ 1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "cp_t_exact",
- "cp_t_exact_docstring",
+ "pot_enthalpy_ice_freezing_poly",
+ "pot_enthalpy_ice_freezing_poly_docstring",
0);
- PyDict_SetItemString(d, "cp_t_exact", ufunc_ptr);
+ PyDict_SetItemString(d, "pot_enthalpy_ice_freezing_poly", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_ct_freezing,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dddd_d,
+ data_pot_rho_t_exact,
+ types_dddd_d,
+ 1, 4, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "ct_freezing",
- "ct_freezing_docstring",
+ "pot_rho_t_exact",
+ "pot_rho_t_exact_docstring",
0);
- PyDict_SetItemString(d, "ct_freezing", ufunc_ptr);
+ PyDict_SetItemString(d, "pot_rho_t_exact", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_ct_freezing_poly,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
+ data_pressure_coefficient_ice,
+ types_dd_d,
+ 1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "ct_freezing_poly",
- "ct_freezing_poly_docstring",
+ "pressure_coefficient_ice",
+ "pressure_coefficient_ice_docstring",
0);
- PyDict_SetItemString(d, "ct_freezing_poly", ufunc_ptr);
+ PyDict_SetItemString(d, "pressure_coefficient_ice", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_ct_from_enthalpy,
+ data_pressure_freezing_ct,
types_ddd_d,
1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "ct_from_enthalpy",
- "ct_from_enthalpy_docstring",
+ "pressure_freezing_ct",
+ "pressure_freezing_ct_docstring",
0);
- PyDict_SetItemString(d, "ct_from_enthalpy", ufunc_ptr);
+ PyDict_SetItemString(d, "pressure_freezing_ct", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_ct_from_enthalpy_exact,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_d_d,
+ data_pt0_cold_ice_poly,
+ types_d_d,
+ 1, 1, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "ct_from_enthalpy_exact",
- "ct_from_enthalpy_exact_docstring",
+ "pt0_cold_ice_poly",
+ "pt0_cold_ice_poly_docstring",
0);
- PyDict_SetItemString(d, "ct_from_enthalpy_exact", ufunc_ptr);
+ PyDict_SetItemString(d, "pt0_cold_ice_poly", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_ct_from_t,
+ data_pt0_from_t,
types_ddd_d,
1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "ct_from_t",
- "ct_from_t_docstring",
+ "pt0_from_t",
+ "pt0_from_t_docstring",
0);
- PyDict_SetItemString(d, "ct_from_t", ufunc_ptr);
+ PyDict_SetItemString(d, "pt0_from_t", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_deltasa_atlas,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
+ data_pt0_from_t_ice,
+ types_dd_d,
+ 1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "deltasa_atlas",
- "deltasa_atlas_docstring",
+ "pt0_from_t_ice",
+ "pt0_from_t_ice_docstring",
0);
- PyDict_SetItemString(d, "deltasa_atlas", ufunc_ptr);
+ PyDict_SetItemString(d, "pt0_from_t_ice", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_dilution_coefficient_t_exact,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
+ data_pt_from_ct,
+ types_dd_d,
+ 1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "dilution_coefficient_t_exact",
- "dilution_coefficient_t_exact_docstring",
+ "pt_from_ct",
+ "pt_from_ct_docstring",
0);
- PyDict_SetItemString(d, "dilution_coefficient_t_exact", ufunc_ptr);
+ PyDict_SetItemString(d, "pt_from_ct", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_dynamic_enthalpy,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
+ data_pt_from_entropy,
+ types_dd_d,
+ 1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "dynamic_enthalpy",
- "dynamic_enthalpy_docstring",
+ "pt_from_entropy",
+ "pt_from_entropy_docstring",
0);
- PyDict_SetItemString(d, "dynamic_enthalpy", ufunc_ptr);
+ PyDict_SetItemString(d, "pt_from_entropy", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_enthalpy,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_d_d,
+ data_pt_from_pot_enthalpy_ice,
+ types_d_d,
+ 1, 1, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "enthalpy",
- "enthalpy_docstring",
+ "pt_from_pot_enthalpy_ice",
+ "pt_from_pot_enthalpy_ice_docstring",
0);
- PyDict_SetItemString(d, "enthalpy", ufunc_ptr);
+ PyDict_SetItemString(d, "pt_from_pot_enthalpy_ice", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_enthalpy_ct_exact,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_d_d,
+ data_pt_from_pot_enthalpy_ice_poly_dh,
+ types_d_d,
+ 1, 1, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "enthalpy_ct_exact",
- "enthalpy_ct_exact_docstring",
+ "pt_from_pot_enthalpy_ice_poly_dh",
+ "pt_from_pot_enthalpy_ice_poly_dh_docstring",
0);
- PyDict_SetItemString(d, "enthalpy_ct_exact", ufunc_ptr);
+ PyDict_SetItemString(d, "pt_from_pot_enthalpy_ice_poly_dh", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_enthalpy_t_exact,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_d_d,
+ data_pt_from_pot_enthalpy_ice_poly,
+ types_d_d,
+ 1, 1, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "enthalpy_t_exact",
- "enthalpy_t_exact_docstring",
+ "pt_from_pot_enthalpy_ice_poly",
+ "pt_from_pot_enthalpy_ice_poly_docstring",
0);
- PyDict_SetItemString(d, "enthalpy_t_exact", ufunc_ptr);
+ PyDict_SetItemString(d, "pt_from_pot_enthalpy_ice_poly", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_entropy_from_t,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dddd_d,
+ data_pt_from_t,
+ types_dddd_d,
+ 1, 4, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "entropy_from_t",
- "entropy_from_t_docstring",
+ "pt_from_t",
+ "pt_from_t_docstring",
0);
- PyDict_SetItemString(d, "entropy_from_t", ufunc_ptr);
+ PyDict_SetItemString(d, "pt_from_t", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_entropy_part,
+ data_pt_from_t_ice,
types_ddd_d,
1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "entropy_part",
- "entropy_part_docstring",
+ "pt_from_t_ice",
+ "pt_from_t_ice_docstring",
0);
- PyDict_SetItemString(d, "entropy_part", ufunc_ptr);
+ PyDict_SetItemString(d, "pt_from_t_ice", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_fdelta,
+ data_rho,
types_ddd_d,
1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "fdelta",
- "fdelta_docstring",
+ "rho",
+ "rho_docstring",
0);
- PyDict_SetItemString(d, "fdelta", ufunc_ptr);
+ PyDict_SetItemString(d, "rho", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_internal_energy,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
+ data_rho_ice,
+ types_dd_d,
+ 1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "internal_energy",
- "internal_energy_docstring",
+ "rho_ice",
+ "rho_ice_docstring",
0);
- PyDict_SetItemString(d, "internal_energy", ufunc_ptr);
+ PyDict_SetItemString(d, "rho_ice", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_kappa,
+ data_rho_t_exact,
types_ddd_d,
1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "kappa",
- "kappa_docstring",
+ "rho_t_exact",
+ "rho_t_exact_docstring",
0);
- PyDict_SetItemString(d, "kappa", ufunc_ptr);
+ PyDict_SetItemString(d, "rho_t_exact", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_kappa_t_exact,
+ data_saar,
types_ddd_d,
1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "kappa_t_exact",
- "kappa_t_exact_docstring",
+ "saar",
+ "saar_docstring",
0);
- PyDict_SetItemString(d, "kappa_t_exact", ufunc_ptr);
+ PyDict_SetItemString(d, "saar", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_pressure_freezing_ct,
+ data_sa_freezing_from_ct,
types_ddd_d,
1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "pressure_freezing_ct",
- "pressure_freezing_ct_docstring",
+ "sa_freezing_from_ct",
+ "sa_freezing_from_ct_docstring",
0);
- PyDict_SetItemString(d, "pressure_freezing_ct", ufunc_ptr);
+ PyDict_SetItemString(d, "sa_freezing_from_ct", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_pt0_from_t,
+ data_sa_freezing_from_ct_poly,
types_ddd_d,
1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "pt0_from_t",
- "pt0_from_t_docstring",
+ "sa_freezing_from_ct_poly",
+ "sa_freezing_from_ct_poly_docstring",
0);
- PyDict_SetItemString(d, "pt0_from_t", ufunc_ptr);
+ PyDict_SetItemString(d, "sa_freezing_from_ct_poly", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_pt_from_t_ice,
+ data_sa_freezing_from_t,
types_ddd_d,
1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "pt_from_t_ice",
- "pt_from_t_ice_docstring",
+ "sa_freezing_from_t",
+ "sa_freezing_from_t_docstring",
0);
- PyDict_SetItemString(d, "pt_from_t_ice", ufunc_ptr);
+ PyDict_SetItemString(d, "sa_freezing_from_t", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_rho,
+ data_sa_freezing_from_t_poly,
types_ddd_d,
1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "rho",
- "rho_docstring",
+ "sa_freezing_from_t_poly",
+ "sa_freezing_from_t_poly_docstring",
0);
- PyDict_SetItemString(d, "rho", ufunc_ptr);
+ PyDict_SetItemString(d, "sa_freezing_from_t_poly", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_rho_t_exact,
+ data_sa_from_rho,
types_ddd_d,
1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "rho_t_exact",
- "rho_t_exact_docstring",
+ "sa_from_rho",
+ "sa_from_rho_docstring",
0);
- PyDict_SetItemString(d, "rho_t_exact", ufunc_ptr);
+ PyDict_SetItemString(d, "sa_from_rho", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_sa_freezing_from_ct,
+ data_sa_from_sp_baltic,
types_ddd_d,
1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "sa_freezing_from_ct",
- "sa_freezing_from_ct_docstring",
+ "sa_from_sp_baltic",
+ "sa_from_sp_baltic_docstring",
0);
- PyDict_SetItemString(d, "sa_freezing_from_ct", ufunc_ptr);
+ PyDict_SetItemString(d, "sa_from_sp_baltic", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_sa_freezing_from_ct_poly,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dddd_d,
+ data_sa_from_sp,
+ types_dddd_d,
+ 1, 4, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "sa_freezing_from_ct_poly",
- "sa_freezing_from_ct_poly_docstring",
+ "sa_from_sp",
+ "sa_from_sp_docstring",
0);
- PyDict_SetItemString(d, "sa_freezing_from_ct_poly", ufunc_ptr);
+ PyDict_SetItemString(d, "sa_from_sp", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_sa_freezing_from_t,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dddd_d,
+ data_sa_from_sstar,
+ types_dddd_d,
+ 1, 4, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "sa_freezing_from_t",
- "sa_freezing_from_t_docstring",
+ "sa_from_sstar",
+ "sa_from_sstar_docstring",
0);
- PyDict_SetItemString(d, "sa_freezing_from_t", ufunc_ptr);
+ PyDict_SetItemString(d, "sa_from_sstar", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_sa_freezing_from_t_poly,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_i,
+ data_sa_p_inrange,
+ types_dd_i,
+ 1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "sa_freezing_from_t_poly",
- "sa_freezing_from_t_poly_docstring",
+ "sa_p_inrange",
+ "sa_p_inrange_docstring",
0);
- PyDict_SetItemString(d, "sa_freezing_from_t_poly", ufunc_ptr);
+ PyDict_SetItemString(d, "sa_p_inrange", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_sa_from_rho,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
+ data_sigma0,
+ types_dd_d,
+ 1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "sa_from_rho",
- "sa_from_rho_docstring",
+ "sigma0",
+ "sigma0_docstring",
0);
- PyDict_SetItemString(d, "sa_from_rho", ufunc_ptr);
+ PyDict_SetItemString(d, "sigma0", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_sa_from_sp_baltic,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
+ data_sigma1,
+ types_dd_d,
+ 1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "sa_from_sp_baltic",
- "sa_from_sp_baltic_docstring",
+ "sigma1",
+ "sigma1_docstring",
0);
- PyDict_SetItemString(d, "sa_from_sp_baltic", ufunc_ptr);
+ PyDict_SetItemString(d, "sigma1", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_saar,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
+ data_sigma2,
+ types_dd_d,
+ 1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "saar",
- "saar_docstring",
+ "sigma2",
+ "sigma2_docstring",
0);
- PyDict_SetItemString(d, "saar", ufunc_ptr);
+ PyDict_SetItemString(d, "sigma2", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_sound_speed,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
+ data_sigma3,
+ types_dd_d,
+ 1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "sound_speed",
- "sound_speed_docstring",
+ "sigma3",
+ "sigma3_docstring",
0);
- PyDict_SetItemString(d, "sound_speed", ufunc_ptr);
+ PyDict_SetItemString(d, "sigma3", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_sound_speed_t_exact,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
+ data_sigma4,
+ types_dd_d,
+ 1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "sound_speed_t_exact",
- "sound_speed_t_exact_docstring",
+ "sigma4",
+ "sigma4_docstring",
0);
- PyDict_SetItemString(d, "sound_speed_t_exact", ufunc_ptr);
+ PyDict_SetItemString(d, "sigma4", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_sp_from_c,
+ data_sound_speed,
types_ddd_d,
1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "sp_from_c",
- "sp_from_c_docstring",
+ "sound_speed",
+ "sound_speed_docstring",
0);
- PyDict_SetItemString(d, "sp_from_c", ufunc_ptr);
+ PyDict_SetItemString(d, "sound_speed", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_sp_from_sa_baltic,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
+ data_sound_speed_ice,
+ types_dd_d,
+ 1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "sp_from_sa_baltic",
- "sp_from_sa_baltic_docstring",
+ "sound_speed_ice",
+ "sound_speed_ice_docstring",
0);
- PyDict_SetItemString(d, "sp_from_sa_baltic", ufunc_ptr);
+ PyDict_SetItemString(d, "sound_speed_ice", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_specvol,
+ data_sound_speed_t_exact,
types_ddd_d,
1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "specvol",
- "specvol_docstring",
+ "sound_speed_t_exact",
+ "sound_speed_t_exact_docstring",
0);
- PyDict_SetItemString(d, "specvol", ufunc_ptr);
+ PyDict_SetItemString(d, "sound_speed_t_exact", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
@@ -2158,207 +2235,183 @@ PyMODINIT_FUNC PyInit__gsw_ufuncs(void)
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_specvol_t_exact,
+ data_specvol,
types_ddd_d,
1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "specvol_t_exact",
- "specvol_t_exact_docstring",
+ "specvol",
+ "specvol_docstring",
0);
- PyDict_SetItemString(d, "specvol_t_exact", ufunc_ptr);
+ PyDict_SetItemString(d, "specvol", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_t_deriv_chem_potential_water_t_exact,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
+ data_specvol_ice,
+ types_dd_d,
+ 1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "t_deriv_chem_potential_water_t_exact",
- "t_deriv_chem_potential_water_t_exact_docstring",
+ "specvol_ice",
+ "specvol_ice_docstring",
0);
- PyDict_SetItemString(d, "t_deriv_chem_potential_water_t_exact", ufunc_ptr);
+ PyDict_SetItemString(d, "specvol_ice", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_t_freezing,
- types_ddd_d,
- 1, 3, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_d_d,
+ data_specvol_sso_0,
+ types_d_d,
+ 1, 1, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "t_freezing",
- "t_freezing_docstring",
+ "specvol_sso_0",
+ "specvol_sso_0_docstring",
0);
- PyDict_SetItemString(d, "t_freezing", ufunc_ptr);
+ PyDict_SetItemString(d, "specvol_sso_0", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_t_freezing_poly,
+ data_specvol_t_exact,
types_ddd_d,
1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "t_freezing_poly",
- "t_freezing_poly_docstring",
+ "specvol_t_exact",
+ "specvol_t_exact_docstring",
0);
- PyDict_SetItemString(d, "t_freezing_poly", ufunc_ptr);
+ PyDict_SetItemString(d, "specvol_t_exact", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_t_from_ct,
+ data_sp_from_c,
types_ddd_d,
1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "t_from_ct",
- "t_from_ct_docstring",
+ "sp_from_c",
+ "sp_from_c_docstring",
0);
- PyDict_SetItemString(d, "t_from_ct", ufunc_ptr);
+ PyDict_SetItemString(d, "sp_from_c", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
- data_thermobaric,
+ data_sp_from_sa_baltic,
types_ddd_d,
1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "thermobaric",
- "thermobaric_docstring",
- 0);
-
- PyDict_SetItemString(d, "thermobaric", ufunc_ptr);
- Py_DECREF(ufunc_ptr);
-
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dddd_d,
- data_deltasa_from_sp,
- types_dddd_d,
- 1, 4, 1, // ndatatypes, nin, nout
- PyUFunc_None,
- "deltasa_from_sp",
- "deltasa_from_sp_docstring",
- 0);
-
- PyDict_SetItemString(d, "deltasa_from_sp", ufunc_ptr);
- Py_DECREF(ufunc_ptr);
-
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dddd_d,
- data_enthalpy_diff,
- types_dddd_d,
- 1, 4, 1, // ndatatypes, nin, nout
- PyUFunc_None,
- "enthalpy_diff",
- "enthalpy_diff_docstring",
+ "sp_from_sa_baltic",
+ "sp_from_sa_baltic_docstring",
0);
- PyDict_SetItemString(d, "enthalpy_diff", ufunc_ptr);
+ PyDict_SetItemString(d, "sp_from_sa_baltic", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dddd_d,
- data_melting_ice_sa_ct_ratio,
+ data_sp_from_sa,
types_dddd_d,
1, 4, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "melting_ice_sa_ct_ratio",
- "melting_ice_sa_ct_ratio_docstring",
+ "sp_from_sa",
+ "sp_from_sa_docstring",
0);
- PyDict_SetItemString(d, "melting_ice_sa_ct_ratio", ufunc_ptr);
+ PyDict_SetItemString(d, "sp_from_sa", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dddd_d,
- data_melting_ice_sa_ct_ratio_poly,
- types_dddd_d,
- 1, 4, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_d_d,
+ data_sp_from_sk,
+ types_d_d,
+ 1, 1, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "melting_ice_sa_ct_ratio_poly",
- "melting_ice_sa_ct_ratio_poly_docstring",
+ "sp_from_sk",
+ "sp_from_sk_docstring",
0);
- PyDict_SetItemString(d, "melting_ice_sa_ct_ratio_poly", ufunc_ptr);
+ PyDict_SetItemString(d, "sp_from_sk", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dddd_d,
- data_p_from_z,
- types_dddd_d,
- 1, 4, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_d_d,
+ data_sp_from_sr,
+ types_d_d,
+ 1, 1, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "p_from_z",
- "p_from_z_docstring",
+ "sp_from_sr",
+ "sp_from_sr_docstring",
0);
- PyDict_SetItemString(d, "p_from_z", ufunc_ptr);
+ PyDict_SetItemString(d, "sp_from_sr", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dddd_d,
- data_pot_rho_t_exact,
+ data_sp_from_sstar,
types_dddd_d,
1, 4, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "pot_rho_t_exact",
- "pot_rho_t_exact_docstring",
+ "sp_from_sstar",
+ "sp_from_sstar_docstring",
0);
- PyDict_SetItemString(d, "pot_rho_t_exact", ufunc_ptr);
+ PyDict_SetItemString(d, "sp_from_sstar", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dddd_d,
- data_pt_from_t,
- types_dddd_d,
- 1, 4, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
+ data_sp_salinometer,
+ types_dd_d,
+ 1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "pt_from_t",
- "pt_from_t_docstring",
+ "sp_salinometer",
+ "sp_salinometer_docstring",
0);
- PyDict_SetItemString(d, "pt_from_t", ufunc_ptr);
+ PyDict_SetItemString(d, "sp_salinometer", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dddd_d,
- data_sa_from_sp,
- types_dddd_d,
- 1, 4, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
+ data_spiciness0,
+ types_dd_d,
+ 1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "sa_from_sp",
- "sa_from_sp_docstring",
+ "spiciness0",
+ "spiciness0_docstring",
0);
- PyDict_SetItemString(d, "sa_from_sp", ufunc_ptr);
+ PyDict_SetItemString(d, "spiciness0", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dddd_d,
- data_sa_from_sstar,
- types_dddd_d,
- 1, 4, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
+ data_spiciness1,
+ types_dd_d,
+ 1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "sa_from_sstar",
- "sa_from_sstar_docstring",
+ "spiciness1",
+ "spiciness1_docstring",
0);
- PyDict_SetItemString(d, "sa_from_sstar", ufunc_ptr);
+ PyDict_SetItemString(d, "spiciness1", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dddd_d,
- data_sp_from_sa,
- types_dddd_d,
- 1, 4, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
+ data_spiciness2,
+ types_dd_d,
+ 1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "sp_from_sa",
- "sp_from_sa_docstring",
+ "spiciness2",
+ "spiciness2_docstring",
0);
- PyDict_SetItemString(d, "sp_from_sa", ufunc_ptr);
+ PyDict_SetItemString(d, "spiciness2", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dddd_d,
- data_sp_from_sstar,
- types_dddd_d,
- 1, 4, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_d_d,
+ data_sr_from_sp,
+ types_d_d,
+ 1, 1, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "sp_from_sstar",
- "sp_from_sstar_docstring",
+ "sr_from_sp",
+ "sr_from_sp_docstring",
0);
- PyDict_SetItemString(d, "sp_from_sstar", ufunc_ptr);
+ PyDict_SetItemString(d, "sr_from_sp", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dddd_d,
@@ -2385,112 +2438,124 @@ PyMODINIT_FUNC PyInit__gsw_ufuncs(void)
PyDict_SetItemString(d, "sstar_from_sp", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dddd_d,
- data_z_from_p,
- types_dddd_d,
- 1, 4, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_t_deriv_chem_potential_water_t_exact,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "z_from_p",
- "z_from_p_docstring",
+ "t_deriv_chem_potential_water_t_exact",
+ "t_deriv_chem_potential_water_t_exact_docstring",
0);
- PyDict_SetItemString(d, "z_from_p", ufunc_ptr);
+ PyDict_SetItemString(d, "t_deriv_chem_potential_water_t_exact", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddddd_d,
- data_melting_seaice_sa_ct_ratio,
- types_ddddd_d,
- 1, 5, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_t_freezing,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "melting_seaice_sa_ct_ratio",
- "melting_seaice_sa_ct_ratio_docstring",
+ "t_freezing",
+ "t_freezing_docstring",
0);
- PyDict_SetItemString(d, "melting_seaice_sa_ct_ratio", ufunc_ptr);
+ PyDict_SetItemString(d, "t_freezing", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddddd_d,
- data_melting_seaice_sa_ct_ratio_poly,
- types_ddddd_d,
- 1, 5, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_t_freezing_poly,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "melting_seaice_sa_ct_ratio_poly",
- "melting_seaice_sa_ct_ratio_poly_docstring",
+ "t_freezing_poly",
+ "t_freezing_poly_docstring",
0);
- PyDict_SetItemString(d, "melting_seaice_sa_ct_ratio_poly", ufunc_ptr);
+ PyDict_SetItemString(d, "t_freezing_poly", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddddd_d,
- data_o2sol,
- types_ddddd_d,
- 1, 5, 1, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_t_from_ct,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "o2sol",
- "o2sol_docstring",
+ "t_from_ct",
+ "t_from_ct_docstring",
0);
- PyDict_SetItemString(d, "o2sol", ufunc_ptr);
+ PyDict_SetItemString(d, "t_from_ct", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_dd,
- data_ct_first_derivatives,
- types_dd_dd,
- 1, 2, 2, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_d,
+ data_t_from_pt0_ice,
+ types_dd_d,
+ 1, 2, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "ct_first_derivatives",
- "ct_first_derivatives_docstring",
+ "t_from_pt0_ice",
+ "t_from_pt0_ice_docstring",
0);
- PyDict_SetItemString(d, "ct_first_derivatives", ufunc_ptr);
+ PyDict_SetItemString(d, "t_from_pt0_ice", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_dd,
- data_entropy_first_derivatives,
- types_dd_dd,
- 1, 2, 2, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_d,
+ data_thermobaric,
+ types_ddd_d,
+ 1, 3, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "entropy_first_derivatives",
- "entropy_first_derivatives_docstring",
+ "thermobaric",
+ "thermobaric_docstring",
0);
- PyDict_SetItemString(d, "entropy_first_derivatives", ufunc_ptr);
+ PyDict_SetItemString(d, "thermobaric", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_dd,
- data_pot_enthalpy_ice_freezing_first_derivatives,
- types_dd_dd,
- 1, 2, 2, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dddd_d,
+ data_z_from_p,
+ types_dddd_d,
+ 1, 4, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "pot_enthalpy_ice_freezing_first_derivatives",
- "pot_enthalpy_ice_freezing_first_derivatives_docstring",
+ "z_from_p",
+ "z_from_p_docstring",
0);
- PyDict_SetItemString(d, "pot_enthalpy_ice_freezing_first_derivatives", ufunc_ptr);
+ PyDict_SetItemString(d, "z_from_p", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_dd,
- data_pot_enthalpy_ice_freezing_first_derivatives_poly,
- types_dd_dd,
- 1, 2, 2, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dddd_d,
+ data_p_from_z,
+ types_dddd_d,
+ 1, 4, 1, // ndatatypes, nin, nout
PyUFunc_None,
- "pot_enthalpy_ice_freezing_first_derivatives_poly",
- "pot_enthalpy_ice_freezing_first_derivatives_poly_docstring",
+ "p_from_z",
+ "p_from_z_docstring",
0);
- PyDict_SetItemString(d, "pot_enthalpy_ice_freezing_first_derivatives_poly", ufunc_ptr);
+ PyDict_SetItemString(d, "p_from_z", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_dd,
- data_pt_first_derivatives,
+ data_ct_first_derivatives,
types_dd_dd,
1, 2, 2, // ndatatypes, nin, nout
PyUFunc_None,
- "pt_first_derivatives",
- "pt_first_derivatives_docstring",
+ "ct_first_derivatives",
+ "ct_first_derivatives_docstring",
0);
- PyDict_SetItemString(d, "pt_first_derivatives", ufunc_ptr);
+ PyDict_SetItemString(d, "ct_first_derivatives", ufunc_ptr);
+ Py_DECREF(ufunc_ptr);
+
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_ddd,
+ data_ct_first_derivatives_wrt_t_exact,
+ types_ddd_ddd,
+ 1, 3, 3, // ndatatypes, nin, nout
+ PyUFunc_None,
+ "ct_first_derivatives_wrt_t_exact",
+ "ct_first_derivatives_wrt_t_exact_docstring",
+ 0);
+
+ PyDict_SetItemString(d, "ct_first_derivatives_wrt_t_exact", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_dd,
@@ -2529,16 +2594,16 @@ PyMODINIT_FUNC PyInit__gsw_ufuncs(void)
PyDict_SetItemString(d, "ct_from_rho", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_dd,
- data_enthalpy_first_derivatives,
- types_ddd_dd,
- 1, 3, 2, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_ddd,
+ data_ct_second_derivatives,
+ types_dd_ddd,
+ 1, 2, 3, // ndatatypes, nin, nout
PyUFunc_None,
- "enthalpy_first_derivatives",
- "enthalpy_first_derivatives_docstring",
+ "ct_second_derivatives",
+ "ct_second_derivatives_docstring",
0);
- PyDict_SetItemString(d, "enthalpy_first_derivatives", ufunc_ptr);
+ PyDict_SetItemString(d, "ct_second_derivatives", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_dd,
@@ -2554,63 +2619,27 @@ PyMODINIT_FUNC PyInit__gsw_ufuncs(void)
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_dd,
- data_rho_first_derivatives_wrt_enthalpy,
- types_ddd_dd,
- 1, 3, 2, // ndatatypes, nin, nout
- PyUFunc_None,
- "rho_first_derivatives_wrt_enthalpy",
- "rho_first_derivatives_wrt_enthalpy_docstring",
- 0);
-
- PyDict_SetItemString(d, "rho_first_derivatives_wrt_enthalpy", ufunc_ptr);
- Py_DECREF(ufunc_ptr);
-
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_dd,
- data_specvol_first_derivatives_wrt_enthalpy,
- types_ddd_dd,
- 1, 3, 2, // ndatatypes, nin, nout
- PyUFunc_None,
- "specvol_first_derivatives_wrt_enthalpy",
- "specvol_first_derivatives_wrt_enthalpy_docstring",
- 0);
-
- PyDict_SetItemString(d, "specvol_first_derivatives_wrt_enthalpy", ufunc_ptr);
- Py_DECREF(ufunc_ptr);
-
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_dd,
- data_t_freezing_first_derivatives,
- types_ddd_dd,
- 1, 3, 2, // ndatatypes, nin, nout
- PyUFunc_None,
- "t_freezing_first_derivatives",
- "t_freezing_first_derivatives_docstring",
- 0);
-
- PyDict_SetItemString(d, "t_freezing_first_derivatives", ufunc_ptr);
- Py_DECREF(ufunc_ptr);
-
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_dd,
- data_t_freezing_first_derivatives_poly,
+ data_enthalpy_first_derivatives,
types_ddd_dd,
1, 3, 2, // ndatatypes, nin, nout
PyUFunc_None,
- "t_freezing_first_derivatives_poly",
- "t_freezing_first_derivatives_poly_docstring",
+ "enthalpy_first_derivatives",
+ "enthalpy_first_derivatives_docstring",
0);
- PyDict_SetItemString(d, "t_freezing_first_derivatives_poly", ufunc_ptr);
+ PyDict_SetItemString(d, "enthalpy_first_derivatives", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_ddd,
- data_ct_first_derivatives_wrt_t_exact,
+ data_enthalpy_second_derivatives_ct_exact,
types_ddd_ddd,
1, 3, 3, // ndatatypes, nin, nout
PyUFunc_None,
- "ct_first_derivatives_wrt_t_exact",
- "ct_first_derivatives_wrt_t_exact_docstring",
+ "enthalpy_second_derivatives_ct_exact",
+ "enthalpy_second_derivatives_ct_exact_docstring",
0);
- PyDict_SetItemString(d, "ct_first_derivatives_wrt_t_exact", ufunc_ptr);
+ PyDict_SetItemString(d, "enthalpy_second_derivatives_ct_exact", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_ddd,
@@ -2625,16 +2654,28 @@ PyMODINIT_FUNC PyInit__gsw_ufuncs(void)
PyDict_SetItemString(d, "enthalpy_second_derivatives", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_ddd,
- data_enthalpy_second_derivatives_ct_exact,
- types_ddd_ddd,
- 1, 3, 3, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_dd,
+ data_entropy_first_derivatives,
+ types_dd_dd,
+ 1, 2, 2, // ndatatypes, nin, nout
+ PyUFunc_None,
+ "entropy_first_derivatives",
+ "entropy_first_derivatives_docstring",
+ 0);
+
+ PyDict_SetItemString(d, "entropy_first_derivatives", ufunc_ptr);
+ Py_DECREF(ufunc_ptr);
+
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_ddd,
+ data_entropy_second_derivatives,
+ types_dd_ddd,
+ 1, 2, 3, // ndatatypes, nin, nout
PyUFunc_None,
- "enthalpy_second_derivatives_ct_exact",
- "enthalpy_second_derivatives_ct_exact_docstring",
+ "entropy_second_derivatives",
+ "entropy_second_derivatives_docstring",
0);
- PyDict_SetItemString(d, "enthalpy_second_derivatives_ct_exact", ufunc_ptr);
+ PyDict_SetItemString(d, "entropy_second_derivatives", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_ddd,
@@ -2697,148 +2738,148 @@ PyMODINIT_FUNC PyInit__gsw_ufuncs(void)
PyDict_SetItemString(d, "frazil_ratios_adiabatic_poly", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_ddd,
- data_rho_alpha_beta,
- types_ddd_ddd,
- 1, 3, 3, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dddd_ddd,
+ data_ice_fraction_to_freeze_seawater,
+ types_dddd_ddd,
+ 1, 4, 3, // ndatatypes, nin, nout
PyUFunc_None,
- "rho_alpha_beta",
- "rho_alpha_beta_docstring",
+ "ice_fraction_to_freeze_seawater",
+ "ice_fraction_to_freeze_seawater_docstring",
0);
- PyDict_SetItemString(d, "rho_alpha_beta", ufunc_ptr);
+ PyDict_SetItemString(d, "ice_fraction_to_freeze_seawater", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_ddd,
- data_rho_first_derivatives,
- types_ddd_ddd,
- 1, 3, 3, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddddd_ddd,
+ data_melting_ice_into_seawater,
+ types_ddddd_ddd,
+ 1, 5, 3, // ndatatypes, nin, nout
PyUFunc_None,
- "rho_first_derivatives",
- "rho_first_derivatives_docstring",
+ "melting_ice_into_seawater",
+ "melting_ice_into_seawater_docstring",
0);
- PyDict_SetItemString(d, "rho_first_derivatives", ufunc_ptr);
+ PyDict_SetItemString(d, "melting_ice_into_seawater", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_ddd,
- data_rho_second_derivatives_wrt_enthalpy,
- types_ddd_ddd,
- 1, 3, 3, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dddddd_dd,
+ data_melting_seaice_into_seawater,
+ types_dddddd_dd,
+ 1, 6, 2, // ndatatypes, nin, nout
PyUFunc_None,
- "rho_second_derivatives_wrt_enthalpy",
- "rho_second_derivatives_wrt_enthalpy_docstring",
+ "melting_seaice_into_seawater",
+ "melting_seaice_into_seawater_docstring",
0);
- PyDict_SetItemString(d, "rho_second_derivatives_wrt_enthalpy", ufunc_ptr);
+ PyDict_SetItemString(d, "melting_seaice_into_seawater", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_ddd,
- data_specvol_alpha_beta,
- types_ddd_ddd,
- 1, 3, 3, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_dd,
+ data_pot_enthalpy_ice_freezing_first_derivatives,
+ types_dd_dd,
+ 1, 2, 2, // ndatatypes, nin, nout
PyUFunc_None,
- "specvol_alpha_beta",
- "specvol_alpha_beta_docstring",
+ "pot_enthalpy_ice_freezing_first_derivatives",
+ "pot_enthalpy_ice_freezing_first_derivatives_docstring",
0);
- PyDict_SetItemString(d, "specvol_alpha_beta", ufunc_ptr);
+ PyDict_SetItemString(d, "pot_enthalpy_ice_freezing_first_derivatives", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_ddd,
- data_specvol_first_derivatives,
- types_ddd_ddd,
- 1, 3, 3, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_dd,
+ data_pot_enthalpy_ice_freezing_first_derivatives_poly,
+ types_dd_dd,
+ 1, 2, 2, // ndatatypes, nin, nout
PyUFunc_None,
- "specvol_first_derivatives",
- "specvol_first_derivatives_docstring",
+ "pot_enthalpy_ice_freezing_first_derivatives_poly",
+ "pot_enthalpy_ice_freezing_first_derivatives_poly_docstring",
0);
- PyDict_SetItemString(d, "specvol_first_derivatives", ufunc_ptr);
+ PyDict_SetItemString(d, "pot_enthalpy_ice_freezing_first_derivatives_poly", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_ddd,
- data_specvol_second_derivatives_wrt_enthalpy,
- types_ddd_ddd,
- 1, 3, 3, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_dd,
+ data_pt_first_derivatives,
+ types_dd_dd,
+ 1, 2, 2, // ndatatypes, nin, nout
PyUFunc_None,
- "specvol_second_derivatives_wrt_enthalpy",
- "specvol_second_derivatives_wrt_enthalpy_docstring",
+ "pt_first_derivatives",
+ "pt_first_derivatives_docstring",
0);
- PyDict_SetItemString(d, "specvol_second_derivatives_wrt_enthalpy", ufunc_ptr);
+ PyDict_SetItemString(d, "pt_first_derivatives", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dddddd_dd,
- data_melting_seaice_into_seawater,
- types_dddddd_dd,
- 1, 6, 2, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_ddd,
+ data_pt_second_derivatives,
+ types_dd_ddd,
+ 1, 2, 3, // ndatatypes, nin, nout
PyUFunc_None,
- "melting_seaice_into_seawater",
- "melting_seaice_into_seawater_docstring",
+ "pt_second_derivatives",
+ "pt_second_derivatives_docstring",
0);
- PyDict_SetItemString(d, "melting_seaice_into_seawater", ufunc_ptr);
+ PyDict_SetItemString(d, "pt_second_derivatives", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_ddd,
- data_ct_second_derivatives,
- types_dd_ddd,
- 1, 2, 3, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_ddd,
+ data_rho_alpha_beta,
+ types_ddd_ddd,
+ 1, 3, 3, // ndatatypes, nin, nout
PyUFunc_None,
- "ct_second_derivatives",
- "ct_second_derivatives_docstring",
+ "rho_alpha_beta",
+ "rho_alpha_beta_docstring",
0);
- PyDict_SetItemString(d, "ct_second_derivatives", ufunc_ptr);
+ PyDict_SetItemString(d, "rho_alpha_beta", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_ddd,
- data_entropy_second_derivatives,
- types_dd_ddd,
- 1, 2, 3, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_ddd,
+ data_rho_first_derivatives,
+ types_ddd_ddd,
+ 1, 3, 3, // ndatatypes, nin, nout
PyUFunc_None,
- "entropy_second_derivatives",
- "entropy_second_derivatives_docstring",
+ "rho_first_derivatives",
+ "rho_first_derivatives_docstring",
0);
- PyDict_SetItemString(d, "entropy_second_derivatives", ufunc_ptr);
+ PyDict_SetItemString(d, "rho_first_derivatives", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dd_ddd,
- data_pt_second_derivatives,
- types_dd_ddd,
- 1, 2, 3, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_dd,
+ data_rho_first_derivatives_wrt_enthalpy,
+ types_ddd_dd,
+ 1, 3, 2, // ndatatypes, nin, nout
PyUFunc_None,
- "pt_second_derivatives",
- "pt_second_derivatives_docstring",
+ "rho_first_derivatives_wrt_enthalpy",
+ "rho_first_derivatives_wrt_enthalpy_docstring",
0);
- PyDict_SetItemString(d, "pt_second_derivatives", ufunc_ptr);
+ PyDict_SetItemString(d, "rho_first_derivatives_wrt_enthalpy", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_dddd_ddd,
- data_ice_fraction_to_freeze_seawater,
- types_dddd_ddd,
- 1, 4, 3, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_ddddd,
+ data_rho_second_derivatives,
+ types_ddd_ddddd,
+ 1, 3, 5, // ndatatypes, nin, nout
PyUFunc_None,
- "ice_fraction_to_freeze_seawater",
- "ice_fraction_to_freeze_seawater_docstring",
+ "rho_second_derivatives",
+ "rho_second_derivatives_docstring",
0);
- PyDict_SetItemString(d, "ice_fraction_to_freeze_seawater", ufunc_ptr);
+ PyDict_SetItemString(d, "rho_second_derivatives", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddddd_ddd,
- data_melting_ice_into_seawater,
- types_ddddd_ddd,
- 1, 5, 3, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_ddd,
+ data_rho_second_derivatives_wrt_enthalpy,
+ types_ddd_ddd,
+ 1, 3, 3, // ndatatypes, nin, nout
PyUFunc_None,
- "melting_ice_into_seawater",
- "melting_ice_into_seawater_docstring",
+ "rho_second_derivatives_wrt_enthalpy",
+ "rho_second_derivatives_wrt_enthalpy_docstring",
0);
- PyDict_SetItemString(d, "melting_ice_into_seawater", ufunc_ptr);
+ PyDict_SetItemString(d, "rho_second_derivatives_wrt_enthalpy", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddddd_ddd,
@@ -2853,16 +2894,40 @@ PyMODINIT_FUNC PyInit__gsw_ufuncs(void)
PyDict_SetItemString(d, "seaice_fraction_to_freeze_seawater", ufunc_ptr);
Py_DECREF(ufunc_ptr);
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_ddddd,
- data_rho_second_derivatives,
- types_ddd_ddddd,
- 1, 3, 5, // ndatatypes, nin, nout
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_ddd,
+ data_specvol_alpha_beta,
+ types_ddd_ddd,
+ 1, 3, 3, // ndatatypes, nin, nout
PyUFunc_None,
- "rho_second_derivatives",
- "rho_second_derivatives_docstring",
+ "specvol_alpha_beta",
+ "specvol_alpha_beta_docstring",
0);
- PyDict_SetItemString(d, "rho_second_derivatives", ufunc_ptr);
+ PyDict_SetItemString(d, "specvol_alpha_beta", ufunc_ptr);
+ Py_DECREF(ufunc_ptr);
+
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_ddd,
+ data_specvol_first_derivatives,
+ types_ddd_ddd,
+ 1, 3, 3, // ndatatypes, nin, nout
+ PyUFunc_None,
+ "specvol_first_derivatives",
+ "specvol_first_derivatives_docstring",
+ 0);
+
+ PyDict_SetItemString(d, "specvol_first_derivatives", ufunc_ptr);
+ Py_DECREF(ufunc_ptr);
+
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_dd,
+ data_specvol_first_derivatives_wrt_enthalpy,
+ types_ddd_dd,
+ 1, 3, 2, // ndatatypes, nin, nout
+ PyUFunc_None,
+ "specvol_first_derivatives_wrt_enthalpy",
+ "specvol_first_derivatives_wrt_enthalpy_docstring",
+ 0);
+
+ PyDict_SetItemString(d, "specvol_first_derivatives_wrt_enthalpy", ufunc_ptr);
Py_DECREF(ufunc_ptr);
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_ddddd,
@@ -2877,6 +2942,42 @@ PyMODINIT_FUNC PyInit__gsw_ufuncs(void)
PyDict_SetItemString(d, "specvol_second_derivatives", ufunc_ptr);
Py_DECREF(ufunc_ptr);
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_ddd,
+ data_specvol_second_derivatives_wrt_enthalpy,
+ types_ddd_ddd,
+ 1, 3, 3, // ndatatypes, nin, nout
+ PyUFunc_None,
+ "specvol_second_derivatives_wrt_enthalpy",
+ "specvol_second_derivatives_wrt_enthalpy_docstring",
+ 0);
+
+ PyDict_SetItemString(d, "specvol_second_derivatives_wrt_enthalpy", ufunc_ptr);
+ Py_DECREF(ufunc_ptr);
+
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_dd,
+ data_t_freezing_first_derivatives_poly,
+ types_ddd_dd,
+ 1, 3, 2, // ndatatypes, nin, nout
+ PyUFunc_None,
+ "t_freezing_first_derivatives_poly",
+ "t_freezing_first_derivatives_poly_docstring",
+ 0);
+
+ PyDict_SetItemString(d, "t_freezing_first_derivatives_poly", ufunc_ptr);
+ Py_DECREF(ufunc_ptr);
+
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_ddd_dd,
+ data_t_freezing_first_derivatives,
+ types_ddd_dd,
+ 1, 3, 2, // ndatatypes, nin, nout
+ PyUFunc_None,
+ "t_freezing_first_derivatives",
+ "t_freezing_first_derivatives_docstring",
+ 0);
+
+ PyDict_SetItemString(d, "t_freezing_first_derivatives", ufunc_ptr);
+ Py_DECREF(ufunc_ptr);
+
ufunc_ptr = PyUFunc_FromFuncAndData(funcs_iidd_d,
data_gibbs_ice,
types_iidd_d,
diff --git a/tools/c_header_parser.py b/tools/c_header_parser.py
index a23466d..b36ba88 100644
--- a/tools/c_header_parser.py
+++ b/tools/c_header_parser.py
@@ -1,7 +1,6 @@
"""
Functions for taking apart the function declarations in gswteos-10.h.
"""
-from collections import ChainMap
from pathlib import Path
import re
@@ -87,50 +86,50 @@ def parse_signatures(sigs):
def get_sigdict(srcdir="src"):
return parse_signatures(get_signatures(srcdir=srcdir))
-# Note: some "sigdict" structures below do *not* use the name as the key.
-def simple_sigs(sigdict):
+def get_simple_name_nin_returntype(sigdict):
"""
- Given the dict output of parse_signatures, return a dict
- with the *number of inputs as key*, and a list of names as the value.
- Only functions with double arguments and return value are included.
+ Return a list of (name, nin, returntype) tuples.
+ Include only functions with double arguments and a single return.
+ Return may be double or int.
"""
- simple = {}
- for psig in sigdict.values():
- if (psig['returntype'] == 'double' and
- all([t == 'double' for t in psig['argtypes']])):
- n = len(psig['argtypes'])
- if n in simple:
- simple[n].append(psig['name'])
- else:
- simple[n] = [psig['name']]
- for value in simple.values():
- value.sort()
- return simple
-
-def get_simple_sig_dict(srcdir='src'):
- return simple_sigs(get_sigdict(srcdir="src"))
-
-def complex_sigdict(sigdict):
+ tups = []
+ for name, sig in sigdict.items():
+ if all([t == 'double' for t in sig['argtypes']]):
+ nin = len(sig['argtypes'])
+ if sig['returntype'] in ('double', 'int'):
+ tups.append((name, nin, sig['returntype']))
+ return tups
+
+
+def get_complex_name_nin_nout(sigdict):
"""
- This is a name-keyed sigdict with everything that is *not* in "simple".
+ Return a list of (name, nin, nout) tuples.
+ Include only functions with multiple outputs, double only.
+ This not bullet-proof, but it works with the current set of functions.
"""
- out = {}
- for key, psig in sigdict.items():
- if (psig['returntype'] == 'double' and
- all([t == 'double' for t in psig['argtypes']])):
+ tups = []
+ simple = [tup[0] for tup in get_simple_name_nin_returntype(sigdict)]
+ for name, sig in sigdict.items():
+ if name in simple:
continue
- out[key] = psig
- return out
-
-def get_complex_sigdict(srcdir='src'):
- return complex_sigdict(get_sigdict(srcdir=srcdir))
-
+ if sig['returntype'] == 'void' and 'int' not in sig['argtypes']:
+ nin = 0
+ nout = 0
+ for arg in sig['argtuple']:
+ if '*' in arg:
+ nout += 1
+ else:
+ nin += 1
+ tups.append((name, nin, nout))
+ return tups
def mixed_sigdict(sigdict):
"""
This should find gibbs and gibbs_ice, with their leading int arguments.
It is keyed by name.
+ Returns a subset of sigdict, with a "letter_sig" entry added to each
+ signature.
"""
out1 = {k: psig for k, psig in sigdict.items() if psig['returntype'] == 'double'}
out = {}
@@ -142,56 +141,3 @@ def mixed_sigdict(sigdict):
psig["letter_sig"] = f"{''.join([a[0] for a in psig['argtypes']])}_d"
return out
-def get_mixed_sigdict(srcdir="src"):
- return mixed_sigdict(get_sigdict(srcdir=srcdir))
-
-def get_complex_scalar_sigdict(srcdir='src'):
- """
- Return a name-keyed sigdict for functions with more than one return but
- with scalar arguments and return values.
- """
- # This works with the current set of functions, but it is not using a fully
- # general criterion. It would fail if a scalar function were added with
- # more than one output and with integer arguments.
- cd = get_complex_sigdict(srcdir=srcdir)
- scalar_dict = {}
- for k, v in cd.items():
- if v['returntype'] == 'void' and 'int' not in v['argtypes']:
- scalar_dict[k] = v
- return scalar_dict
-
-def get_complex_scalar_dict_by_nargs_nreturns(srcdir='src'):
- sd = get_complex_scalar_sigdict(srcdir=srcdir)
- names_by_sigtup = {}
- for k, v in sd.items():
- nargs = 0
- nrets = 0
- for arg in v['argtuple']:
- if '*' in arg:
- nrets += 1
- else:
- nargs += 1
- sigtup = (nargs, nrets)
- if sigtup in names_by_sigtup:
- names_by_sigtup[sigtup].append(k)
- else:
- names_by_sigtup[sigtup] = [k]
- return names_by_sigtup
-
-def print_complex_names_by_nargs_nreturns(srcdir='src'):
- d = get_complex_scalar_dict_by_nargs_nreturns(srcdir=srcdir)
- for k, v in d.items():
- print(k, len(v))
- for name in v:
- print(' %s' % name)
-
-def print_non_wrappable(srcdir='src'):
- sigdict = get_sigdict(srcdir=srcdir) # everything
- csd = complex_sigdict(sigdict) # some we wrap, some we don't
- scd = get_complex_scalar_sigdict(srcdir=srcdir) # we wrap these
- mixed = mixed_sigdict(sigdict) # and these
- # Find the names of functions we don't wrap.
- others = [k for k in csd if k not in ChainMap(scd, mixed)]
- othersd = {k : csd[k] for k in others}
- for k, v in othersd.items():
- print(k, v['argstring'], v['returntype'])
diff --git a/tools/copy_from_GSW-C.py b/tools/copy_from_GSW-C.py
index af10a28..1a95013 100644
--- a/tools/copy_from_GSW-C.py
+++ b/tools/copy_from_GSW-C.py
@@ -7,7 +7,6 @@
siblings in the directory tree.
"""
-import sys
import shutil
from pathlib import Path
diff --git a/tools/docstring_utils.py b/tools/docstring_utils.py
index 001bb41..c0eac32 100644
--- a/tools/docstring_utils.py
+++ b/tools/docstring_utils.py
@@ -123,9 +123,19 @@ def docstring_from_sections(sections):
doclines.extend(sections[name])
for i, line in enumerate(list(doclines)):
- if line:
+ if line.strip():
doclines[i] = ' %s\n' % line.rstrip()
else:
doclines[i] = '\n'
-
+ # Ensure there is only one blank line at the end.
+ blanks = 0
+ for line in reversed(doclines):
+ if not line.strip():
+ blanks += 1
+ else:
+ break
+ if blanks == 0:
+ doclines.append('\n')
+ if blanks > 1:
+ del doclines[-(blanks-1):]
return ''.join(doclines)
diff --git a/tools/fix_wrapped_ufunc_typos.py b/tools/fix_wrapped_ufunc_typos.py
index 2e49527..1f195cd 100644
--- a/tools/fix_wrapped_ufunc_typos.py
+++ b/tools/fix_wrapped_ufunc_typos.py
@@ -29,7 +29,13 @@
(' frist ', ' first '),
(' calulated ', ' calculated '),
(' outout ', ' output '),
- (' degress ', ' degrees ')
+ (' degress ', ' degrees '),
+ (' specifc ', ' specific '),
+ (' avaialble ', ' available '),
+ (' equlibrium ', ' equilibrium '),
+ ('equlibrium', 'equilibrium'),
+ (' apendix ', ' appendix '),
+ (' slighty ', ' slightly '),
]
with open(wrapmod) as f:
diff --git a/tools/make_ufuncs.py b/tools/make_ufuncs.py
index 5540957..a21202f 100644
--- a/tools/make_ufuncs.py
+++ b/tools/make_ufuncs.py
@@ -5,14 +5,15 @@
"""
from pathlib import Path
-import sys
-import shutil
-from c_header_parser import (get_simple_sig_dict,
- get_complex_scalar_dict_by_nargs_nreturns,
- get_mixed_sigdict)
+from c_header_parser import (
+ get_sigdict,
+ get_simple_name_nin_returntype,
+ get_complex_name_nin_nout,
+ mixed_sigdict,
+)
-blacklist = ['add_barrier']
+blacklist = ['add_barrier', 'add_mean']
basedir = Path(__file__).parent.parent
@@ -92,9 +93,15 @@
"""
-def modfile_loop_entry(nin, nout):
+def modfile_loop_entry(nin, nout, out_type):
+ if out_type == 'd':
+ out_return = 'double'
+ npy_out_type = 'NPY_DOUBLE'
+ else:
+ out_return = 'int'
+ npy_out_type = 'NPY_INT' # maybe change to NPY_BOOL
ndin = 'd'*nin
- ndout = 'd'*nout
+ ndout = out_type*nout
loop_id = '%s_%s' % (ndin, ndout)
linelist = ['/* %d in, %d out */' % (nin, nout)]
@@ -112,18 +119,20 @@ def modfile_loop_entry(nin, nout):
linelist.append(' npy_intp out_step%d = steps[%d];' % (i, i+nin))
intypes = ', '.join(['double'] * nin)
if nout == 1:
- linelist.append(' double (*func)(%s);' % (intypes,))
+ linelist.append(f' {out_return} (*func)(%s);' % (intypes,))
else:
+ # Multiple outputs: only double is supported here.
outtypes = ', '.join(['double *'] * nout)
linelist.append(' void (*func)(%s, %s);' % (intypes, outtypes))
+ # Declare local variables for outputs.
douts = []
for i in range(nout):
douts.append('outd%d' % (i,))
- linelist.append(' double %s;' % ', '.join(douts))
+ linelist.append(f' {out_return} %s;' % ', '.join(douts))
linelist.extend([
' func = data;',
- '',
+ '', # End of declarations, start the loop.
' for (i = 0; i < n; i++) {'])
tests = []
args = []
@@ -133,7 +142,10 @@ def modfile_loop_entry(nin, nout):
linelist.append(' if (%s) {' % '||'.join(tests))
outs = []
for i in range(nout):
- outs.append('*((double *)out%d) = NAN;' % i)
+ if out_type == 'd':
+ outs.append('*((double *)out%d) = NAN;' % i)
+ else: # integer for infunnel
+ outs.append('*((int *)out0) = 0;')
linelist.append(' %s' % ''.join(outs))
linelist.append(' } else {')
if nout > 1:
@@ -142,9 +154,15 @@ def modfile_loop_entry(nin, nout):
linelist.append(' func(%s);' % ', '.join(args))
else:
linelist.append(' outd0 = func(%s);' % ', '.join(args))
- for i in range(nout):
- linelist.append(' *((double *)out%d)' % (i,)
- + ' = CONVERT_INVALID(outd%d);' % (i,))
+ if out_type == 'd':
+ for i in range(nout):
+ linelist.append(' *((double *)out%d)' % (i,)
+ + ' = CONVERT_INVALID(outd%d);' % (i,))
+ else:
+ for i in range(nout):
+ linelist.append(' *((int *)out%d)' % (i,)
+ + ' = outd%d;' % (i,))
+
linelist.append(' }')
for i in range(nin):
linelist.append(' in%d += in_step%d;' % (i, i))
@@ -158,7 +176,7 @@ def modfile_loop_entry(nin, nout):
linelist.append('static char types_%s[] = {' % (loop_id,))
linelist.append(' ' + 'NPY_DOUBLE, ' * nin)
- linelist.append(' ' + 'NPY_DOUBLE, ' * nout)
+ linelist.append(' ' + f'{npy_out_type}, ' * nout)
linelist.extend(['};', ''])
return '\n'.join(linelist)
@@ -247,8 +265,6 @@ def modfile_loop_entry_from_sig(sig):
return '\n'.join(linelist)
-
-
def modfile_array_entry(funcname):
return "static void *data_%s[] = {&gsw_%s};\n" % (funcname, funcname)
@@ -268,9 +284,9 @@ def modfile_array_entry(funcname):
"""
-def modfile_init_entry(funcname, nin, nout):
+def modfile_init_entry(funcname, nin, nout, out_type='d'):
return _init_entry % dict(funcname=funcname, nin=nin, nout=nout,
- ndin='d'*nin, ndout='d'*nout)
+ ndin='d'*nin, ndout=out_type*nout)
def modfile_init_entry_from_sig(sig):
# Specialized for the gibbs functions.
@@ -278,78 +294,63 @@ def modfile_init_entry_from_sig(sig):
nin = len(sig["argtypes"])
nout = 1
letter_sig = sig["letter_sig"]
- entry = """
- ufunc_ptr = PyUFunc_FromFuncAndData(funcs_%(letter_sig)s,
- data_%(funcname)s,
- types_%(letter_sig)s,
- 1, %(nin)d, %(nout)d, // ndatatypes, nin, nout
+ entry = f"""
+ ufunc_ptr = PyUFunc_FromFuncAndData(funcs_{letter_sig:s},
+ data_{funcname:s},
+ types_{letter_sig:s},
+ 1, {nin:d}, {nout:d}, // ndatatypes, nin, nout
PyUFunc_None,
- "%(funcname)s",
- "%(funcname)s_docstring",
+ "{funcname:s}",
+ "{funcname:s}_docstring",
0);
- PyDict_SetItemString(d, "%(funcname)s", ufunc_ptr);
+ PyDict_SetItemString(d, "{funcname:s}", ufunc_ptr);
Py_DECREF(ufunc_ptr);
"""
return entry % vars()
def write_modfile(modfile_name, srcdir):
- argcategories1 = get_simple_sig_dict(srcdir=srcdir)
- argcategories2 = get_complex_scalar_dict_by_nargs_nreturns(srcdir=srcdir)
- argcategories3 = get_mixed_sigdict(srcdir=srcdir)
-
- funcnamelist1 = []
- funcnamelist2 = []
- funcnamelist3 = list(argcategories3.keys())
-
- nins = range(1, 6)
- artups = [(2, 2), (3, 2), (3, 3), (6, 2), (2, 3), (4, 3), (5, 3), (3, 5)]
+ raw_sigdict = get_sigdict(srcdir=srcdir)
+ sigdict = {name: sig for name, sig in raw_sigdict.items() if name not in blacklist}
+ simple_tups = get_simple_name_nin_returntype(sigdict)
+ complex_tups = get_complex_name_nin_nout(sigdict)
+ mixed_sigs = mixed_sigdict(sigdict)
modfile_head_parts = [modfile_head_top]
- for nin in nins:
- modfile_head_parts.append(modfile_loop_entry(nin, 1))
- for artup in artups:
+ simple_artups = {(nin, 1, returntype[0]) for _, nin, returntype in simple_tups}
+ for artup in sorted(simple_artups):
modfile_head_parts.append(modfile_loop_entry(*artup))
+
+ complex_artups = {tup[1:] for tup in complex_tups}
+ for artup in sorted(complex_artups):
+ modfile_head_parts.append(modfile_loop_entry(*artup, 'd'))
modfile_head = '\n'.join(modfile_head_parts)
chunks = [modfile_head]
- for sig in argcategories3.values():
+ for sig in mixed_sigs.values():
chunks.append(modfile_loop_entry_from_sig(sig))
- for nin in nins:
- for funcname in sorted(argcategories1[nin]):
- if funcname in blacklist:
- continue
- chunks.append(modfile_array_entry(funcname))
- funcnamelist1.append(funcname)
+ # Array entries
+ for name, _, _ in simple_tups:
+ chunks.append(modfile_array_entry(name))
- for artup in artups:
- for funcname in sorted(argcategories2[artup]):
- if funcname in blacklist:
- continue
- chunks.append(modfile_array_entry(funcname))
- funcnamelist2.append(funcname)
+ for name, _, _ in complex_tups:
+ chunks.append(modfile_array_entry(name))
- for funcname in funcnamelist3:
- chunks.append(modfile_array_entry(funcname))
+ for name in mixed_sigs.keys():
+ chunks.append(modfile_array_entry(name))
chunks.append(modfile_middle)
- for nin in nins:
- for funcname in sorted(argcategories1[nin]):
- if funcname in blacklist:
- continue
- chunks.append(modfile_init_entry(funcname, nin, 1))
+ for name, nin, returntype in simple_tups:
+ chunks.append(modfile_init_entry(name, nin, 1, returntype[0]))
- for artup in artups:
- for funcname in sorted(argcategories2[artup]):
- if funcname in blacklist:
- continue
- chunks.append(modfile_init_entry(funcname, *artup))
+ for name, nin, nout in complex_tups:
+ chunks.append(modfile_init_entry(name, nin, nout, 'd'))
- for sig in argcategories3.values():
+ for sig in mixed_sigs.values():
chunks.append(modfile_init_entry_from_sig(sig))
chunks.append(modfile_tail)
@@ -357,15 +358,15 @@ def write_modfile(modfile_name, srcdir):
with modfile_name.open('w') as f:
f.write(''.join(chunks))
- funcnamelist1.sort()
+ funcnamelist1 = sorted([tup[0] for tup in simple_tups])
with open(srcdir.joinpath('_ufuncs1.list'), 'w') as f:
f.write('\n'.join(funcnamelist1))
- funcnamelist2.sort()
+ funcnamelist2 = sorted([tup[0] for tup in complex_tups])
with open(srcdir.joinpath('_ufuncs2.list'), 'w') as f:
f.write('\n'.join(funcnamelist2))
- funcnamelist = funcnamelist1 + funcnamelist2 + funcnamelist3
+ funcnamelist = funcnamelist1 + funcnamelist2 + list(mixed_sigs.keys())
funcnamelist.sort()
with open(srcdir.joinpath('_ufuncs.list'), 'w') as f:
f.write('\n'.join(funcnamelist))
diff --git a/tools/make_wrapped_ufuncs.py b/tools/make_wrapped_ufuncs.py
index f89cd6c..1df666b 100644
--- a/tools/make_wrapped_ufuncs.py
+++ b/tools/make_wrapped_ufuncs.py
@@ -3,8 +3,6 @@
of make_ufuncs.py.
"""
-import sys
-import re
from pathlib import Path
from _utilities import Bunch
@@ -25,6 +23,7 @@
'pt0_cold_ice_poly',
'pt_from_pot_enthalpy_ice_poly_dh',
't_freezing_exact',
+'sa_p_inrange',
}
wrapper_head = '''
@@ -144,27 +143,12 @@ def get_outname_set():
argset.update(args)
return argset
-def get_help_output_dict():
- # This is not currently used internally.
- out = Bunch()
- for ufname in ufunclist:
- msig = msigdict[ufname]
- helpdict = get_helpdict(msig['path'])
-
- if 'OUTPUT' in helpdict:
- raw = helpdict['OUTPUT']
- outdoc = fix_outputs_doc(raw)
- else:
- raw = ''
- outdoc = ['']
- if ufname in return_overrides:
- outdoc = return_overrides[ufname]
- out[ufname] = Bunch(raw=raw, outdoc=outdoc)
- return out
-
def uf_wrapper(ufname):
argnames = get_argnames(ufname)
+ if argnames is None:
+ print(f"in uf_wrapper, ufname is {ufname}, argnames is None")
+ return None
argstr = ', '.join(argnames)
msig = Bunch(msigdict[ufname])
@@ -174,33 +158,38 @@ def uf_wrapper(ufname):
)
helpdict = get_helpdict(msig['path'])
- # Filter out minimally documented library functions.
+ sections = {}
if 'DESCRIPTION' not in helpdict:
- return None
-
- try:
- desclist = paragraphs(helpdict['DESCRIPTION'])[0]
- sections = dict(Head=desclist)
- plist = []
- for arg in argnames:
- plist.append('%s : array-like' % arg)
- for line in parameters[arg].split('\n'):
- plist.append(" %s" % line)
- sections['Parameters'] = plist
-
- # I think we can assume OUTPUT will be present, but just
- # in case, we check for it. Maybe remove this later.
- if 'OUTPUT' in helpdict:
- outdoc = fix_outputs_doc(helpdict['OUTPUT'])
- else:
- outdoc = ['None']
- if ufname in return_overrides:
- outdoc = return_overrides[ufname]
- sections['Returns'] = outdoc
- doc = docstring_from_sections(sections)
- except KeyError as e:
- print("KeyError for %s, %s" % (ufname, e))
- doc = "(no description available)"
+ helpdict['DESCRIPTION'] = helpdict["summary"]
+ sections["Notes"] = helpdict["all"]
+
+ description_paragraphs = paragraphs(helpdict['DESCRIPTION'])
+ sections["Head"] = description_paragraphs[0]
+ if len(description_paragraphs) > 1:
+ lines = []
+ for p in description_paragraphs[1:]:
+ lines.extend(p)
+ lines.append("\n")
+ sections["Notes"] = lines
+ plist = []
+ for arg in argnames:
+ plist.append('%s : array-like' % arg)
+ for line in parameters[arg].split('\n'):
+ plist.append(" %s" % line)
+ sections['Parameters'] = plist
+
+ # I think we can assume OUTPUT will be present, but just
+ # in case, we check for it. Maybe remove this later.
+ if 'OUTPUT' in helpdict:
+ outdoc = fix_outputs_doc(helpdict['OUTPUT'])
+ else:
+ outdoc = ['double, array']
+ if ufname in return_overrides:
+ outdoc = return_overrides[ufname]
+ sections['Returns'] = outdoc
+ if "REFERENCES" in helpdict:
+ sections["References"] = [line.strip() for line in helpdict["REFERENCES"]]
+ doc = docstring_from_sections(sections)
subs['doc'] = doc
return wrapper_template % subs
diff --git a/tools/matlab_parser.py b/tools/matlab_parser.py
index a49d21a..a9017a5 100644
--- a/tools/matlab_parser.py
+++ b/tools/matlab_parser.py
@@ -117,8 +117,14 @@ def help_text_to_dict(help):
# Headings ('USAGE:', 'DESCRIPTION:', etc.) start with all caps and a colon.
keypat = r"^([A-Z ]+):(.*)"
hdict = dict()
+ topline = help[0][2:].strip()
+ parts = topline.split(maxsplit=1)
+ if len(parts) == 2:
+ hdict["summary"] = parts[1:]
+ else:
+ hdict["summary"] = ["no summary"]
started = False
- for line in help:
+ for line in help[1:]:
keyline = re.match(keypat, line)
if keyline:
# We found a new heading.
@@ -143,6 +149,17 @@ def help_text_to_dict(help):
blocklines.append(_s)
if started and blocklines:
hdict[key] = blocklines
+ # Library functions don't have sections; we can use the whole thing instead.
+ block = []
+ started = False
+ for line in help:
+ if line.startswith("=========="):
+ started = True
+ continue
+ block.append(line)
+ if line.startswith("VERSION"):
+ break
+ hdict['all'] = block
return hdict