mom_intrinsic_functions module reference
A module with intrinsic functions that are used by MOM but are not supported by some compilers.
Functions/Subroutines
Evaluate the inverse cosh, either using a math library or an equivalent expression. |
|
Returns the cube root of a real argument at roundoff accuracy, in a form that works properly with rescaling of the argument by integer powers of 8. |
|
Rescale |
|
Undo the rescaling of a real number back to its original base. |
|
Returns true if any unit test of intrinsic_functions fails, or false if they all pass. |
|
True if the cube of cuberoot(val) does not closely match val. |
Detailed Description
A module with intrinsic functions that are used by MOM but are not supported by some compilers.
Function/Subroutine Documentation
- function mom_intrinsic_functions/invcosh(x)
Evaluate the inverse cosh, either using a math library or an equivalent expression.
- Parameters:
x ::
x[in] The argument of the inverse of cosh [nondim]. NaNs will occur if x<1, but there is no error checking- Called from:
- function mom_intrinsic_functions/cuberoot(x)
Returns the cube root of a real argument at roundoff accuracy, in a form that works properly with rescaling of the argument by integer powers of 8. If the argument is a NaN, a NaN is returned.
- Parameters:
x ::
x[in] The argument of cuberoot in arbitrary units cubed [A3]- Return:
undefined :: The real cube root of x in arbitrary units [A]
- Call to:
- Called from:
mom_energetic_pbl::epbl_bbl_columnmom_energetic_pbl::epbl_columnmom_energetic_pbl::get_eqdisc_v0hmom_mixed_layer_restrat::mixedlayer_restrat_bodnertest_cuberoot
- subroutine mom_intrinsic_functions/rescale_cbrt(a, x, e_r, s_a)
Rescale
ato the range [0.125, 1) and compute its cube-root exponent.- Parameters:
a ::
a[in] The real parameter to be rescaled for cube root in arbitrary units cubed [A3]x ::
x[out] The rescaled value of a in the range from 0.125 < asx <= 1.0, in ambiguous units cubed [B3]e_r ::
e_r[out] Cube root of the exponent of the rescaling ofas_a ::
s_a[out] The sign bit of a
- Call to:
biasexpbitexplenfraclensignbit- Called from:
- function mom_intrinsic_functions/descale(x, e_a, s_a)
Undo the rescaling of a real number back to its original base.
- Parameters:
x ::
x[in] The rescaled value which is to be restored in ambiguous units [B]e_a ::
e_a[in] Exponent of the unscaled values_a ::
s_a[in] Sign bit of the unscaled value
- Return:
undefined :: Restored value with the corrected exponent and sign in arbitrary units [A]
- Call to:
expbitexplensignbit- Called from:
- function mom_intrinsic_functions/intrinsic_functions_unit_tests(verbose)
Returns true if any unit test of intrinsic_functions fails, or false if they all pass.
- Parameters:
verbose ::
verbose[in] If true, write results to stdout- Return:
undefined :: True if any of the unit tests fail
- Call to:
- Called from:
- function mom_intrinsic_functions/test_cuberoot(verbose, val)
True if the cube of cuberoot(val) does not closely match val. False otherwise.
- Parameters:
verbose ::
verbose[in] If true, write results to stdoutval ::
val[in] The real value to test, in arbitrary units [A]
- Call to:
- Called from: