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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

gsw-3.4.2-cp311-cp311-macosx_10_9_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

gsw-3.4.2-cp310-cp310-macosx_10_9_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

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

Uploaded CPython 3.9Windows x86-64

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

Uploaded CPython 3.9macOS 11.0+ ARM64

gsw-3.4.2-cp39-cp39-macosx_10_9_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

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

Uploaded CPython 3.8Windows x86-64

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

Uploaded CPython 3.8macOS 11.0+ ARM64

gsw-3.4.2-cp38-cp38-macosx_10_9_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: gsw-3.4.2-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.4.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c36cfb5867ec1e5304dc675a027d1695aad03e97b6931029d76f0bb99ba19361
MD5 d601c6eaf8af68610b505d2be1e9a39d
BLAKE2b-256 507c48ffa8eedf5ef7d97697ee574dfc9db4209a82622ad6d65980156e2c052b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gsw-3.4.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b1eb416e8631cf842d45b00724d36af4f5e996395c25132f15f297d38f1f5d10
MD5 c086320b686805a5aa546a3adc26e3b4
BLAKE2b-256 43880e22d725f7802fea9b4629556fd7b23338ae8566ef68635c45e24164c694

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gsw-3.4.2-cp311-cp311-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: CPython 3.11, 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.4.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fdc91ea3e30c0ebb2723fadeb4fc31e6161c7141b4a3e59ab687807330727c40
MD5 58d52469cd43780573334c766d9dacfb
BLAKE2b-256 74458d9ca8c1bebfb34e0079314063287fa7ad927cfed43d9c6e20524b4a33d0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gsw-3.4.2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 712b969d034d333dd0304f25c73c4810e011165bb9d2a1398e64e5a609486e03
MD5 e4260cee71cb7f1758f4df35278937f9
BLAKE2b-256 be57ed99a89606bbf0cbdd0e877ddb11f467f66f69697734baa928e6f0f74211

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gsw-3.4.2-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.4.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 494d843456c43518a5e044c565563a6f8c3bcafe122b6eb40bbfca4f06aa3e5f
MD5 82c84f42dc5ecc8d31eb45983fbaecef
BLAKE2b-256 0c4411f43a81e9606fe8210113d249e803e1cd88a541b2631284b311f1deb17b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gsw-3.4.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 368d4e991d3ca456b8291117e80e0c2ec3e72a31e9deb46eebe137c1349021fd
MD5 ccaa3a75ba1293adc28d100d9111aa1b
BLAKE2b-256 8d87da383dea2bbb9f76a0c97b01a51376a1d09f4789b586fe07b03a9b525e13

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gsw-3.4.2-cp310-cp310-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: CPython 3.10, 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.4.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 15870bf4ad262390e0d6ac3063c656acca08c361ec1fd7ffd199363568c73f5a
MD5 8ad3cadb3d6a650530059d25a1a4f49a
BLAKE2b-256 24829113bf639617eb98ae13cf977d3d1b322a10e02472d575bff4e738bb0c6f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gsw-3.4.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7cfb12d06a21c1fa785d0377827582711c72f10dd32473c9c3f2c43a54184e32
MD5 3094cfbb1144031a3cc26a21466b703e
BLAKE2b-256 abbbca1925cced7868add055e61a6b1521ee2aff628230ba95628237d753c18c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gsw-3.4.2-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.4.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a4b88cba1590addb0b6675db3c7c9537200dea03d361c3e20bfbca1289e214f2
MD5 61d193e3f9330e4aac57c7f8a5897963
BLAKE2b-256 a63093420dfbb8778608846e558d14bdd1fbf73afece70d0f0587761d5fa3415

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gsw-3.4.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8fde4945b754c17bceb9a544973a2f6235047b5b9e31743aa9bd8bf50f5d63ed
MD5 00c8e40458e70ec451f42c8ad579977b
BLAKE2b-256 19a2e61d85d737824ed8953d04525369e542c4cd8c67fea460042f04b0678280

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gsw-3.4.2-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.4.2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 842b6fe919e41e70496b7e888443d491406ed92516bb5ec4bb15b7449493149d
MD5 04edcedf6e951700a2ccfe85d43a9793
BLAKE2b-256 d0e53d9560b4d451183f8d698cb2c77b3c1f19e526e6097f4cdac10a796e4d7c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gsw-3.4.2-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 2.1 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.4.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 79cdcd63a8347d8e1277171902bc2e09e35df2977d9491a2b66125baf7c7b3ba
MD5 257562207fdf1f36d0590f2b37f155cf
BLAKE2b-256 82308515331228716269d4ab11678feb59c2f6d86b37b9d23db0abbcf2b15b34

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gsw-3.4.2-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.4.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 4a5e9b3356afa5d1e1647a7e998b06806359c85d138e2b055825715a8c6534e2
MD5 4b564c0d97975bf631224abcf2e98e11
BLAKE2b-256 31c91ac53e4f267e2393d035756e44fd30bd2b0765fd9eda6839dad14888d901

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gsw-3.4.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 de8fe1fcd908795cfe8673a54e4def971974e70508647c0ca2732955fda39c10
MD5 791be83b6e80b99976877ec981cdd4cf
BLAKE2b-256 c9bbfa77cf43374ba3982abe808ae1b878a9a8b8cd391856885c46f681d0e916

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gsw-3.4.2-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.4.2-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9e305f812104a80f9ffa3f7c78d4c57cf1977454f6fbb44dd935594b3074347d
MD5 8669871fbc317f72b925871758a7db02
BLAKE2b-256 6e06c26a030be0f22f9fc0bf7cc7ff68bb04444afc8388d1daa606de38c3bde2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gsw-3.4.2-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 2.1 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.4.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 14c341ad7afeb1d69a03c94b44e9b646a061e1182f02b10a55394052a2c92390
MD5 9a38eed9b72606e76ed78a3ec29ef716
BLAKE2b-256 44a5fdba18c17109b31d8c0da0913db9eaaf1aaa40e7779a5e9dca6b54c8386a

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

3.6.16

17 files

This release

3.4.2 This release

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