World Ocean Simulation System (WOSS) library
woss::SSP Class Reference

SSP class offers multiple creation and manipulation capabilities for sound speed profile. More...

#include <ssp-definitions.h>

Collaboration diagram for woss::SSP:
Collaboration graph

Public Types

enum  SSPEqType { SSP_EQ_CHEN_MILLERO = 0 , SSP_EQ_TEOS_10 = 1 , SSP_EQ_TEOS_10_EXACT = 2 , SSP_EQ_INVALID }
 

Public Member Functions

 SSP (long double depth_precision=SSP_CUSTOM_DEPTH_PRECISION)
 
 SSP (DepthMap &ssp_map, DepthMap &temp_map, DepthMap &sal_map, DepthMap &press_map, long double depth_precision=SSP_CUSTOM_DEPTH_PRECISION)
 
 SSP (DepthMap &ssp_map, long double depth_precision=SSP_CUSTOM_DEPTH_PRECISION)
 
 SSP (const SSP &copy)
 
virtual SSPcreate (long double depth_precision=SSP_CUSTOM_DEPTH_PRECISION) const
 
virtual SSPcreate (DepthMap &ssp_map, DepthMap &temp_map, DepthMap &sal_map, DepthMap &press_map, long double depth_precision=SSP_CUSTOM_DEPTH_PRECISION) const
 
virtual SSPcreate (DepthMap &ssp_map, long double depth_precision=SSP_CUSTOM_DEPTH_PRECISION) const
 
virtual SSPcreate (const SSP &copy) const
 
virtual SSPclone () const
 
int size () const
 
bool empty () const
 
void clear ()
 
DConstIter begin () const
 
DConstIter end () const
 
DConstRIter rbegin () const
 
DConstRIter rend () const
 
DConstIter lower_bound (const PDouble &depth) const
 
DConstIter upper_bound (const PDouble &depth) const
 
DConstIter at (const int i) const
 
DConstIter pressure_begin () const
 
DConstIter pressure_end () const
 
DConstRIter pressure_rbegin () const
 
DConstRIter pressure_rend () const
 
DConstIter pressure_lower_bound (const PDouble &depth) const
 
DConstIter pressure_upper_bound (const PDouble &depth) const
 
DConstIter pressure_find (const PDouble &depth) const
 
DConstIter temperature_begin () const
 
DConstIter temperature_end () const
 
DConstRIter temperature_rbegin () const
 
DConstRIter temperature_rend () const
 
DConstIter temperature_lower_bound (const PDouble &depth) const
 
DConstIter temperature_upper_bound (const PDouble &depth) const
 
DConstIter temperature_find (const PDouble &depth) const
 
DConstIter salinity_begin () const
 
DConstIter salinity_end () const
 
DConstRIter salinity_rbegin () const
 
DConstRIter salinity_rend () const
 
DConstIter salinity_lower_bound (const PDouble &depth) const
 
DConstIter salinity_upper_bound (const PDouble &depth) const
 
DConstIter salinity_find (const PDouble &depth) const
 
virtual bool isValid () const
 
virtual bool isTransformable () const
 
virtual bool isRandomizable () const
 
virtual SSPtransform (const Coord &coordinates, double new_min_depth=-HUGE_VAL, double new_max_depth=HUGE_VAL, int total_depth_steps=SSP_CUSTOM_DEPTH_STEPS) const
 
virtual SSPtruncate (double max_depth) const
 
virtual SSPfullRandomize (double ratio_incr_value) const
 
virtual SSPrandomize (double ratio_incr_value) const
 
virtual bool import (::std::istream &stream_in)
 
virtual bool write (::std::ostream &stream_out) const
 
SSPinsertValue (double depth, double ssp_value)
 
SSPinsertValue (double depth, double temperature, double salinity, const ::std::complex< double > &pressure, double ssp_value)
 
SSPinsertValue (double temperature, double salinity, const ::std::complex< double > &pressure, const Coord &coordinates=Coord(0.0, 0.0))
 
SSPinsertValue (double depth, double temperature, double salinity, const Coord &coordinates=Coord(0.0, 0.0))
 
DConstIter findValue (const double &depth) const
 
SSPeraseValue (const double &depth)
 
double getMaxDepthValue () const
 
double getMinDepthValue () const
 
double getMaxSSPValue () const
 
double getMinSSPValue () const
 
virtual void setDepthPrecision (long double prec)
 
long double getDepthPrecision () const
 
SSPsetSSPEqType (SSPEqType eq_type)
 
SSPEqType getSSPEqType () const
 
SSPoperator= (const SSP &x)
 
friend::std::ostream & operator<< (::std::ostream &os, const SSP &instance)
 
friend::std::ostream & operator>> (::std::istream &is, const SSP &instance)
 

Static Public Member Functions

static void setDebug (bool flag)
 

Protected Member Functions

virtual double calculateSSP (double temperature, double salinity, double pressure) const
 

Protected Attributes

SSPEqType ssp_eq_type
 
double min_ssp_value
 
double max_ssp_value
 
long double depth_precision
 
DepthMap ssp_map
 
DepthMap pressure_map
 
DepthMap salinity_map
 
DepthMap temperature_map
 

Static Protected Attributes

static bool debug = false
 

Private Member Functions

bool isCanonOcean (const Coord &coordinates) const
 
bool isNEAtlanticOcean (const Coord &coordinates) const
 
bool isAntarcticOcean (const Coord &coordinates) const
 
bool isMediterraneanSea (const Coord &coordinates) const
 
bool isRedSea (const Coord &coordinates) const
 
bool isArcticOcean (const Coord &coordinates) const
 
bool isJapanSea (const Coord &coordinates) const
 
