Goby3  3.1.5a
2024.05.23
goby::util::seawater Namespace Reference

Namespaces

 detail
 

Functions

template<typename PressureUnit = decltype(boost::units::si::deci* bar), typename LatitudeUnit = boost::units::degree::plane_angle>
boost::units::quantity< boost::units::si::length > depth (boost::units::quantity< PressureUnit > pressure, boost::units::quantity< LatitudeUnit > latitude)
 Calculates depth from pressure and latitude Adapted from "Algorithms for computation of fundamental properties of seawater; UNESCO technical papers in marine science; Vol.:44; 1983" https://unesdoc.unesco.org/ark:/48223/pf0000059832. More...
 
template<typename DepthUnit = boost::units::si::length, typename LatitudeUnit = boost::units::degree::plane_angle>
boost::units::quantity< decltype(boost::units::si::deci *bar)> pressure (boost::units::quantity< DepthUnit > depth, boost::units::quantity< LatitudeUnit > latitude)
 Calculates pressure from depth and latitude. More...
 
template<typename ConductivityUnit = decltype(milli_siemens_per_cm), typename TemperatureUnit = boost::units::celsius::temperature, typename PressureUnit = decltype(boost::units::si::deci* bar)>
boost::units::quantity< boost::units::si::dimensionless > salinity (boost::units::quantity< ConductivityUnit > conductivity, boost::units::quantity< boost::units::absolute< TemperatureUnit > > temperature, boost::units::quantity< PressureUnit > pressure)
 Calculates salinity from conductivity, temperature, and pressure Adapted from "Algorithms for computation of fundamental properties of seawater; UNESCO technical papers in marine science; Vol.:44; 1983" https://unesdoc.unesco.org/ark:/48223/pf0000059832. More...
 
template<typename TemperatureUnit = boost::units::celsius::temperature, typename DimensionlessUnit = boost::units::si::dimensionless, typename PressureUnit = decltype(boost::units::si::deci* bar)>
boost::units::quantity< decltype(milli_siemens_per_cm)> conductivity (boost::units::quantity< DimensionlessUnit > salinity, boost::units::quantity< boost::units::absolute< TemperatureUnit > > temperature, boost::units::quantity< PressureUnit > pressure)
 Calculates conductivity from salinity, temperature, and pressure Adapted from "Algorithms for computation of fundamental properties of seawater; UNESCO technical papers in marine science; Vol.:44; 1983" https://unesdoc.unesco.org/ark:/48223/pf0000059832. More...
 
template<typename TemperatureUnit = boost::units::celsius::temperature, typename PressureUnit = decltype(boost::units::si::deci* bar)>
boost::units::quantity< decltype(milli_siemens_per_cm)> conductivity (double salinity, boost::units::quantity< boost::units::absolute< TemperatureUnit > > temperature, boost::units::quantity< PressureUnit > pressure)
 Calculates conductivity from salinity, temperature, and pressure (variant that accepts plain double for salinity) Adapted from "Algorithms for computation of fundamental properties of seawater; UNESCO technical papers in marine science; Vol.:44; 1983" https://unesdoc.unesco.org/ark:/48223/pf0000059832. More...
 
template<typename TemperatureUnit = boost::units::celsius::temperature, typename DimensionlessUnit = boost::units::si::dimensionless, typename LengthUnit = boost::units::si::length>
boost::units::quantity< boost::units::si::velocity > mackenzie_soundspeed (boost::units::quantity< boost::units::absolute< TemperatureUnit >> temperature, boost::units::quantity< DimensionlessUnit > salinity, boost::units::quantity< LengthUnit > depth, bool ignore_bounds=false)
 
template<typename TemperatureUnit = boost::units::celsius::temperature, typename LengthUnit = boost::units::si::length>
boost::units::quantity< boost::units::si::velocity > mackenzie_soundspeed (boost::units::quantity< boost::units::absolute< TemperatureUnit >> temperature, double salinity, boost::units::quantity< LengthUnit > depth, bool ignore_bounds=false)
 
template<typename DimensionlessUnit = boost::units::si::dimensionless, typename TemperatureUnit = boost::units::celsius::temperature, typename PressureUnit = decltype(boost::units::si::deci* bar)>
boost::units::quantity< boost::units::si::mass_density > density_anomaly (boost::units::quantity< DimensionlessUnit > salinity, boost::units::quantity< boost::units::absolute< TemperatureUnit > > temperature, boost::units::quantity< PressureUnit > pressure)
 
template<typename TemperatureUnit = boost::units::celsius::temperature, typename PressureUnit = decltype(boost::units::si::deci* bar)>
boost::units::quantity< boost::units::si::mass_density > density_anomaly (double salinity, boost::units::quantity< boost::units::absolute< TemperatureUnit > > temperature, boost::units::quantity< PressureUnit > pressure)
 

