Gibbs Sea Water Functions

Provides an interface to the Gibbs 'SeaWater' ('TEOS-10') C library, version 3.05 (commit 'f7bfebf44f686034636facb09852f1d5760c27f5', dated 2021-03-27, available at <>, which stems from 'Matlab' and other code written by members of Working Group 127 of 'SCOR'/'IAPSO' (Scientific Committee on Oceanic Research / International Association for the Physical Sciences of the Oceans).

Build Status codecov RStudio CRAN mirror downloads RStudio CRAN mirror downloads RStudio CRAN mirror downloads

gsw is an R package that provides a connection to the thermodynamic equation of seawater as defined at An earlier version of gsw was referenced to TEOS-10 version 3.03, but the present one is referenced to version 3.05-4, which is current as of Aug 7, 2017. See the CRAN website for check statistics, etc.

All the gsw functions reproduce test values to a tolerance of 1.5e-8, the default for numerical comparison in R working on a 64-bit machine. (The tests are part of the package-building process, as is usual in R.)

Function names, as well as most argument names, match those used in the TEOS-10 documentation.



  • use GSW-C version 3.05-4
  • make internal sort routines be machine-independent


  • use GSW-C version 3.05-3
  • handle NaN values better
  • add dozens of new GSW functions


  • first version, using GSW version 3.03

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


1.0-6 by Dan Kelley, 7 months ago,

Report a bug at

Browse source code at

Authors: Dan Kelley [aut, cre, cph] , Clark Richards [aut, cph] , WG127 SCOR/IAPSO [aut, cph] (Original 'Matlab' and derived code)

Documentation:   PDF Manual  

GPL (>= 2) | file LICENSE license

Suggests knitr, rmarkdown, testthat

Imported by vprr.

Depended on by oce, seacarb.

See at CRAN