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.

Citation

If you use GSW-Python, please cite: McDougall, T.J. and P.M. Barker, 2011: Getting started with TEOS-10 and the Gibbs Seawater (GSW) Oceanographic Toolbox, 28pp., SCOR/IAPSO WG127, ISBN 978-0-646-55621-5

@book{mcdougall2011getting,
  author = {McDougall, T. J. and Barker, P. M.},
  title = {Getting started with TEOS-10 and the Gibbs Seawater (GSW) Oceanographic Toolbox},
  year = {2011},
  pages = {28},
  publisher = {SCOR/IAPSO WG127},
  isbn = {978-0-646-55621-5}
}

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.9+ x86-64

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

Uploaded CPython 3.11Windows x86-64

gsw-3.6.17.post1-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.post1-cp311-cp311-macosx_11_0_arm64.whl (2.2 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

gsw-3.6.17.post1-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.post1-cp310-cp310-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.10Windows x86-64

gsw-3.6.17.post1-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.post1-cp310-cp310-macosx_11_0_arm64.whl (2.2 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

gsw-3.6.17.post1-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.post1-cp39-cp39-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.9Windows x86-64

gsw-3.6.17.post1-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.post1-cp39-cp39-macosx_11_0_arm64.whl (2.2 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

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

Uploaded CPython 3.9macOS 10.9+ x86-64

File details

Details for the file gsw-3.6.17.post1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: gsw-3.6.17.post1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 2.1 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for gsw-3.6.17.post1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e88163153a657307f6f095f55b9881419bbfe93f17a33b917ce65d48e79d5f5f
MD5 3306dafa37f1a2672d35e2501b0d8265
BLAKE2b-256 594d33291432d5de4492f1d4bcf919762c6646e53d3edf4e9d5b89f305287e5d

See more details on using hashes here.

File details

Details for the file gsw-3.6.17.post1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gsw-3.6.17.post1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7382ca718b9dd54097a8af42cc6b5cbb53764165b6f61902f7d854dd357d798d
MD5 248034d9faee2cc3151c8a9c1ebd71a7
BLAKE2b-256 3e2ee5df13a8c22bacf53481c74f81cc56b52fb84df556214123806a2ecc1991

See more details on using hashes here.

File details

Details for the file gsw-3.6.17.post1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gsw-3.6.17.post1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 450f0d5a8a7a10f0d70018f5abbdb79db17c5a3dd0797fe651de4cb27e3434a5
MD5 3a054421df1668cc4f36d1697d62c358
BLAKE2b-256 171f0ce284b39fa2f8f364bc704dc45c1c0cddc422484cf3f5364a9b9377fc84

See more details on using hashes here.

File details

Details for the file gsw-3.6.17.post1-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for gsw-3.6.17.post1-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4a485a04f9bff9ecba9edca3f97e4ae0909f62434c4dca0d1b8a7af8ae61734f
MD5 4d67abca307a9703237e6233ccec45b2
BLAKE2b-256 6fb4eb7bb3bab36bfda860e30bc539f5863ca59715d218632bef073138594925

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gsw-3.6.17.post1-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/5.0.0 CPython/3.12.3

File hashes

Hashes for gsw-3.6.17.post1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5cf096d0cf4a6f82a374ea4435a85e980a6698e6ef9ff433991f123b90b2038a
MD5 ce1edcf4d1426ed21d954ab0489cb322
BLAKE2b-256 41a2642636dbe0b78aba87832b7d5176323090850c22932a6050e817ac2152a0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gsw-3.6.17.post1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 18bcc50384f1a7c855f1a43117d1345605962a7355bacd339e383816dcaafbeb
MD5 847285c0156a6104c6fce679569efe34
BLAKE2b-256 d844c482621dab46f933f745787b984811b061f0c2fd4c95aaebf07d6e9ec71c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gsw-3.6.17.post1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f04179ee4dcf3293a2d3c7b33ce77195c107ea6aadb2267190bfb1538b05ef05
MD5 b51841aa6ab2c3f42ae51800b19435b3
BLAKE2b-256 68dd10962596e6301401902c44138ec140ad2d40839a276df96b348bcd43d8d3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gsw-3.6.17.post1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5e064bba5093c836bb706e29f9e0f7c2cdb96a2da2cd59d0c93236ec9e8ece15
MD5 eb51826c31875729eae624fbcda2b6e3
BLAKE2b-256 e7681546aa950f4e01279110f338cbf7cce638e9a0280153d6ee22dee0d4842c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gsw-3.6.17.post1-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/5.0.0 CPython/3.12.3

File hashes

Hashes for gsw-3.6.17.post1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b9b4033b68052cd9b74546ed74cdcfba224b384a2916381326eea7ca8bf8d276
MD5 1ac0cda6ff9d93c9434158b57a763ec5
BLAKE2b-256 d2b441fe6a3bab373307d18f7e357d3fa83f6902e5b8637449174f806939ba5c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gsw-3.6.17.post1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cea1f32fbb56204604e65d9b74b05ed74a94dc2683bf0f0fbb5d2e3cbb4291b5
MD5 d8abed1f47b5b94273c95c5cbd852ce9
BLAKE2b-256 f1d1f015ed5166f766ba264f026096aecde39f33d7612894682ceeb4a22b6a92

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gsw-3.6.17.post1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5e9fda21cfeb44fd02d0295a3533c7a8ce3704a7afbe4586f2fe04a23e74da85
MD5 709c5f1bbcef9df58b5029c9e685b6d4
BLAKE2b-256 a5adb4e196390234ed513b1f4fd4b11e69fef9e3952903e029304c32b38e3fe6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gsw-3.6.17.post1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9bce3c7afc631628d827791050f0e56e3ae3db348a20854fb030abc87c0a042e
MD5 36f0a18d6633af538097b6e566bc91e1
BLAKE2b-256 d3007bd554e4d57967b14107908dd6e8b3b9811875732e5f29a3cc6e4c7d2a34

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gsw-3.6.17.post1-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/5.0.0 CPython/3.12.3

File hashes

Hashes for gsw-3.6.17.post1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 5142ff0db9c08bc21e423ca509045fe609fc816bacb73b220585bde9028d9796
MD5 035b0321cec5b79d2dc649f2a8242858
BLAKE2b-256 47304c2a42045a01971e6d7938900a2eae06e0ae362eb356f3d09359dc8b076d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gsw-3.6.17.post1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0c60c1f65e5860794baf4de171efea3b8b790adca9ed5c49dc86d4682727b663
MD5 8c4cc7c86bf061ad306e40890363e126
BLAKE2b-256 b9f26c60ea0894ac176f244d220549a9115ba5ab9df850a86c238b1411627e15

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gsw-3.6.17.post1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 975c77f20fe4a1c7897b37b846e6e2646c489fa339fefa26358816b213722de9
MD5 746b41ea29ce945146b0d0e093c5d3fb
BLAKE2b-256 fb73df16ee0037b8f385a8953d986e7ea8aad2a9316a22615e196f6effd4cb56

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gsw-3.6.17.post1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b039d44223d97a8ee6fd8a738ac92539f95c6592029e203f667d4b8203bdbcb7
MD5 36673f9d2531ba2b0dc2e52e7e33f4ed
BLAKE2b-256 b202156551f8d709d6008bef1e2ba6703eb6eb27b99daf639198f576f04cc2a4

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