MOM6
MOM_checksums.F90 File Reference
#include "version_variable.h"
Include dependency graph for MOM_checksums.F90:

Go to the source code of this file.

Data Types

interface  mom_checksums::hchksum_pair
 
interface  mom_checksums::uvchksum
 
interface  mom_checksums::uchksum
 
interface  mom_checksums::vchksum
 
interface  mom_checksums::bchksum_pair
 
interface  mom_checksums::hchksum
 
interface  mom_checksums::bchksum
 
interface  mom_checksums::qchksum
 
interface  mom_checksums::chksum
 
interface  mom_checksums::chk_sum_msg
 
interface  mom_checksums::is_nan
 

Modules

module  mom_checksums
 

Functions/Subroutines

subroutine mom_checksums::chksum_pair_h_2d (mesg, arrayA, arrayB, HI, haloshift, omit_corners, scale)
 
subroutine mom_checksums::chksum_pair_h_3d (mesg, arrayA, arrayB, HI, haloshift, omit_corners, scale)
 
subroutine mom_checksums::chksum_h_2d (array, mesg, HI, haloshift, omit_corners, scale)
 chksum_h_2d performs checksums on a 2d array staggered at tracer points. More...
 
integer function subchk (array, HI, di, dj, scale)
 
subroutine substats (HI, array, mesg, scale)
 
subroutine mom_checksums::chksum_pair_b_2d (mesg, arrayA, arrayB, HI, haloshift, symmetric, omit_corners, scale)
 
subroutine mom_checksums::chksum_pair_b_3d (mesg, arrayA, arrayB, HI, haloshift, symmetric, omit_corners, scale)
 
subroutine mom_checksums::chksum_b_2d (array, mesg, HI, haloshift, symmetric, omit_corners, scale)
 chksum_B_2d performs checksums on a 2d array staggered at corner points. More...
 
integer function subchk (array, HI, di, dj, scale)
 
subroutine substats (HI, array, mesg, sym_stats, scale)
 
subroutine mom_checksums::chksum_uv_2d (mesg, arrayU, arrayV, HI, haloshift, symmetric, omit_corners, scale)
 
subroutine mom_checksums::chksum_uv_3d (mesg, arrayU, arrayV, HI, haloshift, symmetric, omit_corners, scale)
 
subroutine mom_checksums::chksum_u_2d (array, mesg, HI, haloshift, symmetric, omit_corners, scale)
 chksum_u_2d performs checksums on a 2d array staggered at C-grid u points. More...
 
integer function subchk (array, HI, di, dj, scale)
 
subroutine substats (HI, array, mesg, sym_stats, scale)
 
subroutine mom_checksums::chksum_v_2d (array, mesg, HI, haloshift, symmetric, omit_corners, scale)
 chksum_v_2d performs checksums on a 2d array staggered at C-grid v points. More...
 
integer function subchk (array, HI, di, dj, scale)
 
subroutine substats (HI, array, mesg, sym_stats, scale)
 
subroutine mom_checksums::chksum_h_3d (array, mesg, HI, haloshift, omit_corners, scale)
 chksum_h_3d performs checksums on a 3d array staggered at tracer points. More...
 
integer function subchk (array, HI, di, dj, scale)
 
subroutine substats (HI, array, mesg, scale)
 
subroutine mom_checksums::chksum_b_3d (array, mesg, HI, haloshift, symmetric, omit_corners, scale)
 chksum_B_3d performs checksums on a 3d array staggered at corner points. More...
 
integer function subchk (array, HI, di, dj, scale)
 
subroutine substats (HI, array, mesg, sym_stats, scale)
 
subroutine mom_checksums::chksum_u_3d (array, mesg, HI, haloshift, symmetric, omit_corners, scale)
 chksum_u_3d performs checksums on a 3d array staggered at C-grid u points. More...
 
integer function subchk (array, HI, di, dj, scale)
 
subroutine substats (HI, array, mesg, sym_stats, scale)
 
subroutine mom_checksums::chksum_v_3d (array, mesg, HI, haloshift, symmetric, omit_corners, scale)
 chksum_v_3d performs checksums on a 3d array staggered at C-grid v points. More...
 
integer function subchk (array, HI, di, dj, scale)
 
subroutine substats (HI, array, mesg, sym_stats, scale)
 
