The Gibbs-Seawater (GSW) Oceanographic Toolbox contains the TEOS-10 subroutines for evaluating the thermodynamic properties of pure water (using IAPWS-09) and seawater (using IAPWS-08 for the saline part).
Notable differences between TEOS-10 and EOS-80 are:
1. Absolute Salinity S_A is used to describe the salinity of seawater. S_A incorporates the spatially varying composition of seawater. 2. Conservative Temperature replaces potential temperature. 3. TEOS-10 thermodynamic quantities are mutually consistent with each other.
The GSW toolbox (www.TEOS-10.org) is currently distributed in Fortran (version 1 and 3) and MATLAB (versions 2 and 3). While Fortran has open source compilers, Fortran is not a language recommend as an analysis tool. MATLAB on the other hand is a "scripting" language, making it a better choice as an analysis tool. However, one must acquire a license and deal with a closed source solution.
Following the idea that an important algorithm, such as the TEOS-10, should have the flexibility of a scripting language, and an open source alternative, we decided to convert the GSW toolbox to Python.
Python is an elegant and robust programming language that combines the power and flexibility of traditional compiled languages with the ease-of-use of simpler scripting and interpreted languages. Also, when Python is augmented by SciPy, NumPy, SymPy, and matplotlib, it offers an environment for numerical/scientific computing equivalent to (or better than?) commercial products like MATLAB, IDL, Maple, etc. The use of python based analysis tools in physical oceanography is gaining momentum.
The Python version of TEOS-10 is compatible with the official MATLAB version, allowing an easy transition for new users and a seamless use of the original documentation between the different implementations. Although, we allowed ourselves to drift from the original code to implement some improvements, like a cleaner and more intuitive function to calculate Absolute Salinity, and a decorator providing a consistent interface to the functions for scalars, and ordinary and masked NumPy arrays, both written by Eric Firing.
We opted for an open developing model, with a code repository at Google Project Hosting, (version controlled via mercurial), and a strong testing suite. This model makes collaboration, bug fixing and feedback between users and developers much easier and transparent. The latest source can be acquired at:
while the stable version can be obtained via the Python Package Index PyPI:
The Python version of the GSW toolbox is still under development and some routines are still being implemented.