mom_debugging module reference
Provides checksumming functions for debugging.
Functions/Subroutines
MOM_debugging_init initializes the MOM_debugging module, and sets the parameters that control which checks are active for MOM6. |
|
Returns logicals indicating which debugging checks should be performed. |
|
Check for consistency between the duplicated points of a 3-D C-grid vector. |
|
Check for consistency between the duplicated points of a 2-D C-grid vector. |
|
Check for consistency between the duplicated points of a 3-D scalar at corner points. |
|
Check for consistency between the duplicated points of a 2-D scalar at corner points. |
|
Check for consistency between the duplicated points of a 3-D B-grid vector. |
|
Check for consistency between the duplicated points of a 2-D B-grid vector. |
|
Check for consistency between the duplicated points of a 3-D scalar at tracer points. |
|
Check for consistency between the duplicated points of a 2-D scalar at tracer points. |
|
Check for consistency between the duplicated points of a 3-D A-grid vector. |
|
Check for consistency between the duplicated points of a 2-D A-grid vector. |
|
Do a checksum and redundant point check on a 3d C-grid vector. |
|
Do a checksum and redundant point check on a 2d C-grid vector. |
|
Do a checksum and redundant point check on a 3d B-grid vector. |
|
Do a checksum and redundant point check on a 3d C-grid vector. |
|
Do a checksum and redundant point check on a 2d C-grid vector. |
|
This function returns the sum over computational domain of all processors of hThick*stuff, where stuff is a 3-d array at tracer points. |
|
This subroutine display the total thickness, temperature and salinity as well as the change since the last call. |
|
Returns false if the column integral of a given quantity is within roundoff. |
|
Returns false if the column integrals of two given quantities are within roundoff of each other. |
Detailed Description
This module contains subroutines that perform various error checking and debugging functions for MOM6. This routine is similar to it counterpart in the SIS2 code, except for the use of the ocean_grid_type and by keeping them separate we retain the ability to set up MOM6 and SIS2 debugging separately.
Function/Subroutine Documentation
- subroutine mom_debugging/mom_debugging_init(param_file)
MOM_debugging_init initializes the MOM_debugging module, and sets the parameters that control which checks are active for MOM6.
- Parameters:
param_file ::
param_file[in] A structure to parse for run-time parameters- Call to:
debugdebug_chksumsdebug_redundantmom_checksums::mom_checksums_init
- subroutine mom_debugging/query_debugging_checks(do_debug, do_chksums, do_redundant)
Returns logicals indicating which debugging checks should be performed.
- Parameters:
do_debug ::
do_debug[out] True if verbose debugging is to be outputdo_chksums ::
do_chksums[out] True if checksums are to be outputdo_redundant ::
do_redundant[out] True if redundant points are to be checked
- Call to:
debugdebug_chksumsdebug_redundant- Called from:
mom::ale_regridding_and_remappingmom::post_diabatic_halo_updatesmom::step_mommom::step_mom_thermo
- subroutine mom_debugging/check_redundant_vc3d(mesg, u_comp, v_comp, G, is, ie, js, je, direction, unscale)
Check for consistency between the duplicated points of a 3-D C-grid vector.
- Parameters:
mesg ::
mesg[in] An identifying messageg :: [inout] The ocean’s grid structure
u_comp ::
u_comp[in] The u-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]v_comp ::
v_comp[in] The u-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]is ::
is[in] The starting i-index to checkie ::
ie[in] The ending i-index to checkjs ::
js[in] The starting j-index to checkje ::
je[in] The ending j-index to checkdirection ::
direction[in] the direction flag to be passed to pass_vectorunscale ::
unscale[in] A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
- subroutine mom_debugging/check_redundant_vc2d(mesg, u_comp, v_comp, G, is, ie, js, je, direction, unscale)
Check for consistency between the duplicated points of a 2-D C-grid vector.
- Parameters:
mesg ::
mesg[in] An identifying messageg :: [inout] The ocean’s grid structure
u_comp ::
u_comp[in] The u-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]v_comp ::
v_comp[in] The u-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]is ::
is[in] The starting i-index to checkie ::
ie[in] The ending i-index to checkjs ::
js[in] The starting j-index to checkje ::
je[in] The ending j-index to checkdirection ::
direction[in] the direction flag to be passed to pass_vectorunscale ::
unscale[in] A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
- Called from:
- subroutine mom_debugging/check_redundant_sb3d(mesg, array, G, is, ie, js, je, unscale)
Check for consistency between the duplicated points of a 3-D scalar at corner points.
- Parameters:
mesg ::
mesg[in] An identifying messageg :: [inout] The ocean’s grid structure
array ::
array[in] The array to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]is ::
is[in] The starting i-index to checkie ::
ie[in] The ending i-index to checkjs ::
js[in] The starting j-index to checkje ::
je[in] The ending j-index to checkunscale ::
unscale[in] A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
- subroutine mom_debugging/check_redundant_sb2d(mesg, array, G, is, ie, js, je, unscale)
Check for consistency between the duplicated points of a 2-D scalar at corner points.
- Parameters:
mesg ::
mesg[in] An identifying messageg :: [inout] The ocean’s grid structure
array ::
array[in] The array to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]is ::
is[in] The starting i-index to checkie ::
ie[in] The ending i-index to checkjs ::
js[in] The starting j-index to checkje ::
je[in] The ending j-index to checkunscale ::
unscale[in] A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
- Called from:
- subroutine mom_debugging/check_redundant_vb3d(mesg, u_comp, v_comp, G, is, ie, js, je, direction, unscale)
Check for consistency between the duplicated points of a 3-D B-grid vector.
- Parameters:
mesg ::
mesg[in] An identifying messageg :: [inout] The ocean’s grid structure
u_comp ::
u_comp[in] The u-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]v_comp ::
v_comp[in] The v-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]is ::
is[in] The starting i-index to checkie ::
ie[in] The ending i-index to checkjs ::
js[in] The starting j-index to checkje ::
je[in] The ending j-index to checkdirection ::
direction[in] the direction flag to be passed to pass_vectorunscale ::
unscale[in] A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
- subroutine mom_debugging/check_redundant_vb2d(mesg, u_comp, v_comp, G, is, ie, js, je, direction, unscale)
Check for consistency between the duplicated points of a 2-D B-grid vector.
- Parameters:
mesg ::
mesg[in] An identifying messageg :: [inout] The ocean’s grid structure
u_comp ::
u_comp[in] The u-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]v_comp ::
v_comp[in] The v-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]is ::
is[in] The starting i-index to checkie ::
ie[in] The ending i-index to checkjs ::
js[in] The starting j-index to checkje ::
je[in] The ending j-index to checkdirection ::
direction[in] the direction flag to be passed to pass_vectorunscale ::
unscale[in] A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
- Called from:
- subroutine mom_debugging/check_redundant_st3d(mesg, array, G, is, ie, js, je, unscale)
Check for consistency between the duplicated points of a 3-D scalar at tracer points.
- Parameters:
mesg ::
mesg[in] An identifying messageg :: [inout] The ocean’s grid structure
array ::
array[in] The array to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]is ::
is[in] The starting i-index to checkie ::
ie[in] The ending i-index to checkjs ::
js[in] The starting j-index to checkje ::
je[in] The ending j-index to checkunscale ::
unscale[in] A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
- subroutine mom_debugging/check_redundant_st2d(mesg, array, G, is, ie, js, je, unscale)
Check for consistency between the duplicated points of a 2-D scalar at tracer points.
- Parameters:
mesg ::
mesg[in] An identifying messageg :: [inout] The ocean’s grid structure
array ::
array[in] The array to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]is ::
is[in] The starting i-index to checkie ::
ie[in] The ending i-index to checkjs ::
js[in] The starting j-index to checkje ::
je[in] The ending j-index to checkunscale ::
unscale[in] A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
- Called from:
- subroutine mom_debugging/check_redundant_vt3d(mesg, u_comp, v_comp, G, is, ie, js, je, direction, unscale)
Check for consistency between the duplicated points of a 3-D A-grid vector.
- Parameters:
mesg ::
mesg[in] An identifying messageg :: [inout] The ocean’s grid structure
u_comp ::
u_comp[in] The u-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]v_comp ::
v_comp[in] The v-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]is ::
is[in] The starting i-index to checkie ::
ie[in] The ending i-index to checkjs ::
js[in] The starting j-index to checkje ::
je[in] The ending j-index to checkdirection ::
direction[in] the direction flag to be passed to pass_vectorunscale ::
unscale[in] A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
- subroutine mom_debugging/check_redundant_vt2d(mesg, u_comp, v_comp, G, is, ie, js, je, direction, unscale)
Check for consistency between the duplicated points of a 2-D A-grid vector.
- Parameters:
mesg ::
mesg[in] An identifying messageg :: [inout] The ocean’s grid structure
u_comp ::
u_comp[in] The u-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]v_comp ::
v_comp[in] The v-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]is ::
is[in] The starting i-index to checkie ::
ie[in] The ending i-index to checkjs ::
js[in] The starting j-index to checkje ::
je[in] The ending j-index to checkdirection ::
direction[in] the direction flag to be passed to pass_vectorunscale ::
unscale[in] A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
- Called from:
- subroutine mom_debugging/chksum_vec_c3d(mesg, u_comp, v_comp, G, halos, scalars, unscale)
Do a checksum and redundant point check on a 3d C-grid vector.
- Parameters:
mesg ::
mesg[in] An identifying messageg :: [inout] The ocean’s grid structure
u_comp ::
u_comp[in] The u-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]v_comp ::
v_comp[in] The v-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]halos ::
halos[in] The width of halos to check (default 0)scalars ::
scalars[in] If true this is a pair of scalars that are being checked.unscale ::
unscale[in] A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
- subroutine mom_debugging/chksum_vec_c2d(mesg, u_comp, v_comp, G, halos, scalars, unscale)
Do a checksum and redundant point check on a 2d C-grid vector.
- Parameters:
mesg ::
mesg[in] An identifying messageg :: [inout] The ocean’s grid structure
u_comp ::
u_comp[in] The u-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]v_comp ::
v_comp[in] The v-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]halos ::
halos[in] The width of halos to check (default 0)scalars ::
scalars[in] If true this is a pair of scalars that are being checked.unscale ::
unscale[in] A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
- subroutine mom_debugging/chksum_vec_b3d(mesg, u_comp, v_comp, G, halos, scalars, unscale)
Do a checksum and redundant point check on a 3d B-grid vector.
- Parameters:
mesg ::
mesg[in] An identifying messageg :: [inout] The ocean’s grid structure
u_comp ::
u_comp[in] The u-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]v_comp ::
v_comp[in] The v-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]halos ::
halos[in] The width of halos to check (default 0)scalars ::
scalars[in] If true this is a pair of scalars that are being checked.unscale ::
unscale[in] A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
- subroutine mom_debugging/chksum_vec_b2d(mesg, u_comp, v_comp, G, halos, scalars, symmetric, unscale)
- Parameters:
mesg ::
mesg[in] An identifying messageg :: [inout] The ocean’s grid structure
u_comp ::
u_comp[in] The u-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]v_comp ::
v_comp[in] The v-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]halos ::
halos[in] The width of halos to check (default 0)scalars ::
scalars[in] If true this is a pair of scalars that are being checked.symmetric ::
symmetric[in] If true, do the checksums on the full symmetric computational domain.unscale ::
unscale[in] A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
- subroutine mom_debugging/chksum_vec_a3d(mesg, u_comp, v_comp, G, halos, scalars, unscale)
Do a checksum and redundant point check on a 3d C-grid vector.
- Parameters:
mesg ::
mesg[in] An identifying messageg :: [inout] The ocean’s grid structure
u_comp ::
u_comp[in] The u-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]v_comp ::
v_comp[in] The v-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]halos ::
halos[in] The width of halos to check (default 0)scalars ::
scalars[in] If true this is a pair of scalars that are being checked.unscale ::
unscale[in] A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
- subroutine mom_debugging/chksum_vec_a2d(mesg, u_comp, v_comp, G, halos, scalars, unscale)
Do a checksum and redundant point check on a 2d C-grid vector.
- Parameters:
mesg ::
mesg[in] An identifying messageg :: [inout] The ocean’s grid structure
u_comp ::
u_comp[in] The u-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]v_comp ::
v_comp[in] The v-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]halos ::
halos[in] The width of halos to check (default 0)scalars ::
scalars[in] If true this is a pair of scalars that are being checked.unscale ::
unscale[in] A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
- function mom_debugging/totalstuff(HI, hThick, areaT, stuff, unscale)
This function returns the sum over computational domain of all processors of hThick*stuff, where stuff is a 3-d array at tracer points.
- Parameters:
hi :: [in] A horizontal index type
hthick :: [in] The array of thicknesses to use as weights [H ~> m or kg m-2] or [m] or [kg m-2]
areat :: [in] The array of cell areas [L2 ~> m2] or [m2]
stuff ::
stuff[in] The array of stuff to be summed in arbitrary units [A ~> a] or [a]unscale ::
unscale[in] A factor that is used to undo scaling of the array and the cell mass or volume before it is summed in [a m3 A-1 H-1 L-2 ~> 1] or [a kg A-1 H-1 L-2 ~> 1]
- Return:
undefined :: the globally integrated amount of stuff [A H L2 ~> a m3 or a kg] or [a m3]
- Called from:
- subroutine mom_debugging/totaltands(HI, hThick, areaT, temperature, salinity, mesg, US, H_to_mks)
This subroutine display the total thickness, temperature and salinity as well as the change since the last call.
- Parameters:
hi :: [in] A horizontal index type
hthick :: [in] The array of thicknesses to use as weights [H ~> m or kg m-2] or [m] or [kg m-2]
areat :: [in] The array of cell areas [L2 ~> m2] or [m2]
temperature ::
temperature[in] The temperature field to sum [C ~> degC] or [degC]salinity ::
salinity[in] The salinity field to sum [S ~> ppt] or [ppt]mesg ::
mesg[in] An identifying messageus :: [in] A dimensional unit scaling type
h_to_mks :: [in] A constant that translates thickness units to its MKS units (m or kg m-2) based on whether the model is Boussinesq [m H-1 ~> 1] or not [kg m-2 H-1 ~> 1]
- Call to:
mom_io::stdouttotalstuff
- function mom_debugging/check_column_integral(nk, field, known_answer)
Returns false if the column integral of a given quantity is within roundoff.
- Parameters:
nk ::
nk[in] Number of levels in columnfield ::
field[in] Field to be summed [arbitrary]known_answer ::
known_answer[in] If present is the expected sum [arbitrary], If missing, assumed zero
- function mom_debugging/check_column_integrals(nk_1, field_1, nk_2, field_2, missing_value)
Returns false if the column integrals of two given quantities are within roundoff of each other.
- Parameters:
nk_1 ::
nk_1[in] Number of levels in field 1nk_2 ::
nk_2[in] Number of levels in field 2field_1 ::
field_1[in] First field to be summed [arbitrary]field_2 ::
field_2[in] Second field to be summed [arbitrary]missing_value ::
missing_value[in] If column contains missing values, mask them from the sum [arbitrary]
- Called from: