All functions

The following section documents all functions alphabetically.

This is a Python implementation of the Gibbs SeaWater (GSW) Oceanographic Toolbox of TEOS-10. Extensive documentation is available from https://www.teos-10.org/; users of this Python package are strongly encouraged to study the documents posted there.

This implementation is based on GSW-C for core functions, with additional functions written in Python. GSW-C is the work of Frank Delahoyde and Glenn Hyland (author of GSW-Fortran, on which GSW-C is based), who translated and re-implemented the algorithms originally written in Matlab by David Jackett, Trevor McDougall, and Paul Barker.

The present Python library has an interface that is similar to the original Matlab code, but with a few important differences:

  • Many functions in the GSW-Matlab toolbox are not yet available here.

  • Taking advantage of Python namespaces, we omit the “gsw” prefix from the function names.

  • Missing values may be handled using numpy.ma masked arrays, or using nan values.

  • All functions follow numpy broadcasting rules; function arguments must be broadcastable to the dimensions of the highest-dimensioned argument. Recall that with numpy broadcasting, extra dimensions are automatically added as needed on the left, but must be added explicitly as needed on the right.

  • Functions such as Nsquared that operate on profiles rather than scalars have an axis keyword argument to specify the index that is incremented along the pressure (depth) axis.

gsw.CT_first_derivatives(SA, pt)[source]

Calculates the following two derivatives of Conservative Temperature (1) CT_SA, the derivative with respect to Absolute Salinity at constant potential temperature (with pr = 0 dbar), and 2) CT_pt, the derivative with respect to potential temperature (the regular potential temperature which is referenced to 0 dbar) at constant Absolute Salinity.

Parameters:
SAarray-like

Absolute Salinity, g/kg

ptarray-like

Potential temperature referenced to a sea pressure, degrees C

Returns:
CT_SAarray-like, K/(g/kg)

The derivative of Conservative Temperature with respect to Absolute Salinity at constant potential temperature (the regular potential temperature which has reference sea pressure of 0 dbar).

CT_ptarray-like, unitless

The derivative of Conservative Temperature with respect to potential temperature (the regular one with pr = 0 dbar) 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 https://www.teos-10.org/. See Eqns. (A.12.3a,b) and (A.15.8) of this TEOS-10 Manual.

This software is available from https://www.teos-10.org/

gsw.CT_first_derivatives_wrt_t_exact(SA, t, p)[source]

Calculates the following three derivatives of Conservative Temperature. These derivatives are done with respect to in-situ temperature t (in the case of CT_T_wrt_t) or at constant in-situ tempertature (in the cases of CT_SA_wrt_t and CT_P_wrt_t). (1) CT_SA_wrt_t, the derivative of CT with respect to Absolute Salinity at constant t and p, and (2) CT_T_wrt_t, derivative of CT with respect to in-situ temperature t at constant SA and p. (3) CT_P_wrt_t, derivative of CT with respect to pressure P (in Pa) at constant SA and t.

Parameters:
SAarray-like

Absolute Salinity, g/kg

tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
CT_SA_wrt_tarray-like, K kg/g

The first derivative of Conservative Temperature with respect to Absolute Salinity at constant t and p. [ K/(g/kg)] i.e.

CT_T_wrt_tarray-like, unitless

The first derivative of Conservative Temperature with respect to in-situ temperature, t, at constant SA and p.

CT_P_wrt_tarray-like, K/Pa

The first derivative of Conservative Temperature with 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 https://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 https://www.teos-10.org/

gsw.CT_freezing(SA, p, saturation_fraction)[source]

Calculates the Conservative Temperature at which seawater freezes. The Conservative Temperature freezing point is calculated from the exact in-situ freezing temperature which is found by a modified Newton-Raphson iteration (McDougall and Wotherspoon, 2014) of the equality of the chemical potentials of water in seawater and in ice.

Parameters:
SAarray-like

Absolute Salinity, g/kg

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

saturation_fractionarray-like

Saturation fraction of dissolved air in seawater. (0..1)

Returns:
CT_freezingarray-like, deg C

Conservative Temperature at freezing of seawater That is, the freezing temperature expressed in terms of 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 https://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.

gsw.CT_freezing_first_derivatives(SA, p, saturation_fraction)[source]

Calculates the first derivatives of the Conservative Temperature at which seawater freezes, with respect to Absolute Salinity SA and pressure P (in Pa).

Parameters:
SAarray-like

Absolute Salinity, g/kg

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

saturation_fractionarray-like

Saturation fraction of dissolved air in seawater. (0..1)

Returns:
CTfreezing_SAarray-like, K kg/g

the derivative of the Conservative Temperature at freezing (ITS-90) with respect to Absolute Salinity at fixed pressure [ K/(g/kg) ] i.e.

CTfreezing_Parray-like, K/Pa

