Implements the Mackenzie model for estimating the speed of sound from the ocean's temperature and salinity profile.
This type of profile is commonly used to estimate the sound speed profile associated with a ocean physical properties database such as World Ocean Atlas.
Mackenzie model is defined by the equation:
c(D,S,T) = 1448.96 + 4.591 T - 5.304e-2 T^2 + 2.374e-4 T^3 + 1.340 (S-35) + 1.630e-2 D + 1.675e-7 D^2 - 1.025e-2 T (S-35) - 7.139e-13 T D^3
where:
Uses the GRID_INTERP_PCHIP interpolation in the depth direction to reduce sudden changes in profile slope. The latitude and longitude directions use GRID_INTERP_LINEAR (the default). Values outside of the latitude/longitude axes defined by the data grid at limited to the values at the grid edge.
When using a gridded data set, it is recommended that edge_limit be set to TRUE for any dimensional axis that uses the PCHIP interpolation. This is because of PCHIP allowing for extreme values when extrapolating data.
NOTE: data_grid_mackenzie takes control of the two data_grids that are passed in and then deletes them before the sound speed data_grid is returned.
static data_grid<double,3>* construct | ( | const data_grid< double, 3 > * | temperature, | |
const data_grid< double, 3 > * | salinity, | |||
bool | clean_up = true | |||
) | [inline, static] |
Define sound speed profile using temperature and salinity.
temperature | Ocean temperature profile (degrees C). | |
salinity | Ocean salinity profile (ppt). | |
clean_up | Delete the data_grids passed in. Defaults to true and will delete them, if false the user is responsible for deleting them. |