Skip to content

Commit

Permalink
Creating 10.21105.joss.05988.jats
Browse files Browse the repository at this point in the history
  • Loading branch information
editorialbot committed Jan 3, 2024
1 parent 20f9a5a commit 356b546
Showing 1 changed file with 219 additions and 0 deletions.
219 changes: 219 additions & 0 deletions joss.05988/10.21105.joss.05988.jats
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.2 20190208//EN"
"JATS-publishing1.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="1.2" article-type="other">
<front>
<journal-meta>
<journal-id></journal-id>
<journal-title-group>
<journal-title>Journal of Open Source Software</journal-title>
<abbrev-journal-title>JOSS</abbrev-journal-title>
</journal-title-group>
<issn publication-format="electronic">2475-9066</issn>
<publisher>
<publisher-name>Open Journals</publisher-name>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="publisher-id">5988</article-id>
<article-id pub-id-type="doi">10.21105/joss.05988</article-id>
<title-group>
<article-title>Gibbs Sea Water Oceanographic Toolbox of TEOS-10
implemented in Rust</article-title>
</title-group>
<contrib-group>
<contrib contrib-type="author">
<contrib-id contrib-id-type="orcid">https://orcid.org/0000-0002-6765-0708</contrib-id>
<name>
<surname>Castelao</surname>
<given-names>Guilherme P.</given-names>
</name>
<xref ref-type="aff" rid="aff-1"/>
</contrib>
<contrib contrib-type="author">
<contrib-id contrib-id-type="orcid">https://orcid.org/0000-0003-4371-9659</contrib-id>
<name>
<surname>Irber</surname>
<given-names>Luiz</given-names>
</name>
<xref ref-type="aff" rid="aff-2"/>
</contrib>
<aff id="aff-1">
<institution-wrap>
<institution>Scripps Institution of Oceanography</institution>
</institution-wrap>
</aff>
<aff id="aff-2">
<institution-wrap>
<institution>UC Davis</institution>
</institution-wrap>
</aff>
</contrib-group>
<pub-date date-type="pub" publication-format="electronic" iso-8601-date="2022-10-02">
<day>2</day>
<month>10</month>
<year>2022</year>
</pub-date>
<volume>9</volume>
<issue>93</issue>
<fpage>5988</fpage>
<permissions>
<copyright-statement>Authors of papers retain copyright and release the
work under a Creative Commons Attribution 4.0 International License (CC
BY 4.0)</copyright-statement>
<copyright-year>2022</copyright-year>
<copyright-holder>The article authors</copyright-holder>
<license license-type="open-access" xlink:href="https://creativecommons.org/licenses/by/4.0/">
<license-p>Authors of papers retain copyright and release the work under
a Creative Commons Attribution 4.0 International License (CC BY
4.0)</license-p>
</license>
</permissions>
<kwd-group kwd-group-type="author">
<kwd>Rust</kwd>
<kwd>oceanography</kwd>
</kwd-group>
</article-meta>
</front>
<body>
<sec id="summary">
<title>Summary</title>
<p>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
(<xref alt="Firing et al., 2021" rid="ref-GSW-Python" ref-type="bibr">Firing
et al., 2021</xref>), Julia
(<xref alt="Barth &amp; al., 2020" rid="ref-GSW-Julia" ref-type="bibr">Barth
&amp; al., 2020</xref>), and R
(<xref alt="Kelley &amp; Richards, 2022" rid="ref-GSW-R" ref-type="bibr">Kelley
&amp; Richards, 2022</xref>), are wrappers around the C library
(<xref alt="Delahoyde et al., 2022" rid="ref-GSW-C" ref-type="bibr">Delahoyde
et al., 2022</xref>).</p>
<p>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.</p>
<p>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.</p>
</sec>
<sec id="statement-of-need">
<title>Statement of Need</title>
<p>While GSW is already implemented in several languages, there is no
uniformity among those. The Matlab implementation (GSW-m)
(<xref alt="McDougall &amp; Barker, 2011" rid="ref-GSW-m" ref-type="bibr">McDougall
&amp; Barker, 2011</xref>) is the most complete (see Appendix N from
<xref alt="IOC, SCOR, and IAPSO, 2010" rid="ref-TEOS-10" ref-type="bibr">IOC,
SCOR, and IAPSO, 2010</xref>) 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.</p>
</sec>
</body>
<back>
<ref-list>
<ref id="ref-GSW-m">
<element-citation publication-type="report">
<person-group person-group-type="author">
<name><surname>McDougall</surname><given-names>Trevor J</given-names></name>
<name><surname>Barker</surname><given-names>Paul M</given-names></name>
</person-group>
<article-title>Getting started with TEOS-10 and the Gibbs Seawater (GSW) oceanographic toolbox</article-title>
<publisher-name>SCOR/IAPSO</publisher-name>
<year iso-8601-date="2011">2011</year>
<fpage>1</fpage>
<lpage>28</lpage>
</element-citation>
</ref>
<ref id="ref-GSW-Python">
<element-citation publication-type="article-journal">
<person-group person-group-type="author">
<name><surname>Firing</surname><given-names>Eric</given-names></name>
<name><surname>Filipe</surname></name>
<name><surname>Barna</surname><given-names>Andrew</given-names></name>
<name><surname>Abernathey</surname><given-names>Ryan</given-names></name>
</person-group>
<article-title>TEOS-10/GSW-python: v3.4.1.post0 (v3.4.1.post0)</article-title>
<year iso-8601-date="2021">2021</year>
<pub-id pub-id-type="doi">10.5281/zenodo.5214122</pub-id>
</element-citation>
</ref>
<ref id="ref-TEOS-10">
<element-citation publication-type="report">
<person-group person-group-type="author">
<string-name>IOC, SCOR, and IAPSO</string-name>
</person-group>
<article-title>The international thermodynamic equation of seawater – 2010: Calculation and use of thermodynamic properties</article-title>
<publisher-name>UNESCO</publisher-name>
<year iso-8601-date="2010">2010</year>
<edition>June 2015</edition>
</element-citation>
</ref>
<ref id="ref-GSW-Julia">
<element-citation publication-type="book">
<person-group person-group-type="author">
<name><surname>Barth</surname><given-names>Alexander</given-names></name>
<name><surname>al.</surname></name>
</person-group>
<source>TEOS-10/GibbsSeaWater.jl</source>
<year iso-8601-date="2020">2020</year>
<uri>https://github.com/TEOS-10/GibbsSeaWater.jl</uri>
</element-citation>
</ref>
<ref id="ref-GSW-R">
<element-citation publication-type="book">
<person-group person-group-type="author">
<name><surname>Kelley</surname><given-names>Dan</given-names></name>
<name><surname>Richards</surname><given-names>Clark</given-names></name>
</person-group>
<source>TEOS-10/GSW-r</source>
<year iso-8601-date="2022">2022</year>
<uri>https://github.com/TEOS-10/GSW-R</uri>
</element-citation>
</ref>
<ref id="ref-GSW-C">
<element-citation publication-type="book">
<person-group person-group-type="author">
<name><surname>Delahoyde</surname><given-names>Frank</given-names></name>
<name><surname>Firing</surname><given-names>Eric</given-names></name>
<name><surname>al.</surname></name>
</person-group>
<source></source>
<year iso-8601-date="2022">2022</year>
<uri>https://github.com/TEOS-10/GSW-C</uri>
</element-citation>
</ref>
</ref-list>
</back>
</article>

0 comments on commit 356b546

Please sign in to comment.