# sw_dens: Density of Sea Water In marelac: Tools for Aquatic Sciences

 sw_dens R Documentation

## Density of Sea Water

### Description

Density of sea water in `kg m^{-3}`

### Usage

``````sw_dens(S = 35, t = 25, p = max(0, P-1.013253), P = 1.013253,
method=c("Gibbs","UNESCO","Chen"))
``````

### Arguments

 `S ` Salinity, when `method` = `"UNESCO"`: practical salinity (-) else absolute salinity (g/kg), `t ` Temperature, `^\circ`C, `p ` gauge or applied pressure, pressure referenced against the local atmospheric pressure, bar `P ` true pressure, bar `method ` When "UNESCO", uses the UNESCO (1983) polynomial, when "Gibbs", based on the Gibbs functions as in Feistel, 2008 "Chen" for the limnological range (i.e. fresh water systems).

### Details

To avoid confusion between the arguments (S, t, p) it is advisable to use named arguments in general (e.g. `rho(t = 4)`. The UNESCO formula is imported from package seacarb.

### Value

Density of water in `kg m^{-3}`.

### Note

Pressure used here is 1 bar (true pressure), in contrast to hydrostatic pressure (0 bar at surface) in original formula.

The coefficients from McDougall et al., 2009 were used. For temperature, they differ slightly from Feistel 2003 and Feistel 2008, which is why, for temparatures different from 0, there is a slight offset from the estimates as from table 22 or 21 from Feistel (2008).

### References

Chen Ch.-T. and Millero FJ, 1986. Thermodynamic properties of natural waters covering only the limnological range. Limnol. Oceanogr. 31 No. 3, 657 - 662. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.4319/lo.1986.31.3.0657")}

Fofonoff NP and Millard RC Jr, 1983. Algorithms for computation of fundamental properties of seawater. UNESCO technical papers in marine science, 44, 53 pp.
http://unesdoc.unesco.org/images/0005/000598/059832EB.pdf

Feistel R, 2008. A Gibbs function for seawater thermodynamics for -6 to 80 dgC and salinity up to 120 g/kg. Deep-Sea Research I, 55, 1639-1671.

McDougall TJ, Feistel R, Millero FJ, Jackett DR, Wright DG, King BA, Marion GM, Chen C-T A and Spitzer P, 2009. Calculation of the Thermophysical Properties of Seawater, Global Ship-based Repeat Hydrography Manual, IOCCP Report No. 14, ICPO Publication Series no. 134.

`rho` in package seacarb.

`sw_adtgrad`, `sw_alpha`, `sw_beta`, `sw_comp`, `sw_conserv`, `sw_cp`, `sw_depth`, `sw_enthalpy`, `sw_entropy`, `sw_gibbs`, `sw_kappa`, `sw_kappa_t`, `sw_sfac`, `sw_svel`, `sw_tfreeze`, `sw_tpot`

`convert_PStoAS`, to convert from practical salinity to absolute salinity

`convert_AStoPS`, to convert from absolute salinity to practical salinity

### Examples

``````# table 22 Feistel 2008
sw_dens(0, 0, 0)               #0.999843086e3
sw_dens(0, 79.85, 0)           #0.97188383e3   - deviates
sw_dens(0, 0,998.98675)        #0.104527796e4

# table 21 Feistel 2008
sw_dens(35.16504, 0, 0)        #0.10281072e4
sw_dens(100, 79.85, 0)         #0.102985888e4
sw_dens(35.16504, 0,998.98675) #0.10709264e4

sw_dens(35.7, 25.5, 102.3)     #1027.95249315662

S <- 0:40
plot(S, sw_dens(S = S, t = 4, method = "UNESCO"))

lines(S, sw_dens(S = S, t = 4, method = "Gibbs"), col = "red")

lines(S, sw_dens(S = S, t = 4, method = "Chen"), col = "blue")

``````

marelac documentation built on Sept. 25, 2023, 5:06 p.m.