bool isSuluSea (const Coord &coordinates) const
 
bool isHalmaheraSea (const Coord &coordinates) const
 
bool isCelebesSea (const Coord &coordinates) const
 
bool isBlackSea (const Coord &coordinates) const
 
bool isBalticSea (const Coord &coordinates) const
 
double thyh (double z) const
 
double g (double lat) const
 
double k (double z, double lat) const
 
double hq (double z) const
 
double h (double z, double lat) const
 
double getPressureCorreptions (const Coord &coordinates, double depth) const
 
double getPressureFromDepth (const Coord &coordinates, double depth) const
 
double g_z (double lat) const
 
double getDepthCorreptions (const Coord &coordinates, double pressure) const
 
double getDepthfromPressure (const Coord &coordinates, double pressure) const
 
double d (double t, double p) const
 
double b (double t, double p) const
 
double a (double t, double p) const
 
double cw (double t, double p) const
 
double gibbs (int ns, int nt, int np, double sa, double t, double p) const
 

Friends

bool operator== (const SSP &left, const SSP &right)
 
bool operator!= (const SSP &left, const SSP &right)
 
const SSP operator+ (const SSP &left, const SSP &right)
 
const SSP operator- (const SSP &left, const SSP &right)
 
const SSP operator* (const SSP &left, const SSP &right)
 
const SSP operator/ (const SSP &left, const SSP &right)
 
const SSP operator+ (const SSP &left, const double right)
 
const SSP operator- (const SSP &left, const double right)
 
const SSP operator/ (const SSP &left, const double right)
 
const SSP operator* (const SSP &left, const double right)
 
const SSP operator+ (const double left, const SSP &right)
 
const SSP operator- (const double left, const SSP &right)
 
const SSP operator/ (const double left, const SSP &right)
 
const SSP operator* (const double left, const SSP &right)
 
SSPoperator+= (SSP &left, const SSP &right)
 
SSPoperator-= (SSP &left, const SSP &right)
 
SSPoperator*= (SSP &left, const SSP &right)
 
SSPoperator/= (SSP &left, const SSP &right)
 
SSPoperator+= (SSP &left, const double right)
 
SSPoperator-= (SSP &left, const double right)
 
SSPoperator/= (SSP &left, const double right)
 
SSPoperator*= (SSP &left, const double right)
 

Detailed Description

SSP class offers multiple creation and manipulation capabilities for sound speed profile.

SSP can store all information related to a sound speed profile: temperature [C°], pressure [bar], salinity [psu] and sound speed [m/s]. It offers capabilities for arithmetic computations, sound speed calculations (Chen and Millero equations), depth to pressure conversions (and viceversa) with coordinates corrections, sound speed profile transformations and random perturbation.

Member Enumeration Documentation

◆ SSPEqType

SSP EQ

Enumerator
SSP_EQ_CHEN_MILLERO 

UNESCO Chen & Miller, Wong Zu Eq.

SSP_EQ_TEOS_10 

TEOS-10 Eq (.

See also
reference [10])
SSP_EQ_TEOS_10_EXACT 

TEOS-10 Exact Eq (.

See also
reference [10])
SSP_EQ_INVALID 

Must always be the last.

Constructor & Destructor Documentation

◆ SSP() [1/4]

SSP::SSP ( long double  depth_precision = SSP_CUSTOM_DEPTH_PRECISION)

SSP default constructor. The object created is not valid

Parameters
depth_precisionprecision of PDouble objects representing depth.

◆ SSP() [2/4]

SSP::SSP ( DepthMap ssp_map,
DepthMap temp_map,
DepthMap sal_map,
DepthMap press_map,
long double  depth_precision = SSP_CUSTOM_DEPTH_PRECISION 
)

SSP constructor.

Parameters
ssp_mapmap linking a PDouble depth [m] (with precision depth_precision) to a sound speed [m/s]
temp_mapmap linking a PDouble depth [m] (with precision depth_precision) to a temperature [C°]
sal_mapmap linking a PDouble depth [m] (with precision depth_precision) to a salinity [ppu]
press_mapmap linking a PDouble depth [m] (with precision depth_precision) to a pressure [bar]
depth_precisiondepth precision of given maps [m]

References pressure_map, salinity_map, ssp_map, and temperature_map.

◆ SSP() [3/4]

SSP::SSP ( DepthMap ssp_map,
long double  depth_precision = SSP_CUSTOM_DEPTH_PRECISION 
)

SSP constructor.

Parameters
ssp_mapmap linking a PDouble depth [m] (with precision depth_precision) to a sound speed [m/s]
depth_precisiondepth precision of given maps [m]

References ssp_map.

◆ SSP() [4/4]

SSP::SSP ( const SSP copy)

SSP copy constructor

Parameters
copySSP to be copied

References depth_precision, max_ssp_value, min_ssp_value, pressure_map, salinity_map, ssp_eq_type, ssp_map, and temperature_map.

Member Function Documentation

◆ a()

double woss::SSP::a ( double  t,
double  p 
) const
inlineprivate

UNESCO Chen and Millero Equation with Wong and Zu corrections for sound speed calculations

Parameters
ttemperature provided [C°]
ppressure provided [bar]

Referenced by calculateSSP().

◆ at()

DConstIter SSP::at ( const int  i) const

Returns a const iterator to the sound speed value at i-th position

Parameters
iinteger should be between 0 and size()
Returns
const iterator to end() if position i is not found

References ssp_map.

◆ b()

double woss::SSP::b ( double  t,
double  p 
) const
inlineprivate

UNESCO Chen and Millero Equation with Wong and Zu corrections for sound speed calculations

Parameters
ttemperature provided [C°]
ppressure provided [bar]

Referenced by calculateSSP().

◆ begin()