the derivative of the Conservative Temperature at freezing (ITS-90) with respect to pressure (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 https://www.teos-10.org/.

gsw.CT_freezing_first_derivatives_poly(SA, p, saturation_fraction)[source]

Calculates the first derivatives of the Conservative Temperature at which seawater freezes, with respect to Absolute Salinity SA and pressure P (in Pa) of the comptationally efficient polynomial fit of the freezing temperature (McDougall et al., 2014).

Parameters:
SAarray-like

Absolute Salinity, g/kg

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

saturation_fractionarray-like

Saturation fraction of dissolved air in seawater. (0..1)

Returns:
CTfreezing_SAarray-like, K kg/g

the derivative of the Conservative Temperature at freezing (ITS-90) with respect to Absolute Salinity at fixed pressure [ K/(g/kg) ] i.e.

CTfreezing_Parray-like, K/Pa

the derivative of the Conservative Temperature at freezing (ITS-90) with respect to pressure (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 https://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.

gsw.CT_freezing_poly(SA, p, saturation_fraction)[source]

Calculates the Conservative Temperature at which seawater freezes. The error of this fit ranges between -5e-4 K and 6e-4 K when compared with the Conservative Temperature calculated from the exact in-situ freezing temperature which is found by a Newton-Raphson iteration of the equality of the chemical potentials of water in seawater and in ice. Note that the Conservative Temperature freezing temperature can be found by this exact method using the function gsw_CT_freezing.

Parameters:
SAarray-like

Absolute Salinity, g/kg

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

saturation_fractionarray-like

Saturation fraction of dissolved air in seawater. (0..1)

Returns:
CT_freezingarray-like, deg C

Conservative Temperature at freezing of seawater That is, the freezing temperature expressed in 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 https://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.

gsw.CT_from_enthalpy(SA, h, p)[source]

Calculates the Conservative Temperature of seawater, given the Absolute Salinity, specific enthalpy, h, and pressure p. The specific enthalpy input is the one calculated from the computationally-efficient expression for specific volume in terms of SA, CT and p (Roquet et al., 2015).

Parameters:
SAarray-like

Absolute Salinity, g/kg

harray-like

Specific enthalpy, J/kg

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
CTarray-like, deg C

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 https://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.

gsw.CT_from_enthalpy_exact(SA, h, p)[source]

Calculates the Conservative Temperature of seawater, given the Absolute Salinity, SA, specific enthalpy, h, and pressure p. The specific enthalpy input is calculated from the full Gibbs function of seawater, gsw_enthalpy_t_exact.

Parameters:
SAarray-like

Absolute Salinity, g/kg

harray-like

Specific enthalpy, J/kg

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
CTarray-like, deg C

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 https://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.

gsw.CT_from_entropy(SA, entropy)[source]

Calculates Conservative Temperature with entropy as an input variable.

Parameters:
SAarray-like

Absolute Salinity, g/kg

entropyarray-like

Specific entropy, J/(kg*K)

Returns:
CTarray-like, deg C

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 https://www.teos-10.org/ See appendix A.10 of this TEOS-10 Manual.

gsw.CT_from_pt(SA, pt)[source]

Calculates Conservative Temperature of seawater from potential temperature (whose reference sea pressure is zero dbar).

Parameters:
SAarray-like

Absolute Salinity, g/kg

ptarray-like

Potential temperature referenced to a sea pressure, degrees C

Returns:
CTarray-like, deg C

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 https://www.teos-10.org/ See section 3.3 of this TEOS-10 Manual.

gsw.CT_from_rho(rho, SA, p)[source]

Calculates the Conservative Temperature of a seawater sample, for given values of its density, Absolute Salinity and sea pressure (in dbar), using the computationally-efficient expression for specific volume in terms of SA, CT and p (Roquet et al., 2015).

Parameters:
rhoarray-like

Seawater density (not anomaly) in-situ, e.g., 1026 kg/m^3.

SAarray-like

Absolute Salinity, g/kg

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
CTarray-like, deg C

Conservative Temperature (ITS-90)

CT_multiplearray-like, deg C

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 https://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.

gsw.CT_from_t(SA, t, p)[source]

Calculates Conservative Temperature of seawater from in-situ temperature.

Parameters:
SAarray-like

Absolute Salinity, g/kg

tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
CTarray-like, deg C

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 https://www.teos-10.org/ See section 3.3 of this TEOS-10 Manual.

gsw.CT_maxdensity(SA, p)[source]

Calculates the Conservative Temperature of maximum density of seawater. This function returns the Conservative temperature at which the density of seawater is a maximum, at given Absolute Salinity, SA, and sea pressure, p (in dbar). This function uses the computationally-efficient expression for specific volume in terms of SA, CT and p (Roquet et al., 2015).

Parameters:
SAarray-like

Absolute Salinity, g/kg

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
CT_maxdensityarray-like, deg C

Conservative Temperature at which the density of seawater is a maximum for 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 https://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.

gsw.CT_second_derivatives(SA, pt)[source]

Calculates the following three, second-order derivatives of Conservative Temperature (1) CT_SA_SA, the second derivative with respect to Absolute Salinity at constant potential temperature (with p_ref = 0 dbar), (2) CT_SA_pt, the derivative with respect to potential temperature (the regular potential temperature which is referenced to 0 dbar) and Absolute Salinity, and (3) CT_pt_pt, the second derivative with respect to potential temperature (the regular potential temperature which is referenced to 0 dbar) at constant Absolute Salinity.

Parameters:
SAarray-like

Absolute Salinity, g/kg

ptarray-like

Potential temperature referenced to a sea pressure, degrees C

Returns:
CT_SA_SAarray-like, K/((g/kg)^2)

The second derivative of Conservative Temperature with respect to Absolute Salinity at constant potential temperature (the regular potential temperature which has reference sea pressure of 0 dbar).

CT_SA_ptarray-like,

The derivative of Conservative Temperature with respect to potential temperature (the regular one with

p_refarray-like, 1/(g/kg)

0 dbar) and Absolute Salinity.

CT_pt_ptarray-like,

The second derivative of Conservative Temperature with respect to potential temperature (the regular one with

p_refarray-like, 1/K

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 https://www.teos-10.org/. See appendix A.12 of this TEOS-10 Manual.

This software is available from https://www.teos-10.org/

gsw.C_from_SP(SP, t, p)[source]

Calculates conductivity, C, from (SP,t,p) using PSS-78 in the range 2 < SP < 42. If the input Practical Salinity is less than 2 then a modified form of the Hill et al. (1986) formula is used for Practical Salinity. The modification of the Hill et al. (1986) expression is to ensure that it is exactly consistent with PSS-78 at SP = 2.

Parameters:
SParray-like

Practical Salinity (PSS-78), unitless

tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
Carray-like, mS/cm

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 https://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.

gsw.Fdelta(p, lon, lat)[source]

Calculates Fdelta from the Absolute Salinity Anomaly Ratio (SAAR). It finds SAAR by calling the function “gsw_SAAR(p,long,lat)” and then simply calculates Fdelta from

Parameters:
parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

lonarray-like

Longitude, -360 to 360 degrees

latarray-like

Latitude, -90 to 90 degrees

Returns:
Fdeltaarray-like, unitless

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 https://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. https://os.copernicus.org/articles/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. https://os.copernicus.org/articles/7/363/2011/os-7-363-2011.pdf

gsw.Helmholtz_energy_ice(t, p)[source]

Calculates the Helmholtz energy of ice.

Parameters:
tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
Helmholtz_energy_icearray-like, J/kg

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 https://www.teos-10.org/

gsw.Hill_ratio_at_SP2(t)[source]

Calculates the Hill ratio, which is the adjustment needed to apply for Practical Salinities smaller than 2. This ratio is defined at a Practical Salinity = 2 and in-situ temperature, t using PSS-78. The Hill ratio is the ratio of 2 to the output of the Hill et al. (1986) formula for Practical Salinity at the conductivity ratio, Rt, at which Practical Salinity on the PSS-78 scale is exactly 2.

Parameters:
tarray-like

In-situ temperature (ITS-90), degrees C

Returns:
Hill_ratioarray-like, unitless

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 https://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.

gsw.IPV_vs_fNsquared_ratio(SA, CT, p, p_ref=0, axis=0)[source]

Calculates the ratio of the vertical gradient of potential density to the vertical gradient of locally-referenced potential density. This is also the ratio of the planetary Isopycnal Potential Vorticity (IPV) to f times N^2, hence the name for this variable, IPV_vs_fNsquared_ratio (see Eqn. (3.20.17) of IOC et al. (2010)).

Parameters:
SAarray-like

Absolute Salinity, g/kg

tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

p_reffloat

Reference pressure, dbar

Returns:
IPV_vs_fNsquared_ratioarray

The ratio of the vertical gradient of potential density referenced to p_ref, to the vertical gradient of locally-referenced potential density, dimensionless.

p_midarray

Pressure at midpoints of p, dbar. The array shape matches IPV_vs_fNsquared_ratio.

gsw.Nsquared(SA, CT, p, lat=None, axis=0)[source]

Calculate the square of the buoyancy frequency.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

latarray-like, 1-D, optional

Latitude, degrees.

axisint, optional

The dimension along which pressure increases.

Returns:
N2array

Buoyancy frequency-squared at pressure midpoints, 1/s^2. The shape along the pressure axis dimension is one less than that of the inputs. (Frequency N is in radians per second.)

p_midarray

Pressure at midpoints of p, dbar. The array shape matches N2.

gsw.O2sol(SA, CT, p, lon, lat)[source]

Calculates the oxygen concentration expected at equilibrium with air at an Absolute Pressure of 101325 Pa (sea pressure of 0 dbar) including saturated water vapor. This function uses the solubility coefficients derived from the data of Benson and Krause (1984), as fitted by Garcia and Gordon (1992, 1993).

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

lonarray-like

Longitude, -360 to 360 degrees

latarray-like

Latitude, -90 to 90 degrees

Returns:
O2solarray-like, umol/kg

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 https://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.

gsw.O2sol_SP_pt(SP, pt)[source]

Calculates the oxygen concentration expected at equilibrium with air at an Absolute Pressure of 101325 Pa (sea pressure of 0 dbar) including saturated water vapor. This function uses the solubility coefficients derived from the data of Benson and Krause (1984), as fitted by Garcia and Gordon (1992, 1993).

Parameters:
SParray-like

Practical Salinity (PSS-78), unitless

ptarray-like

Potential temperature referenced to a sea pressure, degrees C

Returns:
O2solarray-like, umol/kg

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 https://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.

gsw.SAAR(p, lon, lat)[source]

Calculates the Absolute Salinity Anomaly Ratio, SAAR, in the open ocean by spatially interpolating the global reference data set of SAAR to the location of the seawater sample.

Parameters:
parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

lonarray-like

Longitude, -360 to 360 degrees

latarray-like

Latitude, -90 to 90 degrees

Returns:
SAARarray-like, unitless

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 https://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. https://os.copernicus.org/articles/8/1123/2012/os-8-1123-2012.pdf

See also gsw_SA_from_SP, gsw_deltaSA_atlas

Reference page in Help browser <a href=”matlab:doc gsw_SAAR”>doc gsw_SAAR</a> 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.

gsw.SA_freezing_from_CT(CT, p, saturation_fraction)[source]

Calculates the Absolute Salinity of seawater at the freezing temperature. That is, the output is the Absolute Salinity of seawater, with Conservative Temperature CT, pressure p and the fraction saturation_fraction of dissolved air, that is in equilibrium with ice at the same in situ temperature and pressure. If the input values are such that there is no positive value of Absolute Salinity for which seawater is frozen, the output, SA_freezing, is made a NaN.

Parameters:
CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

saturation_fractionarray-like

Saturation fraction of dissolved air in seawater. (0..1)

Returns:
SA_freezingarray-like, g/kg

Absolute Salinity of seawater when it freezes, for given input values of its Conservative Temperature, 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 https://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.

gsw.SA_freezing_from_CT_poly(CT, p, saturation_fraction)[source]

Calculates the Absolute Salinity of seawater at the freezing temperature. That is, the output is the Absolute Salinity of seawater, with the fraction saturation_fraction of dissolved air, that is in equilibrium with ice at Conservative Temperature CT and pressure p. If the input values are such that there is no positive value of Absolute Salinity for which seawater is frozen, the output, SA_freezing, is put equal to NaN.

Parameters:
CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

saturation_fractionarray-like

Saturation fraction of dissolved air in seawater. (0..1)

Returns:
SA_freezingarray-like, g/kg

Absolute Salinity of seawater when it freezes, for given input values of Conservative Temperature 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 https://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.

gsw.SA_freezing_from_t(t, p, saturation_fraction)[source]

Calculates the Absolute Salinity of seawater at the freezing temperature. That is, the output is the Absolute Salinity of seawater, with the fraction saturation_fraction of dissolved air, that is in equilibrium with ice at in-situ temperature t and pressure p. If the input values are such that there is no positive value of Absolute Salinity for which seawater is frozen, the output, SA_freezing, is set to NaN.

Parameters:
tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

saturation_fractionarray-like

Saturation fraction of dissolved air in seawater. (0..1)

Returns:
SA_freezingarray-like, g/kg

Absolute Salinity of seawater when it freezes, for given input values of in situ temperature, 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 https://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.

gsw.SA_freezing_from_t_poly(t, p, saturation_fraction)[source]

Calculates the Absolute Salinity of seawater at the freezing temperature. That is, the output is the Absolute Salinity of seawater, with the fraction saturation_fraction of dissolved air, that is in equilibrium with ice at in-situ temperature t and pressure p. If the input values are such that there is no positive value of Absolute Salinity for which seawater is frozen, the output, SA_freezing, is put equal to NaN.

Parameters:
tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

saturation_fractionarray-like

Saturation fraction of dissolved air in seawater. (0..1)

Returns:
SA_freezingarray-like, g/kg

Absolute Salinity of seawater when it freezes, for given input values of in situ temperature, 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 https://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.

gsw.SA_from_SP(SP, p, lon, lat)[source]

Calculates Absolute Salinity from Practical Salinity. Since SP is non-negative by definition, this function changes any negative input values of SP to be zero.

Parameters:
SParray-like

Practical Salinity (PSS-78), unitless

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

lonarray-like

Longitude, -360 to 360 degrees

latarray-like

Latitude, -90 to 90 degrees

Returns:
SAarray-like, g/kg

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 https://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. https://os.copernicus.org/articles/8/1123/2012/os-8-1123-2012.pdf

gsw.SA_from_SP_Baltic(SP, lon, lat)[source]

Calculates Absolute Salinity in the Baltic Sea, from Practical Salinity. Since SP is non-negative by definition, this function changes any negative input values of SP to be zero. Note. This programme will only produce Absolute Salinity values for the Baltic Sea.

Parameters:
SParray-like

Practical Salinity (PSS-78), unitless

lonarray-like

Longitude, -360 to 360 degrees

latarray-like

Latitude, -90 to 90 degrees

Returns:
SA_balticarray-like, g kg^-1

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. https://os.copernicus.org/articles/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 https://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. https://os.copernicus.org/articles/8/1123/2012/os-8-1123-2012.pdf

gsw.SA_from_Sstar(Sstar, p, lon, lat)[source]

Calculates Absolute Salinity from Preformed Salinity.

Parameters:
Sstararray-like

Preformed Salinity, g/kg

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

lonarray-like

Longitude, -360 to 360 degrees

latarray-like

Latitude, -90 to 90 degrees

Returns:
SAarray-like, g/kg

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 https://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. https://os.copernicus.org/articles/8/1123/2012/os-8-1123-2012.pdf

gsw.SA_from_rho(rho, CT, p)[source]

Calculates the Absolute Salinity of a seawater sample, for given values of its density, Conservative Temperature and sea pressure (in dbar). This function uses the computationally-efficient 75-term expression for specific volume in terms of SA, CT and p (Roquet et al., 2015).

Parameters:
rhoarray-like

Seawater density (not anomaly) in-situ, e.g., 1026 kg/m^3.

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
SAarray-like, g/kg

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 https://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.

gsw.SP_from_C(C, t, p)[source]

Calculates Practical Salinity, SP, from conductivity, C, primarily using the PSS-78 algorithm. Note that the PSS-78 algorithm for Practical Salinity is only valid in the range 2 < SP < 42. If the PSS-78 algorithm produces a Practical Salinity that is less than 2 then the Practical Salinity is recalculated with a modified form of the Hill et al. (1986) formula. The modification of the Hill et al. (1986) expression is to ensure that it is exactly consistent with PSS-78 at SP = 2. Note that the input values of conductivity need to be in units of mS/cm (not S/m).

Parameters:
Carray-like

Conductivity, mS/cm

tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
SParray-like, unitless

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 https://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.

gsw.SP_from_SA(SA, p, lon, lat)[source]

Calculates Practical Salinity from Absolute Salinity.

Parameters:
SAarray-like

Absolute Salinity, g/kg

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

lonarray-like

Longitude, -360 to 360 degrees

latarray-like

Latitude, -90 to 90 degrees

Returns:
SParray-like, unitless

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 https://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. https://os.copernicus.org/articles/8/1123/2012/os-8-1123-2012.pdf

gsw.SP_from_SA_Baltic(SA, lon, lat)[source]

Calculates Practical Salinity for the Baltic Sea, from a value computed analytically from Absolute Salinity. Note. This programme will only produce Practical Salinty values for the Baltic Sea.

Parameters:
SAarray-like

Absolute Salinity, g/kg

lonarray-like

Longitude, -360 to 360 degrees

latarray-like

Latitude, -90 to 90 degrees

Returns:
SP_balticarray-like, unitless

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. https://os.copernicus.org/articles/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 https://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. https://os.copernicus.org/articles/8/1123/2012/os-8-1123-2012.pdf

gsw.SP_from_SK(SK)[source]

Calculates Practical Salinity from Knudsen Salinity.

Parameters:
SKarray-like

Knudsen Salinity, ppt

Returns:
SParray-like, unitless

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 https://www.teos-10.org/ See Appendix A.3 of this TEOS-10 Manual.

gsw.SP_from_SR(SR)[source]

Calculates Practical Salinity from Reference Salinity.

Parameters:
SRarray-like

Reference Salinity, g/kg

Returns:
SParray-like, unitless

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 https://www.teos-10.org/

gsw.SP_from_Sstar(Sstar, p, lon, lat)[source]

Calculates Practical Salinity from Preformed Salinity.

Parameters:
Sstararray-like

Preformed Salinity, g/kg

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

lonarray-like

Longitude, -360 to 360 degrees

latarray-like

Latitude, -90 to 90 degrees

Returns:
SParray-like, unitless

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 https://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. https://os.copernicus.org/articles/8/1123/2012/os-8-1123-2012.pdf

gsw.SP_salinometer(Rt, t)[source]

Calculates Practical Salinity SP from a salinometer, primarily using the PSS-78 algorithm. Note that the PSS-78 algorithm for Practical Salinity is only valid in the range 2 < SP < 42. If the PSS-78 algorithm produces a Practical Salinity that is less than 2 then the Practical Salinity is recalculated with a modified form of the Hill et al. (1986) formula. The modification of the Hill et al. (1986) expression is to ensure that it is exactly consistent with PSS-78 at SP = 2.

Parameters:
Rtarray-like

C(SP,t_68,0)/C(SP=35,t_68,0), unitless

tarray-like

In-situ temperature (ITS-90), degrees C

Returns:
SParray-like, unitless

Practical Salinity on the PSS-78 scale 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 https://www.teos-10.org/ See appendix E of this TEOS-10 Manual, and in particular, Eqns. (E.2.1) and (E.2.6).

gsw.SR_from_SP(SP)[source]

Calculates Reference Salinity from Practical Salinity.

Parameters:
SParray-like

Practical Salinity (PSS-78), unitless

Returns:
SRarray-like, g/kg

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 https://www.teos-10.org/

gsw.Sstar_from_SA(SA, p, lon, lat)[source]

Converts Preformed Salinity from Absolute Salinity.

Parameters:
SAarray-like

Absolute Salinity, g/kg

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

lonarray-like

Longitude, -360 to 360 degrees

latarray-like

Latitude, -90 to 90 degrees

Returns:
Sstararray-like, g/kg

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 https://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. https://os.copernicus.org/articles/8/1123/2012/os-8-1123-2012.pdf

gsw.Sstar_from_SP(SP, p, lon, lat)[source]

Calculates Preformed Salinity from Absolute Salinity. Since SP is non-negative by definition, this function changes any negative input values of SP to be zero.

Parameters:
SParray-like

Practical Salinity (PSS-78), unitless

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

lonarray-like

Longitude, -360 to 360 degrees

latarray-like

Latitude, -90 to 90 degrees

Returns:
Sstararray-like, g/kg

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 https://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. https://os.copernicus.org/articles/8/1123/2012/os-8-1123-2012.pdf

gsw.Turner_Rsubrho(SA, CT, p, axis=0)[source]

Calculate the Turner Angle and the Stability Ratio.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

axisint, optional

The dimension along which pressure increases.

Returns:
Tuarray

Turner Angle at pressure midpoints, degrees. The shape along the pressure axis dimension is one less than that of the inputs.

Rsubrhoarray

Stability Ratio, dimensionless. The shape matches Tu.

p_midarray

Pressure at midpoints of p, dbar. The array shape matches Tu.

gsw.adiabatic_lapse_rate_from_CT(SA, CT, p)[source]

Calculates the adiabatic lapse rate of sea water from Conservative Temperature.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
adiabatic_lapse_ratearray-like, K/Pa

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 https://www.teos-10.org/. See Eqn. (2.22.1) of this TEOS-10 Manual.

gsw.adiabatic_lapse_rate_ice(t, p)[source]

Calculates the adiabatic lapse rate of ice.

Parameters:
tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
adiabatic_lapse_rate_icearray-like, K/Pa

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 https://www.teos-10.org/.

gsw.alpha(SA, CT, p)[source]

Calculates the thermal expansion coefficient of seawater with respect to Conservative Temperature using the computationally-efficient expression for specific volume in terms of SA, CT and p (Roquet et al., 2015).

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
alphaarray-like, 1/K

thermal expansion coefficient 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 https://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.

gsw.alpha_on_beta(SA, CT, p)[source]

Calculates alpha divided by beta, where alpha is the thermal expansion coefficient and beta is the saline contraction coefficient of seawater from Absolute Salinity and Conservative Temperature. This function uses the computationally-efficient expression for specific volume in terms of SA, CT and p (Roquet et al., 2015).

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
alpha_on_betaarray-like, g kg^-1 K^-1

thermal expansion coefficient with respect to Conservative Temperature divided by the saline contraction coefficient 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 https://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.

gsw.alpha_wrt_t_exact(SA, t, p)[source]

Calculates the thermal expansion coefficient of seawater with respect to in-situ temperature.

Parameters:
SAarray-like

Absolute Salinity, g/kg

tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
alpha_wrt_t_exactarray-like, 1/K

thermal expansion coefficient 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 https://www.teos-10.org/. See Eqn. (2.18.1) of this TEOS-10 manual.

gsw.alpha_wrt_t_ice(t, p)[source]

Calculates the thermal expansion coefficient of ice with respect to in-situ temperature.

Parameters:
tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
alpha_wrt_t_icearray-like, 1/K

thermal expansion coefficient of ice 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 https://www.teos-10.org/. See Eqn. (2.18.1) of this TEOS-10 manual.

gsw.beta(SA, CT, p)[source]

Calculates the saline (i.e. haline) contraction coefficient of seawater at constant Conservative Temperature using the computationally-efficient 75-term expression for specific volume in terms of SA, CT and p (Roquet et al., 2015).

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
betaarray-like, kg/g

saline contraction coefficient 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 https://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.

gsw.beta_const_t_exact(SA, t, p)[source]

Calculates the saline (i.e. haline) contraction coefficient of seawater at constant in-situ temperature.

Parameters:
SAarray-like

Absolute Salinity, g/kg

tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
beta_const_t_exactarray-like, kg/g

saline contraction coefficient 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 https://www.teos-10.org/ See Eqn. (2.19.1) of this TEOS-10 manual.

gsw.cabbeling(SA, CT, p)[source]

Calculates the cabbeling coefficient of seawater with respect to Conservative Temperature. This function uses the computationally- efficient expression for specific volume in terms of SA, CT and p (Roquet et al., 2015).

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
cabbelingarray-like, 1/K^2

cabbeling coefficient with respect to 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 https://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.

gsw.chem_potential_water_ice(t, p)[source]

Calculates the chemical potential of water in ice from in-situ temperature and pressure.

Parameters:
tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
chem_potential_water_icearray-like, J/kg

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 https://www.teos-10.org/

gsw.chem_potential_water_t_exact(SA, t, p)[source]

Calculates the chemical potential of water in seawater.

Parameters:
SAarray-like

Absolute Salinity, g/kg

tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
chem_potential_water_t_exactarray-like, J/g

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 https://www.teos-10.org/

gsw.cp_ice(t, p)[source]

Calculates the isobaric heat capacity of ice.

Parameters:
tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
cp_icearray-like, J kg^-1 K^-1

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 https://www.teos-10.org/

gsw.cp_t_exact(SA, t, p)[source]

Calculates the isobaric heat capacity of seawater.

Parameters:
SAarray-like

Absolute Salinity, g/kg

tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
cp_t_exactarray-like, J/(kg*K)

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 https://www.teos-10.org/

gsw.deltaSA_atlas(p, lon, lat)[source]

Calculates the Absolute Salinity Anomaly atlas value, SA - SR, in the open ocean by spatially interpolating the global reference data set of deltaSA_atlas to the location of the seawater sample.

Parameters:
parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

lonarray-like

Longitude, -360 to 360 degrees

latarray-like

Latitude, -90 to 90 degrees

Returns:
deltaSA_atlasarray-like, g/kg

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 https://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. https://os.copernicus.org/articles/8/1123/2012/os-8-1123-2012.pdf

gsw.deltaSA_from_SP(SP, p, lon, lat)[source]

Calculates Absolute Salinity Anomaly from Practical Salinity. Since SP is non-negative by definition, this function changes any negative input values of SP to be zero.

Parameters:
SParray-like

Practical Salinity (PSS-78), unitless

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

lonarray-like

Longitude, -360 to 360 degrees

latarray-like

Latitude, -90 to 90 degrees

Returns:
deltaSAarray-like, g/kg

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 https://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. https://os.copernicus.org/articles/8/1117/2012/os-8-1117-2012.pdf

gsw.dilution_coefficient_t_exact(SA, t, p)[source]

Calculates the dilution coefficient of seawater. The dilution coefficient of seawater is defined as the Absolute Salinity times the second derivative of the Gibbs function with respect to Absolute Salinity, that is, SA.*g_SA_SA.

Parameters:
SAarray-like

Absolute Salinity, g/kg

tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
dilution_coefficient_t_exactarray-like, (J/kg)(kg/g)

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 https://www.teos-10.org/

gsw.distance(lon, lat, p=0, axis=-1)[source]

Great-circle distance in m between lon, lat points.

Parameters:
lon, latarray-like, 1-D or 2-D (shapes must match)

Longitude, latitude, in degrees.

parray-like, scalar, 1-D or 2-D, optional, default is 0

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

axisint, -1, 0, 1, optional

The axis or dimension along which lat and lon vary. This differs from most functions, for which axis is the dimension along which p increases.

Returns:
distance1-D or 2-D array

distance in meters between adjacent points.

gsw.dynamic_enthalpy(SA, CT, p)[source]

Calculates dynamic enthalpy of seawater using the computationally- efficient expression for specific volume in terms of SA, CT and p (Roquet et al., 2015). Dynamic enthalpy is defined as enthalpy minus potential enthalpy (Young, 2010).

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
dynamic_enthalpyarray-like, J/kg

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 https://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.

gsw.enthalpy(SA, CT, p)[source]

Calculates specific enthalpy of seawater using the computationally- efficient expression for specific volume in terms of SA, CT and p (Roquet et al., 2015).

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
enthalpyarray-like, J/kg

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 https://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.

gsw.enthalpy_CT_exact(SA, CT, p)[source]

Calculates specific enthalpy of seawater from Absolute Salinity and Conservative Temperature and pressure.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
enthalpy_CT_exactarray-like, J/kg

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 https://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.

gsw.enthalpy_SSO_0(p)[source]

enthalpy at (SSO,CT=0,p)

Parameters:
parray-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.

gsw.enthalpy_diff(SA, CT, p_shallow, p_deep)[source]

Calculates the difference of the specific enthalpy of seawater between two different pressures, p_deep (the deeper pressure) and p_shallow (the shallower pressure), at the same values of SA and CT. This function uses the computationally-efficient expression for specific volume in terms of SA, CT and p (Roquet et al., 2015). The output (enthalpy_diff) is the specific enthalpy evaluated at (SA,CT,p_deep) minus the specific enthalpy at (SA,CT,p_shallow).

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

p_shallowarray-like

Upper sea pressure (absolute pressure minus 10.1325 dbar), dbar

p_deeparray-like

Lower sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
enthalpy_diffarray-like, J/kg

difference of specific enthalpy (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 https://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.

gsw.enthalpy_first_derivatives(SA, CT, p)[source]

Calculates the following two derivatives of specific enthalpy (h) of seawater using the computationally-efficient expression for specific volume in terms of SA, CT and p (Roquet et al., 2015). (1) h_SA, the derivative with respect to Absolute Salinity at constant CT and p, and (2) h_CT, derivative with respect to CT at constant SA and p. Note that h_P is specific volume (1/rho) it can be calculated by calling gsw_specvol(SA,CT,p).

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
h_SAarray-like, J/g

The first derivative of specific enthalpy with respect to Absolute Salinity at constant CT and p. [ J/(kg (g/kg))] i.e.

h_CTarray-like, J/(kg K)

The first derivative of specific enthalpy with respect to 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 https://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 https://www.teos-10.org/

gsw.enthalpy_first_derivatives_CT_exact(SA, CT, p)[source]

Calculates the following two derivatives of specific enthalpy, h, (1) h_SA, the derivative with respect to Absolute Salinity at constant CT and p, and (2) h_CT, derivative with respect to CT at constant SA and p. Note that h_P is specific volume, v, it can be calculated by calling gsw_specvol_CT_exact(SA,CT,p).

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
h_SAarray-like, J/g

The first derivative of specific enthalpy with respect to Absolute Salinity at constant CT and p. [ J/(kg (g/kg))] i.e.

h_CTarray-like, J/(kg K)

The first derivative of specific enthalpy with respect to 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 https://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 https://www.teos-10.org/

gsw.enthalpy_ice(t, p)[source]

Calculates the specific enthalpy of ice (h_Ih).

Parameters:
tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
enthalpy_icearray-like, J/kg

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 https://www.teos-10.org/

gsw.enthalpy_second_derivatives(SA, CT, p)[source]

Calculates the following three second-order derivatives of specific enthalpy (h),using the computationally-efficient expression for specific volume in terms of SA, CT and p (Roquet et al., 2015). (1) h_SA_SA, second-order derivative with respect to Absolute Salinity at constant CT & p. (2) h_SA_CT, second-order derivative with respect to SA & CT at constant p. (3) h_CT_CT, second-order derivative with respect to CT at constant SA and p.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
h_SA_SAarray-like, J/(kg (g/kg)^2)

The second derivative of specific enthalpy with respect to Absolute Salinity at constant CT & p.

h_SA_CTarray-like, J/(kg K(g/kg))

The second derivative of specific enthalpy with respect to SA and CT at constant p.

h_CT_CTarray-like, J/(kg K^2)

The second derivative of specific enthalpy with respect to 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 https://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 https://www.teos-10.org/

gsw.enthalpy_second_derivatives_CT_exact(SA, CT, p)[source]

Calculates the following three second-order derivatives of specific enthalpy (h), (1) h_SA_SA, second-order derivative with respect to Absolute Salinity at constant CT & p. (2) h_SA_CT, second-order derivative with respect to SA & CT at constant p. (3) h_CT_CT, second-order derivative with respect to CT at constant SA and p.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
h_SA_SAarray-like, J/(kg (g/kg)^2)

The second derivative of specific enthalpy with respect to Absolute Salinity at constant CT & p.

h_SA_CTarray-like, J/(kg K(g/kg))

The second derivative of specific enthalpy with respect to SA and CT at constant p.

h_CT_CTarray-like, J/(kg K^2)

The second derivative of specific enthalpy with respect to 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 https://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 https://www.teos-10.org/

gsw.enthalpy_t_exact(SA, t, p)[source]

Calculates the specific enthalpy of seawater.

Parameters:
SAarray-like

Absolute Salinity, g/kg

tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
enthalpy_t_exactarray-like, J/kg

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 https://www.teos-10.org/

gsw.entropy_first_derivatives(SA, CT)[source]

Calculates the following two partial derivatives of specific entropy (eta) (1) eta_SA, the derivative with respect to Absolute Salinity at constant Conservative Temperature, and (2) eta_CT, the derivative with respect to Conservative Temperature at constant Absolute Salinity.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

Returns:
eta_SAarray-like, J/(g K)

The derivative of specific entropy with respect to Absolute Salinity (in units of g kg^-1) at constant Conservative Temperature.

eta_CTarray-like, J/(kg K^2)

The derivative of specific entropy with respect to 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 https://www.teos-10.org/. See Eqns. (A.12.8) and (P.14a,c) of this TEOS-10 Manual.

This software is available from https://www.teos-10.org/

gsw.entropy_from_CT(SA, CT)[source]

Calculates specific entropy of seawater from Conservative Temperature.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

Returns:
entropyarray-like, J/(kg*K)

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 https://www.teos-10.org/ See appendix A.10 of this TEOS-10 Manual.

gsw.entropy_from_pt(SA, pt)[source]

Calculates specific entropy of seawater as a function of potential temperature.

Parameters:
SAarray-like

Absolute Salinity, g/kg

ptarray-like

Potential temperature referenced to a sea pressure, degrees C

Returns:
entropyarray-like, J/(kg*K)

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 https://www.teos-10.org/ See appendix A.10 of this TEOS-10 Manual.

gsw.entropy_from_t(SA, t, p)[source]

Calculates specific entropy of seawater from in-situ temperature.

Parameters:
SAarray-like

Absolute Salinity, g/kg

tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
entropyarray-like, J/(kg*K)

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 https://www.teos-10.org/

gsw.entropy_ice(t, p)[source]

Calculates specific entropy of ice.

Parameters:
tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
ice_entropyarray-like, J kg^-1 K^-1

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 https://www.teos-10.org/

gsw.entropy_part(SA, t, p)[source]

entropy minus the terms that are a function of only SA

Parameters:
SAarray-like

Absolute Salinity, g/kg

tarray-like

In-situ temperature (ITS-90), degrees C

parray-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)

gsw.entropy_part_zerop(SA, pt0)[source]

entropy_part evaluated at the sea surface

Parameters:
SAarray-like

Absolute Salinity, g/kg

pt0array-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)

gsw.entropy_second_derivatives(SA, CT)[source]

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 Conservative Temperature. (3) eta_CT_CT, the second derivative with respect to Conservative Temperature at constant Absolute Salinity.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

Returns:
eta_SA_SAarray-like, J/(kg K(g/kg)^2)

The second derivative of specific entropy with respect to Absolute Salinity (in units of g kg^-1) at constant Conservative Temperature.

eta_SA_CTarray-like, J/(kg (g/kg) K^2)

The second derivative of specific entropy with respect to Conservative Temperature at constant Absolute

eta_CT_CTarray-like, J/(kg K^3)

The second derivative of specific entropy with respect 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 https://www.teos-10.org/. See Eqns. (P.14b) and (P.15a,b) of this TEOS-10 Manual.

This software is available from https://www.teos-10.org/

gsw.f(lat)[source]

Coriolis parameter in 1/s for latitude in degrees.

gsw.frazil_properties(SA_bulk, h_bulk, p)[source]

Calculates the mass fraction of ice (mass of ice divided by mass of ice plus seawater), w_Ih_final, which results from given values of the bulk Absolute Salinity, SA_bulk, bulk enthalpy, h_bulk, occurring at pressure p. The final values of Absolute Salinity, SA_final, and Conservative Temperature, CT_final, of the interstitial seawater phase are also returned. This code assumes that there is no dissolved air in the seawater (that is, saturation_fraction is assumed to be zero throughout the code).

Parameters:
SA_bulkarray-like

bulk Absolute Salinity of the seawater and ice mixture, g/kg

h_bulkarray-like

bulk enthalpy of the seawater and ice mixture, J/kg

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
SA_finalarray-like, g/kg

Absolute Salinity of the seawater in the final state, whether or not any ice is present.

CT_finalarray-like, deg C

Conservative Temperature of the seawater in the final state, whether or not any ice is present.

w_Ih_finalarray-like, unitless

mass fraction of ice in the final seawater-ice mixture. If this ice mass fraction is positive, the system is at thermodynamic equilibrium. If this ice mass fraction is zero there is no ice in the final state which consists only of seawater which is warmer than the freezing 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 https://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.

gsw.frazil_properties_potential(SA_bulk, h_pot_bulk, p)[source]

Calculates the mass fraction of ice (mass of ice divided by mass of ice plus seawater), w_Ih_eq, which results from given values of the bulk Absolute Salinity, SA_bulk, bulk potential enthalpy, h_pot_bulk, occurring at pressure p. The final equilibrium values of Absolute Salinity, SA_eq, and Conservative Temperature, CT_eq, of the interstitial seawater phase are also returned. This code assumes that there is no dissolved air in the seawater (that is, saturation_fraction is assumed to be zero throughout the code).

Parameters:
SA_bulkarray-like

bulk Absolute Salinity of the seawater and ice mixture, g/kg

h_pot_bulkarray-like

bulk enthalpy of the seawater and ice mixture, J/kg

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
SA_finalarray-like, g/kg

Absolute Salinity of the seawater in the final state, whether or not any ice is present.

CT_finalarray-like, deg C

Conservative Temperature of the seawater in the final state, whether or not any ice is present.

w_Ih_finalarray-like, unitless

mass fraction of ice in the final seawater-ice mixture. If this ice mass fraction is positive, the system is at thermodynamic equilibrium. If this ice mass fraction is zero there is no ice in the final state which consists only of seawater which is warmer than the freezing 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 https://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.

gsw.frazil_properties_potential_poly(SA_bulk, h_pot_bulk, p)[source]

Calculates the mass fraction of ice (mass of ice divided by mass of ice plus seawater), w_Ih_eq, which results from given values of the bulk Absolute Salinity, SA_bulk, bulk potential enthalpy, h_pot_bulk, occurring at pressure p. The final equilibrium values of Absolute Salinity, SA_eq, and Conservative Temperature, CT_eq, of the interstitial seawater phase are also returned. This code assumes that there is no dissolved air in the seawater (that is, saturation_fraction is assumed to be zero throughout the code).

Parameters:
SA_bulkarray-like

bulk Absolute Salinity of the seawater and ice mixture, g/kg

h_pot_bulkarray-like

bulk enthalpy of the seawater and ice mixture, J/kg

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
SA_finalarray-like, g/kg

Absolute Salinity of the seawater in the final state, whether or not any ice is present.

CT_finalarray-like, deg C

Conservative Temperature of the seawater in the final state, whether or not any ice is present.

w_Ih_finalarray-like, unitless

mass fraction of ice in the final seawater-ice mixture. If this ice mass fraction is positive, the system is at thermodynamic equilibrium. If this ice mass fraction is zero there is no ice in the final state which consists only of seawater which is warmer than the freezing 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 https://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.

gsw.frazil_ratios_adiabatic(SA, p, w_Ih)[source]

Calculates the ratios of SA, CT and P changes when frazil ice forms or melts in response to an adiabatic change in pressure of a mixture of seawater and frazil ice crystals.

Parameters:
SAarray-like

Absolute Salinity, g/kg

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

w_Iharray-like

mass fraction of ice: the mass of ice divided by the sum of the masses of ice and seawater. 0 <= wIh <= 1. unitless.

Returns:
dSA_dCT_frazilarray-like, g/(kg K)

the ratio of the changes in Absolute Salinity to that of Conservative Temperature

dSA_dP_frazilarray-like, g/(kg Pa)

the ratio of the changes in Absolute Salinity to that of pressure (in Pa)

dCT_dP_frazilarray-like, K/Pa

the ratio of the changes in Conservative Temperature 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 https://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.

gsw.frazil_ratios_adiabatic_poly(SA, p, w_Ih)[source]

Calculates the ratios of SA, CT and P changes when frazil ice forms or melts in response to an adiabatic change in pressure of a mixture of seawater and frazil ice crystals.

Parameters:
SAarray-like

Absolute Salinity, g/kg

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

w_Iharray-like

mass fraction of ice: the mass of ice divided by the sum of the masses of ice and seawater. 0 <= wIh <= 1. unitless.

Returns:
dSA_dCT_frazilarray-like, g/(kg K)

the ratio of the changes in Absolute Salinity to that of Conservative Temperature

dSA_dP_frazilarray-like, g/(kg Pa)

the ratio of the changes in Absolute Salinity to that of pressure (in Pa)

dCT_dP_frazilarray-like, K/Pa

the ratio of the changes in Conservative Temperature 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 https://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.

gsw.geo_strf_dyn_height(SA, CT, p, p_ref=0, axis=0, max_dp=1.0, interp_method='pchip')[source]

Dynamic height anomaly as a function of pressure.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

p_reffloat or array-like, optional

Reference pressure, dbar

axisint, optional, default is 0

The index of the pressure dimension in SA and CT.

max_dpfloat

If any pressure interval in the input p exceeds max_dp, the dynamic height will be calculated after interpolating to a grid with this spacing.

interp_methodstring {‘mrst’, ‘pchip’, ‘linear’}

Interpolation algorithm.

Returns:
dynamic_heightarray

This is the integral of specific volume anomaly with respect to pressure, from each pressure in p to the specified reference pressure. It is the geostrophic streamfunction in an isobaric surface, relative to the reference surface.

gsw.geo_strf_steric_height(SA, CT, p, p_ref=0, axis=0, max_dp=1.0, interp_method='pchip')[source]

Steric height anomaly as a function of pressure.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

p_reffloat or array-like, optional

Reference pressure, dbar

axisint, optional, default is 0

The index of the pressure dimension in SA and CT.

max_dpfloat

If any pressure interval in the input p exceeds max_dp, the dynamic height will be calculated after interpolating to a grid with this spacing.

interp_methodstring {‘mrst’, ‘pchip’, ‘linear’}

Interpolation algorithm.

Returns:
steric_heightarray

This is the integral of specific volume anomaly with respect to pressure, from each pressure in p to the specified reference pressure, divided by the global mean surface value of gravitational acceleration, 9.7963 m s^-2. (see page 46 of Griffies, 2004) It is not exactly the height of an isobaric surface above a geopotential surface, but is an exact geostrophic streamfunction.

References

Griffies, S. M., 2004: Fundamentals of Ocean Climate Models. Princeton, NJ: Princeton University Press, 518 pp + xxxiv.

gsw.geostrophic_velocity(geo_strf, lon, lat, p=0, axis=0)[source]

Calculate geostrophic velocity from a streamfunction.

Calculates geostrophic velocity relative to a reference pressure, given a geostrophic streamfunction and the position of each station in sequence along an ocean section. The data can be from a single isobaric or “density” surface, or from a series of such surfaces.

Parameters:
geo_strfarray-like, 1-D or 2-D

geostrophic streamfunction; see Notes below.

lonarray-like, 1-D

Longitude, -360 to 360 degrees

latarray-like, 1-D

Latitude, degrees

pfloat or array-like, optional

Sea pressure (absolute pressure minus 10.1325 dbar), dbar. This used only for a tiny correction in the distance calculation; it is safe to omit it.

axisint, 0 or 1, optional

The axis or dimension along which pressure increases in geo_strf. If geo_strf is 1-D, it is ignored.

Returns:
velocityarray, 2-D or 1-D

Geostrophic velocity in m/s relative to the sea surface, averaged between each successive pair of positions.

mid_lon, mid_latarray, 1-D

Midpoints of input lon and lat.

Notes

The geostrophic streamfunction can be:

  • geo_strf_dyn_height (in an isobaric surface)

  • geo_strf_Montgomery (in a specific volume anomaly surface)

  • geo_strf_Cunninhgam (in an approximately neutral surface such as a potential density surface).

  • geo_strf_isopycnal (in an approximately neutral surface such as a potential density surface, a Neutral Density surface, or an omega surface (Klocker et al., 2009)).

Only geo_strf_dyn_height() is presently implemented in GSW-Python.

gsw.gibbs(ns, nt, np, SA, t, p)[source]

Calculates specific Gibbs energy and its derivatives up to order 3 for seawater. The Gibbs function for seawater is that of TEOS-10 (IOC et al., 2010), being the sum of IAPWS-08 for the saline part and IAPWS-09 for the pure water part. These IAPWS releases are the officially blessed IAPWS descriptions of Feistel (2008) and the pure water part of Feistel (2003). Absolute Salinity, SA, in all of the GSW routines is expressed on the Reference-Composition Salinity Scale of 2008 (RCSS-08) of Millero et al. (2008).

Parameters:
nsarray-like

order of SA derivative, integer in (0, 1, 2)

ntarray-like

order of t derivative, integer in (0, 1, 2)

nparray-like

order of p derivative, integer in (0, 1, 2)

SAarray-like

Absolute Salinity, g/kg

tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
gibbsarray-like

Specific Gibbs energy or its derivatives. The Gibbs energy (when ns = nt = np = 0) has units of J/kg. The Absolute Salinity derivatives are output in units of (J/kg) (g/kg)^(-ns). The temperature derivatives are output in units of (J/kg) (K)^(-nt). The pressure derivatives are output in units of (J/kg) (Pa)^(-np). The mixed derivatives are output in units of (J/kg) (g/kg)^(-ns) (K)^(-nt) (Pa)^(-np). 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 kg–1, 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 https://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 https://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 https://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 <a href=”matlab:doc gsw_gibbs”>doc gsw_gibbs</a> 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.

gsw.gibbs_ice(nt, np, t, p)[source]

Ice specific Gibbs energy and derivatives up to order 2.

Parameters:
ntarray-like

order of t derivative, integer in (0, 1, 2)

nparray-like

order of p derivative, integer in (0, 1, 2)

tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
gibbs_icearray-like

Specific Gibbs energy of ice or its derivatives. The Gibbs energy (when nt = np = 0) has units of J/kg. The temperature derivatives are output in units of (J/kg) (K)^(-nt). The pressure derivatives are output in units of (J/kg) (Pa)^(-np). The mixed derivatives are output in units of (J/kg) (K)^(-nt) (Pa)^(-np). 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 https://www.teos-10.org/. See appendix I.

Reference page in Help browser <a href=”matlab:doc gsw_gibbs_ice”>doc gsw_gibbs_ice</a> 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.

gsw.gibbs_ice_part_t(t, p)[source]

part of the first temperature derivative of Gibbs energy of ice that is the output is gibbs_ice(1,0,t,p) + S0

Parameters:
tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
gibbs_ice_part_tarray-like, J kg^-1 K^-1

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 https://www.teos-10.org/. See appendix I.

gsw.gibbs_ice_pt0(pt0)[source]

part of the first temperature derivative of Gibbs energy of ice that is the output is “gibbs_ice(1,0,pt0,0) + s0”

Parameters:
pt0array-like

Potential temperature with reference pressure of 0 dbar, degrees C

Returns:
gibbs_ice_part_pt0array-like, J kg^-1 K^-1

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 https://www.teos-10.org/. See appendix I.

gsw.gibbs_ice_pt0_pt0(pt0)[source]

The second temperature derivative of Gibbs energy of ice at the potential temperature with reference sea pressure of zero dbar. That is the output is gibbs_ice(2,0,pt0,0).

Parameters:
pt0array-like

Potential temperature with reference pressure of 0 dbar, degrees C

Returns:
gibbs_ice_pt0_pt0array-like, J kg^-1 K^-2

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 https://www.teos-10.org/. See appendix I.

gsw.gibbs_pt0_pt0(SA, pt0)[source]

gibbs_tt at (SA,pt,0)

Parameters:
SAarray-like

Absolute Salinity, g/kg

pt0array-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)

gsw.grav(lat, p)[source]

Calculates acceleration due to gravity as a function of latitude and as a function of pressure in the ocean.

Parameters:
latarray-like

Latitude, -90 to 90 degrees

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
gravarray-like, m s^-2

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 https://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.

gsw.ice_fraction_to_freeze_seawater(SA, CT, p, t_Ih)[source]

Calculates the mass fraction of ice (mass of ice divided by mass of ice plus seawater), which, when melted into seawater having (SA,CT,p) causes the final dilute seawater to be at the freezing temperature. The other outputs are the Absolute Salinity and Conservative Temperature of the final diluted seawater.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

t_Iharray-like

In-situ temperature of ice (ITS-90), degrees C

Returns:
SA_freezearray-like, g/kg

Absolute Salinity of seawater after the mass fraction of ice, ice_fraction, at temperature t_Ih has melted into the original seawater, and the final mixture is at the freezing temperature of seawater.

CT_freezearray-like, deg C

Conservative Temperature of seawater after the mass fraction, w_Ih, of ice at temperature t_Ih has melted into the original seawater, and the final mixture is at the freezing temperature of seawater.

w_Iharray-like, unitless

mass fraction of ice, having in-situ temperature t_Ih, which, when melted into seawater at (SA,CT,p) leads to the final diluted seawater being at the freezing temperature. 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 https://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.

gsw.indexer(shape, axis, order='C')[source]

Generator of indexing tuples for “apply_along_axis” usage.

The generator cycles through all axes other than axis. The numpy np.apply_along_axis function only works with functions of a single array; this generator allows us work with a function of more than one array.

gsw.infunnel(SA, CT, p)[source]

“oceanographic funnel” check for the 75-term equation

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
in_funnelarray-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)

