freshwater package¶
Submodules¶
freshwater.constants module¶
-
class
freshwater.constants.
Constants
¶ Bases:
object
Constants from Chen and Millero (1986).
freshwater.eos module¶
-
class
freshwater.eos.
Eos
(t, s=0, p=0)¶ Bases:
object
Equation of state for freshwater from Chen and Millero (1986).
-
t
¶ temperature (\(\mathrm{^{\circ} C}\))
- Type
array_like
-
s
¶ salinity (g/kg) grams of dissolved salt in 1 kg of lake water
- Type
array_like
-
p
¶ pressure (bar) applied pressure
- Type
array_like
-
rho
¶ density of lake water (\(\mathrm{kg \, m^{-3}}\))
- Type
array_like
-
alpha
¶ Coefficient of thermal expansion \(\mathrm{(^{\circ} C)^{-1}}\)
- Type
array_like
-
tmd
¶ Temperature of maximum density (\(\mathrm{^{\circ} C}\))
- Type
array_like
-
u
¶ Speed of sound (\(\mathrm{m \, s^{-1}}\))
- Type
array_like
-
cp
¶ Specific heat capacity (\(\mathrm{J \, kg^{-1} \, ^{\circ} C^{-1}}\))
- Type
array_like
-
tf
¶ Freezing point of lake water (\(\mathrm{^{\circ} C}\))
- Type
array_like
References
- 1
Chen, C. T. A., & Millero, F. J. (1986). Thermodynamic properties for natural waters covering only the limnological range 1. Limnology and Oceanography, 31(3), 657-662.
Examples
Import the class Eos (Equation of state) from the freshwater module
>>> from freshwater.eos import Eos
Compute properties of lake water with a temperature of 10 deg C, a salinity of 0.5 g/kg and a pressure of 0 bar (gauge pressure).
>>> e = Eos(t=10, s=0.5, p=0) >>> e.rho 1000.091963 >>> e.alpha 8.9433231e-05 >>> e.tmd 3.87295
-
-
freshwater.eos.
polyval_r
(p, x)¶ Identical to numpy.polyval except p is an array of coefficients of increasing order instead of decreasing order.