DConstIter woss::SSP::begin ( ) const
inline

Returns a const iterator to the beginning of the sound speed map

Returns
const iterator

References ssp_map.

Referenced by transform(), truncate(), and woss::BellhopWoss::writeNormalizedSSP().

◆ calculateSSP()

double woss::SSP::calculateSSP ( double  temperature,
double  salinity,
double  pressure 
) const
inlineprotectedvirtual

Calculates sound speed from temperature, salinity, pressure with UNESCO Chen and Millero equations and with Wong and Zu corrections

Parameters
temperaturetemperature value [C°]
salinitysalinity value [ppu]
pressurepressure value [bar]

References a(), b(), cw(), d(), gibbs(), SSP_EQ_CHEN_MILLERO, SSP_EQ_TEOS_10, SSP_EQ_TEOS_10_EXACT, and ssp_eq_type.

Referenced by fullRandomize(), insertValue(), and transform().

Here is the call graph for this function:

◆ clear()

void woss::SSP::clear ( )
inline

Erase all values of sound speed, temperature, pressure and salinity. The object therefore is not valid

References pressure_map, salinity_map, ssp_map, and temperature_map.

Referenced by woss::BellhopWoss::writeNormalizedSSP().

◆ clone()

virtual SSP * woss::SSP::clone ( ) const
inlinevirtual

SSP virtual factory method

Returns
a heap-created copy of this instance

Referenced by woss::DefHandler::operator=(), and truncate().

◆ create() [1/4]

virtual SSP * woss::SSP::create ( const SSP copy) const
inlinevirtual

SSP virtual factory method

Parameters
copySSP to be copied
Returns
a heap-created SSP object

◆ create() [2/4]

virtual SSP * woss::SSP::create ( DepthMap ssp_map,
DepthMap temp_map,
DepthMap sal_map,
DepthMap press_map,
long double  depth_precision = SSP_CUSTOM_DEPTH_PRECISION 
) const
inlinevirtual

SSP virtual factory method

Parameters
ssp_mapmap linking a PDouble depth [m] (with precision depth_precision) to a sound speed [m/s]
temp_mapmap linking a PDouble depth [m] (with precision depth_precision) to a temperature [C°]
sal_mapmap linking a PDouble depth [m] (with precision depth_precision) to a salinity [ppu]
press_mapmap linking a PDouble depth [m] (with precision depth_precision) to a pressure [bar]
depth_precisiondepth precision of given maps [m]
Returns
a heap-created SSP object

References depth_precision, and ssp_map.

◆ create() [3/4]

virtual SSP * woss::SSP::create ( DepthMap ssp_map,
long double  depth_precision = SSP_CUSTOM_DEPTH_PRECISION 
) const
inlinevirtual

SSP virtual factory method

Parameters
ssp_mapmap linking a PDouble depth [m] (with precision depth_precision) to a sound speed [m/s]
depth_precisiondepth precision of given maps [m]
Returns
a heap-created SSP object

References depth_precision, and ssp_map.

◆ create() [4/4]

virtual SSP * woss::SSP::create ( long double  depth_precision = SSP_CUSTOM_DEPTH_PRECISION) const
inlinevirtual

SSP virtual factory method

Parameters
depth_precisionprecision of PDouble objects representing depth.
Returns
a heap-created SSP object

References depth_precision.

Referenced by woss::WossDbManager::getAverageSSP(), and woss::WossDbManager::importCustomSSP().

◆ cw()

double woss::SSP::cw ( double  t,
double  p 
) const
inlineprivate

UNESCO Chen and Millero Equation with Wong and Zu corrections for sound speed calculations

Parameters
ttemperature provided [C°]
ppressure provided [bar]

Referenced by calculateSSP().

◆ d()

double woss::SSP::d ( double  t,
double  p 
) const
inlineprivate

UNESCO Chen and Millero Equation with Wong and Zu corrections for sound speed calculations

Parameters
ttemperature provided [C°]
ppressure provided [bar]

Referenced by calculateSSP().

◆ empty()

bool woss::SSP::empty ( ) const
inline

Checks if the instance has stored values

Returns
true if condition applies, false otherwise

References ssp_map.

◆ end()

DConstIter woss::SSP::end ( ) const
inline

Returns a const iterator to the end of the sound speed map

Returns
const iterator

References ssp_map.

Referenced by truncate(), and woss::BellhopWoss::writeNormalizedSSP().

◆ eraseValue()

SSP & woss::SSP::eraseValue ( const double &  depth)
inline

Erase the sound speed value with key == of depth parameter

Parameters
depthconst reference to a PDouble depth value
Returns
reference to *this

References ssp_map.

◆ findValue()

DConstIter woss::SSP::findValue ( const double &  depth) const
inline

Returns a const iterator to the sound speed value with key == of depth parameter

Parameters
depthconst reference to a PDouble depth value
Returns
const iterator to end() if depth is not found

References ssp_map.

◆ fullRandomize()

SSP * SSP::fullRandomize ( double  ratio_incr_value) const
virtual

Performs a random perturbation of temperature, salinity, pressure with given ratio Sound speed values are then calculated from this new data

Parameters
ratio_incr_valueperturbation ratio
Returns
a new SSP object

References calculateSSP(), depth_precision, woss::Singleton< T >::instance(), isRandomizable(), pressure_map, salinity_map, ssp_map, and temperature_map.

Here is the call graph for this function:

◆ g()

double woss::SSP::g ( double  lat) const
inlineprivate

Equation for pressure from depth conversion ( Leroy and Parthiot )

Parameters
latlatitude [decimal degree]

Referenced by k().

◆ g_z()

double woss::SSP::g_z ( double  lat) const
inlineprivate