subroutine mom_checksums::chksum1d (array, mesg, start_i, end_i, compare_PEs)
 chksum1d does a checksum of a 1-dimensional array. More...
 
subroutine mom_checksums::chksum2d (array, mesg)
 chksum2d does a checksum of all data in a 2-d array. More...
 
subroutine mom_checksums::chksum3d (array, mesg)
 chksum3d does a checksum of all data in a 2-d array. More...
 
logical function mom_checksums::is_nan_0d (x)
 This function returns .true. if x is a NaN, and .false. otherwise. More...
 
logical function mom_checksums::is_nan_1d (x, skip_mpp)
 This function returns .true. if any element of x is a NaN, and .false. otherwise. More...
 
logical function mom_checksums::is_nan_2d (x)
 This function returns .true. if any element of x is a NaN, and .false. otherwise. More...
 
logical function mom_checksums::is_nan_3d (x)
 This function returns .true. if any element of x is a NaN, and .false. otherwise. More...
 
subroutine mom_checksums::chk_sum_msg1 (fmsg, bc0, mesg)
 
subroutine mom_checksums::chk_sum_msg5 (fmsg, bc0, bcSW, bcSE, bcNW, bcNE, mesg)
 
subroutine mom_checksums::chk_sum_msg_nsew (fmsg, bc0, bcN, bcS, bcE, bcW, mesg)
 
subroutine mom_checksums::chk_sum_msg_s (fmsg, bc0, bcS, mesg)
 
subroutine mom_checksums::chk_sum_msg_w (fmsg, bc0, bcW, mesg)
 
subroutine mom_checksums::chk_sum_msg2 (fmsg, bc0, bcSW, mesg)
 
subroutine mom_checksums::chk_sum_msg3 (fmsg, aMean, aMin, aMax, mesg)
 
subroutine, public 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. More...
 
subroutine mom_checksums::chksum_error (signal, message)
 

Variables

integer, parameter mom_checksums::default_shift =0
 
logical mom_checksums::calculatestatistics =.true.
 
logical mom_checksums::writechksums =.true.
 
logical mom_checksums::checkfornans =.true.
 

Function/Subroutine Documentation

◆ subchk() [1/8]

integer function chksum_h_2d::subchk ( real, dimension(hi%isd:,hi%jsd:), intent(in)  array,
type(hor_index_type), intent(in)  HI,
integer, intent(in)  di,
integer, intent(in)  dj,
real, intent(in)  scale 
)
private

Definition at line 193 of file MOM_checksums.F90.

Referenced by mom_checksums::chksum_b_2d(), mom_checksums::chksum_b_3d(), mom_checksums::chksum_h_2d(), mom_checksums::chksum_h_3d(), mom_checksums::chksum_u_2d(), mom_checksums::chksum_u_3d(), mom_checksums::chksum_v_2d(), mom_checksums::chksum_v_3d(), and subchk().

193  type(hor_index_type), intent(in) :: hi
194  real, dimension(HI%isd:,HI%jsd:), intent(in) :: array
195  integer, intent(in) :: di, dj
196  real, intent(in) :: scale
197  integer :: bitcount, i, j, bc
198  subchk = 0
199  do j=hi%jsc+dj,hi%jec+dj; do i=hi%isc+di,hi%iec+di
200  bc = bitcount(abs(scale*array(i,j)))
201  subchk = subchk + bc
202  enddo; enddo
203  call sum_across_pes(subchk)
204  subchk=mod(subchk,1000000000)
int bitcount(double *x)
Definition: bitcount.c:22
integer function subchk(array, HI, di, dj, scale)
Here is the caller graph for this function:

◆ subchk() [2/8]

integer function chksum_b_2d::subchk ( real, dimension(hi%isdb:,hi%jsdb:), intent(in)  array,
type(hor_index_type), intent(in)  HI,
integer, intent(in)  di,
integer, intent(in)  dj,
real, intent(in)  scale 
)
private

Definition at line 362 of file MOM_checksums.F90.

References subchk().

