| swRrho {oce} | R Documentation |
Density Ratio
Description
Compute density ratio
Usage
swRrho(
ctd,
sense = c("diffusive", "finger"),
smoothingLength = 10,
df,
eos = getOption("oceEOS", default = "gsw")
)
Arguments
ctd |
an oce object that holds |
sense |
an indication of the sense of double diffusion under study and therefore of the definition of Rrho; see “Details” |
smoothingLength |
ignored if |
df |
if given, this is provided to |
eos |
equation of state, either |
Details
This computes Rrho (density ratio) from a ctd object.
If eos="unesco", this is done by calculating salinity and
potential-temperature derivatives from smoothing splines whose properties
are governed by smoothingLength or df. If
sense="diffusive" the definition is
(beta*dS/dz)/(alpha*d(theta)/dz) and
the reciprocal for "finger".
If eos="gsw", this is done by extracting absolute salinity and
conservative temperature, smoothing with a smoothing spline as in the
"unesco" case, and then calling gsw::gsw_Turner_Rsubrho()
on these smoothed fields. Since the gsw function works on mid-point
pressures, approx() is used to interpolate back to the original
pressures.
If the default arguments are acceptable, ctd[["Rrho"]] may be used
instead of swRrho(ctd).
Value
Density ratio defined in either the "diffusive" or
"finger" sense.
Author(s)
Dan Kelley and Chantelle Layton
See Also
Other functions that calculate seawater properties:
T68fromT90(),
T90fromT48(),
T90fromT68(),
computableWaterProperties(),
locationForGsw(),
swAbsoluteSalinity(),
swAlphaOverBeta(),
swAlpha(),
swBeta(),
swCSTp(),
swConservativeTemperature(),
swDepth(),
swDynamicHeight(),
swLapseRate(),
swN2(),
swPressure(),
swRho(),
swSCTp(),
swSR(),
swSTrho(),
swSigma0(),
swSigma1(),
swSigma2(),
swSigma3(),
swSigma4(),
swSigmaTheta(),
swSigmaT(),
swSigma(),
swSoundAbsorption(),
swSoundSpeed(),
swSpecificHeat(),
swSpice(),
swSstar(),
swTFreeze(),
swTSrho(),
swThermalConductivity(),
swTheta(),
swViscosity(),
swZ()
Examples
library(oce)
data(ctd)
u <- swRrho(ctd, eos = "unesco")
g <- swRrho(ctd, eos = "gsw")
p <- ctd[["p"]]
plot(u, p, ylim = rev(range(p)), type = "l", xlab = expression(R[rho]))
lines(g, p, lty = 2, col = "red")
legend("topright", lty = 1:2, legend = c("unesco", "gsw"), col = c("black", "red"))