Equation for depth from pressure conversion ( Leroy and Parthiot )

Parameters
latlatitude [decimal degree]

Referenced by getDepthfromPressure().

◆ getDepthCorreptions()

double SSP::getDepthCorreptions ( const Coord coordinates,
double  pressure 
) const
private

Returns depth correction for given coordinates and pressure ( Leroy and Parthiot )

Parameters
coordinatescoordinates provided
pressurepressure provided [bar]

References isAntarcticOcean(), isBalticSea(), isBlackSea(), isCanonOcean(), isCelebesSea(), isHalmaheraSea(), isJapanSea(), isMediterraneanSea(), isNEAtlanticOcean(), isRedSea(), and isSuluSea().

Referenced by getDepthfromPressure().

Here is the call graph for this function:

◆ getDepthfromPressure()

double woss::SSP::getDepthfromPressure ( const Coord coordinates,
double  pressure 
) const
inlineprivate

Returns depth for given coordinates and pressure ( Leroy and Parthiot )

Parameters
coordinatescoordinates provided
pressurepressure provided [bar]
Returns
depth [m]

References g_z(), getDepthCorreptions(), and woss::Coord::getLatitude().

Here is the call graph for this function:

◆ getDepthPrecision()

long double woss::SSP::getDepthPrecision ( ) const
inline

Returns the sound speed profile depth precision

Returns
depth precision [m]

References depth_precision.

◆ getMaxDepthValue()

double woss::SSP::getMaxDepthValue ( ) const
inline

Returns the maximum depth value

Returns
maximum depth [m]

References ssp_map.

Referenced by woss::ACToolboxWoss::initSSPVector().

◆ getMaxSSPValue()

double woss::SSP::getMaxSSPValue ( ) const
inline

Returns the maximum sound speed value

Returns
maximum sound speed [m/s]

References max_ssp_value.

◆ getMinDepthValue()

double woss::SSP::getMinDepthValue ( ) const
inline

Returns the minimum depth value

Returns
minimum depth [m]

References ssp_map.

Referenced by woss::ACToolboxWoss::initSSPVector().

◆ getMinSSPValue()

double woss::SSP::getMinSSPValue ( ) const
inline

Returns the maximum depth value

Returns
maximum sound speed [m/s]

References min_ssp_value.

◆ getPressureCorreptions()

double SSP::getPressureCorreptions ( const Coord coordinates,
double  depth 
) const
private

Returns pressure correction for given coordinates and depth ( Leroy and Parthiot )

Parameters
coordinatescoordinates provided
depthdepth provided [m]

References isAntarcticOcean(), isBalticSea(), isBlackSea(), isCanonOcean(), isCelebesSea(), isHalmaheraSea(), isJapanSea(), isMediterraneanSea(), isNEAtlanticOcean(), isRedSea(), and isSuluSea().

Referenced by getPressureFromDepth().

Here is the call graph for this function:

◆ getPressureFromDepth()

double woss::SSP::getPressureFromDepth ( const Coord coordinates,
double  depth 
) const
inlineprivate

Returns pressure for given coordinates and depth ( Leroy and Parthiot )

Parameters
coordinatescoordinates provided
depthdepth provided [m]
Returns
pressure [bar]

References woss::Coord::getLatitude(), getPressureCorreptions(), h(), and thyh().

Referenced by insertValue(), and transform().

Here is the call graph for this function:

◆ getSSPEqType()

SSPEqType woss::SSP::getSSPEqType ( ) const
inline

Gets the current SSPEqType

Returns
current SSPEqType

References ssp_eq_type.

◆ gibbs()

double woss::SSP::gibbs ( int  ns,
int  nt,
int  np,
double  sa,
double  t,
double  p 
) const
inlineprivate

Seawater specific Gibbs free energy and derivatives up to order 2

Parameters
nsorder of salinity derivative
ntorder of temperature derivative
nporder of pressure derivative
sasalinity [ppu]
ttemperature [C°]
ppressure [dbar]

Referenced by calculateSSP().

◆ h()

double woss::SSP::h ( double  z,
double  lat 
) const
inlineprivate

Equation for pressure from depth conversion ( Leroy and Parthiot )

Parameters
zdepth [m]
latlatitude [decimal degree]

References hq(), and k().

Referenced by getPressureFromDepth().

Here is the call graph for this function:

◆ hq()

double woss::SSP::hq ( double  z) const
inlineprivate

Equation for pressure from depth conversion ( Leroy and Parthiot )

Parameters
zdepth [m]

Referenced by h().

◆ import()

bool SSP::import ( ::std::istream &  stream_in)
virtual

Imports values in from the given stream

Parameters
stream_inconst reference to an istream instance
Returns
true if method was successful, false otherwise

References insertValue().

Here is the call graph for this function:

◆ insertValue() [1/4]

SSP & SSP::insertValue ( double  depth,
double  ssp_value 
)

Inserts and doesn't replace a sound speed value at given depth

Parameters
depthdepth value [m]. The corresponding PDouble will take SSP::depth_precision as precision
ssp_valuesound speed value [m/s]
Returns
reference to *this

References depth_precision, max_ssp_value, min_ssp_value, and ssp_map.

Referenced by import(), woss::WossDbManager::importCustomSSP(), and truncate().

◆ insertValue() [2/4]

SSP & woss::SSP::insertValue ( double  depth,
double  temperature,
double  salinity,
const ::std::complex< double > &  pressure,
double  ssp_value 
)

Inserts and doesn't replace a sound speed value at given depth

Parameters
depthdepth value [m]. The corresponding PDouble will take SSP::depth_precision as precision
temperaturetemperature value [C°]
salinitysalinity value [ppu]
pressurepressure value [bar]
ssp_valuesound speed value [m/s]
Returns
reference to *this

◆ insertValue() [3/4]

SSP & SSP::insertValue ( double  depth,
double  temperature,
double  salinity,
const Coord coordinates = Coord(0.0, 0.0) 
)

Calculates and doesn't replace sound speed from given temperature, pressure and salinity value at given depth, with pressure converted from depth.

Parameters
coordinatescoordinates for depth-to-pressure conversion corrections (defaults to CanonOcean)
depthdepth value [m]
temperaturetemperature value [C°]
salinitysalinity value [ppu]
Returns
reference to *this

References calculateSSP(), depth_precision, getPressureFromDepth(), woss::Coord::isValid(), max_ssp_value, min_ssp_value, pressure_map, salinity_map, ssp_map, and temperature_map.

Here is the call graph for this function:

◆ insertValue() [4/4]

SSP & woss::SSP::insertValue ( double  temperature,
double  salinity,
const ::std::complex< double > &  pressure,
const Coord coordinates = Coord(0.0, 0.0) 
)

Calculates and doesn't replace sound speed from given temperature, pressure and salinity value at depth converted from pressure.

Parameters
coordinatescoordinates for pressure-to-depth conversion corrections (defaults to CanonOcean)
temperaturetemperature value [C°]
salinitysalinity value [ppu]
pressurepressure value [bar]
Returns
reference to *this

◆ isAntarcticOcean()

bool woss::SSP::isAntarcticOcean ( const Coord coordinates) const
inlineprivate

Checks if coordinates provided are in Antarctic Ocean

Parameters
coordinatescoordinates value
Returns
true if condition holds, false otherwise

References woss::Coord::getLatitude().

Referenced by getDepthCorreptions(), and getPressureCorreptions().

Here is the call graph for this function:

◆ isArcticOcean()

bool woss::SSP::isArcticOcean ( const Coord coordinates) const
inlineprivate

Checks if coordinates provided are in Arctic Ocean

Parameters
coordinatescoordinates value
Returns
true if condition holds, false otherwise

References woss::Coord::getLatitude().

Here is the call graph for this function:

◆ isBalticSea()

bool woss::SSP::isBalticSea ( const Coord coordinates) const
inlineprivate

Checks if coordinates provided are in Baltic Sea

Parameters
coordinatescoordinates value
Returns
true if condition holds, false otherwise

References woss::Coord::getLatitude(), and woss::Coord::getLongitude().

Referenced by getDepthCorreptions(), and getPressureCorreptions().

Here is the call graph for this function:

◆ isBlackSea()

bool woss::SSP::isBlackSea ( const Coord coordinates) const
inlineprivate

Checks if coordinates provided are in Black Sea

Parameters
coordinatescoordinates value
Returns
true if condition holds, false otherwise

References woss::Coord::getLatitude(), and woss::Coord::getLongitude().

Referenced by getDepthCorreptions(), and getPressureCorreptions().

Here is the call graph for this function:

◆ isCanonOcean()

bool woss::SSP::isCanonOcean ( const Coord coordinates) const
inlineprivate

Checks if coordinates provided are in canon ocean

Parameters
coordinatescoordinates value
Returns
true if condition holds, false otherwise

References woss::Coord::getLatitude().

Referenced by getDepthCorreptions(), and getPressureCorreptions().

Here is the call graph for this function:

◆ isCelebesSea()

bool woss::SSP::isCelebesSea ( const Coord coordinates) const
inlineprivate

Checks if coordinates provided are in Celebes Sea

Parameters
coordinatescoordinates value
Returns
true if condition holds, false otherwise

References woss::Coord::getLatitude(), and woss::Coord::getLongitude().

Referenced by getDepthCorreptions(), and getPressureCorreptions().

Here is the call graph for this function:

◆ isHalmaheraSea()

bool woss::SSP::isHalmaheraSea ( const Coord coordinates) const
inlineprivate

Checks if coordinates provided are in Halmahera Sea

Parameters
coordinatescoordinates value
Returns
true if condition holds, false otherwise

References woss::Coord::getLatitude(), and woss::Coord::getLongitude().

Referenced by getDepthCorreptions(), and getPressureCorreptions().

Here is the call graph for this function:

◆ isJapanSea()

bool woss::SSP::isJapanSea ( const Coord coordinates) const
inlineprivate

Checks if coordinates provided are in Japan Sea

Parameters
coordinatescoordinates value
Returns
true if condition holds, false otherwise

References woss::Coord::getLatitude(), and woss::Coord::getLongitude().

Referenced by getDepthCorreptions(), and getPressureCorreptions().

Here is the call graph for this function:

◆ isMediterraneanSea()

bool woss::SSP::isMediterraneanSea ( const Coord coordinates) const
inlineprivate

Checks if coordinates provided are in Mediterranean Sea

Parameters
coordinatescoordinates value
Returns
true if condition holds, false otherwise

References woss::Coord::getLatitude(), and woss::Coord::getLongitude().

Referenced by getDepthCorreptions(), and getPressureCorreptions().

Here is the call graph for this function:

◆ isNEAtlanticOcean()

bool woss::SSP::isNEAtlanticOcean ( const Coord coordinates) const
inlineprivate

Checks if coordinates provided are in north eastern Atlantic Ocean

Parameters
coordinatescoordinates value
Returns
true if condition holds, false otherwise

References woss::Coord::getLatitude(), and woss::Coord::getLongitude().

Referenced by getDepthCorreptions(), and getPressureCorreptions().

Here is the call graph for this function:

◆ isRandomizable()

virtual bool woss::SSP::isRandomizable ( ) const
inlinevirtual

Checks if the sound speed profile provided can be randomly perturbated

Returns
true if it can, false otherwise

References isValid(), pressure_map, salinity_map, and temperature_map.

Referenced by fullRandomize(), and transform().

Here is the call graph for this function:

◆ isRedSea()

bool woss::SSP::isRedSea ( const Coord coordinates) const
inlineprivate

Checks if coordinates provided are in Red Sea

Parameters
coordinatescoordinates value
Returns
true if condition holds, false otherwise

References woss::Coord::getLatitude(), and woss::Coord::getLongitude().

Referenced by getDepthCorreptions(), and getPressureCorreptions().

Here is the call graph for this function:

◆ isSuluSea()

bool woss::SSP::isSuluSea ( const Coord coordinates) const
inlineprivate

Checks if coordinates provided are in Sulu Sea

Parameters
coordinatescoordinates value
Returns
true if condition holds, false otherwise

References woss::Coord::getLatitude(), and woss::Coord::getLongitude().

Referenced by getDepthCorreptions(), and getPressureCorreptions().

Here is the call graph for this function:

◆ isTransformable()

virtual bool woss::SSP::isTransformable ( ) const
inlinevirtual

Checks if the sound speed profile provided can be transformed

Returns
true if it can, false otherwise

References isValid().

Referenced by woss::ACToolboxWoss::initSSPVector(), and transform().

Here is the call graph for this function:

◆ isValid()

virtual bool woss::SSP::isValid ( ) const
inlinevirtual

Checks the validity of sound speed profile provided

Returns
true if it has at least one value, false otherwise

References ssp_map.

Referenced by woss::ACToolboxWoss::initSSPVector(), isRandomizable(), isTransformable(), and randomize().

◆ k()

double woss::SSP::k ( double  z,
double  lat 
) const
inlineprivate

Equation for pressure from depth conversion ( Leroy and Parthiot )

Parameters
zdepth [m]
latlatitude [decimal degree]

References g().

Referenced by h().

Here is the call graph for this function:

◆ lower_bound()

DConstIter woss::SSP::lower_bound ( const PDouble depth) const
inline

Returns a const iterator to the sound speed value with key >= of depth parameter

Parameters
depthconst reference to a PDouble depth value
Returns
const iterator to end() if depth is not found

References ssp_map.

◆ operator<<()

friend::std::ostream & woss::SSP::operator<< ( ::std::ostream &  os,
const SSP instance 
)

<< operator

Parameters
osleft operand ostream reference
instanceright operand const SSP reference
Returns
os reference after the operation

◆ operator=()

SSP & SSP::operator= ( const SSP x)

Assignment operator

Parameters
copyconst reference to a SSP object to be copied
Returns
SSP reference to this

References depth_precision, max_ssp_value, min_ssp_value, pressure_map, salinity_map, ssp_map, and temperature_map.

◆ operator>>()

friend::std::ostream & woss::SSP::operator>> ( ::std::istream &  is,
const SSP instance 
)

‍operator

Parameters
osleft operand ostream reference
instanceright operand const SSP reference
Returns
os reference after the operation

◆ pressure_begin()

DConstIter woss::SSP::pressure_begin ( ) const
inline

Returns a const iterator to the begin of the pressure map

Returns
const iterator

References pressure_map.

◆ pressure_end()

DConstIter woss::SSP::pressure_end ( ) const
inline

Returns a const iterator to the end of the pressure map

Returns
const iterator

References pressure_map.

◆ pressure_find()

DConstIter woss::SSP::pressure_find ( const PDouble depth) const
inline

Returns a const iterator to the pressure value with key == depth parameter

Parameters
depthconst reference to a PDouble depth value
Returns
const iterator to pressure_end() if depth is not found

References pressure_map.

◆ pressure_lower_bound()

DConstIter woss::SSP::pressure_lower_bound ( const PDouble depth) const
inline

Returns a const iterator to the pressure value with key >= of depth parameter

Parameters
depthconst reference to a PDouble depth value
Returns
const iterator to pressure_end() if depth is not found

References pressure_map.

◆ pressure_rbegin()

DConstRIter woss::SSP::pressure_rbegin ( ) const
inline

Returns a const reverse iterator to the reverse begin of the pressure map

Returns
const reverse iterator

References pressure_map.

◆ pressure_rend()

DConstRIter woss::SSP::pressure_rend ( ) const
inline

Returns a const reverse iterator to the reverse end of the pressure map

Returns
const reverse iterator

References pressure_map.

◆ pressure_upper_bound()

DConstIter woss::SSP::pressure_upper_bound ( const PDouble depth) const
inline

Returns a const iterator to the pressure value with key > of depth parameter

Parameters
depthconst reference to a PDouble depth value
Returns
const iterator to pressure_end() if depth is not found

References pressure_map.

◆ randomize()

SSP * SSP::randomize ( double  ratio_incr_value) const
virtual

Performs a random perturbation of sound speed values with given ratio

Parameters
ratio_incr_valueperturbation ratio
Returns
a new SSP object

References depth_precision, woss::Singleton< T >::instance(), isValid(), and ssp_map.

Referenced by woss::BellhopWoss::writeNormalizedSSP().

Here is the call graph for this function:

◆ rbegin()

DConstRIter woss::SSP::rbegin ( ) const
inline

Returns a const reverse iterator to the reverse beginning of the sound speed map

Returns
const reverse iterator

References ssp_map.

◆ rend()

DConstRIter woss::SSP::rend ( ) const
inline

Returns a const reverse iterator to the reverse end of the sound speed map

Returns
const reverse iterator

References ssp_map.

◆ salinity_begin()

DConstIter woss::SSP::salinity_begin ( ) const
inline

Returns a const iterator to the beginning of the salinity map

Returns
const reverse iterator

References salinity_map.

◆ salinity_end()

DConstIter woss::SSP::salinity_end ( ) const
inline

Returns a const iterator to the end of the salinity map

Returns
const reverse iterator

References salinity_map.

◆ salinity_find()

DConstIter woss::SSP::salinity_find ( const PDouble depth) const
inline

Returns a const iterator to the salinity value with key > of depth parameter

Parameters
depthconst reference to a PDouble depth value
Returns
const iterator to salinity_end() if depth is not found

References salinity_map.

◆ salinity_lower_bound()

DConstIter woss::SSP::salinity_lower_bound ( const PDouble depth) const
inline

Returns a const iterator to the salinity value with key >= of depth parameter

Parameters
depthconst reference to a PDouble depth value
Returns
const iterator to salinity_end() if depth is not found

References salinity_map.

◆ salinity_rbegin()

DConstRIter woss::SSP::salinity_rbegin ( ) const
inline

Returns a const reverse iterator to the reverse beginning of the salinity map

Returns
const reverse iterator

References salinity_map.

◆ salinity_rend()

DConstRIter woss::SSP::salinity_rend ( ) const
inline

Returns a const reverse iterator to the reverse end of the salinity map

Returns
const reverse iterator

References salinity_map.

◆ salinity_upper_bound()

DConstIter woss::SSP::salinity_upper_bound ( const PDouble depth) const
inline

Returns a const iterator to the salinity value with key > of depth parameter

Parameters
depthconst reference to a PDouble depth value
Returns
const iterator to salinity_end() if depth is not found

References salinity_map.

◆ setDebug()

static void woss::SSP::setDebug ( bool  flag)
inlinestatic

Sets debug flag for all instances

Parameters
flagdebug bool

References debug.

◆ setDepthPrecision()

void SSP::setDepthPrecision ( long double  prec)
virtual

Sets the sound speed profile depth precision for all PDouble depth values. If the given precision is different from current value, the profile will be modified accordingly

Parameters
precdepth precision [m]

References depth_precision, pressure_map, salinity_map, ssp_map, and temperature_map.

◆ setSSPEqType()

SSP & woss::SSP::setSSPEqType ( SSPEqType  eq_type)
inline

Sets the SSP EQ that should be used by when inserting data

Parameters
eq_typevalid SSPEqType
Returns
reference to *this

References ssp_eq_type.

◆ size()

int woss::SSP::size ( ) const
inline

Returns the number of sound speed values stored

Returns
number of sound speed values stored

References ssp_map.

Referenced by woss::ACToolboxWoss::initSSPVector().

◆ temperature_begin()

DConstIter woss::SSP::temperature_begin ( ) const
inline

Returns a const iterator to the beginning of the temperature map

Returns
const reverse iterator

References temperature_map.

◆ temperature_end()

DConstIter woss::SSP::temperature_end ( ) const
inline

Returns a const iterator to the end of the temperature map

Returns
const reverse iterator

References temperature_map.

◆ temperature_find()

DConstIter woss::SSP::temperature_find ( const PDouble depth) const
inline

Returns a const iterator to the temperature value with key == of depth parameter

Parameters
depthconst reference to a PDouble depth value
Returns
const iterator to temperature_end() if depth is not found

References temperature_map.

◆ temperature_lower_bound()

DConstIter woss::SSP::temperature_lower_bound ( const PDouble depth) const
inline

Returns a const iterator to the temperature value with key >= of depth parameter

Parameters
depthconst reference to a PDouble depth value
Returns
const iterator to temperature_end() if depth is not found

References temperature_map.

◆ temperature_rbegin()

DConstRIter woss::SSP::temperature_rbegin ( ) const
inline

Returns a const reverse iterator to the reverse beginning of the temperature map

Returns
const reverse iterator

References temperature_map.

◆ temperature_rend()

DConstRIter woss::SSP::temperature_rend ( ) const
inline

Returns a const reverse iterator to the reverse end of the temperature map

Returns
const reverse iterator

References temperature_map.

◆ temperature_upper_bound()

DConstIter woss::SSP::temperature_upper_bound ( const PDouble depth) const
inline

Returns a const iterator to the temperature value with key > of depth parameter

Parameters
depthconst reference to a PDouble depth value
Returns
const iterator to temperature_end() if depth is not found

References temperature_map.

◆ thyh()

double woss::SSP::thyh ( double  z) const
inlineprivate

Equation for pressure from depth conversion ( Leroy and Parthiot )

Parameters
zdepth [m]

Referenced by getPressureFromDepth().

◆ transform()

SSP * SSP::transform ( const Coord coordinates,
double  new_min_depth = -HUGE_VAL,
double  new_max_depth = HUGE_VAL,
int  total_depth_steps = SSP_CUSTOM_DEPTH_STEPS 
) const
virtual

Transform the sound speed profile. If the current ssp can't be transformed it returns a not valid SSP. If both depth are not changed while depth steps is increased, all data will be linearly interpolated. If the SSP is extended in depth, sound speed will be calculated from last known temperature and salinity, while pressure will be calculated from depth conversion.

Parameters
coordinatescoordinates for pressure, depth conversion corrections
new_min_depthmiminum depth [m] of the new SSP
new_max_depthmaximum depth [m] of the new SSP
total_depth_stepsnumber of depths of the new SSP
Returns
a new SSP object

References begin(), calculateSSP(), depth_precision, getPressureFromDepth(), isRandomizable(), isTransformable(), woss::Coord::isValid(), pressure_map, salinity_map, ssp_map, and temperature_map.

Here is the call graph for this function:

◆ truncate()

SSP * SSP::truncate ( double  max_depth) const
virtual

It returns a new SSP object, truncated at the input depth. If the current ssp can't be truncated it returns a not valid SSP.

