Project Status: Active – The project has reached a stable, usable state and is being actively developed. CRAN_Status_Badge R-CMD-check RStudio CRAN mirror downloads RStudio CRAN mirror downloads RStudio CRAN mirror downloads

gsw is an R package that provides a connection to software relating to TEOS, the Thermodynamic Equation Of Seawater (see This connection involves R wrappers to C functions within the GSW-C library (, release v3.06-16-0, commit 657216dd4f5ea079b5f0e021a4163e2d26893371), along with a data file within the GSW-Matlab library (, commit 38c9635d6fd93e74c2648e4ee23cec49c1f58530).

The foundational algorithms upon which both GSW-C and GSW-R rest were devised by the Scientific Committee on Oceanic Research / International Association for the Physical Sciences of the Oceans, Working Group 127. These algorithms were recommended as a replacement for a previous system (called UNESCO-80) at the twenty-fifth assembly in the Intergovernmental Oceanographic Commission in 2009.

The gsw functions reproduce test values in the GSW-Fortran documentation to a tolerance of 1.5e-8, the default for numerical comparison in R working on a 64-bit machine. This offers some assurance that the coding process has not introduced errors.

The naming convention in gsw is patterned on the system described at, as a way to reduce the effort users might face in switching to R.