mom_checksums module reference¶
Routines to calculate checksums of various array and vector types.
Functions/Subroutines¶
Checksum a scalar field (consistent with array checksums) |
|
Checksum a 1d array (typically a column). |
|
Checksums on a pair of 2d arrays staggered at tracer points. |
|
Checksums on a pair of 3d arrays staggered at tracer points. |
|
Checksums a 2d array staggered at tracer points. |
|
Checksums on a pair of 2d arrays staggered at q-points. |
|
Checksums on a pair of 3d arrays staggered at q-points. |
|
Checksums a 2d array staggered at corner points. |
|
Checksums a pair of 2d velocity arrays staggered at C-grid locations. |
|
Checksums a pair of 3d velocity arrays staggered at C-grid locations. |
|
Checksums a 2d array staggered at C-grid u points. |
|
Checksums a 2d array staggered at C-grid v points. |
|
Checksums a 3d array staggered at tracer points. |
|
Checksums a 3d array staggered at corner points. |
|
Checksums a 3d array staggered at C-grid u points. |
|
Checksums a 3d array staggered at C-grid v points. |
|
chksum1d does a checksum of a 1-dimensional array. |
|
chksum2d does a checksum of all data in a 2-d array. |
|
chksum3d does a checksum of all data in a 2-d array. |
|
This function returns .true. |
|
Returns .true. |
|
Returns .true. |
|
Returns .true. |
|
Compute the field checksum of a scalar. |
|
Compute the field checksum of a 1d field. |
|
Compute the field checksum of a rotated 2d field. |
|
Compute the field checksum of a rotated 3d field. |
|
Compute the field checksum of a rotated 4d field. |
|
Write a message including the checksum of the non-shifted array. |
|
Write a message including checksums of non-shifted and diagonally shifted arrays. |
|
Write a message including checksums of non-shifted and laterally shifted arrays. |
|
Write a message including checksums of non-shifted and southward shifted arrays. |
|
Write a message including checksums of non-shifted and westward shifted arrays. |
|
Write a message including checksums of non-shifted and southwestward shifted arrays. |
|
Write a message including the global mean, maximum and minimum of an array. |
|
MOM_checksums_init initializes the MOM_checksums module. |
|
A wrapper for MOM_error used in the checksum code. |
|
Does a bitcount of a number by first casting to an integer and then using BTEST to check bit by bit. |
Detailed Description¶
Routines to calculate checksums of various array and vector types.
Function/Subroutine Documentation¶
-
subroutine
mom_checksums/
chksum0
(scalar, mesg, scale, logunit)¶ Checksum a scalar field (consistent with array checksums)
- Parameters:
scalar :: [in] The array to be checksummed in arbitrary, possibly rescaled units [A ~> a]
mesg :: [in] An identifying message
scale :: [in] A factor to convert this array back to unscaled units for checksums and output [a A-1 ~> 1]
logunit :: [in] IO unit for checksum logging
- Call to:
bc_modulus
bitcount
calculatestatistics
checkfornans
chksum_error
writechksums
- Called from:
-
subroutine
mom_checksums/
zchksum
(array, mesg, scale, logunit)¶ Checksum a 1d array (typically a column).
- Parameters:
array :: [in] The array to be checksummed in arbitrary, possibly rescaled units [A ~> a]
mesg :: [in] An identifying message
scale :: [in] A factor to convert this array back to unscaled units for checksums and output [a A-1 ~> 1]
logunit :: [in] IO unit for checksum logging
- Call to:
calculatestatistics
checkfornans
chksum_error
subchk
substats
writechksums
-
subroutine
mom_checksums/
chksum_pair_h_2d
(mesg, arrayA, arrayB, HI, haloshift, omit_corners, scale, logunit, scalar_pair)¶ Checksums on a pair of 2d arrays staggered at tracer points.
- Parameters:
mesg :: [in] Identifying messages
hi :: [in] A horizontal index type
arraya :: [in] The first array to be checksummed in arbitrary, possibly rescaled units [A ~> a]
arrayb :: [in] The second array to be checksummed in arbitrary, possibly rescaled units [A ~> a]
haloshift :: [in] The width of halos to check (default 0)
omit_corners :: [in] If true, avoid checking diagonal shifts
scale :: [in] A factor to convert these arrays back to unscaled units for checksums and output [a A-1 ~> 1]
logunit :: [in] IO unit for checksum logging
scalar_pair :: [in] If true, then the arrays describe a scalar, rather than vector
-
subroutine
mom_checksums/
chksum_pair_h_3d
(mesg, arrayA, arrayB, HI, haloshift, omit_corners, scale, logunit, scalar_pair)¶ Checksums on a pair of 3d arrays staggered at tracer points.
- Parameters:
mesg :: [in] Identifying messages
hi :: [in] A horizontal index type
arraya :: [in] The first array to be checksummed in arbitrary, possibly rescaled units [A ~> a]
arrayb :: [in] The second array to be checksummed in arbitrary, possibly rescaled units [A ~> a]
haloshift :: [in] The width of halos to check (default 0)
omit_corners :: [in] If true, avoid checking diagonal shifts
scale :: [in] A factor to convert this array back to unscaled units for checksums and output [a A-1 ~> 1]
logunit :: [in] IO unit for checksum logging
scalar_pair :: [in] If true, then the arrays describe a scalar, rather than vector
-
subroutine
mom_checksums/
chksum_h_2d
(array_m, mesg, HI_m, haloshift, omit_corners, scale, logunit)¶ Checksums a 2d array staggered at tracer points.
- Parameters:
hi_m :: [in] Horizontal index bounds of the model grid
array_m :: [in] Field array on the model grid in arbitrary, possibly rescaled units [A ~> a]
mesg :: [in] An identifying message
haloshift :: [in] The width of halos to check (default 0)
omit_corners :: [in] If true, avoid checking diagonal shifts
scale :: [in] A factor to convert this array back to unscaled units for checksums and output [a A-1 ~> 1]
logunit :: [in] IO unit for checksum logging
- Called from:
-
subroutine
mom_checksums/
chksum_pair_b_2d
(mesg, arrayA, arrayB, HI, haloshift, symmetric, omit_corners, scale, logunit, scalar_pair)¶ Checksums on a pair of 2d arrays staggered at q-points.
- Parameters:
mesg :: [in] Identifying messages
hi :: [in] A horizontal index type
arraya :: [in] The first array to be checksummed in arbitrary, possibly rescaled units [A ~> a]
arrayb :: [in] The second array to be checksummed in arbitrary, possibly rescaled units [A ~> a]
symmetric :: [in] If true, do the checksums on the full symmetric computational domain.
haloshift :: [in] The width of halos to check (default 0)
omit_corners :: [in] If true, avoid checking diagonal shifts
scale :: [in] A factor to convert this array back to unscaled units for checksums and output [a A-1 ~> 1]
logunit :: [in] IO unit for checksum logging
scalar_pair :: [in] If true, then the arrays describe a scalar, rather than vector
-
subroutine
mom_checksums/
chksum_pair_b_3d
(mesg, arrayA, arrayB, HI, haloshift, symmetric, omit_corners, scale, logunit, scalar_pair)¶ Checksums on a pair of 3d arrays staggered at q-points.
- Parameters:
mesg :: [in] Identifying messages
hi :: [in] A horizontal index type
arraya :: [in] The first array to be checksummed in arbitrary, possibly rescaled units [A ~> a]
arrayb :: [in] The second array to be checksummed in arbitrary, possibly rescaled units [A ~> a]
haloshift :: [in] The width of halos to check (default 0)
symmetric :: [in] If true, do the checksums on the full symmetric computational domain.
omit_corners :: [in] If true, avoid checking diagonal shifts
scale :: [in] A factor to convert this array back to unscaled units for checksums and output [a A-1 ~> 1]
logunit :: [in] IO unit for checksum logging
scalar_pair :: [in] If true, then the arrays describe a scalar, rather than vector
-
subroutine
mom_checksums/
chksum_b_2d
(array_m, mesg, HI_m, haloshift, symmetric, omit_corners, scale, logunit)¶ Checksums a 2d array staggered at corner points.
- Parameters:
hi_m :: [in] A horizontal index type
array_m :: [in] The array to be checksummed in
mesg :: [in] An identifying message
haloshift :: [in] The width of halos to check (default 0)
symmetric :: [in] If true, do the checksums on the full symmetric computational domain.
omit_corners :: [in] If true, avoid checking diagonal shifts
scale :: [in] A factor to convert this array back to unscaled units for checksums and output [a A-1 ~> 1]
logunit :: [in] IO unit for checksum logging
- Called from:
-
subroutine
mom_checksums/
chksum_uv_2d
(mesg, arrayU, arrayV, HI, haloshift, symmetric, omit_corners, scale, logunit, scalar_pair)¶ Checksums a pair of 2d velocity arrays staggered at C-grid locations.
- Parameters:
mesg :: [in] Identifying messages
hi :: [in] A horizontal index type
arrayu :: [in] The u-component array to be checksummed in arbitrary, possibly rescaled units [A ~> a]
arrayv :: [in] The v-component array to be checksummed in arbitrary, possibly rescaled units [A ~> a]
haloshift :: [in] The width of halos to check (default 0)
symmetric :: [in] If true, do the checksums on the full symmetric computational domain.
omit_corners :: [in] If true, avoid checking diagonal shifts
scale :: [in] A factor to convert these arrays back to unscaled units for checksums and output [a A-1 ~> 1]
logunit :: [in] IO unit for checksum logging
scalar_pair :: [in] If true, then the arrays describe a a scalar, rather than vector
-
subroutine
mom_checksums/
chksum_uv_3d
(mesg, arrayU, arrayV, HI, haloshift, symmetric, omit_corners, scale, logunit, scalar_pair)¶ Checksums a pair of 3d velocity arrays staggered at C-grid locations.
- Parameters:
mesg :: [in] Identifying messages
hi :: [in] A horizontal index type
arrayu :: [in] The u-component array to be checksummed in arbitrary, possibly rescaled units [A ~> a]
arrayv :: [in] The v-component array to be checksummed in arbitrary, possibly rescaled units [A ~> a]
haloshift :: [in] The width of halos to check (default 0)
symmetric :: [in] If true, do the checksums on the full symmetric computational domain.
omit_corners :: [in] If true, avoid checking diagonal shifts
scale :: [in] A factor to convert these arrays back to unscaled units for checksums and output [a A-1 ~> 1]
logunit :: [in] IO unit for checksum logging
scalar_pair :: [in] If true, then the arrays describe a a scalar, rather than vector
-
subroutine
mom_checksums/
chksum_u_2d
(array_m, mesg, HI_m, haloshift, symmetric, omit_corners, scale, logunit)¶ Checksums a 2d array staggered at C-grid u points.
- Parameters:
hi_m :: [in] A horizontal index type
array_m :: [in] The array to be checksummed in arbitrary, possibly rescaled units [A ~> a]
mesg :: [in] An identifying message
haloshift :: [in] The width of halos to check (default 0)
symmetric :: [in] If true, do the checksums on the full symmetric computational domain.
omit_corners :: [in] If true, avoid checking diagonal shifts
scale :: [in] A factor to convert this array back to unscaled units for checksums and output [a A-1 ~> 1]
logunit :: [in] IO unit for checksum logging
- Called from:
-
subroutine
mom_checksums/
chksum_v_2d
(array_m, mesg, HI_m, haloshift, symmetric, omit_corners, scale, logunit)¶ Checksums a 2d array staggered at C-grid v points.
- Parameters:
hi_m :: [in] A horizontal index type
array_m :: [in] The array to be checksummed in arbitrary, possibly rescaled units [A ~> a]
mesg :: [in] An identifying message
haloshift :: [in] The width of halos to check (default 0)
symmetric :: [in] If true, do the checksums on the full symmetric computational domain.
omit_corners :: [in] If true, avoid checking diagonal shifts
scale :: [in] A factor to convert this array back to unscaled units for checksums and output [a A-1 ~> 1]
logunit :: [in] IO unit for checksum logging
- Called from:
-
subroutine
mom_checksums/
chksum_h_3d
(array_m, mesg, HI_m, haloshift, omit_corners, scale, logunit)¶ Checksums a 3d array staggered at tracer points.
- Parameters:
hi_m :: [in] A horizontal index type
array_m :: [in] The array to be checksummed in arbitrary, possibly rescaled units [A ~> a]
mesg :: [in] An identifying message
haloshift :: [in] The width of halos to check (default 0)
omit_corners :: [in] If true, avoid checking diagonal shifts
scale :: [in] A factor to convert this array back to unscaled units for checksums and output [a A-1 ~> 1]
logunit :: [in] IO unit for checksum logging
- Called from:
-
subroutine
mom_checksums/
chksum_b_3d
(array_m, mesg, HI_m, haloshift, symmetric, omit_corners, scale, logunit)¶ Checksums a 3d array staggered at corner points.
- Parameters:
hi_m :: [in] A horizontal index type
array_m :: [in] The array to be checksummed in arbitrary, possibly rescaled units [A ~> a]
mesg :: [in] An identifying message
haloshift :: [in] The width of halos to check (default 0)
symmetric :: [in] If true, do the checksums on the full symmetric computational domain.
omit_corners :: [in] If true, avoid checking diagonal shifts
scale :: [in] A factor to convert this array back to unscaled units for checksums and output [a A-1 ~> 1]
logunit :: [in] IO unit for checksum logging
- Called from:
-
subroutine
mom_checksums/
chksum_u_3d
(array_m, mesg, HI_m, haloshift, symmetric, omit_corners, scale, logunit)¶ Checksums a 3d array staggered at C-grid u points.
- Parameters:
hi_m :: [in] A horizontal index type
array_m :: [in] The array to be checksummed in arbitrary, possibly rescaled units [A ~> a]
mesg :: [in] An identifying message
haloshift :: [in] The width of halos to check (default 0)
symmetric :: [in] If true, do the checksums on the full symmetric computational domain.
omit_corners :: [in] If true, avoid checking diagonal shifts
scale :: [in] A factor to convert this array back to unscaled units for checksums and output [a A-1 ~> 1]
logunit :: [in] IO unit for checksum logging
- Called from:
-
subroutine
mom_checksums/
chksum_v_3d
(array_m, mesg, HI_m, haloshift, symmetric, omit_corners, scale, logunit)¶ Checksums a 3d array staggered at C-grid v points.
- Parameters:
hi_m :: [in] A horizontal index type
array_m :: [in] The array to be checksummed in arbitrary, possibly rescaled units [A ~> a]
mesg :: [in] An identifying message
haloshift :: [in] The width of halos to check (default 0)
symmetric :: [in] If true, do the checksums on the full symmetric computational domain.
omit_corners :: [in] If true, avoid checking diagonal shifts
scale :: [in] A factor to convert this array back to unscaled units for checksums and output [a A-1 ~> 1]
logunit :: [in] IO unit for checksum logging
- Called from:
-
subroutine
mom_checksums/
chksum1d
(array, mesg, start_i, end_i, compare_PEs)¶ chksum1d does a checksum of a 1-dimensional array.
- Parameters:
array :: [in] The array to be summed (index starts at 1) [abitrary].
mesg :: [in] An identifying message.
start_i :: [in] The starting index for the sum (default 1)
end_i :: [in] The ending index for the sum (default all)
compare_pes :: [in] If true, compare across PEs instead of summing and list the root_PE value (default true)
-
subroutine
mom_checksums/
chksum2d
(array, mesg)¶ chksum2d does a checksum of all data in a 2-d array.
- Parameters:
array :: [in] The array to be checksummed [arbitrary]
mesg :: [in] An identifying message
-
subroutine
mom_checksums/
chksum3d
(array, mesg)¶ chksum3d does a checksum of all data in a 2-d array.
- Parameters:
array :: [in] The array to be checksummed [arbitrary]
mesg :: [in] An identifying message
-
function
mom_checksums/
is_nan_0d
(x) [logical]¶ This function returns .true. if x is a NaN, and .false. otherwise.
- Parameters:
x :: [in] The value to be checked for NaNs [arbitrary]
- Called from:
mom_checksums::is_nan::is_nan_0d
mom_checksums::is_nan::is_nan_1d
mom_checksums::is_nan::is_nan_2d
mom_checksums::is_nan::is_nan_3d
-
function
mom_checksums/
is_nan_1d
(x, skip_mpp) [logical]¶ Returns .true. if any element of x is a NaN, and .false. otherwise.
- Parameters:
x :: [in] The array to be checked for NaNs [arbitrary]
skip_mpp :: [in] If true, only check this array only on the local PE (default false).
- Called from:
-
function
mom_checksums/
is_nan_2d
(x) [logical]¶ Returns .true. if any element of x is a NaN, and .false. otherwise.
- Parameters:
x :: [in] The array to be checked for NaNs [arbitrary]
- Called from:
-
function
mom_checksums/
is_nan_3d
(x) [logical]¶ Returns .true. if any element of x is a NaN, and .false. otherwise.
- Parameters:
x :: [in] The array to be checked for NaNs [arbitrary]
- Called from:
-
function
mom_checksums/
rotated_field_chksum_real_0d
(field, pelist, mask_val, turns) [integer(kind=int64)]¶ Compute the field checksum of a scalar.
- Parameters:
field :: [in] Input scalar [arbitrary]
pelist :: [in] PE list of ranks to checksum
mask_val :: [in] FMS mask value [nondim]
turns :: [in] Number of quarter turns
- Return:
undefined :: checksum of scalar
-
function
mom_checksums/
rotated_field_chksum_real_1d
(field, pelist, mask_val, turns) [integer(kind=int64)]¶ Compute the field checksum of a 1d field.
- Parameters:
field :: [in] Input array [arbitrary]
pelist :: [in] PE list of ranks to checksum
mask_val :: [in] FMS mask value [nondim]
turns :: [in] Number of quarter turns
- Return:
undefined :: checksum of array
-
function
mom_checksums/
rotated_field_chksum_real_2d
(field, pelist, mask_val, turns) [integer(kind=int64)]¶ Compute the field checksum of a rotated 2d field.
- Parameters:
field :: [in] Unrotated input field [arbitrary]
pelist :: [in] PE list of ranks to checksum
mask_val :: [in] FMS mask value [nondim]
turns :: [in] Number of quarter turns
- Return:
undefined :: checksum of array
-
function
mom_checksums/
rotated_field_chksum_real_3d
(field, pelist, mask_val, turns) [integer(kind=int64)]¶ Compute the field checksum of a rotated 3d field.
- Parameters:
field :: [in] Unrotated input field [arbitrary]
pelist :: [in] PE list of ranks to checksum
mask_val :: [in] FMS mask value [nondim]
turns :: [in] Number of quarter turns
- Return:
undefined :: checksum of array
-
function
mom_checksums/
rotated_field_chksum_real_4d
(field, pelist, mask_val, turns) [integer(kind=int64)]¶ Compute the field checksum of a rotated 4d field.
- Parameters:
field :: [in] Unrotated input field [arbitrary]
pelist :: [in] PE list of ranks to checksum
mask_val :: [in] FMS mask value [nondim]
turns :: [in] Number of quarter turns
- Return:
undefined :: checksum of array
-
subroutine
mom_checksums/
chk_sum_msg1
(fmsg, bc0, mesg, iounit)¶ Write a message including the checksum of the non-shifted array.
- Parameters:
fmsg :: [in] A checksum code-location specific preamble
mesg :: [in] An identifying message supplied by top-level caller
bc0 :: [in] The bitcount of the non-shifted array
iounit :: [in] Checksum logger IO unit
-
subroutine
mom_checksums/
chk_sum_msg5
(fmsg, bc0, bcSW, bcSE, bcNW, bcNE, mesg, iounit)¶ Write a message including checksums of non-shifted and diagonally shifted arrays.
- Parameters:
fmsg :: [in] A checksum code-location specific preamble
mesg :: [in] An identifying message supplied by top-level caller
bc0 :: [in] The bitcount of the non-shifted array
bcsw :: [in] The bitcount for SW shifted array
bcse :: [in] The bitcount for SE shifted array
bcnw :: [in] The bitcount for NW shifted array
bcne :: [in] The bitcount for NE shifted array
iounit :: [in] Checksum logger IO unit
-
subroutine
mom_checksums/
chk_sum_msg_nsew
(fmsg, bc0, bcN, bcS, bcE, bcW, mesg, iounit)¶ Write a message including checksums of non-shifted and laterally shifted arrays.
- Parameters:
fmsg :: [in] A checksum code-location specific preamble
mesg :: [in] An identifying message supplied by top-level caller
bc0 :: [in] The bitcount of the non-shifted array
bcn :: [in] The bitcount for N shifted array
bcs :: [in] The bitcount for S shifted array
bce :: [in] The bitcount for E shifted array
bcw :: [in] The bitcount for W shifted array
iounit :: [in] Checksum logger IO unit
- Called from:
mom_checksums::bchksum::chksum_b_2d
mom_checksums::bchksum::chksum_b_3d
mom_checksums::hchksum::chksum_h_2d
mom_checksums::hchksum::chksum_h_3d
mom_checksums::uchksum::chksum_u_2d
mom_checksums::uchksum::chksum_u_3d
mom_checksums::vchksum::chksum_v_2d
mom_checksums::vchksum::chksum_v_3d
-
subroutine
mom_checksums/
chk_sum_msg_s
(fmsg, bc0, bcS, mesg, iounit)¶ Write a message including checksums of non-shifted and southward shifted arrays.
- Parameters:
fmsg :: [in] A checksum code-location specific preamble
mesg :: [in] An identifying message supplied by top-level caller
bc0 :: [in] The bitcount of the non-shifted array
bcs :: [in] The bitcount of the south-shifted array
iounit :: [in] Checksum logger IO unit
- Called from:
mom_checksums::vchksum::chksum_v_2d
mom_checksums::vchksum::chksum_v_3d
-
subroutine
mom_checksums/
chk_sum_msg_w
(fmsg, bc0, bcW, mesg, iounit)¶ Write a message including checksums of non-shifted and westward shifted arrays.
- Parameters:
fmsg :: [in] A checksum code-location specific preamble
mesg :: [in] An identifying message supplied by top-level caller
bc0 :: [in] The bitcount of the non-shifted array
bcw :: [in] The bitcount of the west-shifted array
iounit :: [in] Checksum logger IO unit
- Called from:
mom_checksums::uchksum::chksum_u_2d
mom_checksums::uchksum::chksum_u_3d
-
subroutine
mom_checksums/
chk_sum_msg2
(fmsg, bc0, bcSW, mesg, iounit)¶ Write a message including checksums of non-shifted and southwestward shifted arrays.
- Parameters:
fmsg :: [in] A checksum code-location specific preamble
mesg :: [in] An identifying message supplied by top-level caller
bc0 :: [in] The bitcount of the non-shifted array
bcsw :: [in] The bitcount of the southwest-shifted array
iounit :: [in] Checksum logger IO unit
-
subroutine
mom_checksums/
chk_sum_msg3
(fmsg, aMean, aMin, aMax, mesg, iounit)¶ Write a message including the global mean, maximum and minimum of an array.
- Parameters:
fmsg :: [in] A checksum code-location specific preamble
mesg :: [in] An identifying message supplied by top-level caller
amean :: [in] The mean value of the array [arbitrary]
amin :: [in] The minimum value of the array [arbitrary]
amax :: [in] The maximum value of the array [arbitrary]
iounit :: [in] Checksum logger IO unit
-
subroutine
mom_checksums/
mom_checksums_init
(param_file)¶ MOM_checksums_init initializes the MOM_checksums module. As it happens, the only thing that it does is to log the version of this module.
- Parameters:
param_file :: [in] A structure to parse for run-time parameters
- Called from:
-
subroutine
mom_checksums/
chksum_error
(signal, message)¶ A wrapper for MOM_error used in the checksum code.
- Parameters:
signal :: [in] An error severity level, such as FATAL or WARNING
message :: [in] An error message
- Call to:
- Called from:
chksum0
mom_checksums::bchksum::chksum_b_2d
mom_checksums::bchksum::chksum_b_3d
mom_checksums::hchksum::chksum_h_2d
mom_checksums::hchksum::chksum_h_3d
mom_checksums::uchksum::chksum_u_2d
mom_checksums::uchksum::chksum_u_3d
mom_checksums::vchksum::chksum_v_2d
mom_checksums::vchksum::chksum_v_3d
zchksum
-
function
mom_checksums/
bitcount
(x) [integer]¶ Does a bitcount of a number by first casting to an integer and then using BTEST to check bit by bit.
- Parameters:
x :: [in] Number to be bitcount [arbitrary]
- Called from:
chksum0
mom_checksums::chksum::chksum1d
mom_checksums::chksum::chksum2d
mom_checksums::chksum::chksum3d
subchk