362  type(hor_index_type), intent(in) :: hi
363  real, dimension(HI%IsdB:,HI%JsdB:), intent(in) :: array
364  integer, intent(in) :: di, dj
365  real, intent(in) :: scale
366  integer :: bitcount, i, j, bc
367  subchk = 0
368  ! This line deliberately uses the h-point computational domain.
369  do j=hi%jsc+dj,hi%jec+dj; do i=hi%isc+di,hi%iec+di
370  bc = bitcount(abs(scale*array(i,j)))
371  subchk = subchk + bc
372  enddo; enddo
373  call sum_across_pes(subchk)
374  subchk=mod(subchk,1000000000)
int bitcount(double *x)
Definition: bitcount.c:22
integer function subchk(array, HI, di, dj, scale)
Here is the call graph for this function:

◆ subchk() [3/8]

integer function chksum_u_2d::subchk ( real, dimension(hi%isdb:,hi%jsd:), intent(in)  array,
type(hor_index_type), intent(in)  HI,
integer, intent(in)  di,
integer, intent(in)  dj,
real, intent(in)  scale 
)
private

Definition at line 531 of file MOM_checksums.F90.

References subchk().

531  type(hor_index_type), intent(in) :: hi
532  real, dimension(HI%IsdB:,HI%jsd:), intent(in) :: array
533  integer, intent(in) :: di, dj
534  real, intent(in) :: scale
535  integer :: bitcount, i, j, bc
536  subchk = 0
537  ! This line deliberately uses the h-point computational domain.
538  do j=hi%jsc+dj,hi%jec+dj; do i=hi%isc+di,hi%iec+di
539  bc = bitcount(abs(scale*array(i,j)))
540  subchk = subchk + bc
541  enddo; enddo
542  call sum_across_pes(subchk)
543  subchk=mod(subchk,1000000000)
int bitcount(double *x)
Definition: bitcount.c:22
integer function subchk(array, HI, di, dj, scale)
Here is the call graph for this function:

◆ subchk() [4/8]

integer function chksum_v_2d::subchk ( real, dimension(hi%isd:,hi%jsdb:), intent(in)  array,
type(hor_index_type), intent(in)  HI,
integer, intent(in)  di,
integer, intent(in)  dj,
real, intent(in)  scale 
)
private

Definition at line 659 of file MOM_checksums.F90.

References subchk().

659  type(hor_index_type), intent(in) :: hi
660  real, dimension(HI%isd:,HI%JsdB:), intent(in) :: array
661  integer, intent(in) :: di, dj
662  real, intent(in) :: scale
663  integer :: bitcount, i, j, bc
664  subchk = 0
665  ! This line deliberately uses the h-point computational domain.
666  do j=hi%jsc+dj,hi%jec+dj; do i=hi%isc+di,hi%iec+di
667  bc = bitcount(abs(scale*array(i,j)))
668  subchk = subchk + bc
669  enddo; enddo
670  call sum_across_pes(subchk)
671  subchk=mod(subchk,1000000000)
int bitcount(double *x)
Definition: bitcount.c:22
integer function subchk(array, HI, di, dj, scale)
Here is the call graph for this function:

◆ subchk() [5/8]

integer function chksum_h_3d::subchk ( real, dimension(hi%isd:,hi%jsd:,:), intent(in)  array,
type(hor_index_type), intent(in)  HI,
integer, intent(in)  di,
integer, intent(in)  dj,
real, intent(in)  scale 
)
private

Definition at line 770 of file MOM_checksums.F90.

References subchk().

770  type(hor_index_type), intent(in) :: hi
771  real, dimension(HI%isd:,HI%jsd:,:), intent(in) :: array
772  integer, intent(in) :: di, dj
773  real, intent(in) :: scale
774  integer :: bitcount, i, j, k, bc
775  subchk = 0
776  do k=lbound(array,3),ubound(array,3) ; do j=hi%jsc+dj,hi%jec+dj ; do i=hi%isc+di,hi%iec+di
777  bc = bitcount(abs(scale*array(i,j,k)))
778  subchk = subchk + bc
779  enddo ; enddo ; enddo
780  call sum_across_pes(subchk)
781  subchk=mod(subchk,1000000000)
int bitcount(double *x)
Definition: bitcount.c:22
integer function subchk(array, HI, di, dj, scale)
Here is the call graph for this function:

◆ subchk() [6/8]

integer function chksum_b_3d::subchk ( real, dimension(hi%isdb:,hi%jsdb:,:), intent(in)  array,
type(hor_index_type), intent(in)  HI,
integer, intent(in)  di,
integer, intent(in)  dj,
real, intent(in)  scale 
)
private