gsw.internal_energy(SA, CT, p)[source]

Calculates specific internal energy of seawater using the computationally-efficient expression for specific volume in terms of SA, CT and p (Roquet et al., 2015).

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
internal_energyarray-like, J/kg

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 https://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.

gsw.internal_energy_ice(t, p)[source]

Calculates the specific internal energy of ice.

Parameters:
tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
internal_energy_icearray-like, J/kg

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 https://www.teos-10.org/

gsw.kappa(SA, CT, p)[source]

Calculates the isentropic compressibility of seawater. This function has inputs of Absolute Salinity and Conservative Temperature. This function uses the computationally-efficient expression for specific volume in terms of SA, CT and p (Roquet et al., 2015).

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
kappaarray-like, 1/Pa

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 https://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.

gsw.kappa_const_t_ice(t, p)[source]

Calculates isothermal compressibility of ice. Note. This is the compressibility of ice AT CONSTANT IN-SITU TEMPERATURE

Parameters:
tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
kappa_const_t_icearray-like, 1/Pa

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 https://www.teos-10.org/

gsw.kappa_ice(t, p)[source]

Calculates the isentropic compressibility of ice.

Parameters:
tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
kappa_icearray-like, 1/Pa

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 https://www.teos-10.org/

gsw.kappa_t_exact(SA, t, p)[source]

