Skip to main content

Python module for estimating thermodynamic properties of water in freshwater lakes.

Project description

Compute thermodynamic properties of lake water

travis-ci build status

The freshwater toolbox is a python package for estimating thermodynamic properties of water in freshwater bodies. Given temperature, salinity, and pressure, the freshwater toolbox enables the user to estimate the density, thermal expansion coefficient, specific heat capacity, speed of sound, temperature of maximum density, and freezing point of a parcel of lake water. The equation of state described in Chen and Millero (1986) [1] is implemented, which is suited for lake waters over the range of temperature, salinity, and pressure of 0–30 °C, 0–0.6 g/kg, and 0–180 bar, respectively.


The easiest way to install the freshwater toolbox is using pip:

pip install freshwater

You can also clone the source code from the github repository and install it with the following commands:

git clone
cd freshwater/
pip install .

Quick Start

Say you have a sample of lake water with temperature 10 °C, salinity 0.5 g/kg, and pressure 0 bar, and you would like to compute its density 𝜌 and thermal expansion coefficient 𝛼. This can be done with the following commands.

First, import the equation of state (Eos) class:

>>> from freshwater.eos import Eos

Second, Eos takes arguments of temperature, salinity and pressure:

>>> e = Eos(t=10, s=0.5, p=0)
>>> e.rho
>>> e.alpha

Please consult the online documentation for more details.

[1]Chen, C. T. A., & Millero, F. J. (1986). Thermodynamic properties for natural waters covering only the limnological range. Limnology and Oceanography, 31(3), 657-662. doi

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

freshwater-0.1.5.tar.gz (4.8 kB view hashes)

Uploaded source

Built Distribution

freshwater-0.1.5-py3-none-any.whl (5.9 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page