Definition at line 894 of file MOM_checksums.F90.

References subchk().

894  type(hor_index_type), intent(in) :: hi
895  real, dimension(HI%IsdB:,HI%JsdB:,:), intent(in) :: array
896  integer, intent(in) :: di, dj
897  real, intent(in) :: scale
898  integer :: bitcount, i, j, k, bc
899  subchk = 0
900  ! This line deliberately uses the h-point computational domain.
901  do k=lbound(array,3),ubound(array,3) ; do j=hi%jsc+dj,hi%jec+dj ; do i=hi%isc+di,hi%iec+di
902  bc = bitcount(abs(scale*array(i,j,k)))
903  subchk = subchk + bc
904  enddo ; enddo ; enddo
905  call sum_across_pes(subchk)
906  subchk=mod(subchk,1000000000)
int bitcount(double *x)
Definition: bitcount.c:22
integer function subchk(array, HI, di, dj, scale)
Here is the call graph for this function:

◆ subchk() [7/8]

integer function chksum_u_3d::subchk ( real, dimension(hi%isdb:,hi%jsd:,:), intent(in)  array,
type(hor_index_type), intent(in)  HI,
integer, intent(in)  di,
integer, intent(in)  dj,
real, intent(in)  scale 
)
private

Definition at line 1022 of file MOM_checksums.F90.

References subchk().

1022  type(hor_index_type), intent(in) :: hi
1023  real, dimension(HI%IsdB:,HI%jsd:,:), intent(in) :: array
1024  integer, intent(in) :: di, dj
1025  real, intent(in) :: scale
1026  integer :: bitcount, i, j, k, bc
1027  subchk = 0
1028  ! This line deliberately uses the h-point computational domain.
1029  do k=lbound(array,3),ubound(array,3) ; do j=hi%jsc+dj,hi%jec+dj ; do i=hi%isc+di,hi%iec+di
1030  bc = bitcount(abs(scale*array(i,j,k)))
1031  subchk = subchk + bc
1032  enddo ; enddo ; enddo
1033  call sum_across_pes(subchk)
1034  subchk=mod(subchk,1000000000)
int bitcount(double *x)
Definition: bitcount.c:22
integer function subchk(array, HI, di, dj, scale)
Here is the call graph for this function:

◆ subchk() [8/8]

integer function chksum_v_3d::subchk ( real, dimension(hi%isd:,hi%jsdb:,:), intent(in)  array,
type(hor_index_type), intent(in)  HI,
integer, intent(in)  di,
integer, intent(in)  dj,
real, intent(in)  scale 
)
private

Definition at line 1150 of file MOM_checksums.F90.

References subchk().

1150  type(hor_index_type), intent(in) :: hi
1151  real, dimension(HI%isd:,HI%JsdB:,:), intent(in) :: array
1152  integer, intent(in) :: di, dj
1153  real, intent(in) :: scale
1154  integer :: bitcount, i, j, k, bc
1155  subchk = 0
1156  ! This line deliberately uses the h-point computational domain.
1157  do k=lbound(array,3),ubound(array,3) ; do j=hi%jsc+dj,hi%jec+dj ; do i=hi%isc+di,hi%iec+di
1158  bc = bitcount(abs(scale*array(i,j,k)))
1159  subchk = subchk + bc
1160  enddo ; enddo ; enddo
1161  call sum_across_pes(subchk)
1162  subchk=mod(subchk,1000000000)
int bitcount(double *x)
Definition: bitcount.c:22
integer function subchk(array, HI, di, dj, scale)
Here is the call graph for this function:

◆ substats() [1/8]

subroutine chksum_h_2d::substats ( type(hor_index_type), intent(in)  HI,
real, dimension(hi%isd:,hi%jsd:), intent(in)  array,
character(len=*), intent(in)  mesg,
real, intent(in)  scale 
)
private

Definition at line 208 of file MOM_checksums.F90.

References mom_error_handler::is_root_pe().

Referenced by mom_checksums::chksum_b_2d(), mom_checksums::chksum_b_3d(), mom_checksums::chksum_h_2d(), mom_checksums::chksum_h_3d(), mom_checksums::chksum_u_2d(), mom_checksums::chksum_u_3d(), mom_checksums::chksum_v_2d(), and mom_checksums::chksum_v_3d().

