MOM_debugging module reference
Provides checksumming functions for debugging
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.
Generic Interfaces
Check for consistency between the duplicated points of a C-grid vector |
|
Check for consistency between the duplicated points of a C-grid vector |
|
Check for consistency between the duplicated points of a B-grid vector or scalar |
|
Check for consistency between the duplicated points of an A-grid vector or scalar |
|
Do checksums on the components of a C-grid vector |
|
Do checksums on the components of a C-grid vector |
|
Do checksums on the components of a B-grid vector |
|
Do checksums on the components of an A-grid vector |
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 |
Generic Interface Documentation
- interface check_redundant
Check for consistency between the duplicated points of a C-grid vector
Callers call graph
Text view
mom::ale_regridding_and_remapping → mom_debugging::interface::check_redundant
mom::step_mom_thermo → mom_debugging::interface::check_redundant
mom_dynamics_split_rk2::step_mom_dyn_split_rk2 → mom_debugging::interface::check_redundant
mom_dynamics_split_rk2b::step_mom_dyn_split_rk2b → mom_debugging::interface::check_redundant
- interface check_redundant_C
Check for consistency between the duplicated points of a C-grid vector
Callers call graph
- interface check_redundant_B
Check for consistency between the duplicated points of a B-grid vector or scalar
Callers call graph
- interface check_redundant_T
Check for consistency between the duplicated points of an A-grid vector or scalar
Callers call graph
- interface vec_chksum
Do checksums on the components of a C-grid vector
- interface vec_chksum_C
Do checksums on the components of a C-grid vector
- interface vec_chksum_B
Do checksums on the components of a B-grid vector
- interface vec_chksum_A
Do checksums on the components of an A-grid vector
Functions/Subroutine Documentation
- subroutine 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 [in]
A structure to parse for run-time parameters
Callees call graph
- subroutine query_debugging_checks(do_debug, do_chksums, do_redundant)
Returns logicals indicating which debugging checks should be performed.
- Parameters
do_debug [out]
True if verbose debugging is to be output
do_chksums [out]
True if checksums are to be output
do_redundant [out]
True if redundant points are to be checked
Callers call graph
Text view
mom::ale_regridding_and_remapping → mom_debugging::query_debugging_checks
mom::post_diabatic_halo_updates → mom_debugging::query_debugging_checks
mom::step_mom_thermo → mom_debugging::query_debugging_checks
mom_dynamics_split_rk2::step_mom_dyn_split_rk2 → mom_debugging::query_debugging_checks
mom_dynamics_split_rk2b::step_mom_dyn_split_rk2b → mom_debugging::query_debugging_checks
- subroutine 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 [in]
An identifying message
G [inout]
The ocean's grid structure
u_comp [in]
The u-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]
v_comp [in]
The u-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]
is [in]
The starting i-index to check
ie [in]
The ending i-index to check
js [in]
The starting j-index to check
je [in]
The ending j-index to check
direction [in]
the direction flag to be passed to pass_vector
unscale [in]
A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
Callees call graph
- subroutine 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 [in]
An identifying message
G [inout]
The ocean's grid structure
u_comp [in]
The u-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]
v_comp [in]
The u-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]
is [in]
The starting i-index to check
ie [in]
The ending i-index to check
js [in]
The starting j-index to check
je [in]
The ending j-index to check
direction [in]
the direction flag to be passed to pass_vector
unscale [in]
A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
Callees call graph
Callers call graph
- subroutine 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 [in]
An identifying message
G [inout]
The ocean's grid structure
array [in]
The array to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]
is [in]
The starting i-index to check
ie [in]
The ending i-index to check
js [in]
The starting j-index to check
je [in]
The ending j-index to check
unscale [in]
A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
Callees call graph
- subroutine 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 [in]
An identifying message
G [inout]
The ocean's grid structure
array [in]
The array to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]
is [in]
The starting i-index to check
ie [in]
The ending i-index to check
js [in]
The starting j-index to check
je [in]
The ending j-index to check
unscale [in]
A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
Callees call graph
Callers call graph
- subroutine 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 [in]
An identifying message
G [inout]
The ocean's grid structure
u_comp [in]
The u-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]
v_comp [in]
The v-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]
is [in]
The starting i-index to check
ie [in]
The ending i-index to check
js [in]
The starting j-index to check
je [in]
The ending j-index to check
direction [in]
the direction flag to be passed to pass_vector
unscale [in]
A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
Callees call graph
- subroutine 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 [in]
An identifying message
G [inout]
The ocean's grid structure
u_comp [in]
The u-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]
v_comp [in]
The v-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]
is [in]
The starting i-index to check
ie [in]
The ending i-index to check
js [in]
The starting j-index to check
je [in]
The ending j-index to check
direction [in]
the direction flag to be passed to pass_vector
unscale [in]
A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
Callees call graph
Callers call graph
- subroutine 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 [in]
An identifying message
G [inout]
The ocean's grid structure
array [in]
The array to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]
is [in]
The starting i-index to check
ie [in]
The ending i-index to check
js [in]
The starting j-index to check
je [in]
The ending j-index to check
unscale [in]
A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
Callees call graph
- subroutine 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 [in]
An identifying message
G [inout]
The ocean's grid structure
array [in]
The array to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]
is [in]
The starting i-index to check
ie [in]
The ending i-index to check
js [in]
The starting j-index to check
je [in]
The ending j-index to check
unscale [in]
A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
Callees call graph
Callers call graph
- subroutine 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 [in]
An identifying message
G [inout]
The ocean's grid structure
u_comp [in]
The u-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]
v_comp [in]
The v-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]
is [in]
The starting i-index to check
ie [in]
The ending i-index to check
js [in]
The starting j-index to check
je [in]
The ending j-index to check
direction [in]
the direction flag to be passed to pass_vector
unscale [in]
A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
Callees call graph
- subroutine 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 [in]
An identifying message
G [inout]
The ocean's grid structure
u_comp [in]
The u-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]
v_comp [in]
The v-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]
is [in]
The starting i-index to check
ie [in]
The ending i-index to check
js [in]
The starting j-index to check
je [in]
The ending j-index to check
direction [in]
the direction flag to be passed to pass_vector
unscale [in]
A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
Callees call graph
Callers call graph
- subroutine 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 [in]
An identifying message
G [inout]
The ocean's grid structure
u_comp [in]
The u-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]
v_comp [in]
The v-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]
halos [in]
The width of halos to check (default 0)
scalars [in]
If true this is a pair of scalars that are being checked.
unscale [in]
A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
Callees call graph
- subroutine 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 [in]
An identifying message
G [inout]
The ocean's grid structure
u_comp [in]
The u-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]
v_comp [in]
The v-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]
halos [in]
The width of halos to check (default 0)
scalars [in]
If true this is a pair of scalars that are being checked.
unscale [in]
A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
Callees call graph
- subroutine 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 [in]
An identifying message
G [inout]
The ocean's grid structure
u_comp [in]
The u-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]
v_comp [in]
The v-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]
halos [in]
The width of halos to check (default 0)
scalars [in]
If true this is a pair of scalars that are being checked.
unscale [in]
A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
Callees call graph
subroutine chksum_vec_B2d(mesg, u_comp, v_comp, G, halos, scalars, symmetric, unscale)
- Parameters
mesg [in]
An identifying message
G [inout]
The ocean's grid structure
u_comp [in]
The u-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]
v_comp [in]
The v-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]
halos [in]
The width of halos to check (default 0)
scalars [in]
If true this is a pair of scalars that are being checked.
symmetric [in]
If true, do the checksums on the full symmetric computational domain.
unscale [in]
A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
Callees call graph
- subroutine 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 [in]
An identifying message
G [inout]
The ocean's grid structure
u_comp [in]
The u-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]
v_comp [in]
The v-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]
halos [in]
The width of halos to check (default 0)
scalars [in]
If true this is a pair of scalars that are being checked.
unscale [in]
A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
Callees call graph
- subroutine 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 [in]
An identifying message
G [inout]
The ocean's grid structure
u_comp [in]
The u-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]
v_comp [in]
The v-component of the vector to be checked for consistency in arbitrary, possibly rescaled units [A ~> a]
halos [in]
The width of halos to check (default 0)
scalars [in]
If true this is a pair of scalars that are being checked.
unscale [in]
A factor that undoes the scaling for the arrays to give consistent output [a A-1 ~> 1]
Callees call graph
- function 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 [in]
The array of stuff to be summed in arbitrary units [A ~> a] or [a]
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]
totalStuff
the globally integrated amount of stuff [A H L2 ~> a m3 or a kg] or [a m3]
- subroutine 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 [in]
The temperature field to sum [C ~> degC] or [degC]
salinity [in]
The salinity field to sum [S ~> ppt] or [ppt]
mesg [in]
An identifying message
US [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]
- logical function check_column_integral(nk, field, known_answer)
Returns false if the column integral of a given quantity is within roundoff
- Parameters
nk [in]
Number of levels in column
field [in]
Field to be summed [arbitrary]
known_answer [in]
If present is the expected sum [arbitrary], If missing, assumed zero
- logical function 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 [in]
Number of levels in field 1
nk_2 [in]
Number of levels in field 2
field_1 [in]
First field to be summed [arbitrary]
field_2 [in]
Second field to be summed [arbitrary]
missing_value [in]
If column contains missing values, mask them from the sum [arbitrary]