5 #ifndef USML_OCEAN_DATA_GRID_MACKENZIE_H
6 #define USML_OCEAN_DATA_GRID_MACKENZIE_H
8 #include <usml/types/data_grid.h>
82 for ( index[0]=0 ; index[0] < temperature->
axis(0)->
size() ; ++index[0] ) {
83 for ( index[1]=0 ; index[1] < temperature->
axis(1)->
size() ; ++index[1] ) {
84 for ( index[2]=0 ; index[2] < temperature->
axis(2)->
size() ; ++index[2] ) {
89 (*temperature->
axis(0))[ index[0] ] ;
90 double T = temperature->
data( index ) ;
91 double S = salinity->
data( index ) ;
95 double c = 1448.96 + 4.591 * T - 5.304e-2 * T*T
97 + ( 1.340 - 1.025e-2 * T ) * ( S - 35.0 )
98 + 1.630e-2 * D + 1.675e-7 * D*D
99 - 7.139e-13 * T * D*D*D ;
101 ssp->
data( index, c ) ;
static double earth_radius
Local radius of curvature in the area of operations.
Definition: wposition.h:100
const seq_vector * axis(int unsigned dim) const
Extract a reference to one of the axes.
Definition: data_grid.h:92
static data_grid< double, 3 > * construct(const data_grid< double, 3 > *temperature, const data_grid< double, 3 > *salinity)
Define sound speed profile using temperature and salinity.
Definition: data_grid_mackenzie.h:72
enum GRID_INTERP_TYPE interp_type(int unsigned dimension) const
Retrieve the type of interpolation for one of the axes.
Definition: data_grid.h:135
Definition: data_grid.h:23
Implements the Mackenzie model for estimating the speed of sound from the ocean's temperature and sal...
Definition: data_grid_mackenzie.h:58
size_type size() const
Returns the number of elements in this sequence.
Definition: seq_vector.h:138
Definition: data_grid.h:24
DATA_TYPE data(const unsigned *index) const
Extract a data value at a specific combination of indices.
Definition: data_grid.h:102