208  type(hor_index_type), intent(in) :: hi
209  real, dimension(HI%isd:,HI%jsd:), intent(in) :: array
210  character(len=*), intent(in) :: mesg
211  real, intent(in) :: scale
212  integer :: i, j, n
213  real :: amean, amin, amax
214 
215  amin = array(hi%isc,hi%jsc)
216  amax = array(hi%isc,hi%jsc)
217  n = 0
218  do j=hi%jsc,hi%jec ; do i=hi%isc,hi%iec
219  amin = min(amin, array(i,j))
220  amax = max(amax, array(i,j))
221  n = n + 1
222  enddo ; enddo
223  amean = reproducing_sum(array(hi%isc:hi%iec,hi%jsc:hi%jec))
224  call sum_across_pes(n)
225  call min_across_pes(amin)
226  call max_across_pes(amax)
227  amean = amean / real(n)
228  if (is_root_pe()) call chk_sum_msg("h-point:",amean*scale,amin*scale,amax*scale,mesg)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ substats() [2/8]

subroutine chksum_b_2d::substats ( type(hor_index_type), intent(in)  HI,
real, dimension(hi%isdb:,hi%jsdb:), intent(in)  array,
character(len=*), intent(in)  mesg,
logical, intent(in)  sym_stats,
real, intent(in)  scale 
)
private

Definition at line 378 of file MOM_checksums.F90.

378  type(hor_index_type), intent(in) :: hi
379  real, dimension(HI%IsdB:,HI%JsdB:), intent(in) :: array
380  character(len=*), intent(in) :: mesg
381  logical, intent(in) :: sym_stats
382  real, intent(in) :: scale
383  integer :: i, j, n, isb, jsb
384  real :: amean, amin, amax
385 
386  isb = hi%isc ; if (sym_stats) isb = hi%isc-1
387  jsb = hi%jsc ; if (sym_stats) jsb = hi%jsc-1
388 
389  amin = array(hi%isc,hi%jsc) ; amax = amin
390  do j=jsb,hi%JecB ; do i=isb,hi%IecB
391  amin = min(amin, array(i,j))
392  amax = max(amax, array(i,j))
393  enddo ; enddo
394  ! This line deliberately uses the h-point computational domain.
395  amean = reproducing_sum(array(hi%isc:hi%iec,hi%jsc:hi%jec))
396  n = (1 + hi%jec - hi%jsc) * (1 + hi%iec - hi%isc)
397  call sum_across_pes(n)
398  call min_across_pes(amin)
399  call max_across_pes(amax)
400  amean = amean / real(n)
401  if (is_root_pe()) call chk_sum_msg("B-point:",amean*scale,amin*scale,amax*scale,mesg)

◆ substats() [3/8]

subroutine chksum_u_2d::substats ( type(hor_index_type), intent(in)  HI,
real, dimension(hi%isdb:,hi%jsd:), intent(in)  array,
character(len=*), intent(in)  mesg,
logical, intent(in)  sym_stats,
real, intent(in)  scale 
)
private

Definition at line 547 of file MOM_checksums.F90.

547  type(hor_index_type), intent(in) :: hi
548  real, dimension(HI%IsdB:,HI%jsd:), intent(in) :: array
549  character(len=*), intent(in) :: mesg
550  logical, intent(in) :: sym_stats
551  real, intent(in) :: scale
552  integer :: i, j, n, isb
553  real :: amean, amin, amax
554 
555  isb = hi%isc ; if (sym_stats) isb = hi%isc-1
556 
557  amin = array(hi%isc,hi%jsc) ; amax = amin
558  do j=hi%jsc,hi%jec ; do i=isb,hi%IecB
559  amin = min(amin, array(i,j))
560  amax = max(amax, array(i,j))
561  enddo ; enddo
562  ! This line deliberately uses the h-point computational domain.
563  amean = reproducing_sum(array(hi%isc:hi%iec,hi%jsc:hi%jec))
564  n = (1 + hi%jec - hi%jsc) * (1 + hi%iec - hi%isc)
565  call sum_across_pes(n)
566  call min_across_pes(amin)
567  call max_across_pes(amax)
568  amean = amean / real(n)
569  if (is_root_pe()) call chk_sum_msg("u-point:",amean*scale,amin*scale,amax*scale,mesg)

