MOM6
MOM_unit_tests.F90
Go to the documentation of this file.
1 !> Invokes unit tests in all modules that have them
3 
4 use mom_error_handler, only : mom_error, fatal, is_root_pe
5 
10 
11 contains
12 
13 !> Calls unit tests for other modules.
14 !! Note that if a unit test returns true, a FATAL error is triggered.
15 subroutine unit_tests(verbosity)
16  ! Arguments
17  integer, intent(in) :: verbosity !< The verbosity level
18  ! Local variables
19  logical :: verbose
20 
21  verbose = verbosity>=5
22 
23  if (is_root_pe()) then ! The following need only be tested on 1 PE
24  if (string_functions_unit_tests(verbose)) call mom_error(fatal, &
25  "MOM_unit_tests: string_functions_unit_tests FAILED")
26  if (remapping_unit_tests(verbose)) call mom_error(fatal, &
27  "MOM_unit_tests: remapping_unit_tests FAILED")
28  if (neutral_diffusion_unit_tests(verbose)) call mom_error(fatal, &
29  "MOM_unit_tests: neutralDiffusionUnitTests FAILED")
30  if (diag_vkernels_unit_tests(verbose)) call mom_error(fatal, &
31  "MOM_unit_tests: diag_vkernels_unit_tests FAILED")
32  endif
33 
34 end subroutine unit_tests
35 
36 end module mom_unit_tests
Provides kernels for single-column interpolation, re-integration (re-mapping of integrated quantities...
logical function, public neutral_diffusion_unit_tests(verbose)
Returns true if unit tests of neutral_diffusion functions fail. Otherwise returns false...
Provides column-wise vertical remapping functions.
logical function, public diag_vkernels_unit_tests(verbose)
Returns true if any unit tests for module MOM_diag_vkernels fail.
subroutine unit_tests(verbosity)
Calls unit tests for other modules. Note that if a unit test returns true, a FATAL error is triggered...
logical function, public remapping_unit_tests(verbose)
Runs unit tests on remapping functions. Should only be called from a single/root thread Returns True ...
Invokes unit tests in all modules that have them.
logical function, public string_functions_unit_tests(verbose)
Returns true if a unit test of string_functions fails.
logical function, public is_root_pe()
A column-wise toolbox for implementing neutral diffusion.
subroutine, public mom_error(level, message, all_print)