Learn R Programming

⚠️There's a newer version (1.2-0) of this package.Take me there.

gsw is an R package that provides a connection to the thermodynamic equation of seawater version 3.03, downloaded from teos-10.org on 2014-08-25. This package is still in development, and is on track for a planned submission to CRAN in January.

All the functions provided here reproduce teos-10.org 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 match those used specified in the TEOS-10 documentation.

The plan is to update this package to match publicised changes to GSW. Users should be aware that this may involve changes to function names or arguments, if TEOS-10 alters such things.

Copy Link

Version

Install

install.packages('gsw')

Monthly Downloads

2,402

Version

1.0-3

License

GPL (>= 2) | file LICENSE

Maintainer

Dan Kelley

Last Published

January 19th, 2015

Functions in gsw (1.0-3)

gsw_specvol

Specific volume
argfix

Reshape list elements to match the shape of the first element.
gsw_CT_from_pt

Conservative Temperature from potential temperature
gsw_CT_from_t

Convert from temperature to conservative temperature
gsw_adiabatic_lapse_rate_from_CT

Adiabatic lapse rate from Conservative Temperature
gsw_dynamic_enthalpy

Dynamic enthalpy of seawater (48-term equation)
gsw_latentheat_melting

Latent heat of melting
gsw_kappa

Isentropic compressibility of seawater
saar

Global SA lookup file
gsw_alpha_wrt_t_exact

Thermal expansion coefficient with respect to in-situ temperature
gsw_grav

Gravitational acceleration
gsw_pt_from_t

Potential temperature from in-situ temperature
gsw_t_from_CT

In situ temperature from Conservative Temperature
gsw_pt0_from_t

Potential temperature referenced to the surface
gsw_cabbeling

Cabbeling coefficient (48-term equation)
gsw_sound_speed_t_exact

Sound speed
gsw_C_from_SP

Electrical conductivity from Practical Salinity
gsw_entropy_from_t

Specific entropy as a function of in-situ temperature and pressure
gsw_Nsquared

Calculate Brunt Vaisala Frequency squared
gsw_kappa_t_exact

Isentropic compressibility of seawater
gsw_p_from_z

Pressure from z
gsw_sigma4

Potential density anomaly referenced to 4000 dbar
gsw_thermobaric

Thermobaric coefficient (48-term equation)
gsw_SA_from_SP

Convert from practical salinity to absolute salinity
gsw_Sstar_from_SA

Convert from Absolute Salinity to Preformed Salinity
gsw_alpha

Thermal expansion coefficient with respect to Conservative Temperature. (48-term equation)
gsw_SP_from_Sstar

Practical Salinity from Preformed Salinity
gsw_SP_from_SA

Convert from Absolute Salinity to Practical Salinity
gsw_sound_speed

Sound speed with 48-term density
gsw_z_from_p

Height from pressure (48-term equation)
gsw_SR_from_SP

Calculate Reference Salinity from Practical Salinity
gsw_SP_from_C

Convert from electrical conductivity to practical salinity
gsw_specvol_t_exact

Specific volume
gsw_Turner_Rsubrho

Turner angle and density ratio
gsw_beta_const_t_exact

Saline contraction coefficient at constant in-situ temperature
gsw_internal_energy

Specific internal energy of seawater (48-term equation)
gsw_cp_t_exact

Isobaric heat capacity
gsw_sigma0

Potential density anomaly referenced to 0 dbar
gsw_CT_freezing

Conservative temperature freezing point
gsw_latentheat_evap_CT

Latent heat of evaporation
gsw_enthalpy_t_exact

Specific enthalpy of seawater
gsw_latentheat_evap_t

Latent heat of evaporation
gsw_specvol_anom

Specific volume anomaly
gsw_alpha_on_beta

Thermal expansion coefficient over haline contraction coefficient (48-term equation)
gsw_t_freezing

Freezing temperature
gsw_rho_first_derivatives

SA, CT and p partial derivatives of density (48-term equation)
gsw_SP_from_SK

Calculate Practical Salinity from Knudsen Salinity
gsw

R implementation of the Thermodynamic Equation Of Seawater - 2010 (TEOS-10)
gsw_IPV_vs_fNsquared_ratio

Ratio of vert. gradient of pot. density to vert grad of locally-referenced pot density
gsw_Sstar_from_SP

Convert from Practical Salinity to Preformed Salinity
gsw_SA_from_Sstar

Absolute Salinity from Preformed Salinity
gsw_beta

Saline contraction coefficient at constant Conservative Temperature. (48-term equation)
gsw_deltaSA_from_SP

Absolute Salinity Anomaly from Practical Salinity
gsw_pt_from_CT

Potential temperature from Conservative Temperature
gsw_enthalpy

Specific enthalpy of seawater (48-term equation)
gsw_pot_rho_t_exact

Potential density
gsw_rho_t_exact

In-situ density
gsw_SP_from_SR

Calculate Practical Salinity from Reference Salinity
gsw_rho

In-situ density (48-term equation)
gsw_sigma1

Potential density anomaly referenced to 1000 dbar
gsw_SA_from_rho

Convert from density to absolute salinity
gsw_sigma2

Potential density anomaly referenced to 2000 dbar
gsw_sigma3

Potential density anomaly referenced to 3000 dbar