◆ substats() [4/8]

subroutine chksum_v_2d::substats ( type(hor_index_type), intent(in)  HI,
real, dimension(hi%isd:,hi%jsdb:), intent(in)  array,
character(len=*), intent(in)  mesg,
logical, intent(in)  sym_stats,
real, intent(in)  scale 
)
private

Definition at line 675 of file MOM_checksums.F90.

675  type(hor_index_type), intent(in) :: hi
676  real, dimension(HI%isd:,HI%JsdB:), intent(in) :: array
677  character(len=*), intent(in) :: mesg
678  logical, intent(in) :: sym_stats
679  real, intent(in) :: scale
680  integer :: i, j, n, jsb
681  real :: amean, amin, amax
682 
683  jsb = hi%jsc ; if (sym_stats) jsb = hi%jsc-1
684 
685  amin = array(hi%isc,hi%jsc) ; amax = amin
686  do j=jsb,hi%JecB ; do i=hi%isc,hi%iec
687  amin = min(amin, array(i,j))
688  amax = max(amax, array(i,j))
689  enddo ; enddo
690  ! This line deliberately uses the h-computational domain.
691  amean = reproducing_sum(array(hi%isc:hi%iec,hi%jsc:hi%jec))
692  n = (1 + hi%jec - hi%jsc) * (1 + hi%iec - hi%isc)
693  call sum_across_pes(n)
694  call min_across_pes(amin)
695  call max_across_pes(amax)
696  amean = amean / real(n)
697  if (is_root_pe()) call chk_sum_msg("v-point:",amean*scale,amin*scale,amax*scale,mesg)

◆ substats() [5/8]

subroutine chksum_h_3d::substats ( type(hor_index_type), intent(in)  HI,
real, dimension(hi%isd:,hi%jsd:,:), intent(in)  array,
character(len=*), intent(in)  mesg,
real, intent(in)  scale 
)
private

Definition at line 785 of file MOM_checksums.F90.

785  type(hor_index_type), intent(in) :: hi
786  real, dimension(HI%isd:,HI%jsd:,:), intent(in) :: array
787  character(len=*), intent(in) :: mesg
788  real, intent(in) :: scale
789  integer :: i, j, k, n
790  real :: amean, amin, amax
791 
792  amin = array(hi%isc,hi%jsc,1)
793  amax = array(hi%isc,hi%jsc,1)
794  n = 0
795  do k=lbound(array,3),ubound(array,3) ; do j=hi%jsc,hi%jec ; do i=hi%isc,hi%iec
796  amin = min(amin, array(i,j,k))
797  amax = max(amax, array(i,j,k))
798  n = n + 1
799  enddo ; enddo ; enddo
800  amean = reproducing_sum(array(hi%isc:hi%iec,hi%jsc:hi%jec,:))
801  call sum_across_pes(n)
802  call min_across_pes(amin)
803  call max_across_pes(amax)
804  amean = amean / real(n)
805  if (is_root_pe()) call chk_sum_msg("h-point:",amean*scale,amin*scale,amax*scale,mesg)

◆ substats() [6/8]

subroutine chksum_b_3d::substats ( type(hor_index_type), intent(in)  HI,
real, dimension(hi%isdb:,hi%jsdb:,:), intent(in)  array,
character(len=*), intent(in)  mesg,
logical, intent(in)  sym_stats,
real, intent(in)  scale 
)
private

Definition at line 910 of file MOM_checksums.F90.

