Skip to main content

Gibbs Seawater Oceanographic Package of TEOS-10

Project description

GSW-Python

Tests Wheels DOI

This Python implementation of the Thermodynamic Equation of Seawater 2010 (TEOS-10) is based primarily on numpy ufunc wrappers of the GSW-C implementation. This library replaces the original python-gsw pure-python implementation.. 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.8 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.

Installation

Pip users can install the pre-built wheels with:

pip install gsw

conda users will find binaries on conda-forge,

conda install gsw --channel conda-forge

The development version of 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.

Note for xarray users

A wrapper around gsw called gsw-xarray exists for xarray. It adds CF compliant attributes when possible, units, and name.

Note on generating the docstrings

The autogenerated docstrings are checked with codespell in the CIs. when autogenerating them we need to run pre-commit run --all-files and fix the documentation issues found.

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

gsw-3.6.17.tar.gz (2.7 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

gsw-3.6.17-cp311-cp311-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.11Windows x86-64

gsw-3.6.17-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

gsw-3.6.17-cp311-cp311-macosx_11_0_arm64.whl (2.2 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

gsw-3.6.17-cp311-cp311-macosx_10_9_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

gsw-3.6.17-cp310-cp310-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.10Windows x86-64

gsw-3.6.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

gsw-3.6.17-cp310-cp310-macosx_11_0_arm64.whl (2.2 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

gsw-3.6.17-cp310-cp310-macosx_10_9_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

gsw-3.6.17-cp39-cp39-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.9Windows x86-64

gsw-3.6.17-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

gsw-3.6.17-cp39-cp39-macosx_11_0_arm64.whl (2.2 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

gsw-3.6.17-cp39-cp39-macosx_10_9_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

gsw-3.6.17-cp38-cp38-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.8Windows x86-64

gsw-3.6.17-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

gsw-3.6.17-cp38-cp38-macosx_11_0_arm64.whl (2.2 MB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

gsw-3.6.17-cp38-cp38-macosx_10_9_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

File details

Details for the file gsw-3.6.17.tar.gz.

File metadata

  • Download URL: gsw-3.6.17.tar.gz
  • Upload date:
  • Size: 2.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for gsw-3.6.17.tar.gz
Algorithm Hash digest
SHA256 e13979e1ba29fd41f63c8a3cbb1c47fe50b602d8ce9357b4008b0c2f6e76c665
MD5 06f963c12d8ca39e714a0c0364c0d2b9
BLAKE2b-256 002411db47cfc7027cd94f66ab17792d2be4f8d1bcb641fb92fd9fa09cc90ba9

See more details on using hashes here.

File details

Details for the file gsw-3.6.17-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: gsw-3.6.17-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 2.1 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for gsw-3.6.17-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 75e66329b41b7fc3ad378659ef3798bb73b65595d8f8456d2edebe29dfce1968
MD5 10b8da3c41f385e5fb2f57920795c75a
BLAKE2b-256 f32ee075552387ace9bb5885a09017be845c803056634f13810af988b9ee502d

See more details on using hashes here.

File details

Details for the file gsw-3.6.17-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gsw-3.6.17-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 faf6ea429cce6f7e3b501d7f6e1526e6a08306c23dfdf8509950d4cf611feef8
MD5 fd72323f0dc29973e8701d0b28c0071c
BLAKE2b-256 875e01e5a4b04a65bfbc0feff2f40f6911c6f86f5a51a94b88be52390f589d20

See more details on using hashes here.

File details

Details for the file gsw-3.6.17-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gsw-3.6.17-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4e5826999be3a40969ebf87bb26055a7da0de06f76997d6b168f0c6c86fa06b0
MD5 01792edbc5d252eefd53042c5ce513eb
BLAKE2b-256 dd9a18b0558d4054689086013949a6301e1e6407a5060b93c1f2177bfa1aafd6

See more details on using hashes here.

File details

Details for the file gsw-3.6.17-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for gsw-3.6.17-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 27282d29b3d177d3a587cf744ce6b6e0e305ad420c8bab9c790e2d45bd4787d0
MD5 5084a49b8770bc4c75f796933f9a7c35
BLAKE2b-256 034531b1958d0b7324401a8e4c563ad80710335e88bfcfd7d08d1ae8c2498a01

See more details on using hashes here.

File details

Details for the file gsw-3.6.17-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: gsw-3.6.17-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 2.1 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for gsw-3.6.17-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1a468bcba0d3d7cff2471e06a803cb44e11302647e4e87243f1b2b27a5bbc943
MD5 dcc58e1a602e3f9cb88c02051e98062e
BLAKE2b-256 4bb2db34264b13a2ee74501e8fe8ab89e8a5c96e83dd15a1b0b0f052c9d3dfba

See more details on using hashes here.

File details

Details for the file gsw-3.6.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gsw-3.6.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 04f8bdf2516e67830ea52b9581cb2fe89a75d92f6a82c5d64b69aeb64e5c7aa9
MD5 ab025dfecf34a653dd61aa601a4bb006
BLAKE2b-256 48c08cfc352c85903624ac74e2fae24041a2cfcd2950d18c0b44a237aef380d8

See more details on using hashes here.

File details

Details for the file gsw-3.6.17-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gsw-3.6.17-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fdbf4c6d4417e23097fb3970b293d22f14317f126577c0bd0da3c5219b16fef8
MD5 bb571e0a423b7e3ee5abf6ebf241689b
BLAKE2b-256 298958f3a4a49aebfdabc05bc13a9b0fe76b8237e52b75dc4ad89894d77e8bc8

See more details on using hashes here.

File details

Details for the file gsw-3.6.17-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for gsw-3.6.17-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9eaa6138daf77253c6ed52249fdb964b720d048b883880328bec75d9b1aae867
MD5 6ccac0bc15625104a8b996d5dbe62754
BLAKE2b-256 5586fc8efc7c224ab120cb146a9cdcc7817e0a2929f2f9b014b25d64c07b402b

See more details on using hashes here.

File details

Details for the file gsw-3.6.17-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: gsw-3.6.17-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 2.1 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for gsw-3.6.17-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e79dbec217f5aadd4a3ea7e68f67dafd4ca9be78f2bc2b79ab5a0ecd87f26e8f
MD5 7adc720d30be082c6aeff44e18f27161
BLAKE2b-256 fe5a447a69b8fa786ebdfae486c7ede342fb41f9c6f085ff6b68147f1cb1915f

See more details on using hashes here.

File details

Details for the file gsw-3.6.17-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gsw-3.6.17-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e253fc83d8d41db63b89e3c350c1e6bb03bc69b6fdc7f45312e7a3e36704cfda
MD5 e74dd58f3533c14fc3c20cbfda20802d
BLAKE2b-256 4ab5c4bf644245b98635ff58ae3b2848f449088b1b39e14c9ad4055becae759d

See more details on using hashes here.

File details

Details for the file gsw-3.6.17-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

  • Download URL: gsw-3.6.17-cp39-cp39-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: CPython 3.9, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for gsw-3.6.17-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2449c90ff30a89620903720d8f3ad9065d876ee723003acd28183630f5495e1c
MD5 b529202a753d470dd9047b4f425ce9db
BLAKE2b-256 9b8727d6228f52194343a3ddcaa2b13d1cced18484cbe31bb3e037a59c46913f

See more details on using hashes here.

File details

Details for the file gsw-3.6.17-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: gsw-3.6.17-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: CPython 3.9, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for gsw-3.6.17-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3ffa5e0ff02e4c40fe4f7e0eb58294bfc1b26123cb109931f54397a62ba8db7a
MD5 1435ec4049632196e71d38eb0eaf5095
BLAKE2b-256 0c668a65bd1a3f6ae9d8f67d74b466aab019ed7e824eb925b4eed489768ee4b1

See more details on using hashes here.

File details

Details for the file gsw-3.6.17-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: gsw-3.6.17-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 2.1 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for gsw-3.6.17-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 fdece9cc8abcca238c15050a4172234a376b02e48cd1014ad7f9c04da3b92f86
MD5 1805c3a7113307cb396bed4fa5b3aac3
BLAKE2b-256 11b2cc15b2d20daca09716c0cab6cf47c4aef1bebad377a7ad2d7afd70a47fb9

See more details on using hashes here.

File details

Details for the file gsw-3.6.17-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gsw-3.6.17-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e95b493485edb55c5723024575289f2739b26f7cceda232264f158191a0726bf
MD5 e86a7c5d9f4feeef73e24ad439e25133
BLAKE2b-256 b8bf9f1e9656e3a474c7eb89d1ca12c01650de0e0a48d52ce7aebbb8dcfa2925

See more details on using hashes here.

File details

Details for the file gsw-3.6.17-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

  • Download URL: gsw-3.6.17-cp38-cp38-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: CPython 3.8, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for gsw-3.6.17-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 20ed2b9ceb7f640734f03c62f81bcd2a244f4649583a79dfd4a069221f0987eb
MD5 81fa7b87b804aa60e055813b298ae387
BLAKE2b-256 9cabbe0b0bf9bffcb96851b960a00ec051708b005f11e4fc3265ccdb280c18a0

See more details on using hashes here.

File details

Details for the file gsw-3.6.17-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: gsw-3.6.17-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for gsw-3.6.17-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 da126b58f69ab9d318d59b4c012c717691174064fc72dc91e56cea2ba9657110
MD5 22bc7fd26caadbcb15b2db70b32652bd
BLAKE2b-256 2d7110d4b25b382a162ca95e44d4393df21438461e4752a63e225a0e874a9b9e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page