Added cpsw alias function
This commit is contained in:
parent
867f921caa
commit
87d06a8655
|
@ -6,6 +6,7 @@ Function reference
|
|||
#. adiabatic_temperature_gradient
|
||||
#. atg
|
||||
#. conductivity
|
||||
#. cpsw
|
||||
#. depth
|
||||
#. freezing_point
|
||||
#. potential_temperature
|
||||
|
@ -57,6 +58,11 @@ Units::
|
|||
temperature -- degrees Celsius
|
||||
pressure -- decibars
|
||||
|
||||
cpsw
|
||||
----
|
||||
|
||||
Alias for :ref:`ref_specific_heat`.
|
||||
|
||||
depth
|
||||
-----
|
||||
|
||||
|
@ -143,6 +149,8 @@ Units::
|
|||
|
||||
Returns sound speed in meters/second.
|
||||
|
||||
.. _ref_specific_heat:
|
||||
|
||||
specific_heat
|
||||
-------------
|
||||
|
||||
|
|
|
@ -53,6 +53,8 @@ double sound_speed(double salinity, double temperature, double pressure);
|
|||
#define theta(salinity, temperature, pressure, reference_pressure) \
|
||||
potential_temperature(salinity, temperature, pressure, \
|
||||
reference_pressure)
|
||||
#define cpsw(salinity, temperature, pressure) \
|
||||
specific_heat(salinity, temperature, pressure)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -105,6 +105,9 @@ START_TEST(test_specific_heat)
|
|||
ck_assert(cmp_double(specific_heat(25, 0, 0), 4048.440412));
|
||||
ck_assert(cmp_double(specific_heat(35, 20, 5000), 3894.992770));
|
||||
ck_assert(cmp_double(specific_heat(40, 40, 10000), 3849.499481));
|
||||
|
||||
/* Test again the first case using the function alias cpsw. */
|
||||
ck_assert(cmp_double(cpsw(25, 0, 0), 4048.440412));
|
||||
}
|
||||
END_TEST
|
||||
|
||||
|
|
Loading…
Reference in New Issue