Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JOSS #45

Merged
merged 21 commits into from
Dec 19, 2023
Merged

JOSS #45

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/draft-pdf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
on: [push]

jobs:
paper:
runs-on: ubuntu-latest
name: Paper Draft
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build draft PDF
uses: openjournals/openjournals-draft-action@master
with:
journal: joss
# This should be the path to the paper within your repo.
paper-path: joss/paper.md
- name: Upload
uses: actions/upload-artifact@v1
with:
name: paper
# This is the output path where Pandoc will write the compiled
# PDF. Note, this should be the same directory as the input
# paper.md
path: joss/paper.pdf
94 changes: 94 additions & 0 deletions joss/paper.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
@techreport{GSW-m,
title={Getting started with {TEOS-10} and the {G}ibbs {S}eawater ({GSW}) oceanographic toolbox},
author={McDougall, Trevor J and Barker, Paul M},
publisher={{SCOR}/{IAPSO}},
series={WG 127},
pages={1--28},
year={2011},
note={ISBN 978-0-646-55621-5}
}

@article{GSW-Python,
title={TEOS-10/GSW-Python: v3.4.1.post0 (v3.4.1.post0)},
author={Eric Firing and Filipe and Andrew Barna and Ryan Abernathey},
year={2021},
doi={10.5281/zenodo.5214122}
}

@article{MILLERO200850,
title = {The composition of Standard Seawater and the definition of the Reference-Composition Salinity Scale},
journal = {Deep Sea Research Part I: Oceanographic Research Papers},
volume = {55},
number = {1},
pages = {50-72},
year = {2008},
issn = {0967-0637},
doi = {10.1016/j.dsr.2007.10.001},
url = {https://www.sciencedirect.com/science/article/pii/S0967063707002282},
author = {Frank J. Millero and Rainer Feistel and Daniel G. Wright and Trevor J. McDougall},
}

@article{feistel2003new,
title={A new extended Gibbs thermodynamic potential of seawater},
author={Feistel, Rainer},
journal={Progress in Oceanography},
volume={58},
number={1},
pages={43--114},
year={2003},
publisher={Elsevier},
doi = {10.1016/S0079-6611(03)00088-0}
}

@article{feistel2008gibbs,
title={A Gibbs function for seawater thermodynamics for- 6 to 80 C and salinity up to 120 g kg--1},
author={Feistel, Rainer},
journal={Deep Sea Research Part I: Oceanographic Research Papers},
volume={55},
number={12},
pages={1639--1671},
year={2008},
publisher={Elsevier}
}

@techreport{TEOS-10,
title={The international thermodynamic equation of seawater – 2010: Calculation and use of thermodynamic properties},
author={{IOC, SCOR, and IAPSO}},
edition={June 2015},
series={Intergovernmental Oceanographic Commission, Manuals and Guides No. 56},
year={2010},
publisher={UNESCO},
note={196 pp.}
}

@manual{GSW-Julia,
title={TEOS-10/GibbsSeaWater.jl},
author={Alexander Barth and et. al.},
year={2020},
url={https://github.com/TEOS-10/GibbsSeaWater.jl},
note={GitHub Repository.}
}

@manual{GSW-R,
title={TEOS-10/GSW-R},
author={Dan Kelley and Clark Richards},
year={2022},
url={https://github.com/TEOS-10/GSW-R},
note={GitHub Repository.}
}

@manual{GSW-FORTRAN,
title={TEOS-10/GSW-FORTRAN},
author={David Jackett and Paul Barker and Glenn Hyland},
year={2017},
url={https://github.com/TEOS-10/GSW-Fortran},
note={GitHub Repository.}
}

@manual{GSW-C,
title={},
author={Frank Delahoyde and Eric Firing and et. al.},
year={2022},
url={https://github.com/TEOS-10/GSW-C},
note={GitHub Repository.}
}
71 changes: 71 additions & 0 deletions joss/paper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
title: 'Gibbs Sea Water Oceanographic Toolbox of TEOS-10 implemented in Rust'
tags:
- Rust
- oceanography
authors:
- name: Guilherme P. Castelao
orcid: 0000-0002-6765-0708
affiliation: 1 # (Multiple affiliations must be quoted)
- name: Luiz Irber
orcid: 0000-0003-4371-9659
affiliation: 2
affiliations:
- name: Scripps Institution of Oceanography
index: 1
- name: UC Davis
index: 2
date: 2 October 2022
bibliography: paper.bib
---

# Summary

The Gibbs Seawater Toolbox (GSW) is a key software for Oceanography since it
provides consistent thermodynamic properties of seawater, conversions, and
other utilities. GSW has been adopted since 2009 by the Intergovernmental
Oceanographic Commission as the official description of seawater. Although it
is available in several computer languages, most implementations, such as
Python [@GSW-Python], Julia [@GSW-Julia], and R [@GSW-R], are wrappers around the C library [@GSW-C].

Here we introduce a version of GSW implemented in pure Rust (GSW-rs),
initially developed for inclusion in microcontroller firmware to support
autonomous decisions and onboard Machine Learning. The same implementation
also works on regular computers and can seamlessly replace GSW-C on apps and
libraries by maintaining compatibility with the GSW-C Foreign Function
Interface (FFI). Thanks to zero-cost abstraction, GSW-rs does not impose
performance and readability trade-off, allowing it to be written for clear
understanding and closer to the original scientific publications. Therefore,
it is easier to verify and maintain. Another key aspect is the support for
testing. GSW-rs is subject to unit tests as well as validation against the
reference dataset from TEOS-10, allowing for consistent development through
continuous integration.

Modern oceanography strongly relies on autonomous platforms - such as Argo
floats, Spray underwater gliders, and Saildrones - to provide sustained
observations. Software robustness and performance are critical requirements
for these platforms to operate with low energy budgets and up to several years
in a single deployment, making Rust an optimal language for this task. At the
same time, the expanding cloud infrastructure can give the illusion of
infinite computing, but convenient program languages such as Python must rely
on high-performance languages in the backend to optimize bottlenecks. A Rust
implementation of GSW allows sustainable and efficient progress, from embedded
to high-performance computing.

# Statement of Need

While GSW is already implemented in several languages, there is no uniformity
among those. The Matlab implementation (GSW-m) [@GSW-m] is the most
complete [see Appendix N from @TEOS-10] and up to date, but it is based
on a commercial language, restricting its use. Several other implementations,
including those for Julia, Python, and R, are wrappers around the
C implementation (GSW-C), which is hence the actual foundation for the
alternative Open Source family of solutions. Although it is powerful, C lacks
some features and conveniences of modern languages. Here we present an
alternative using Rust language, resulting in comparable performance to GSW-C,
while providing an efficient framework that accelerates the development effort
and minimizes errors. For embedded systems, GSW-rs is a requirement for a
pure Rust firmware able to make sense of sensor measurements in real time.
In addition, for any application, GSW-rs provides the option to conform more closely to GSW-m than does the present GSW-C implementation. Function coverage, however, does not yet match either GSW-C or GSW-m.

# References
Loading