Skip to main content

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.

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.16.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.16-cp311-cp311-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.9+ x86-64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

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

Uploaded CPython 3.10macOS 10.9+ x86-64

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

Uploaded CPython 3.9Windows x86-64

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

Uploaded CPython 3.9macOS 11.0+ ARM64

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

Uploaded CPython 3.9macOS 10.9+ x86-64

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

Uploaded CPython 3.8Windows x86-64

gsw-3.6.16-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.16-cp38-cp38-macosx_11_0_arm64.whl (2.2 MB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

gsw-3.6.16-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.16.tar.gz.

File metadata

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

File hashes

Hashes for gsw-3.6.16.tar.gz
Algorithm Hash digest
SHA256 d24d820c8b43dbf72206cf5e3b0ed800b05aa85ca40afd39c9abd19849714197
MD5 8b4c902d8e80b87ea5b5426a866206d9
BLAKE2b-256 d065f8a32543c436a32220c663cbb2a48b096eb23e951bfa38c72667a6d1a79b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gsw-3.6.16-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.9.14

File hashes

Hashes for gsw-3.6.16-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 0b9bdffd64778f5ca0e5bfad31f8d4b5123b1709b21c4073741e184bda6930fe
MD5 73bf1c10cecd4197abeba6a0e334feac
BLAKE2b-256 ba09e17ba8a64f57f54dbff80d246abe2f2199e1946f61dde3c4e8b119faa650

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gsw-3.6.16-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cdbd49cd0c9b304a77ffe4778a7ff510fe24c3a7271bf809c627d663bc7f24d2
MD5 9dc5a9c0e53ee3fb2d33ffbc20223fb2
BLAKE2b-256 bc7d2aea7145be89dcb72c34c0a47e645c4073c86891a5d6786df16c340e3c34

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gsw-3.6.16-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 85b9485b7f65f763dff3244a7ac22c0de89fc5626a126ef3f95632d8370564e7
MD5 a56b50e30bb0c6f634c1534cdfb79561
BLAKE2b-256 19e11a9a7e8e5117aca0c642e09dbfe097e1b9c41da6b43ddb47785abaf29986

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gsw-3.6.16-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 640f55216f96eeca850dbc68e436127b6e3354a9e93b092050102bfbfc615977
MD5 5e95fbf3f73ca3db458ebaa9508b2ea8
BLAKE2b-256 0bf31eb6904bc85acd974863abd8dfb0b9758c08694b7486a6434b746a48dbdc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gsw-3.6.16-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.9.14

File hashes

Hashes for gsw-3.6.16-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 21539ae3a69124019422a20519843bd6c69d59c8d6d07e1dcc02c7d531dfabbf
MD5 dd75a47f018507cab948504cd95d2628
BLAKE2b-256 b73873727a8729305819ea65f358e95aafd3ef905a65a090e4412faa3bac80b3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gsw-3.6.16-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ca57bb9ea402ab3e5bdd2cde3d5401fe56e8dd98ee79ae6246d6a0b7d54f9757
MD5 8b8725b2f7d155539b1b475c1b0c69ec
BLAKE2b-256 bc429bff13a4969f5b33db15e56086b3e977f30d559ec92a518322ddaa1a2dde

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gsw-3.6.16-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f9f7fc35a057ab022195269ac4c28354e8a4d189d0490ff53a7ebee98c68f674
MD5 442a41f55d96ecc3ab1d7420b70b7dd3
BLAKE2b-256 38515218c0cd824443abaf7e276af133c8ed0404b3c1ec59a59dfa67c568c030

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gsw-3.6.16-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 98516e119df9a060d65cdad1cf4be96d8f2e19bdccecb748e7498ce597c6d2fe
MD5 25468cc160c3278452dd565fa15f2ff6
BLAKE2b-256 bb8aacb40c941eb5ae4b2e2e0c7164187d1ab16035ec9f6173c0b2262846d6c5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gsw-3.6.16-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.9.14

File hashes

Hashes for gsw-3.6.16-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 f867919ff6e6fc9729cd63207f8f238afd33a755c75a4f34dfa493aab19023ac
MD5 cd89b0c9c8130987135fa72dca7bab03
BLAKE2b-256 bc51ef28e1c1a1e28b31550584d60fffec5c32a4f5dd5d0efc3f93b92f5ae6db

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gsw-3.6.16-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b5bcd37205041b6213fa3d0955ffa0a1032bda4b78bb6f6b8dcf443ad507c4d6
MD5 19062888f3c345d769bd5902777d3ed3
BLAKE2b-256 a9270aad355a05139b754751b1de87440eee6acf6f2aa7f021a0fb8d5c84f207

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gsw-3.6.16-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.9.14

File hashes

Hashes for gsw-3.6.16-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9adfa3623c70f3b7de34a6490da4256a41a38f6373907d046f2d39d7d9f3b8ad
MD5 681bbecd7838767c7a99f5372f51e65d
BLAKE2b-256 360b50c7cc5280458a6bcf9379c361406ecf026765d95afb0f01560bc3b143f0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gsw-3.6.16-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.9.14

File hashes

Hashes for gsw-3.6.16-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5725749d3031bd3ebade777491948532967753563045c82bd9ba5f287ccb36aa
MD5 0cfde46488200e65003872d5bfde55e4
BLAKE2b-256 45db542f5af3f56e38378bf00be64dede15bac5475e0de1db02ece491b532010

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gsw-3.6.16-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.9.14

File hashes

Hashes for gsw-3.6.16-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 cda4efc0dbb724448da4a9e2fac99581febc1c3eff21b1c6f4a94eb32835727f
MD5 3183dff43b82f7f96231c14f1b382f73
BLAKE2b-256 4aed099217a20d195044285834150e8c6cc07bde00760515777f51ff97305429

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gsw-3.6.16-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e7b56cafe4cf8677976fbe26e3c8f34d528dd20c94508d04ccd620c750df5b38
MD5 98e89684e382a7ac83218d136c5b4407
BLAKE2b-256 2d65405067399beee2dde828a23c44e07f073be472a8a499c04705545a88b47e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gsw-3.6.16-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.9.14

File hashes

Hashes for gsw-3.6.16-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 688ff5b7d83b15cbde68ad7f2c5b9bb53d4049beedec6058053c2bcd494bdd5f
MD5 3273c97de19da1f369811241df61ba74
BLAKE2b-256 1f2b134b3a349dd08321891443cbf05d13cdaed0dfca6b12c477ea521f9b7465

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gsw-3.6.16-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.9.14

File hashes

Hashes for gsw-3.6.16-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f406248065f47710ce1132fc7b843bb041fc5f9f4336a358025580fbc3e47d7c
MD5 c0e49acc26e80521d1aaa1740de4b92c
BLAKE2b-256 540f16e9fa82b23a718ab752c96f23d46d28063910f8c6f84e4373eb3970efcb

See more details on using hashes here.

Release history Release notifications | RSS feed

3.6.23

7 files

3.6.22

6 files

3.6.21

6 files

3.6.20

36 files

3.6.19

21 files

3.6.18

17 files

3.6.17.post1

16 files

3.6.17

17 files

3.6.16.post1

16 files

This release

3.6.16 This release

17 files

3.4.2

16 files

3.4.0

10 files

3.3.1.post1

9 files

3.3.1

1 file

3.3.0

1 file

3.2.1

1 file

3.2.0

1 file

3.1.1

1 file

3.1.0

1 file

3.0.6

1 file

3.0.3

1 file

3.0.2

1 file

3.0.1

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page