Gibbs Seawater Oceanographic Package of TEOS-10
Project description
gsw Python package
This Python implementation of the Thermodynamic Equation of Seawater 2010 (TEOS-10) is based primarily on numpy ufunc wrappers of the GSW-C implementation. We expect it to replace the original python-gsw pure-python implementation after a brief overlap period. The primary reasons for this change are that by building on the C implementation we reduce code duplication and we gain an immediate update to the 75-term equation. Additional benefits include a major increase in speed, a reduction in memory usage, and the inclusion of more functions. The penalty is that a C (or MSVC C++ for Windows) compiler is required to build the package from source.
Warning: this is for Python >=3.5 only.
Documentation is provided at https://teos-10.github.io/GSW-Python/.
For the core functionality, we use an auto-generated C extension
module to wrap the C functions as numpy
ufuncs,
and then use an
autogenerated Python module to add docstrings and handle masked
arrays. 165 scalar C functions with only double-precision
arguments and return values are wrapped as ufuncs, and 158 of
these are exposed in the gsw
namespace with an additional
wrapper in Python.
A hand-written wrapper is used for one C function, and others are re-implemented directly in Python instead of being wrapped. Additional functions present in GSW-Matlab but not in GSW-C may be re-implemented in Python, but there is no expectation that all such functions will be provided.
The package can be installed from a clone of the repo using
pip install .
. It is neither necessary nor recommended
to run the code generators, and no instructions are provided
for them; their output is
included in the repo. You will need a suitable compiler: gcc or
clang for unix-like systems, or the MSVC compiler set used for Python
itself on Windows. For Windows, some of the source code has been
modified to C++ because the MSVC C compiler does not support the
C99 complex data type used in original GSW-C.
To test, after installation, run "pytest" from the source directory.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for gsw-3.4.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b50e93478a9eec3d364603267a37a4b2bab132cd20c7b544b706038aa5e3ec7 |
|
MD5 | fd37ca333574ba1d5d1765950311161e |
|
BLAKE2b-256 | 35a2483112a6dcaa92fd3c7aa536790d4ecf9e293e3cc446f4558dfe5bffdbf1 |
Hashes for gsw-3.4.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e61c5994986dc1feb49b520a6944d7d6a003144e8763f7cbd41767848025c56a |
|
MD5 | 57fdf8bd92d0f3becfe3e6673871026f |
|
BLAKE2b-256 | a97724b6467898fe139db116a5c04ce7ce0a5d23fc75d0b36a96c328989039e5 |
Hashes for gsw-3.4.0-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2eb37d9be37412189d086ee4022de79ad8c9df471c13a9b3db2e4c69597f399 |
|
MD5 | 65eb1e44a54231ba01329b355e2f4ab4 |
|
BLAKE2b-256 | e784f2b79efe9ed0d983e2bec3eca02e30e32cfd93e2674874a1510b949e106a |
Hashes for gsw-3.4.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be2bf10ba8d603617d3422df7f3b92aa2c8bd7ceed11defcb1ec69f5eed8f846 |
|
MD5 | 0229fe7a7493023f6dee4c5a58d81597 |
|
BLAKE2b-256 | 1652cc4b3fce38335d372818815a57e7c9f13ec1284fba99569eebdb2a7fc513 |
Hashes for gsw-3.4.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 291e87f04c7c22e9f667c982666bf7c146304f55f836406d978cf080a731abcd |
|
MD5 | 0bbda79a721bc7af91f0d1485996a6b7 |
|
BLAKE2b-256 | 7233c3ec417e4cd1cc7f8039ce75f92f67010cca7f46a505906e32be2b33f008 |
Hashes for gsw-3.4.0-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0731de8be614a0d84bc0c828e8f2cab7e0af8c04f7314ff03105c615946d5a6 |
|
MD5 | 1e9f7516ee5cdb7190dbde765a916395 |
|
BLAKE2b-256 | c64fd1a2a84af7af71dcff614b67ae39b14dc299b0dd316d5f6fbdfaac1f6063 |
Hashes for gsw-3.4.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f3c23a37b5d9cb4e1da297bef6a02e1401636c470de3ba33701aa7dc3ecda11 |
|
MD5 | 8c4e56b1f8bb979d4726905651786fca |
|
BLAKE2b-256 | 525dcdc2921ca8c898e23819dd8589043f93964b77c106a896aab26863768828 |
Hashes for gsw-3.4.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f854e8cd6b25f0d4ada2f432c232d484d116d13f4a0ad1c54dc335ef2bcdfc8 |
|
MD5 | 88b131f3fa72c2a7142eb21cd61d3123 |
|
BLAKE2b-256 | 072db8a6d45211dac9cdb5019af825af532b9dde001eb9feec99f14147ce00b7 |
Hashes for gsw-3.4.0-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c355bab42a4c2a8b3041c4b35fca371375ebddc0e48cbce6b1322e95451be0a7 |
|
MD5 | 18168733737cae2176f628e1bae02e4d |
|
BLAKE2b-256 | 9018075de7929e044a16b382b131809ef9514e75ca520d0b8c021d67b033117c |