namespace mom_debugging

Overview

Provides checksumming functions for debugging. More…

namespace mom_debugging {

// interfaces

interface check_redundant;
interface check_redundant_b;
interface check_redundant_c;
interface check_redundant_t;
interface vec_chksum;
interface vec_chksum_a;
interface vec_chksum_b;
interface vec_chksum_c;

// global functions

subroutine, public mom_debugging_init(param_file param_file);
real function, public totalstuff(HI HI, hThick hThick, areaT areaT, stuff stuff);

subroutine, public totaltands(
    HI HI,
    hThick hThick,
    areaT areaT,
    temperature temperature,
    salinity salinity,
    mesg mesg
    );

logical function, public check_column_integral(nk nk, field field, known_answer known_answer);

logical function, public check_column_integrals(
    nk_1 nk_1,
    field_1 field_1,
    nk_2 nk_2,
    field_2 field_2,
    missing_value missing_value
    );

} // namespace mom_debugging

Detailed Documentation

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.

Global Functions

subroutine, public mom_debugging_init(param_file param_file)

MOM_debugging_init initializes the MOM_debugging module, and sets the parameterts that control which checks are active for MOM6.

Parameters:

param_file

A structure to parse for run-time parameters

real function, public totalstuff(HI HI, hThick hThick, areaT areaT, stuff stuff)

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

A horizontal index type

hthick

The array of thicknesses to use as weights

areat

The array of cell areas [m2]

stuff

The array of stuff to be summed

Returns:

the globally integrated amoutn of stuff

subroutine, public totaltands(
    HI HI,
    hThick hThick,
    areaT areaT,
    temperature temperature,
    salinity salinity,
    mesg mesg
    )

This subroutine display the total thickness, temperature and salinity as well as the change since the last call.

Parameters:

hi

A horizontal index type

hthick

The array of thicknesses to use as weights

areat

The array of cell areas [m2]

temperature

The temperature field to sum

salinity

The salinity field to sum

mesg

An identifying message

logical function, public check_column_integral(
    nk nk,
    field field,
    known_answer known_answer
    )

Returns false if the column integral of a given quantity is within roundoff.

Parameters:

nk

Number of levels in column

field

Field to be summed

known_answer

If present is the expected sum, If missing, assumed zero

logical function, public check_column_integrals(
    nk_1 nk_1,
    field_1 field_1,
    nk_2 nk_2,
    field_2 field_2,
    missing_value missing_value
    )

Returns false if the column integrals of two given quantities are within roundoff of each other.

Parameters:

nk_1

Number of levels in field 1

nk_2

Number of levels in field 2

field_1

First field to be summed

field_2

Second field to be summed

missing_value

If column contains missing values, mask them from the sum