GSW is a Python implementation of the Thermodynamic Equation of Seawater (TEOS-10) for oceanographic computations. Current version 3.6.21, requires Python >=3.11. It provides over 200 functions for oceanographic variables, including density, salinity, sound speed, potential temperature, etc. Release cadence is sporadic, following updates to the TEOS-10 algorithms.
pip install gswNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Compute absolute salinity and conservative temperature from practical salinity and pressure.
Convert inputs to numpy arrays (e.g., np.array([...])).
Upgrade Python to 3.11+ or install gsw==2.x with pip install 'gsw<3'.
Check the documentation for the exact function name; the old names are still available but may be removed in future.
Convert Pa to dbar by dividing by 10000.
Run 'pip install gsw' in the correct environment.
Ensure all inputs are numeric numpy arrays: e.g., SP = np.array([34, 35], dtype=float).
Check data; pressure must be >=0 dbar. For surface pressure use 0.