Variables

static const boost::units::quantity< decltype(milli_siemens_per_cm)> conductivity_at_standard
 
static const boost::units::metric::bar_base_unit::unit_type bar
 
static const decltype((boost::units::si::milli *boost::units::si::siemen)/(boost::units::si::centi *boost::units::si::meters) milli_siemens_per_cm )
 

Function Documentation

◆ conductivity() [1/2]

template<typename TemperatureUnit = boost::units::celsius::temperature, typename DimensionlessUnit = boost::units::si::dimensionless, typename PressureUnit = decltype(boost::units::si::deci* bar)>
boost::units::quantity<decltype(milli_siemens_per_cm)> goby::util::seawater::conductivity ( boost::units::quantity< DimensionlessUnit >  salinity,
boost::units::quantity< boost::units::absolute< TemperatureUnit > >  temperature,
boost::units::quantity< PressureUnit >  pressure 
)

Calculates conductivity from salinity, temperature, and pressure Adapted from "Algorithms for computation of fundamental properties of seawater; UNESCO technical papers in marine science; Vol.:44; 1983" https://unesdoc.unesco.org/ark:/48223/pf0000059832.

Parameters
salinitySalinity
temperatureTemperature
pressurePressure
Returns
computed conductivity

Definition at line 82 of file salinity.h.

◆ conductivity() [2/2]

template<typename TemperatureUnit = boost::units::celsius::temperature, typename PressureUnit = decltype(boost::units::si::deci* bar)>
boost::units::quantity<decltype(milli_siemens_per_cm)> goby::util::seawater::conductivity ( double  salinity,
boost::units::quantity< boost::units::absolute< TemperatureUnit > >  temperature,
boost::units::quantity< PressureUnit >  pressure 
)

Calculates conductivity from salinity, temperature, and pressure (variant that accepts plain double for salinity) Adapted from "Algorithms for computation of fundamental properties of seawater; UNESCO technical papers in marine science; Vol.:44; 1983" https://unesdoc.unesco.org/ark:/48223/pf0000059832.

Parameters
salinitySalinity
temperatureTemperature
pressurePressure
Returns
computed conductivity

Definition at line 106 of file salinity.h.

◆ density_anomaly() [1/2]

template<typename DimensionlessUnit = boost::units::si::dimensionless, typename TemperatureUnit = boost::units::celsius::temperature, typename PressureUnit = decltype(boost::units::si::deci* bar)>
boost::units::quantity<boost::units::si::mass_density> goby::util::seawater::density_anomaly ( boost::units::quantity< DimensionlessUnit >  salinity,
boost::units::quantity< boost::units::absolute< TemperatureUnit > >  temperature,
boost::units::quantity< PressureUnit >  pressure 
)

Calculate water density anomaly at a given Salinity, Temperature, Pressure using the seawater Equation of State. Adapted from "Algorithms for computation of fundamental properties of seawater; UNESCO technical papers in marine science; Vol.:44; 1983" https://unesdoc.unesco.org/ark:/48223/pf0000059832

Parameters
salinitySalinity
temperatureTemperature
pressurePressure
Returns
computed density anomaly

Definition at line 59 of file swstate.h.

◆ density_anomaly() [2/2]

template<typename TemperatureUnit = boost::units::celsius::temperature, typename PressureUnit = decltype(boost::units::si::deci* bar)>
boost::units::quantity<boost::units::si::mass_density> goby::util::seawater::density_anomaly ( double  salinity,
boost::units::quantity< boost::units::absolute< TemperatureUnit > >  temperature,
boost::units::quantity< PressureUnit >  pressure 
)

Calculate water density anomaly at a given Salinity, Temperature, Pressure using the seawater Equation of State (variant that uses plain double for salinity) Adapted from "Algorithms for computation of fundamental properties of seawater; UNESCO technical papers in marine science; Vol.:44; 1983" https://unesdoc.unesco.org/ark:/48223/pf0000059832

Parameters
salinitySalinity
temperatureTemperature
pressurePressure
Returns
computed density anomaly

Definition at line 216 of file swstate.h.

◆ depth()

template<typename PressureUnit = decltype(boost::units::si::deci* bar), typename LatitudeUnit = boost::units::degree::plane_angle>
boost::units::quantity<boost::units::si::length> goby::util::seawater::depth ( boost::units::quantity< PressureUnit >  pressure,
boost::units::quantity< LatitudeUnit >  latitude 
)

Calculates depth from pressure and latitude Adapted from "Algorithms for computation of fundamental properties of seawater; UNESCO technical papers in marine science; Vol.:44; 1983" https://unesdoc.unesco.org/ark:/48223/pf0000059832.