910  type(hor_index_type), intent(in) :: hi
911  real, dimension(HI%IsdB:,HI%JsdB:,:), intent(in) :: array
912  character(len=*), intent(in) :: mesg
913  logical, intent(in) :: sym_stats
914  real, intent(in) :: scale
915  integer :: i, j, k, n, isb, jsb
916  real :: amean, amin, amax
917 
918  isb = hi%isc ; if (sym_stats) isb = hi%isc-1
919  jsb = hi%jsc ; if (sym_stats) jsb = hi%jsc-1
920 
921  amin = array(hi%isc,hi%jsc,1) ; amax = amin
922  do k=lbound(array,3),ubound(array,3) ; do j=jsb,hi%JecB ; do i=isb,hi%IecB
923  amin = min(amin, array(i,j,k))
924  amax = max(amax, array(i,j,k))
925  enddo ; enddo ; enddo
926  amean = reproducing_sum(array(hi%isc:hi%iec,hi%jsc:hi%jec,:))
927  n = (1 + hi%jec - hi%jsc) * (1 + hi%iec - hi%isc) * size(array,3)
928  call sum_across_pes(n)
929  call min_across_pes(amin)
930  call max_across_pes(amax)
931  amean = amean / real(n)
932  if (is_root_pe()) call chk_sum_msg("B-point:",amean*scale,amin*scale,amax*scale,mesg)

◆ substats() [7/8]

subroutine chksum_u_3d::substats ( type(hor_index_type), intent(in)  HI,
real, dimension(hi%isdb:,hi%jsd:,:), intent(in)  array,
character(len=*), intent(in)  mesg,
logical, intent(in)  sym_stats,
real, intent(in)  scale 
)
private

Definition at line 1038 of file MOM_checksums.F90.

1038  type(hor_index_type), intent(in) :: hi
1039  real, dimension(HI%IsdB:,HI%jsd:,:), intent(in) :: array
1040  character(len=*), intent(in) :: mesg
1041  logical, intent(in) :: sym_stats
1042  real, intent(in) :: scale
1043  integer :: i, j, k, n, isb
1044  real :: amean, amin, amax
1045 
1046  isb = hi%isc ; if (sym_stats) isb = hi%isc-1
1047 
1048  amin = array(hi%isc,hi%jsc,1) ; amax = amin
1049  do k=lbound(array,3),ubound(array,3) ; do j=hi%jsc,hi%jec ; do i=isb,hi%IecB
1050  amin = min(amin, array(i,j,k))
1051  amax = max(amax, array(i,j,k))
1052  enddo ; enddo ; enddo
1053  ! This line deliberately uses the h-point computational domain.
1054  amean = reproducing_sum(array(hi%isc:hi%iec,hi%jsc:hi%jec,:))
1055  n = (1 + hi%jec - hi%jsc) * (1 + hi%iec - hi%isc) * size(array,3)
1056  call sum_across_pes(n)
1057  call min_across_pes(amin)
1058  call max_across_pes(amax)
1059  amean = amean / real(n)
1060  if (is_root_pe()) call chk_sum_msg("u-point:",amean*scale,amin*scale,amax*scale,mesg)

◆ substats() [8/8]

subroutine chksum_v_3d::substats ( type(hor_index_type), intent(in)  HI,
real, dimension(hi%isd:,hi%jsdb:,:), intent(in)  array,
character(len=*), intent(in)  mesg,
logical, intent(in)  sym_stats,
real, intent(in)  scale 
)
private

Definition at line 1166 of file MOM_checksums.F90.

1166  type(hor_index_type), intent(in) :: hi
1167  real, dimension(HI%isd:,HI%JsdB:,:), intent(in) :: array
1168  character(len=*), intent(in) :: mesg
1169  logical, intent(in) :: sym_stats
1170  real, intent(in) :: scale
1171  integer :: i, j, k, n, jsb
1172  real :: amean, amin, amax
1173 
1174  jsb = hi%jsc ; if (sym_stats) jsb = hi%jsc-1
1175 
1176  amin = array(hi%isc,hi%jsc,1) ; amax = amin
1177  do k=lbound(array,3),ubound(array,3) ; do j=jsb,hi%JecB ; do i=hi%isc,hi%iec
1178  amin = min(amin, array(i,j,k))
1179  amax = max(amax, array(i,j,k))
1180  enddo ; enddo ; enddo
1181  ! This line deliberately uses the h-point computational domain.
1182  amean = reproducing_sum(array(hi%isc:hi%iec,hi%jsc:hi%jec,:))
1183  n = (1 + hi%jec - hi%jsc) * (1 + hi%iec - hi%isc) * size(array,3)
1184  call sum_across_pes(n)
1185  call min_across_pes(amin)
1186  call max_across_pes(amax)
1187  amean = amean / real(n)
1188  if (is_root_pe()) call chk_sum_msg("v-point:",amean*scale,amin*scale,amax*scale,mesg)