Calculates the isentropic compressibility of seawater.

Parameters:
SAarray-like

Absolute Salinity, g/kg

tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
kappa_t_exactarray-like, 1/Pa

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 https://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.

gsw.latentheat_evap_CT(SA, CT)[source]

Calculates latent heat, or enthalpy, of evaporation at p = 0 (the surface). It is defined as a function of Absolute Salinity, SA, and Conservative Temperature, CT, and is valid in the ranges 0 < SA < 42 g/kg and 0 < CT < 40 deg C. The errors range between -0.4 and 0.6 J/kg.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

Returns:
latentheat_evaparray-like, J/kg

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 https://www.teos-10.org/ See section 3.39 of this TEOS-10 Manual.

gsw.latentheat_evap_t(SA, t)[source]

Calculates latent heat, or enthalpy, of evaporation at p = 0 (the surface). It is defined as a function of Absolute Salinity, SA, and in-situ temperature, t, and is valid in the ranges 0 < SA < 40 g/kg and 0 < CT < 42 deg C. The errors range between -0.4 and 0.6 J/kg.

Parameters:
SAarray-like

Absolute Salinity, g/kg

tarray-like

In-situ temperature (ITS-90), degrees C

Returns:
latentheat_evaparray-like, J/kg

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 https://www.teos-10.org/ See section 3.39 of this TEOS-10 Manual.

