swRho | R Documentation |
Compute \rho
, the in-situ density of seawater.
swRho(
salinity,
temperature = NULL,
pressure = NULL,
longitude = NULL,
latitude = NULL,
eos = getOption("oceEOS", default = "gsw"),
debug = getOption("oceDebug")
)
salinity |
either practical salinity (in which case |
temperature |
in-situ temperature ( |
pressure |
pressure (dbar) |
longitude |
longitude of observation (only used if |
latitude |
latitude of observation (only used if |
eos |
equation of state, either |
debug |
an integer specifying whether debugging information is
to be printed during the processing. This is a general parameter that
is used by many |
If eos="unesco"
, the density is calculated using the UNESCO equation
of state for seawater (references 1 and 2), and if eos="gsw"
, the GSW formulation
(references 3 and 4) is used.
In-situ density (kg/m^3
).
The UNESCO formulae are defined in terms of
temperature measured on the IPTS-68 scale, whereas the replacement GSW
formulae are based on the ITS-90 scale. Prior to the addition of GSW
capabilities, the various sw*
functions took temperature to be in
IPTS-68 units. As GSW capabilities were added in early 2015, the assumed
unit of temperature
was taken to be ITS-90. This change means that
old code has to be modified, by replacing e.g. swRho(S, T, p)
with
swRho(S, T90fromT68(T), p)
. At typical oceanic values, the difference
between the two scales is a few millidegrees.
Dan Kelley
Fofonoff, P. and R. C. Millard Jr, 1983. Algorithms for computation of fundamental properties of seawater. Unesco Technical Papers in Marine Science, 44, 53 pp.
Gill, A.E., 1982. Atmosphere-ocean Dynamics, Academic Press, New York, 662 pp.
IOC, SCOR, and IAPSO (2010). The international thermodynamic equation of seawater-2010: Calculation and use of thermodynamic properties. Technical Report 56, Intergovernmental Oceanographic Commission, Manuals and Guide.
McDougall, T.J. and P.M. Barker, 2011: Getting started with TEOS-10 and the Gibbs Seawater (GSW) Oceanographic Toolbox, 28pp., SCOR/IAPSO WG127, ISBN 978-0-646-55621-5.
Related density routines include swSigma0()
(and
equivalents at other pressure horizons), swSigmaT()
, and
swSigmaTheta()
.
Other functions that calculate seawater properties:
T68fromT90()
,
T90fromT48()
,
T90fromT68()
,
computableWaterProperties()
,
locationForGsw()
,
swAbsoluteSalinity()
,
swAlpha()
,
swAlphaOverBeta()
,
swBeta()
,
swCSTp()
,
swConservativeTemperature()
,
swDepth()
,
swDynamicHeight()
,
swLapseRate()
,
swN2()
,
swPressure()
,
swRrho()
,
swSCTp()
,
swSR()
,
swSTrho()
,
swSigma()
,
swSigma0()
,
swSigma1()
,
swSigma2()
,
swSigma3()
,
swSigma4()
,
swSigmaT()
,
swSigmaTheta()
,
swSoundAbsorption()
,
swSoundSpeed()
,
swSpecificHeat()
,
swSpice()
,
swSpiciness0()
,
swSpiciness1()
,
swSpiciness2()
,
swSstar()
,
swTFreeze()
,
swTSrho()
,
swThermalConductivity()
,
swTheta()
,
swViscosity()
,
swZ()
library(oce)
# The numbers in the comments are the check values listed in reference 1;
# note that temperature in that reference was on the T68 scale, but that
# the present function works with the ITS-90 scale, so a conversion
# is required.
swRho(35, T90fromT68(5), 0, eos = "unesco") # 1027.67547
swRho(35, T90fromT68(5), 10000, eos = "unesco") # 1069.48914
swRho(35, T90fromT68(25), 0, eos = "unesco") # 1023.34306
swRho(35, T90fromT68(25), 10000, eos = "unesco") # 1062.53817
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.