Parameters
pressurePressure
latitudeLatitude
Returns
computed depth

Definition at line 57 of file depth.h.

◆ mackenzie_soundspeed() [1/2]

template<typename TemperatureUnit = boost::units::celsius::temperature, typename DimensionlessUnit = boost::units::si::dimensionless, typename LengthUnit = boost::units::si::length>
boost::units::quantity<boost::units::si::velocity> goby::util::seawater::mackenzie_soundspeed ( boost::units::quantity< boost::units::absolute< TemperatureUnit >>  temperature,
boost::units::quantity< DimensionlessUnit >  salinity,
boost::units::quantity< LengthUnit >  depth,
bool  ignore_bounds = false 
)

K.V. Mackenzie, Nine-term equation for the sound speed in the oceans (1981) J. Acoust. Soc. Am. 70(3), pp 807-812 https://doi.org/10.1121/1.386920 Ranges of validity encompass: temperature -2 to 30 deg C, salinity 25 to 40, and depth 0 to 8000 m.

Parameters
temperaturetemperature
salinitysalinity (unitless, calculated using Practical Salinity Scale)
depthdepth
Exceptions
std::out_of_rangeif any of the inputs are out of the validity range for this algorithm
Returns
speed of sound in meters per second

Definition at line 52 of file soundspeed.h.

◆ mackenzie_soundspeed() [2/2]

template<typename TemperatureUnit = boost::units::celsius::temperature, typename LengthUnit = boost::units::si::length>
boost::units::quantity<boost::units::si::velocity> goby::util::seawater::mackenzie_soundspeed ( boost::units::quantity< boost::units::absolute< TemperatureUnit >>  temperature,
double  salinity,
boost::units::quantity< LengthUnit >  depth,
bool  ignore_bounds = false 
)

K.V. Mackenzie, Nine-term equation for the sound speed in the oceans (1981) J. Acoust. Soc. Am. 70(3), pp 807-812 (variant that accepts plain double for salinity) https://doi.org/10.1121/1.386920 Ranges of validity encompass: temperature -2 to 30 deg C, salinity 30 to 40, and depth 0 to 8000 m.

Parameters
temperaturetemperature
salinitysalinity
depthdepth
Exceptions
std::out_of_rangeif any of the inputs are out of the validity range for this algorithm
Returns
speed of sound in meters per second

Definition at line 97 of file soundspeed.h.

◆ pressure()

template<typename DepthUnit = boost::units::si::length, typename LatitudeUnit = boost::units::degree::plane_angle>
boost::units::quantity<decltype(boost::units::si::deci * bar)> goby::util::seawater::pressure ( boost::units::quantity< DepthUnit >  depth,
boost::units::quantity< LatitudeUnit >  latitude 
)
inline

Calculates pressure from depth and latitude.

Ref: Saunders, "Practical Conversion of Pressure to Depth", J. Phys. Oceanog., April 1981.

Parameters
depthDepth
latitudeLatitude
Returns
computed pressure

Definition at line 55 of file pressure.h.

◆ salinity()

template<typename ConductivityUnit = decltype(milli_siemens_per_cm), typename TemperatureUnit = boost::units::celsius::temperature, typename PressureUnit = decltype(boost::units::si::deci* bar)>
boost::units::quantity<boost::units::si::dimensionless> goby::util::seawater::salinity ( boost::units::quantity< ConductivityUnit >  conductivity,
boost::units::quantity< boost::units::absolute< TemperatureUnit > >  temperature,
boost::units::quantity< PressureUnit >  pressure 
)

Calculates salinity from conductivity, temperature, and pressure Adapted from "Algorithms for computation of fundamental properties of seawater; UNESCO technical papers in marine science; Vol.:44; 1983" https://unesdoc.unesco.org/ark:/48223/pf0000059832.

Parameters
conductivityConductivity
temperatureTemperature
pressurePressure
Returns
computed salinity

Definition at line 58 of file salinity.h.

Variable Documentation

◆ bar

const boost::units::metric::bar_base_unit::unit_type goby::util::seawater::bar
static

Definition at line 36 of file units.h.

◆ conductivity_at_standard

const boost::units::quantity<decltype(milli_siemens_per_cm)> goby::util::seawater::conductivity_at_standard
static
Initial value:

Definition at line 44 of file salinity.h.

◆ milli_siemens_per_cm

const decltype((boost::units::si::milli * boost::units::si::siemen) / (boost::units::si::centi * boost::units::si::meters) goby::util::seawater::milli_siemens_per_cm)
static

Definition at line 38 of file units.h.

goby::util::seawater::milli_siemens_per_cm
static const decltype((boost::units::si::milli *boost::units::si::siemen)/(boost::units::si::centi *boost::units::si::meters) milli_siemens_per_cm)
Definition: units.h:38