gsw.latentheat_melting(SA, p)[source]

Calculates latent heat, or enthalpy, of melting. It is defined in terms of Absolute Salinity, SA, and sea pressure, p, and is valid in the ranges 0 < SA < 42 g kg^-1 and 0 < p < 10,000 dbar. This is based on the IAPWS Releases IAPWS-09 (for pure water), IAPWS-08 (for the saline compoonent of seawater and IAPWS-06 for ice Ih.

Parameters:
SAarray-like

Absolute Salinity, g/kg

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
latentheat_meltingarray-like, J/kg

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 https://www.teos-10.org/ See section 3.34 of this TEOS-10 Manual.

gsw.match_args_return(f)[source]

Decorator for most functions that operate on profile data.

gsw.melting_ice_SA_CT_ratio(SA, CT, p, t_Ih)[source]

Calculates the ratio of SA to CT changes when ice melts into seawater. It is assumed that a small mass of ice melts into an infinite mass of seawater. Because of the infinite mass of seawater, the ice will always melt.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

t_Iharray-like

In-situ temperature of ice (ITS-90), degrees C

Returns:
melting_ice_SA_CT_ratioarray-like, g kg^-1 K^-1

the ratio of SA to CT changes when ice melts 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 https://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.

gsw.melting_ice_SA_CT_ratio_poly(SA, CT, p, t_Ih)[source]

Calculates the ratio of SA to CT changes when ice melts into seawater. It is assumed that a small mass of ice melts into an infinite mass of seawater. Because of the infinite mass of seawater, the ice will always melt.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

t_Iharray-like

In-situ temperature of ice (ITS-90), degrees C

Returns:
melting_ice_SA_CT_ratioarray-like, g kg^-1 K^-1

the ratio of SA to CT changes when ice melts 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 https://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.

gsw.melting_ice_equilibrium_SA_CT_ratio(SA, p)[source]

Calculates the ratio of SA to CT changes when ice melts into seawater with both the seawater and the seaice temperatures being almost equal to the equilibrium freezing temperature. It is assumed that a small mass of ice melts into an infinite mass of seawater. If indeed the temperature of the seawater and the ice were both equal to the freezing temperature, then no melting or freezing would occur; an imbalance between these three temperatures is needed for freezing or melting to occur (the three temperatures being (1) the seawater temperature, (2) the ice temperature, and (3) the freezing temperature.

Parameters:
SAarray-like

Absolute Salinity, g/kg

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
melting_ice_equilibrium_SA_CT_ratioarray-like, g/(kg K)

the ratio dSA/dCT of SA to CT changes when ice melts into seawater, with the seawater and seaice being close to the 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 https://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.

gsw.melting_ice_equilibrium_SA_CT_ratio_poly(SA, p)[source]

Calculates the ratio of SA to CT changes when ice melts into seawater with both the seawater and the seaice temperatures being almost equal to the equilibrium freezing temperature. It is assumed that a small mass of ice melts into an infinite mass of seawater. If indeed the temperature of the seawater and the ice were both equal to the freezing temperature, then no melting or freezing would occur; an imbalance between these three temperatures is needed for freezing or melting to occur (the three temperatures being (1) the seawater temperature, (2) the ice temperature, and (3) the freezing temperature.

Parameters:
SAarray-like

Absolute Salinity, g/kg

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
melting_ice_equilibrium_SA_CT_ratioarray-like, g/(kg K)

the ratio dSA/dCT of SA to CT changes when ice melts into seawater, with the seawater and seaice being close to the 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 https://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.

gsw.melting_ice_into_seawater(SA, CT, p, w_Ih, t_Ih)[source]

Calculates the final Absolute Salinity, final Conservative Temperature and final ice mass fraction that results when a given mass fraction of ice melts and is mixed into seawater whose properties are (SA,CT,p). This code takes the seawater to contain no dissolved air.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

w_Iharray-like

mass fraction of ice: the mass of ice divided by the sum of the masses of ice and seawater. 0 <= wIh <= 1. unitless.

t_Iharray-like

In-situ temperature of ice (ITS-90), degrees C

Returns:
SA_finalarray-like, g/kg

Absolute Salinity of the seawater in the final state, whether or not any ice is present.

CT_finalarray-like, deg C

Conservative Temperature of the seawater in the final state, whether or not any ice is present.

w_Ih_finalarray-like, unitless

mass fraction of ice in the final seawater-ice mixture. If this ice mass fraction is positive, the system is at thermodynamic equilibrium. If this ice mass fraction is zero there is no ice in the final state which consists only of seawater which is warmer than the freezing 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 https://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.

gsw.melting_seaice_SA_CT_ratio(SA, CT, p, SA_seaice, t_seaice)[source]

Calculates the ratio of SA to CT changes when sea ice melts into seawater. It is assumed that a small mass of sea ice melts into an infinite mass of seawater. Because of the infinite mass of seawater, the sea ice will always melt.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

SA_seaicearray-like

Absolute Salinity of sea ice: the mass fraction of salt in sea ice, expressed in g of salt per kg of sea ice.

t_seaicearray-like

In-situ temperature of the sea ice at pressure p (ITS-90), degrees C

Returns:
melting_seaice_SA_CT_ratioarray-like, g/(kg K)

the ratio dSA/dCT of SA to CT changes when 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 https://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.

gsw.melting_seaice_SA_CT_ratio_poly(SA, CT, p, SA_seaice, t_seaice)[source]

Calculates the ratio of SA to CT changes when sea ice melts into seawater. It is assumed that a small mass of sea ice melts into an infinite mass of seawater. Because of the infinite mass of seawater, the sea ice will always melt.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

SA_seaicearray-like

Absolute Salinity of sea ice: the mass fraction of salt in sea ice, expressed in g of salt per kg of sea ice.

t_seaicearray-like

In-situ temperature of the sea ice at pressure p (ITS-90), degrees C

Returns:
melting_seaice_SA_CT_ratioarray-like, g/(kg K)

the ratio dSA/dCT of SA to CT changes when 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 https://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.

gsw.melting_seaice_equilibrium_SA_CT_ratio(SA, p)[source]

Calculates the ratio of SA to CT changes when sea ice melts into seawater with both the seawater and the sea ice temperatures being almost equal to the equilibrium freezing temperature. It is assumed that a small mass of seaice melts into an infinite mass of seawater. If indeed the temperature of the seawater and the sea ice were both equal to the freezing temperature, then no melting or freezing would occur; an imbalance between these three temperatures is needed for freezing or melting to occur (the three temperatures being (1) the seawater temperature, (2) the sea ice temperature, and (3) the freezing temperature.

Parameters:
SAarray-like

Absolute Salinity, g/kg

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
melting_seaice_equilibrium_SA_CT_ratioarray-like, g/(kg K)

the ratio dSA/dCT of SA to CT changes when sea ice melts into seawater, with the seawater and sea ice being close to the 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 https://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.

gsw.melting_seaice_equilibrium_SA_CT_ratio_poly(SA, p)[source]

Calculates the ratio of SA to CT changes when sea ice melts into seawater with both the seawater and the sea ice temperatures being almost equal to the equilibrium freezing temperature. It is assumed that a small mass of seaice melts into an infinite mass of seawater. If indeed the temperature of the seawater and the sea ice were both equal to the freezing temperature, then no melting or freezing would occur; an imbalance between these three temperatures is needed for freezing or melting to occur (the three temperatures being (1) the seawater temperature, (2) the sea ice temperature, and (3) the freezing temperature.

Parameters:
SAarray-like

Absolute Salinity, g/kg

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
melting_seaice_equilibrium_SA_CT_ratioarray-like, g/(kg K)

the ratio dSA/dCT of SA to CT changes when sea ice melts into seawater, with the seawater and sea ice being close to the 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 https://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.

gsw.melting_seaice_into_seawater(SA, CT, p, w_seaice, SA_seaice, t_seaice)[source]

Calculates the Absolute Salinity and Conservative Temperature that results when a given mass of sea ice (or ice) melts and is mixed into a known mass of seawater (whose properties are (SA,CT,p)).

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

w_seaicearray-like

mass fraction of ice: the mass of sea-ice divided by the sum of the masses of sea-ice and seawater. 0 <= wIh <= 1. unitless.

SA_seaicearray-like

Absolute Salinity of sea ice: the mass fraction of salt in sea ice, expressed in g of salt per kg of sea ice.

t_seaicearray-like

In-situ temperature of the sea ice at pressure p (ITS-90), degrees C

Returns:
SA_finalarray-like, g/kg

Absolute Salinity of the mixture of the melted sea ice (or ice) and the original seawater

CT_finalarray-like, deg C

Conservative Temperature of the mixture of the melted 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 https://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.

gsw.p_from_z(z, lat, geo_strf_dyn_height=0, sea_surface_geopotential=0)[source]

Calculates sea pressure from height using computationally-efficient 75-term expression for density, in terms of SA, CT and p (Roquet et al., 2015). Dynamic height anomaly, geo_strf_dyn_height, if provided, must be computed with its p_ref = 0 (the surface). Also if provided, sea_surface_geopotental is the geopotential at zero sea pressure. This function solves Eqn.(3.32.3) of IOC et al. (2010) iteratively for p.

Parameters:
zarray-like

Depth, positive up, m

latarray-like

Latitude, -90 to 90 degrees

geo_strf_dyn_heightarray-like
dynamic height anomaly, m^2/s^2

Note that the reference pressure, p_ref, of geo_strf_dyn_height must be zero (0) dbar.

sea_surface_geopotentialarray-like

geopotential at zero sea pressure, m^2/s^2

Returns:
parray-like, dbar

sea pressure ( 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 https://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 https://www.teos-10.org/

gsw.pchip_interp(x, y, xi, axis=0)[source]

Interpolate using Piecewise Cubic Hermite Interpolating Polynomial

This is a shape-preserving algorithm; it does not introduce new local extrema. The implementation in C that is wrapped here is largely taken from the scipy implementation, https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.PchipInterpolator.html.

Points outside the range of the interpolation table are filled using the end values in the table. (In contrast, scipy.interpolate.pchip_interpolate() extrapolates using the end polynomials.)

Parameters:
x, yarray-like

Interpolation table x and y; n-dimensional, must be broadcastable to the same dimensions.

xiarray-like

One-dimensional array of new x values.

axisint, optional, default is 0

Axis along which xi is taken.

Returns:
yiarray

Values of y interpolated to xi along the specified axis.

gsw.pot_enthalpy_from_pt_ice(pt0_ice)[source]

Calculates the potential enthalpy of ice from potential temperature of ice (whose reference sea pressure is zero dbar).

Parameters:
pt0_icearray-like

Potential temperature of ice (ITS-90), degrees C

Returns:
pot_enthalpy_icearray-like, J/kg

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 https://www.teos-10.org/

gsw.pot_enthalpy_from_pt_ice_poly(pt0_ice)[source]

Calculates the potential enthalpy of ice from potential temperature of ice (whose reference sea pressure is zero dbar). This is a compuationally efficient polynomial fit to the potential enthalpy of ice.

Parameters:
pt0_icearray-like

Potential temperature of ice (ITS-90), degrees C

Returns:
pot_enthalpy_icearray-like, J/kg

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 https://www.teos-10.org/

gsw.pot_enthalpy_ice_freezing(SA, p)[source]

Calculates the potential enthalpy of ice at which seawater freezes.

Parameters:
SAarray-like

Absolute Salinity, g/kg

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
pot_enthalpy_ice_freezingarray-like, J/kg

potential enthalpy of ice at freezing 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 https://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.

gsw.pot_enthalpy_ice_freezing_first_derivatives(SA, p)[source]

Calculates the first derivatives of the potential enthalpy of ice at which seawater freezes, with respect to Absolute Salinity SA and pressure P (in Pa).

Parameters:
SAarray-like

Absolute Salinity, g/kg

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
pot_enthalpy_ice_freezing_SAarray-like, K kg/g

the derivative of the potential enthalpy of ice at freezing (ITS-90) with respect to Absolute salinity at fixed pressure [ K/(g/kg) ] i.e.

pot_enthalpy_ice_freezing_Parray-like, K/Pa

the derivative of the potential enthalpy of ice at freezing (ITS-90) with respect to pressure (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 https://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.

gsw.pot_enthalpy_ice_freezing_first_derivatives_poly(SA, p)[source]

Calculates the first derivatives of the potential enthalpy of ice Ih at which ice melts into seawater with Absolute Salinity SA and at pressure p. This code uses the computationally efficient polynomial fit of the freezing potential enthalpy of ice Ih (McDougall et al., 2015).

Parameters:
SAarray-like

Absolute Salinity, g/kg

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
pot_enthalpy_ice_freezing_SAarray-like, J/g

the derivative of the potential enthalpy of ice at freezing (ITS-90) with respect to Absolute salinity at fixed pressure [ (J/kg)/(g/kg) ] i.e.

pot_enthalpy_ice_freezing_Parray-like, (J/kg)/Pa

the derivative of the potential enthalpy of ice at freezing (ITS-90) with respect to pressure (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 https://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.

gsw.pot_enthalpy_ice_freezing_poly(SA, p)[source]

Calculates the potential enthalpy of ice at which seawater freezes. The error of this fit ranges between -2.5 and 1 J/kg with an rms of 1.07, between SA of 0 and 120 g/kg and p between 0 and 10,000 dbar (the error in the fit is between -0.7 and 0.7 with an rms of 0.3, between SA of 0 and 120 g/kg and p between 0 and 5,000 dbar) when compared with the potential enthalpy calculated from the exact in-situ freezing temperature which is found by a Newton-Raphson iteration of the equality of the chemical potentials of water in seawater and in ice. Note that the potential enthalpy at freezing can be found by this exact method using the function gsw_pot_enthalpy_ice_freezing.

Parameters:
SAarray-like

Absolute Salinity, g/kg

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
pot_enthalpy_ice_freezingarray-like, J/kg

potential enthalpy of ice at freezing 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 https://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.

gsw.pot_rho_t_exact(SA, t, p, p_ref)[source]

Calculates potential density of seawater. Note. This function outputs potential density, not potential density anomaly; that is, 1000 kg/m^3 is not subtracted.

Parameters:
SAarray-like

Absolute Salinity, g/kg

tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

p_refarray-like

Reference pressure, dbar

Returns:
pot_rho_t_exactarray-like, kg/m^3

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 https://www.teos-10.org/ See section 3.4 of this TEOS-10 Manual.

gsw.pressure_coefficient_ice(t, p)[source]

Calculates pressure coefficient of ice.

Parameters:
tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
pressure_coefficient_icearray-like, Pa/K

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 https://www.teos-10.org/ See Eqn. (2.15.1) of this TEOS-10 Manual.

gsw.pressure_freezing_CT(SA, CT, saturation_fraction)[source]

Calculates the pressure (in dbar) of seawater at the freezing temperature. That is, the output is the pressure at which seawater, with Absolute Salinity SA, Conservative Temperature CT, and with saturation_fraction of dissolved air, freezes. If the input values are such that there is no value of pressure in the range between 0 dbar and 10,000 dbar for which seawater is at the freezing temperature, the output, pressure_freezing, is put equal to NaN.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

saturation_fractionarray-like

Saturation fraction of dissolved air in seawater. (0..1)

Returns:
pressure_freezingarray-like, dbar

sea pressure at which the seawater freezes ( 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 https://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.

gsw.pt0_from_t(SA, t, p)[source]

Calculates potential temperature with reference pressure, p_ref = 0 dbar. The present routine is computationally faster than the more general function “gsw_pt_from_t(SA,t,p,p_ref)” which can be used for any reference pressure value. This subroutine calls “gsw_entropy_part(SA,t,p)”, “gsw_entropy_part_zerop(SA,pt0)” and “gsw_gibbs_pt0_pt0(SA,pt0)”.

Parameters:
SAarray-like

Absolute Salinity, g/kg

tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
pt0array-like, deg C

potential temperature 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 https://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.

gsw.pt0_from_t_ice(t, p)[source]

Calculates potential temperature of ice Ih with a reference pressure of 0 dbar, from in-situ temperature, t.

Parameters:
tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
pt0_icearray-like, deg C

potential temperature of ice Ih with reference pressure 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 https://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.

gsw.pt_first_derivatives(SA, CT)[source]

Calculates the following two partial derivatives of potential temperature (the regular potential temperature whose reference sea pressure is 0 dbar) (1) pt_SA, the derivative with respect to Absolute Salinity at constant Conservative Temperature, and (2) pt_CT, the derivative with respect to Conservative Temperature at constant Absolute Salinity.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

Returns:
pt_SAarray-like, K/(g/kg)

The derivative of potential temperature with respect to Absolute Salinity at constant Conservative Temperature.

pt_CTarray-like, unitless

The derivative of potential temperature with respect to Conservative Temperature at constant Absolute Salinity. 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 https://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 https://www.teos-10.org/

gsw.pt_from_CT(SA, CT)[source]

Calculates potential temperature (with a reference sea pressure of zero dbar) from Conservative Temperature. This function uses 1.5 iterations through a modified Newton-Raphson (N-R) iterative solution procedure, starting from a rational-function-based initial condition for both pt and dCT_dpt.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

Returns:
ptarray-like, deg C

potential temperature referenced to a sea pressure 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 https://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.

gsw.pt_from_entropy(SA, entropy)[source]

Calculates potential temperature with reference pressure p_ref = 0 dbar and with entropy as an input variable.

Parameters:
SAarray-like

Absolute Salinity, g/kg

entropyarray-like

Specific entropy, J/(kg*K)

Returns:
ptarray-like, deg C

potential temperature 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 https://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.

gsw.pt_from_pot_enthalpy_ice(pot_enthalpy_ice)[source]

Calculates the potential temperature of ice from the potential enthalpy of ice. The reference sea pressure of both the potential temperature and the potential enthalpy is zero dbar.

Parameters:
pot_enthalpy_icearray-like

Potential enthalpy of ice, J/kg

Returns:
pt0_icearray-like, deg C

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 https://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.

gsw.pt_from_pot_enthalpy_ice_poly(pot_enthalpy_ice)[source]

Calculates the potential temperature of ice (whose reference sea pressure is zero dbar) from the potential enthalpy of ice. This is a compuationally efficient polynomial fit to the potential enthalpy of ice.

Parameters:
pot_enthalpy_icearray-like

Potential enthalpy of ice, J/kg

Returns:
pt0_icearray-like, deg C

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 https://www.teos-10.org/

gsw.pt_from_t(SA, t, p, p_ref)[source]

Calculates potential temperature with the general reference pressure, p_ref, from in-situ temperature, t. This function calls “gsw_entropy_part” which evaluates entropy except for the parts which are a function of Absolute Salinity alone. A faster gsw routine exists if p_ref is indeed zero dbar. This routine is “gsw_pt0_from_t(SA,t,p)”.

Parameters:
SAarray-like

Absolute Salinity, g/kg

tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

p_refarray-like

Reference pressure, dbar

Returns:
ptarray-like, deg C

potential temperature with reference pressure, p_ref, on the 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 https://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.

gsw.pt_from_t_ice(t, p, p_ref)[source]

Calculates potential temperature of ice Ih with the general reference pressure, p_ref, from in-situ temperature, t.

Parameters:
tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

p_refarray-like

Reference pressure, dbar

Returns:
pt_icearray-like, deg C

potential temperature of ice Ih with reference pressure, 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 https://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.

gsw.pt_second_derivatives(SA, CT)[source]

Calculates the following three second-order derivatives of potential temperature (the regular potential temperature which has a reference sea pressure of 0 dbar), (1) pt_SA_SA, the second derivative with respect to Absolute Salinity at constant Conservative Temperature, (2) pt_SA_CT, the derivative with respect to Conservative Temperature and Absolute Salinity, and (3) pt_CT_CT, the second derivative with respect to Conservative Temperature at constant Absolute Salinity.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

Returns:
pt_SA_SAarray-like, K/((g/kg)^2)

The second derivative of potential temperature (the regular potential temperature which has reference sea pressure of 0 dbar) with respect to Absolute Salinity at constant Conservative Temperature.

pt_SA_CTarray-like, 1/(g/kg)

The derivative of potential temperature with respect to Absolute Salinity and Conservative Temperature.

pt_CT_CTarray-like, 1/K

The second derivative of potential temperature (the regular one with p_ref = 0 dbar) with respect to 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 https://www.teos-10.org/. See Eqns. (A.12.9) and (A.12.10) of this TEOS-10 Manual.

This software is available from https://www.teos-10.org/

gsw.rho(SA, CT, p)[source]

Calculates in-situ density from Absolute Salinity and Conservative Temperature, using the computationally-efficient expression for specific volume in terms of SA, CT and p (Roquet et al., 2015).

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
rhoarray-like, kg/m^3

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 https://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.

gsw.rho_alpha_beta(SA, CT, p)[source]

Calculates in-situ density, the appropriate thermal expansion coefficient and the appropriate saline contraction coefficient of seawater from Absolute Salinity and Conservative Temperature. This function uses the computationally-efficient expression for specific volume in terms of SA, CT and p (Roquet et al., 2015).

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
rhoarray-like, kg/m^3

in-situ density

alphaarray-like, 1/K

thermal expansion coefficient with respect to Conservative Temperature

betaarray-like, kg/g

saline (i.e. haline) contraction 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 https://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.

gsw.rho_first_derivatives(SA, CT, p)[source]

Calculates the three (3) partial derivatives of in-situ density with respect to Absolute Salinity, Conservative Temperature and pressure. Note that the pressure derivative is done with respect to pressure 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).

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
rho_SAarray-like, (kg/m^3)(g/kg)^-1

partial derivative of density with respect to Absolute Salinity

rho_CTarray-like, kg/(m^3 K)

partial derivative of density with respect to Conservative Temperature

rho_Parray-like, kg/(m^3 Pa)

partial derivative of density 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 https://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.

gsw.rho_first_derivatives_wrt_enthalpy(SA, CT, p)[source]

Calculates the following two first-order derivatives of rho, (1) rho_SA_wrt_h, first-order derivative with respect to Absolute Salinity at constant h & p. (2) rho_h, first-order derivative with respect to h at constant SA & p.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
rho_SA_wrt_harray-like, ((kg/m^3)(g/kg)^-1

The first derivative of rho with respect to Absolute Salinity at constant CT & p.

rho_harray-like, (m^3/kg)(J/kg)^-1

The first derivative of rho with respect to 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 https://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 https://www.teos-10.org/

gsw.rho_ice(t, p)[source]

Calculates in-situ density of ice from in-situ temperature and pressure. Note that the output, rho_ice, is density, not density anomaly; that is, 1000 kg/m^3 is not subtracted from it.

Parameters:
tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
rho_icearray-like, kg/m^3

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 https://www.teos-10.org/

gsw.rho_second_derivatives(SA, CT, p)[source]

Calculates the following five second-order derivatives of rho, (1) rho_SA_SA, second-order derivative with respect to Absolute Salinity at constant CT & p. (2) rho_SA_CT, second-order derivative with respect to SA & CT at constant p. (3) rho_CT_CT, second-order derivative with respect to CT at constant SA & p. (4) rho_SA_P, second-order derivative with respect to SA & P at constant CT. (5) rho_CT_P, second-order derivative with respect to CT & P at constant SA.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
rho_SA_SAarray-like, (kg/m^3)(g/kg)^-2

The second-order derivative of rho with respect to Absolute Salinity at constant CT & p.

rho_SA_CTarray-like, (kg/m^3)(g/kg)^-1 K^-1

The second-order derivative of rho with respect to SA and CT at constant p.

rho_CT_CTarray-like, (kg/m^3) K^-2

The second-order derivative of rho with respect to CT at constant SA & p

rho_SA_Parray-like, (kg/m^3)(g/kg)^-1 Pa^-1

The second-order derivative with respect to SA & P at constant CT.

rho_CT_Parray-like, (kg/m^3) K^-1 Pa^-1

The second-order derivative with respect to CT & P at 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 https://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 https://www.teos-10.org/

gsw.rho_second_derivatives_wrt_enthalpy(SA, CT, p)[source]

Calculates the following three second-order derivatives of rho with respect to enthalpy, (1) rho_SA_SA, second-order derivative with respect to Absolute Salinity at constant h & p. (2) rho_SA_h, second-order derivative with respect to SA & h at constant p. (3) rho_h_h, second-order derivative with respect to h at constant SA & p.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
rho_SA_SAarray-like, (kg/m^3)(g/kg)^-2

The second-order derivative of rho with respect to Absolute Salinity at constant h & p.

rho_SA_harray-like, J/(kg K(g/kg))

The second-order derivative of rho with respect to SA and h at constant p.

rho_h_harray-like,

The second-order derivative of rho with respect to h at 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 https://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 https://www.teos-10.org/

gsw.rho_t_exact(SA, t, p)[source]

Calculates in-situ density of seawater from Absolute Salinity and in-situ temperature. Note that the output, rho, is density, not density anomaly; that is, 1000 kg/m^3 is not subtracted from it.

Parameters:
SAarray-like

Absolute Salinity, g/kg

tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
rho_t_exactarray-like, kg/m^3

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 https://www.teos-10.org/ See section 2.8 of this TEOS-10 Manual.

gsw.sa_ct_interp(SA, CT, p, p_i, axis=0)[source]

Interpolates vertical casts of values of Absolute Salinity and Conservative Temperature to the arbitrary pressures p_i.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

p_iarray-like

Sea pressure to interpolate on, dbar

axisint, optional, default is 0

The index of the pressure dimension in SA and CT.

Returns:
SA_iarray

Values of SA interpolated to p_i along the specified axis.

CT_iarray

Values of CT interpolated to p_i along the specified axis.

gsw.seaice_fraction_to_freeze_seawater(SA, CT, p, SA_seaice, t_seaice)[source]

Calculates the mass fraction of sea ice (mass of sea ice divided by mass of sea ice plus seawater), which, when melted into seawater having the properties (SA,CT,p) causes the final seawater to be at the freezing temperature. The other outputs are the Absolute Salinity and Conservative Temperature of the final seawater.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

SA_seaicearray-like

Absolute Salinity of sea ice: the mass fraction of salt in sea ice, expressed in g of salt per kg of sea ice.

t_seaicearray-like

In-situ temperature of the sea ice at pressure p (ITS-90), degrees C

Returns:
SA_freezearray-like, g/kg

Absolute Salinity of seawater after the mass fraction of sea ice, w_seaice, at temperature t_seaice has melted into the original seawater, and the final mixture is at the freezing temperature of seawater.

CT_freezearray-like, deg C

Conservative Temperature of seawater after the mass fraction, w_seaice, of sea ice at temperature t_seaice has melted into the original seawater, and the final mixture is at the freezing temperature of seawater.

w_seaicearray-like, unitless

mass fraction of sea ice, at SA_seaice and t_seaice, which, when melted into seawater at (SA,CT,p) leads to the final mixed seawater being at the freezing temperature. 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 https://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.

gsw.sigma0(SA, CT)[source]

Calculates potential density anomaly with reference pressure of 0 dbar, this being this particular potential density minus 1000 kg/m^3. This function has inputs of Absolute Salinity and Conservative Temperature. This function uses the computationally-efficient expression for specific volume in terms of SA, CT and p (Roquet et al., 2015).

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

Returns:
sigma0array-like, kg/m^3

potential density anomaly with respect to a reference pressure of 0 dbar, 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 https://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.

gsw.sigma1(SA, CT)[source]

Calculates potential density anomaly with reference pressure of 1000 dbar, this being this particular potential density minus 1000 kg/m^3. This function has inputs of Absolute Salinity and Conservative Temperature. This function uses the computationally-efficient expression for specific volume in terms of SA, CT and p (Roquet et al., 2015).

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

Returns:
sigma1array-like, kg/m^3

potential density anomaly with respect to a reference pressure of 1000 dbar, 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 https://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.

gsw.sigma2(SA, CT)[source]

Calculates potential density anomaly with reference pressure of 2000 dbar, this being this particular potential density minus 1000 kg/m^3. Temperature. This function uses the computationally-efficient expression for specific volume in terms of SA, CT and p (Roquet et al., 2015).

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

Returns:
sigma2array-like, kg/m^3

potential density anomaly with respect to a reference pressure of 2000 dbar, 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 https://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.

gsw.sigma3(SA, CT)[source]

Calculates potential density anomaly with reference pressure of 3000 dbar, this being this particular potential density minus 1000 kg/m^3. Temperature. This function uses the computationally-efficient expression for specific volume in terms of SA, CT and p (Roquet et al., 2015).

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

Returns:
sigma3array-like, kg/m^3

potential density anomaly with respect to a reference pressure of 3000 dbar, 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 https://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.

gsw.sigma4(SA, CT)[source]

Calculates potential density anomaly with reference pressure of 4000 dbar, this being this particular potential density minus 1000 kg/m^3. Temperature. This function uses the computationally-efficient expression for specific volume in terms of SA, CT and p (Roquet et al., 2015).

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

Returns:
sigma4array-like, kg/m^3

potential density anomaly with respect to a reference pressure of 4000 dbar, 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 https://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.

gsw.sound_speed(SA, CT, p)[source]

Calculates the speed of sound in seawater. This function has inputs of Absolute Salinity and Conservative Temperature. This function uses the computationally-efficient expression for specific volume in terms of SA, CT and p (Roquet et al., 2015).

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
sound_speedarray-like, m/s

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 https://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.

gsw.sound_speed_ice(t, p)[source]

Calculates the compression speed of sound in ice.

Parameters:
tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
sound_speed_icearray-like, m/s

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 https://www.teos-10.org/

gsw.sound_speed_t_exact(SA, t, p)[source]

Calculates the speed of sound in seawater.

Parameters:
SAarray-like

Absolute Salinity, g/kg

tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
sound_speed_t_exactarray-like, m/s

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 https://www.teos-10.org/ See Eqn. (2.17.1) of this TEOS-10 Manual.

gsw.specvol(SA, CT, p)[source]

Calculates specific volume from Absolute Salinity, Conservative Temperature and pressure, using the computationally-efficient 75-term polynomial expression for specific volume (Roquet et al., 2015).

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
specvolarray-like, m^3/kg

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 https://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 https://www.teos-10.org/

gsw.specvol_SSO_0(p)[source]

specific volume at (SSO,CT=0,p)

Parameters:
parray-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.

gsw.specvol_alpha_beta(SA, CT, p)[source]

Calculates specific volume, the appropriate thermal expansion coefficient and the appropriate saline contraction coefficient of seawater from Absolute Salinity and Conservative Temperature. This function uses the computationally-efficient expression for specific volume in terms of SA, CT and p (Roquet et al., 2015).

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
specvolarray-like, m/kg

specific volume

alphaarray-like, 1/K

thermal expansion coefficient with respect to Conservative Temperature

betaarray-like, kg/g

saline (i.e. haline) contraction 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 https://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.

gsw.specvol_anom_standard(SA, CT, p)[source]

Calculates specific volume anomaly from Absolute Salinity, Conservative Temperature and pressure. It uses the computationally-efficient expression for specific volume as a function of SA, CT and p (Roquet et al., 2015). The reference value to which the anomaly is calculated has an Absolute Salinity of SSO and Conservative Temperature equal to 0 degrees C.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
specvol_anomarray-like, m^3/kg

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 https://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.

gsw.specvol_first_derivatives(SA, CT, p)[source]

Calculates the following three first-order derivatives of specific volume (v), (1) v_SA, first-order derivative with respect to Absolute Salinity at constant CT & p. (2) v_CT, first-order derivative with respect to CT at constant SA & p. (3) v_P, first-order derivative with respect to P at constant SA and CT.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
v_SAarray-like, (m^3/kg)(g/kg)^-1

The first derivative of specific volume with respect to Absolute Salinity at constant CT & p.

v_CTarray-like, m^3/(K kg)

The first derivative of specific volume with respect to CT at constant SA and p.

v_Parray-like, m^3/(Pa kg)

The first derivative of specific volume with respect to 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 https://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 https://www.teos-10.org/

gsw.specvol_first_derivatives_wrt_enthalpy(SA, CT, p)[source]

Calculates the following two first-order derivatives of specific volume (v), (1) v_SA_wrt_h, first-order derivative with respect to Absolute Salinity at constant h & p. (2) v_h, first-order derivative with respect to h at constant SA & p.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
v_SA_wrt_harray-like, (m^3/kg)(g/kg)^-1

The first derivative of specific volume with respect to Absolute Salinity at constant CT & p.

v_harray-like, (m^3/kg)(J/kg)^-1

The first derivative of specific volume with respect to 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 https://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 https://www.teos-10.org/

gsw.specvol_ice(t, p)[source]

Calculates the specific volume of ice.

Parameters:
tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
specvol_icearray-like, m^3/kg

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 https://www.teos-10.org/

gsw.specvol_second_derivatives(SA, CT, p)[source]

Calculates the following five second-order derivatives of specific volume (v), (1) v_SA_SA, second-order derivative with respect to Absolute Salinity at constant CT & p. (2) v_SA_CT, second-order derivative with respect to SA & CT at constant p. (3) v_CT_CT, second-order derivative with respect to CT at constant SA and p. (4) v_SA_P, second-order derivative with respect to SA & P at constant CT. (5) v_CT_P, second-order derivative with respect to CT & P at constant SA.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
v_SA_SAarray-like, (m^3/kg)(g/kg)^-2

The second derivative of specific volume with respect to Absolute Salinity at constant CT & p.

v_SA_CTarray-like, (m^3/kg)(g/kg)^-1 K^-1

The second derivative of specific volume with respect to SA and CT at constant p.

v_CT_CTarray-like, (m^3/kg) K^-2)

The second derivative of specific volume with respect to CT at constant SA and p.

v_SA_Parray-like, (m^3/kg)(g/kg)^-1 Pa^-1

The second derivative of specific volume with respect to SA and P at constant CT.

v_CT_Parray-like, (m^3/kg) K^-1 Pa^-1

The second derivative of specific volume with respect to 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 https://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 https://www.teos-10.org/

gsw.specvol_second_derivatives_wrt_enthalpy(SA, CT, p)[source]

Calculates the following three first-order derivatives of specific volume (v) with respect to enthalpy, (1) v_SA_SA_wrt_h, second-order derivative with respect to Absolute Salinity at constant h & p. (2) v_SA_h, second-order derivative with respect to SA & h at constant p. (3) v_h_h, second-order derivative with respect to h at constant SA & p.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
v_SA_SA_wrt_harray-like, (m^3/kg)(g/kg)^-2

The second-order derivative of specific volume with respect to Absolute Salinity at constant h & p.

v_SA_harray-like, (m^3/kg)(g/kg)^-1 (J/kg)^-1

The second-order derivative of specific volume with respect to SA and h at constant p.

v_h_harray-like, (m^3/kg)(J/kg)^-2

The second-order derivative with respect to h at 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 https://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 https://www.teos-10.org/

gsw.specvol_t_exact(SA, t, p)[source]

Calculates the specific volume of seawater.

Parameters:
SAarray-like

Absolute Salinity, g/kg

tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
specvol_t_exactarray-like, m^3/kg

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 https://www.teos-10.org/ See section 2.7 of this TEOS-10 Manual.

gsw.spiciness0(SA, CT)[source]

Calculates spiciness from Absolute Salinity and Conservative Temperature at a pressure of 0 dbar, as described by McDougall and Krzysik (2015). This routine is based on the computationally-efficient expression for specific volume in terms of SA, CT and p (Roquet et al., 2015).

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

Returns:
spiciness0array-like, kg/m^3

spiciness referenced to a pressure of 0 dbar, 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 https://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.

gsw.spiciness1(SA, CT)[source]

Calculates spiciness from Absolute Salinity and Conservative Temperature at a pressure of 1000 dbar, as described by McDougall and Krzysik (2015). This routine is based on the computationally-efficient expression for specific volume in terms of SA, CT and p (Roquet et al., 2015).

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

Returns:
spiciness1array-like, kg/m^3

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 https://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.

gsw.spiciness2(SA, CT)[source]

Calculates spiciness from Absolute Salinity and Conservative Temperature at a pressure of 2000 dbar, as described by McDougall and Krzysik (2015). This routine is based on the computationally-efficient expression for specific volume in terms of SA, CT and p (Roquet et al., 2015).

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

Returns:
spiciness2array-like, kg/m^3

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 https://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.

gsw.t90_from_t68(t68)[source]

ITS-90 temperature from IPTS-68 temperature

This conversion should be applied to all in-situ data collected between 1/1/1968 and 31/12/1989.

gsw.t_deriv_chem_potential_water_t_exact(SA, t, p)[source]

Calculates the temperature derivative of the chemical potential of water in seawater so that it is valid at exactly SA = 0.

Parameters:
SAarray-like

Absolute Salinity, g/kg

tarray-like

In-situ temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
chem_potential_water_dtarray-like, J g^-1 K^-1

temperature derivative of the 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 https://www.teos-10.org/

gsw.t_freezing(SA, p, saturation_fraction)[source]

Calculates the in-situ temperature at which seawater freezes. The in-situ temperature freezing point is calculated from the exact in-situ freezing temperature which is found by a modified Newton-Raphson iteration (McDougall and Wotherspoon, 2013) of the equality of the chemical potentials of water in seawater and in ice.

Parameters:
SAarray-like

Absolute Salinity, g/kg

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

saturation_fractionarray-like

Saturation fraction of dissolved air in seawater. (0..1)

Returns:
t_freezingarray-like, deg C

in-situ temperature at which seawater freezes. (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 https://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.

gsw.t_freezing_first_derivatives(SA, p, saturation_fraction)[source]

Calculates the first derivatives of the in-situ temperature at which seawater freezes with respect to Absolute Salinity SA and pressure P (in Pa). These expressions come from differentiating the expression that defines the freezing temperature, namely the equality between the chemical potentials of water in seawater and in ice.

Parameters:
SAarray-like

Absolute Salinity, g/kg

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

saturation_fractionarray-like

Saturation fraction of dissolved air in seawater. (0..1)

Returns:
tfreezing_SAarray-like, K kg/g

the derivative of the in-situ freezing temperature (ITS-90) with respect to Absolute Salinity at fixed pressure [ K/(g/kg) ] i.e.

tfreezing_Parray-like, K/Pa

the derivative of the in-situ freezing temperature (ITS-90) with respect to pressure (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 https://www.teos-10.org/.

gsw.t_freezing_first_derivatives_poly(SA, p, saturation_fraction)[source]

Calculates the first derivatives of the in-situ temperature at which seawater freezes with respect to Absolute Salinity SA and pressure P (in Pa). These expressions come from differentiating the expression that defines the freezing temperature, namely the equality between the chemical potentials of water in seawater and in ice.

Parameters:
SAarray-like

Absolute Salinity, g/kg

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

saturation_fractionarray-like

Saturation fraction of dissolved air in seawater. (0..1)

Returns:
tfreezing_SAarray-like, K kg/g

the derivative of the in-situ freezing temperature (ITS-90) with respect to Absolute Salinity at fixed pressure [ K/(g/kg) ] i.e.

tfreezing_Parray-like, K/Pa

the derivative of the in-situ freezing temperature (ITS-90) with respect to pressure (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 https://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.

gsw.t_freezing_poly(SA, p, saturation_fraction)[source]

Calculates the in-situ temperature at which seawater freezes from a comptationally efficient polynomial.

Parameters:
SAarray-like

Absolute Salinity, g/kg

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

saturation_fractionarray-like

Saturation fraction of dissolved air in seawater. (0..1)

Returns:
t_freezingarray-like, deg C

in-situ temperature at which seawater freezes. (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 https://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.

gsw.t_from_CT(SA, CT, p)[source]

Calculates in-situ temperature from the Conservative Temperature of seawater.

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
tarray-like, deg C

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 https://www.teos-10.org/ See sections 3.1 and 3.3 of this TEOS-10 Manual.

gsw.t_from_pt0_ice(pt0_ice, p)[source]

Calculates in-situ temperature from the potential temperature of ice Ih with reference pressure, p_ref, of 0 dbar (the surface), and the in-situ pressure.

Parameters:
pt0_icearray-like

Potential temperature of ice (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
tarray-like, deg C

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 https://www.teos-10.org/ See appendix I of this TEOS-10 Manual.

gsw.thermobaric(SA, CT, p)[source]

Calculates the thermobaric coefficient of seawater with respect to Conservative Temperature. This routine is based on the computationally-efficient expression for specific volume in terms of SA, CT and p (Roquet et al., 2015).

Parameters:
SAarray-like

Absolute Salinity, g/kg

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

Returns:
thermobaricarray-like, 1/(K Pa)

thermobaric coefficient 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 https://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.

gsw.tracer_ct_interp(tracer, CT, p, p_i, factor=9.0, axis=0)[source]

Interpolates vertical casts of values of a tracer and Conservative Temperature to the arbitrary pressures p_i.

Parameters:
tracerarray-like

tracer

CTarray-like

Conservative Temperature (ITS-90), degrees C

parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

p_iarray-like

Sea pressure to interpolate on, dbar

factor: float, optional, default is 9.

Ratio between the ranges of Conservative Temperature and tracer in the world ocean.

axisint, optional, default is 0

The index of the pressure dimension in tracer and CT.

Returns:
tracer_iarray

Values of tracer interpolated to p_i along the specified axis.

CT_iarray

Values of CT interpolated to p_i along the specified axis.

gsw.z_from_p(p, lat, geo_strf_dyn_height=0, sea_surface_geopotential=0)[source]

Calculates height from sea pressure using the computationally-efficient 75-term expression for specific volume in terms of SA, CT and p (Roquet et al., 2015). Dynamic height anomaly, geo_strf_dyn_height, if provided, must be computed with its p_ref = 0 (the surface). Also if provided, sea_surface_geopotental is the geopotential at zero sea pressure. This function solves Eqn.(3.32.3) of IOC et al. (2010).

Parameters:
parray-like

Sea pressure (absolute pressure minus 10.1325 dbar), dbar

latarray-like

Latitude, -90 to 90 degrees

geo_strf_dyn_heightarray-like
dynamic height anomaly, m^2/s^2

Note that the reference pressure, p_ref, of geo_strf_dyn_height must be zero (0) dbar.

sea_surface_geopotentialarray-like

geopotential at zero sea pressure, m^2/s^2

Returns:
zarray-like, m

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 https://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 https://www.teos-10.org/