Gibbs Seawater Oceanographic Package of TEOS-10
Project description
GSW-Python
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
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 Distributions
Built Distributions
File details
Details for the file gsw-3.6.16.post1-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: gsw-3.6.16.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/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c4986799024e36e06567106de3240e55c07b9cf54659a39b4de646ddd93ee89 |
|
MD5 | db0c460a42891af563817b1c4df70e87 |
|
BLAKE2b-256 | 1c3416911268b4e76d439e9b4f12908e6dc77ee61866db82ae6d34f3d61e71c3 |
File details
Details for the file gsw-3.6.16.post1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: gsw-3.6.16.post1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 2.4 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16447f8ddb962129f7676f8187116c05164e00ab6ca8e52934efaaf388f061c9 |
|
MD5 | a1300d3e87594fdd3a98f6e48247f953 |
|
BLAKE2b-256 | 50bb8b6487bcdfbb8e8560b59f9dd345a4bfaa59b5700867c108a2295eff9b39 |
File details
Details for the file gsw-3.6.16.post1-cp311-cp311-macosx_11_0_arm64.whl
.
File metadata
- Download URL: gsw-3.6.16.post1-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.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 965b0c4cd04baafeac4a65c5e61401347ffcd5d284499a8c20392ecf8416cf39 |
|
MD5 | 62f23262213ed3c59e10ce844043bad7 |
|
BLAKE2b-256 | 96503acecfc841ff55d5eb5cb1fc21a8e8465904b77e4e26bc4afd8ff8355f16 |
File details
Details for the file gsw-3.6.16.post1-cp311-cp311-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: gsw-3.6.16.post1-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 2.2 MB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b44f2be48ffa20fb26c43fe405aca041417e61fe187fa9afd1d8e6e81cbb39ff |
|
MD5 | 048ac28a1e13d7bf676918b6a53aa885 |
|
BLAKE2b-256 | 0321c4bb392d714566404164ef587ec81c93e103582f5babf9c3e45248da775c |
File details
Details for the file gsw-3.6.16.post1-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: gsw-3.6.16.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/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fcb6f29d7d146c29e9d6a8d2f8ec6e62f999bda1a0831afb3cb1fcbf0d5908f |
|
MD5 | 24d489dd3eba9505ca6d3e87b7ebb401 |
|
BLAKE2b-256 | e330ecdea91a1439641a6a01d6e028e0779d7d13a7c2ad2c364ec6e48c590c6f |
File details
Details for the file gsw-3.6.16.post1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: gsw-3.6.16.post1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 2.4 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2ac19184f9d47f86ee53e8a1f308216e5ef30885d2275ea7e8ad73affff7c0d |
|
MD5 | ce347a4d030a7e879646adfad6566e08 |
|
BLAKE2b-256 | 52aa572a22789ced77c58ac9424d3666a9852ed7960323450013db225d363f9d |
File details
Details for the file gsw-3.6.16.post1-cp310-cp310-macosx_11_0_arm64.whl
.
File metadata
- Download URL: gsw-3.6.16.post1-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.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 631a0cf798150b058468abc229e69e262fb5d2ca926a24321974db7051097130 |
|
MD5 | 586b4eca15298b5539221a812c7668bc |
|
BLAKE2b-256 | 02d3bf27579f28a5dca81912fb1d3ac9590fd5f7d54cb8f4d75161aee5510e0b |
File details
Details for the file gsw-3.6.16.post1-cp310-cp310-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: gsw-3.6.16.post1-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 2.2 MB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7599399812a420b3eeb702e0b287554a1b0ecf71da1d79de528f4f06626aef56 |
|
MD5 | fc2a346b4045958cbc94255c356e1b5f |
|
BLAKE2b-256 | 17f350bf5a131f2f5991f38fe19f24a1fb8b3b9ec71660085b1438d3ac47b7f8 |
File details
Details for the file gsw-3.6.16.post1-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: gsw-3.6.16.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/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca8635ce3889a919c3960f13c030279afd9406d6813e41edc7e7273d30d8a9d8 |
|
MD5 | 2aba7b4bdd9b55af49663a7a57c1b90e |
|
BLAKE2b-256 | c3e809e9297079d7e3745e78097b15417b1b0677d008c85db974a6441387c288 |
File details
Details for the file gsw-3.6.16.post1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: gsw-3.6.16.post1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 2.4 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c2125c16476699142c635bb707ae06b9e419399b0b4abd73d08bd35002ef922 |
|
MD5 | bc2a70a2330d17c89757141b382568f3 |
|
BLAKE2b-256 | 4878fdfbebf352d86c7d4cf4486a5564f36601c8d9cdb3a5feb712d277ea882d |
File details
Details for the file gsw-3.6.16.post1-cp39-cp39-macosx_11_0_arm64.whl
.
File metadata
- Download URL: gsw-3.6.16.post1-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.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 541edf16f0b54effb0c79a5e4bc86f65670c39f7b9455a69709f35eeee704bc3 |
|
MD5 | bba4519be9a0ae28cc60eb50434528fc |
|
BLAKE2b-256 | 28fae4aae9d92ca21efb4d4b8e4b20a210564c72f1a279c318f781faf1014e01 |
File details
Details for the file gsw-3.6.16.post1-cp39-cp39-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: gsw-3.6.16.post1-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.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef0197cbb666892c05e19cd9c0a812ce1c292c83a6da71f705a243d4558be902 |
|
MD5 | 625e162be63edf34f2d095aadbf81351 |
|
BLAKE2b-256 | dc04d9f7feb46cf6da89b9d02eec880c241331236193e700cee2c5b5508173a9 |
File details
Details for the file gsw-3.6.16.post1-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: gsw-3.6.16.post1-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.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4497bc8d3b3a36d2831b012016af5d864a55354cdf3630760a8e0b8e7ddc5f58 |
|
MD5 | 3963f92c67326283bb469af194a30903 |
|
BLAKE2b-256 | 91be5e07227c2152fdad22af1b774c042467914d7386b963fdd5e007ce940d0c |
File details
Details for the file gsw-3.6.16.post1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: gsw-3.6.16.post1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 2.4 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf0fbf7a691ffb0c127bbbd0330a68a3e0bdcd0ce53dd7ad9386d45564f6a560 |
|
MD5 | 0a8de62ab28840e855f7f1a2c18359be |
|
BLAKE2b-256 | 4a221518fa7d103de19a97afb26e86d8ff0a3106aee50ed09fc7bfc51de8b008 |
File details
Details for the file gsw-3.6.16.post1-cp38-cp38-macosx_11_0_arm64.whl
.
File metadata
- Download URL: gsw-3.6.16.post1-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.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93a6d142e169827346e1d1c458c5d5b6f4dbc8ee5fbc9e009a860325a596be74 |
|
MD5 | 38bc2e2030f3a4de0927f0defb057edc |
|
BLAKE2b-256 | 555e3f7fe56e45867b0d0206224436b80c3365697680ab569d834aaea9025d94 |
File details
Details for the file gsw-3.6.16.post1-cp38-cp38-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: gsw-3.6.16.post1-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.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f87c2cac500453f6a2a05b29d5318f756de11dbfb67f255abe8f276c695a04b |
|
MD5 | 4866aefbbee278dc603839b53974110c |
|
BLAKE2b-256 | 7da618818b695f8fb2d4767bff15ff1262035613f788eeaa01d701c3155131aa |