![]() |
Regression tests for the ocean package.
| |
BOOST_AUTO_TEST_CASE (constant_attenuation_test) | |
Test the basic features of the attenuation model using the attenuation_constant model. | |
BOOST_AUTO_TEST_CASE (thorp_test_a) | |
Compare values of the Thorp model to Table 7 in Weinburg, "Generic Sonar Model", NUWC TD-5971D (1985). | |
BOOST_AUTO_TEST_CASE (thorp_test_b) | |
Reproduce the plot shown in Jensen, et al. | |
| |
BOOST_AUTO_TEST_CASE (flat_boundary_test) | |
Test the basic features of the boundary model using the boundary_flat model. | |
BOOST_AUTO_TEST_CASE (sloped_boundary_test) | |
Find the bottom slope that causes the bathymetry to break the ocean surface after traveling 1 deg north of the equator. | |
BOOST_AUTO_TEST_CASE (etopo_boundary_test) | |
Extract Malta Escarpment bathymetry from March 2010 version of ETOPO1. | |
BOOST_AUTO_TEST_CASE (ascii_arc_test) | |
Test the extraction of bathymetry data from ASCII files with an ARC header. | |
BOOST_AUTO_TEST_CASE (scattering_strength_test) | |
Computes the broad spectrum scattering strength from a flat boundary interface, using lambert's law. | |
BOOST_AUTO_TEST_CASE (ocean_volume_test) | |
Test the basics of creating an ocean volume layer,. | |
| |
BOOST_AUTO_TEST_CASE (constant_profile_test) | |
Test the basic features of the profile model using a constant profile model. | |
BOOST_AUTO_TEST_CASE (plot_profile_test) | |
Write results of analytic test models out to CSV file for later plotting. | |
BOOST_AUTO_TEST_CASE (compute_mackenzie_test) | |
Extract Hawaii ocean temperature and salinity from World Ocean Atlas 2005. | |
| |
BOOST_AUTO_TEST_CASE (constant_reflect_loss_test) | |
Test the basic features of the reflection loss model using the reflect_loss_constant model. | |
BOOST_AUTO_TEST_CASE (rayleigh_test_a) | |
Compare values of the Rayleigh model to test case (a) from of the Rayleigh model in Jensen, Kuperman, Porter, Schmidt, "Computational Ocean Acoustics", Table 1.4 and Figure 1.22, Chapter 1.6.1, pp 46-47. | |
BOOST_AUTO_TEST_CASE (rayleigh_test_b) | |
Compare values of the Rayleigh model to test case (b) from of the Rayleigh model in Jensen, Kuperman, Porter, Schmidt, "Computational Ocean Acoustics", Table 1.4 and Figure 1.22, Chapter 1.6.1, pp 46-47. | |
BOOST_AUTO_TEST_CASE (rayleigh_test_c) | |
Compare values of the Rayleigh model to test case (c) from of the Rayleigh model in Jensen, Kuperman, Porter, Schmidt, "Computational Ocean Acoustics", Table 1.4 and Figure 1.22, Chapter 1.6.1, pp 46-47. | |
BOOST_AUTO_TEST_CASE (rayleigh_test_d) | |
Compare values of the Rayleigh model to test case (b) from of the Rayleigh model in Jensen, Kuperman, Porter, Schmidt, "Computational Ocean Acoustics", Table 1.4 and Figure 1.22, Chapter 1.6.1, pp 46-47. | |
BOOST_AUTO_TEST_CASE (plot_rayleigh_sediments) | |
Compute Rayleigh model values for generic sediments. | |
BOOST_AUTO_TEST_CASE (reflect_loss_netcdf_test) | |
Test the basic features of the reflection loss model using the netCDF bottom type file. | |
BOOST_AUTO_TEST_CASE (wave_height_pierson_test) | |
Test the accuracy Pierson and Moskowitz model for computing wave height from wind speed. | |
BOOST_AUTO_TEST_CASE (reflect_loss_eckart_test) | |
Compare the results of the reflect_loss_eckart surface reflection loss model to Figures 2-5 in Jones et. | |
BOOST_AUTO_TEST_CASE (reflect_loss_beckmann_test) | |
Compare the results of the reflect_loss_beckmann surface reflection loss model to Figures 2-5 in Jones et. |
BOOST_AUTO_TEST_CASE | ( | reflect_loss_beckmann_test | ) |
Compare the results of the reflect_loss_beckmann surface reflection loss model to Figures 2-5 in Jones et.
al. Returns error if the values at 10 degrees are different from those that we hand calculated.
Figure Wind Speed Frequency Loss at 10 deg ------ ---------- --------- -------------- 2 4.6 m/s 3150 Hz 1.15 dB 3 4.6 m/s 5000 Hz 2.90 dB 4 14.4 m/s 1000 Hz 11.15 dB 5 14.4 m/s 5000 Hz 278.76 dB
BOOST_AUTO_TEST_CASE | ( | reflect_loss_eckart_test | ) |
Compare the results of the reflect_loss_eckart surface reflection loss model to Figures 2-5 in Jones et.
al. Returns error if the values at 10 degrees are different from those that we hand calculated.
Figure Wind Speed Frequency Loss at 10 deg ------ ---------- --------- -------------- 2 4.6 m/s 3150 Hz 1.15 dB 3 4.6 m/s 5000 Hz 2.90 dB 4 14.4 m/s 1000 Hz 11.15 dB 5 14.4 m/s 5000 Hz 278.76 dB
BOOST_AUTO_TEST_CASE | ( | wave_height_pierson_test | ) |
Test the accuracy Pierson and Moskowitz model for computing wave height from wind speed.
Compare to significant wave height plot from http://www.wikiwaves.org/Ocean-Wave_Spectra.
BOOST_AUTO_TEST_CASE | ( | reflect_loss_netcdf_test | ) |
Test the basic features of the reflection loss model using the netCDF bottom type file.
Generate errors if values differ by more that 1E-5 percent.
bottom type numbers in the center of the data field top left, right, bottom left, right
bottom type numbers at the corners of the data field top left, bottom left, top right, bottom right
BOOST_AUTO_TEST_CASE | ( | plot_rayleigh_sediments | ) |
Compute Rayleigh model values for generic sediments.
Write results to CSV file for processing in Excel or Matlab.
BOOST_AUTO_TEST_CASE | ( | rayleigh_test_d | ) |
Compare values of the Rayleigh model to test case (b) from of the Rayleigh model in Jensen, Kuperman, Porter, Schmidt, "Computational Ocean Acoustics", Table 1.4 and Figure 1.22, Chapter 1.6.1, pp 46-47.
Write results to CSV file for processing in Excel or Matlab.
Although Table 1.4 indicates an attenuation of 0.5, you can tell from the cs=0 case that an attenuation of 0.0 was used to make Figure 1.22.
BOOST_AUTO_TEST_CASE | ( | rayleigh_test_c | ) |
Compare values of the Rayleigh model to test case (c) from of the Rayleigh model in Jensen, Kuperman, Porter, Schmidt, "Computational Ocean Acoustics", Table 1.4 and Figure 1.22, Chapter 1.6.1, pp 46-47.
Write results to CSV file for processing in Excel or Matlab.
BOOST_AUTO_TEST_CASE | ( | rayleigh_test_b | ) |
Compare values of the Rayleigh model to test case (b) from of the Rayleigh model in Jensen, Kuperman, Porter, Schmidt, "Computational Ocean Acoustics", Table 1.4 and Figure 1.22, Chapter 1.6.1, pp 46-47.
Write results to CSV file for processing in Excel or Matlab.
BOOST_AUTO_TEST_CASE | ( | rayleigh_test_a | ) |
Compare values of the Rayleigh model to test case (a) from of the Rayleigh model in Jensen, Kuperman, Porter, Schmidt, "Computational Ocean Acoustics", Table 1.4 and Figure 1.22, Chapter 1.6.1, pp 46-47.
Write results to CSV file for processing in Excel or Matlab.
BOOST_AUTO_TEST_CASE | ( | compute_mackenzie_test | ) |
Extract Hawaii ocean temperature and salinity from World Ocean Atlas 2005.
Compare some of the results to the interactive version at UK National Physical Laboratory, "Technical Guides - Speed of Sound in Sea-Water," interactive website at http://resource.npl.co.uk/acoustics/techguides/soundseawater/.
Generate errors if values differ by more that 1E-3 percent.
BOOST_AUTO_TEST_CASE | ( | plot_profile_test | ) |
Write results of analytic test models out to CSV file for later plotting.
The plotted models include:
BOOST_AUTO_TEST_CASE | ( | ocean_volume_test | ) |
Test the basics of creating an ocean volume layer,.
BOOST_AUTO_TEST_CASE | ( | scattering_strength_test | ) |
Computes the broad spectrum scattering strength from a flat boundary interface, using lambert's law.
BOOST_AUTO_TEST_CASE | ( | ascii_arc_test | ) |
Test the extraction of bathymetry data from ASCII files with an ARC header.
The test file creates a simple environment with 3 latitudes and 4 longitudes. Testing individual depth points in latitude and longitude ensures the the data is oriented correctly as it is read in. Errors on the order 3 cm are introduced by the conversion from earth spherical coordinates and back.
BOOST_AUTO_TEST_CASE | ( | etopo_boundary_test | ) |
Extract Malta Escarpment bathymetry from March 2010 version of ETOPO1.
Compare results to data extracted from this database by hand.
The ETOPO1 database for this area contains the following data:
netcdf boundary_test { dimensions: x = 9 ; y = 13 ; variables: double x(x) ; x:long_name = "Longitude" ; x:actual_range = -180., 180. ; x:units = "degrees" ; double y(y) ; y:long_name = "Latitude" ; y:actual_range = -90., 90. ; y:units = "degrees" ; int z(y, x) ; z:long_name = "z" ; z:_FillValue = -2147483648 ; z:actual_range = -10898., 8271. ;
// global attributes: :Conventions = "COARDS/CF-1.0" ; :title = "ETOPO1_Ice_g_gmt4.grd" ; :GMT_version = "4.4.0" ; :node_offset = 0 ; :NCO = "20111109" ; data:
x = 15.8666666666667, 15.8833333333333, 15.9, 15.9166666666667, 15.9333333333333, 15.95, 15.9666666666667, 15.9833333333333, 16 ;
y = 36, 36.0166666666667, 36.0333333333334, 36.05, 36.0666666666667, 36.0833333333334, 36.1, 36.1166666666667, 36.1333333333334, 36.15, 36.1666666666667, 36.1833333333334, 36.2 ;
z = -3616, -3665, -3678, -3703, -3708, -3705, -3718, -3724, -3730, -3653, -3672, -3686, -3711, -3705, -3710, -3698, -3708, -3718, -3696, -3693, -3701, -3693, -3707, -3700, -3689, -3695, -3706, -3674, -3703, -3720, -3709, -3710, -3702, -3695, -3682, -3679, -3717, -3720, -3710, -3704, -3701, -3683, -3679, -3675, -3661, -3702, -3702, -3691, -3677, -3678, -3685, -3658, -3662, -3654, -3661, -3660, -3644, -3651, -3668, -3673, -3655, -3649, -3648, -3633, -3630, -3632, -3643, -3653, -3657, -3651, -3640, -3640, -3625, -3634, -3626, -3629, -3647, -3643, -3640, -3635, -3630, -3615, -3614, -3619, -3628, -3634, -3634, -3637, -3633, -3584, -3613, -3616, -3622, -3624, -3626, -3631, -3634, -3615, -3581, -3609, -3607, -3619, -3616, -3617, -3634, -3635, -3593, -3574, -3593, -3613, -3612, -3623, -3638, -3615, -3594, -3569, -3557 ; }
Given that boundary_grid is using PCHIP interpolation, the expected results are:
Location: lat=36.0004 long=15.8904 World Coords: theta=0.94247 phi=0.27734 Depth: 3613.3142451792955 Normal: theta=-0.0053183248950815359 phi=0.075681405852260769 Slope: theta=0.303697 phi=-4.32587 deg
When the gcc -ffast-math compiler option is turned off, these results are expected to be accurate to at least 1e-6 percent. With fast-math turned on, the accuracy of the normal drops to 1e-5 percent, and the about 0.15 meters is lost on the accuracy in depth.
BOOST_AUTO_TEST_CASE | ( | sloped_boundary_test | ) |
Find the bottom slope that causes the bathymetry to break the ocean surface after traveling 1 deg north of the equator.
The analytic result is about 0.5 degrees. Intuitively, a value equal to about half the traveled distance represents the combined effect of the bottom reaching up to the surface, and the surface bending down to the reach the bottom. Generate errors if values differ by more that 1E-6 percent.
BOOST_AUTO_TEST_CASE | ( | thorp_test_b | ) |
Reproduce the plot shown in Jensen, et al.
Computational Ocean Acoustics p37 Fig. 1.20
BOOST_AUTO_TEST_CASE | ( | thorp_test_a | ) |
Compare values of the Thorp model to Table 7 in Weinburg, "Generic Sonar Model", NUWC TD-5971D (1985).
Because GSM uses slightly different constants then Jensen, et. al., we only expect the results to match within 20% and only at 400 Hz and above.
BOOST_AUTO_TEST_CASE | ( | constant_reflect_loss_test | ) |
Test the basic features of the reflection loss model using the reflect_loss_constant model.
Generate errors if values differ by more that 1E-6 percent.
BOOST_AUTO_TEST_CASE | ( | constant_profile_test | ) |
Test the basic features of the profile model using a constant profile model.
Generate errors if values differ by more that 1E-6 percent.
BOOST_AUTO_TEST_CASE | ( | flat_boundary_test | ) |
Test the basic features of the boundary model using the boundary_flat model.
Generate errors if values differ by more that 1E-6 percent.
BOOST_AUTO_TEST_CASE | ( | constant_attenuation_test | ) |
Test the basic features of the attenuation model using the attenuation_constant model.
Given a model where attenuation is 1e-6 * frequency, check to see that the calculated results are within 1e-6% of the analytic values.