Unofficial TEOS-10 GSW Oceanographic Toolbox in Rust

GSW for microcontrollers.

Note that we do follow TEOS-10 manual and references, but this library is not endorsed by TEOS-10 committee.

Talks

We presented about goals and progress (as of Apr 2022) at the SEA Improving Scientific Software 2022, slides available here.

Minimum supported Rust version

Currently the minimum supported Rust version is 1.64.0

Features

From the Cargo Book: "Cargo 'features' provide a mechanism to express conditional compilation and optional dependencies.". The features defined in GSW-rs are:

For example, to compile it compatible with the official Matlab library: cargo build --features compat

Repository structure

For anyone learning Rust, this repository might be overwhelming. We are doing many things here, hence more files and directories that would be strictly necessary.

License

Licensed under the 3-Clause BSD License (LICENSE)

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the LICENSE, shall be licensed as above, without any additional terms or conditions.

Contributions should be done through GitHub, by forking the repository, creating a new branch, and pushing that new branch back as a Pull Request. Tests covering the new feature or bugfix must be included, and if relevant, the documentation updated. If not familiar with the procedure, we encourage to contact us and we will walk you through the process. Every contribution is valuable and will be recognized.

A note on tests. We don't follow the typical Rust pattern of grouping all the tests of the module together. As a scientific library, and a large one, we tend to keep tests right after the target tested, so it is easy to verify if a certain function covers the desired behavior. Whenever possible, we also add tests confirming specific values described in the literature.

A note on references: Please review and add the relevant literature for each function. It is particularly important to verify the coefficients and the valid range in the original literature.

Citation

If you use this library we kindly ask to cite all the three following references:

DOI

Castelao, G., & Irber, L. (2021). Unofficial Gibbs Sea Water Oceanographic Toolbox of TEOS-10 implemented in Rust (Version 0.1.1) [Computer software]. https://doi.org/10.5281/zenodo.5348561

text @software{Castelao_Gibbs_Sea_Water_2021, title = {{Gibbs Sea Water Oceanographic Toolbox of TEOS-10 implemented in Rust}}, author = {Castelao, Guilherme and Irber, Luiz}, year = {2021}, license = {BSD-3-Clause}, version = {0.1.1}, doi = {10.5281/zenodo.5348561}, url = {https://github.com/castelao/GSW-rs} }

Why should you also cite the two following references? We do appreciate you recognizing our efforts developing this library citing the reference above, but we can't take any credit for the theory behind it. There is a long list of publications that resulted in all these relations explored in this library. Although we encourage you to study and cite the ones relevant to your work, you should at least cite the two following ones. The manual 56 that summarizes all those publications, and the 'Getting started' publication which presents how to use the Toolbox.

As we review and expand this library, we add the relevant specific references within each function. You can find those in our source code or the manual.