https://github.com/castelao/gsw-python
Python implementation of TEOS-10 GSW based on ufunc wrappers of GSW-C
Science Score: 10.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.0%) to scientific vocabulary
Last synced: 10 months ago
·
JSON representation
Repository
Python implementation of TEOS-10 GSW based on ufunc wrappers of GSW-C
Basic Info
- Host: GitHub
- Owner: castelao
- License: other
- Default Branch: master
- Homepage: https://teos-10.github.io/GSW-Python
- Size: 11.4 MB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Fork of TEOS-10/GSW-Python
Created about 5 years ago
· Last pushed about 5 years ago
https://github.com/castelao/GSW-Python/blob/master/
# gsw Python package   [](https://zenodo.org/badge/latestdoi/86503067) This Python implementation of the Thermodynamic Equation of Seawater 2010 (TEOS-10) is based primarily on numpy ufunc wrappers of the GSW-C implementation. We expect it to replace the original [python-gsw](https://github.com/TEOS-10/python-gsw) pure-python implementation after a brief overlap period. 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.5 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](https://docs.scipy.org/doc/numpy/reference/ufuncs.html), 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. 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.
Owner
- Name: Guilherme Castelão
- Login: castelao
- Kind: user
- Location: CO
- Company: @NREL
- Website: www.castelao.net
- Repositories: 80
- Profile: https://github.com/castelao
multi-class: PhD in Physical Oceanography, offshore solo sailor, Rustacean and Pythonista.