Parameters
max_depthtruncation depth [m]
Returns
a new SSP object

References begin(), clone(), debug, end(), insertValue(), and ssp_map.

Here is the call graph for this function:

◆ upper_bound()

DConstIter woss::SSP::upper_bound ( const PDouble depth) const
inline

Returns a const iterator to the sound speed value with key > of depth parameter

Parameters
depthconst reference to a PDouble depth value
Returns
const iterator to end() if depth is not found

References ssp_map.

◆ write()

bool SSP::write ( ::std::ostream &  stream_out) const
virtual

Write values out to the given stream

Parameters
stream_outconst reference to an ostream instance
Returns
true if method was successful, false otherwise

References pressure_map, salinity_map, ssp_map, and temperature_map.

Friends And Related Symbol Documentation

◆ operator!=

bool operator!= ( const SSP left,
const SSP right 
)
friend

Inequality operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
true if left == right, false otherwise

◆ operator* [1/3]

const SSP operator* ( const double  left,
const SSP right 
)
friend

Multiplication operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
a new const instance holding the operation result

◆ operator* [2/3]

const SSP operator* ( const SSP left,
const double  right 
)
friend

Multiplication operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
a new const instance holding the operation result

◆ operator* [3/3]

const SSP operator* ( const SSP left,
const SSP right 
)
friend

Multiplication operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
a new const instance holding the operation result

◆ operator*= [1/2]

SSP & operator*= ( SSP left,
const double  right 
)
friend

Compound assignment multiplication operator

Parameters
leftleft operand reference
rightright operand const reference
Returns
left reference after the operation

◆ operator*= [2/2]

SSP & operator*= ( SSP left,
const SSP right 
)
friend

Compound assignment multiplication operator

Parameters
leftleft operand reference
rightright operand const reference
Returns
left reference after the operation

◆ operator+ [1/3]

const SSP operator+ ( const double  left,
const SSP right 
)
friend

Sum operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
a new const instance holding the operation result

◆ operator+ [2/3]

const SSP operator+ ( const SSP left,
const double  right 
)
friend

Sum operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
a new const instance holding the operation result

◆ operator+ [3/3]

const SSP operator+ ( const SSP left,
const SSP right 
)
friend

Sum operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
a const instance holding the operation result

◆ operator+= [1/2]

SSP & operator+= ( SSP left,
const double  right 
)
friend

Compound assignment sum operator

Parameters
leftleft operand reference
rightright operand const reference
Returns
left reference after the operation

◆ operator+= [2/2]

SSP & operator+= ( SSP left,
const SSP right 
)
friend

Compound assignment sum operator

Parameters
leftleft operand reference
rightright operand const reference
Returns
left reference after the operation

◆ operator- [1/3]

const SSP operator- ( const double  left,
const SSP right 
)
friend

Subtraction operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
a new const instance holding the operation result

◆ operator- [2/3]

const SSP operator- ( const SSP left,
const double  right 
)
friend

Subtraction operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
a new const instance holding the operation result

◆ operator- [3/3]

const SSP operator- ( const SSP left,
const SSP right 
)
friend

Subtraction operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
a new const instance holding the operation result

◆ operator-= [1/2]

SSP & operator-= ( SSP left,
const double  right 
)
friend

Compound assignment subtraction operator

Parameters
leftleft operand reference
rightright operand const reference
Returns
left reference after the operation

◆ operator-= [2/2]

SSP & operator-= ( SSP left,
const SSP right 
)
friend

Compound assignment subtraction operator

Parameters
leftleft operand reference
rightright operand const reference
Returns
left reference after the operation

◆ operator/ [1/3]

const SSP operator/ ( const double  left,
const SSP right 
)
friend

Division operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
a new const instance holding the operation result

◆ operator/ [2/3]

const SSP operator/ ( const SSP left,
const double  right 
)
friend

Division operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
a new const instance holding the operation result

◆ operator/ [3/3]

const SSP operator/ ( const SSP left,
const SSP right 
)
friend

Division operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
a new const instance holding the operation result

◆ operator/= [1/2]

SSP & operator/= ( SSP left,
const double  right 
)
friend

Compound assignment division operator

Parameters
leftleft operand reference
rightright operand const reference
Returns
left reference after the operation

◆ operator/= [2/2]

SSP & operator/= ( SSP left,
const SSP right 
)
friend

Compound assignment division operator

Parameters
leftleft operand reference
rightright operand const reference
Returns
left reference after the operation

◆ operator==

bool operator== ( const SSP left,
const SSP right 
)
friend

Equality operator

Parameters
leftleft operand const reference
rightright operand const reference
Returns
true if left == right, false otherwise

Member Data Documentation

◆ debug

bool SSP::debug = false
staticprotected

Stores the common debug flag

Referenced by setDebug(), and truncate().

◆ depth_precision

long double woss::SSP::depth_precision
protected

◆ max_ssp_value

double woss::SSP::max_ssp_value
protected

Stores the maximum sound speed value [m/s]

Referenced by getMaxSSPValue(), insertValue(), insertValue(), operator=(), and SSP().

◆ min_ssp_value

double woss::SSP::min_ssp_value
protected

Stores the miminum sound speed value [m/s]

Referenced by getMinSSPValue(), insertValue(), insertValue(), operator=(), and SSP().

◆ pressure_map

◆ salinity_map

◆ ssp_eq_type

SSPEqType woss::SSP::ssp_eq_type
protected

Stores the SSP eq type that should be used

Referenced by calculateSSP(), getSSPEqType(), setSSPEqType(), and SSP().

◆ ssp_map

◆ temperature_map


The documentation for this class was generated from the following files: