mom_document module reference¶
The subroutines here provide hooks for document generation functions at various levels of granularity.
Data Types¶
A structure that controls where the documentation occurs, its veborsity and formatting. |
|
A linked list of the parameter documentation messages that have been issued so far. |
Functions/Subroutines¶
This subroutine handles parameter documentation with no value. |
|
This subroutine handles parameter documentation for logicals. |
|
This subroutine handles parameter documentation for arrays of logicals. |
|
This subroutine handles parameter documentation for integers. |
|
This subroutine handles parameter documentation for arrays of integers. |
|
This subroutine handles parameter documentation for reals. |
|
This subroutine handles parameter documentation for arrays of reals. |
|
This subroutine handles parameter documentation for character strings. |
|
This subroutine handles documentation for opening a parameter block. |
|
This subroutine handles documentation for closing a parameter block. |
|
This subroutine handles parameter documentation for time-type variables. |
|
This subroutine writes out the message and description to the documetation files. |
|
This function returns a string with a time type formatted as seconds (perhaps including a fractional number of seconds) and days. |
|
This function returns a string with a real formatted like ‘(G)’. |
|
Returns a character string of a comma-separated, compact formatted, reals e.g. |
|
This function tests whether a real value is encoded in a string. |
|
This function returns a string with an integer formatted like ‘(I)’. |
|
This function returns a string with an logical formatted like ‘(L)’. |
|
This function returns a string for formatted parameter assignment. |
|
This function returns a string for formatted false logicals. |
|
This subroutine handles the module documentation. |
|
This subroutine handles the subroutine documentation. |
|
This subroutine handles the function documentation. |
|
Initialize the parameter documentation. |
|
This subroutine allocates and populates a structure that controls where the documentation occurs and its formatting, and opens up the files controlled by this structure. |
|
Find an unused unit number, returning >0 if found, and triggering a FATAL error if not. |
|
This subroutine closes the the files controlled by doc, and sets flags in doc to indicate that parameterization is no longer permitted. |
|
Returns true if documentation has already been written. |
Detailed Description¶
The subroutines here provide hooks for document generation functions at various levels of granularity.
Type Documentation¶
-
type
mom_document/doc_type¶ A structure that controls where the documentation occurs, its veborsity and formatting.
- Type fields
%unitall[integer] :: The open unit number for docFileBase + .all.%unitshort[integer] :: The open unit number for docFileBase + .short.%unitlayout[integer] :: The open unit number for docFileBase + .layout.%unitdebugging[integer] :: The open unit number for docFileBase + .debugging.%filesareopen[logical] :: True if any files were successfully opened.%docfilebase[character (len= mlen )] :: The basename of the files where run-time parameters, settings and defaults are documented.%complete[logical] :: If true, document all parameters.%minimal[logical] :: If true, document non-default parameters.%layout[logical] :: If true, document layout parameters.%debugging[logical] :: If true, document debugging parameters.%definesyntax[logical] :: If true, use ‘#def’ syntax instead of a=b syntax.%warnonconflicts[logical] :: Cause a WARNING error if defaults differ.%commentcolumn[integer] :: Number of spaces before the comment marker.%max_line_len[integer] :: The maximum length of message lines.%chain_msg[type( link_msg ),pointer] :: Database of messages.%blockprefix[character (len=240)] :: The full name of the current block.
-
type
mom_document/link_msg¶ A linked list of the parameter documentation messages that have been issued so far.
- Type fields
%next[type( link_msg ),pointer, private] :: Facilitates linked list.%name[character (len=80),private] :: Parameter name.%msg[character (len=620),private] :: Parameter value and default.
Function/Subroutine Documentation¶
-
subroutine
mom_document/doc_param_none(doc, varname, desc, units)¶ This subroutine handles parameter documentation with no value.
- Parameters
doc :: A pointer to a structure that controls where the documentation occurs and its formatting
varname :: [in] The name of the parameter being documented
desc :: [in] A description of the parameter being documented
units :: [in] The units of the parameter being documented
- Call to
mom_error_handler::is_root_pemesghasbeendocumentedopen_doc_filewritemessageanddesc
-
subroutine
mom_document/doc_param_logical(doc, varname, desc, units, val, default, layoutParam, debuggingParam, like_default)¶ This subroutine handles parameter documentation for logicals.
- Parameters
doc :: A pointer to a structure that controls where the documentation occurs and its formatting
varname :: [in] The name of the parameter being documented
desc :: [in] A description of the parameter being documented
units :: [in] The units of the parameter being documented
val :: [in] The value of this parameter
default :: [in] The default value of this parameter
layoutparam :: [in] If present and true, this is a layout parameter.
debuggingparam :: [in] If present and true, this is a debugging parameter.
like_default :: [in] If present and true, log this parameter as though it has the default value, even if there is no default.
- Call to
define_stringmom_error_handler::is_root_pemesghasbeendocumentedopen_doc_filestring_falsestring_trueundef_stringwritemessageanddesc
-
subroutine
mom_document/doc_param_logical_array(doc, varname, desc, units, vals, default, layoutParam, debuggingParam, like_default)¶ This subroutine handles parameter documentation for arrays of logicals.
- Parameters
doc :: A pointer to a structure that controls where the documentation occurs and its formatting
varname :: [in] The name of the parameter being documented
desc :: [in] A description of the parameter being documented
units :: [in] The units of the parameter being documented
vals :: [in] The array of values to record
default :: [in] The default value of this parameter
layoutparam :: [in] If present and true, this is a layout parameter.
debuggingparam :: [in] If present and true, this is a debugging parameter.
like_default :: [in] If present and true, log this parameter as though it has the default value, even if there is no default.
- Call to
define_stringmom_error_handler::is_root_pemesghasbeendocumentedopen_doc_filestring_falsestring_truewritemessageanddesc
-
subroutine
mom_document/doc_param_int(doc, varname, desc, units, val, default, layoutParam, debuggingParam, like_default)¶ This subroutine handles parameter documentation for integers.
- Parameters
doc :: A pointer to a structure that controls where the documentation occurs and its formatting
varname :: [in] The name of the parameter being documented
desc :: [in] A description of the parameter being documented
units :: [in] The units of the parameter being documented
val :: [in] The value of this parameter
default :: [in] The default value of this parameter
layoutparam :: [in] If present and true, this is a layout parameter.
debuggingparam :: [in] If present and true, this is a debugging parameter.
like_default :: [in] If present and true, log this parameter as though it has the default value, even if there is no default.
- Call to
define_stringint_stringmom_error_handler::is_root_pemesghasbeendocumentedopen_doc_filewritemessageanddesc
-
subroutine
mom_document/doc_param_int_array(doc, varname, desc, units, vals, default, layoutParam, debuggingParam, like_default)¶ This subroutine handles parameter documentation for arrays of integers.
- Parameters
doc :: A pointer to a structure that controls where the documentation occurs and its formatting
varname :: [in] The name of the parameter being documented
desc :: [in] A description of the parameter being documented
units :: [in] The units of the parameter being documented
vals :: [in] The array of values to record
default :: [in] The default value of this parameter
layoutparam :: [in] If present and true, this is a layout parameter.
debuggingparam :: [in] If present and true, this is a debugging parameter.
like_default :: [in] If present and true, log this parameter as though it has the default value, even if there is no default.
- Call to
define_stringint_stringmom_error_handler::is_root_pemesghasbeendocumentedopen_doc_filewritemessageanddesc
-
subroutine
mom_document/doc_param_real(doc, varname, desc, units, val, default, debuggingParam, like_default)¶ This subroutine handles parameter documentation for reals.
- Parameters
doc :: A pointer to a structure that controls where the documentation occurs and its formatting
varname :: [in] The name of the parameter being documented
desc :: [in] A description of the parameter being documented
units :: [in] The units of the parameter being documented
val :: [in] The value of this parameter
default :: [in] The default value of this parameter
debuggingparam :: [in] If present and true, this is a debugging parameter.
like_default :: [in] If present and true, log this parameter as though it has the default value, even if there is no default.
- Call to
define_stringmom_error_handler::is_root_pemesghasbeendocumentedopen_doc_filereal_stringwritemessageanddesc
-
subroutine
mom_document/doc_param_real_array(doc, varname, desc, units, vals, default, debuggingParam, like_default)¶ This subroutine handles parameter documentation for arrays of reals.
- Parameters
doc :: A pointer to a structure that controls where the documentation occurs and its formatting
varname :: [in] The name of the parameter being documented
desc :: [in] A description of the parameter being documented
units :: [in] The units of the parameter being documented
vals :: [in] The array of values to record
default :: [in] The default value of this parameter
debuggingparam :: [in] If present and true, this is a debugging parameter.
like_default :: [in] If present and true, log this parameter as though it has the default value, even if there is no default.
- Call to
define_stringmom_error_handler::is_root_pemesghasbeendocumentedopen_doc_filereal_array_stringreal_stringwritemessageanddesc
-
subroutine
mom_document/doc_param_char(doc, varname, desc, units, val, default, layoutParam, debuggingParam, like_default)¶ This subroutine handles parameter documentation for character strings.
- Parameters
doc :: A pointer to a structure that controls where the documentation occurs and its formatting
varname :: [in] The name of the parameter being documented
desc :: [in] A description of the parameter being documented
units :: [in] The units of the parameter being documented
val :: [in] The value of the parameter
default :: [in] The default value of this parameter
layoutparam :: [in] If present and true, this is a layout parameter.
debuggingparam :: [in] If present and true, this is a debugging parameter.
like_default :: [in] If present and true, log this parameter as though it has the default value, even if there is no default.
- Call to
define_stringmom_error_handler::is_root_pemesghasbeendocumentedopen_doc_filewritemessageanddesc
-
subroutine
mom_document/doc_openblock(doc, blockName, desc)¶ This subroutine handles documentation for opening a parameter block.
- Parameters
doc :: A pointer to a structure that controls where the documentation occurs and its formatting
blockname :: [in] The name of the parameter block being opened
desc :: [in] A description of the parameter block being opened
- Call to
mom_error_handler::is_root_peopen_doc_filewritemessageanddesc
-
subroutine
mom_document/doc_closeblock(doc, blockName)¶ This subroutine handles documentation for closing a parameter block.
- Parameters
doc :: A pointer to a structure that controls where the documentation occurs and its formatting
blockname :: [in] The name of the parameter block being closed
- Call to
mom_error_handler::is_root_peopen_doc_filewritemessageanddesc
-
subroutine
mom_document/doc_param_time(doc, varname, desc, val, default, units, debuggingParam, like_default)¶ This subroutine handles parameter documentation for time-type variables.
- Parameters
doc :: A pointer to a structure that controls where the documentation occurs and its formatting
varname :: [in] The name of the parameter being documented
desc :: [in] A description of the parameter being documented
val :: [in] The value of the parameter
default :: [in] The default value of this parameter
units :: [in] The units of the parameter being documented
debuggingparam :: [in] If present and true, this is a debugging parameter.
like_default :: [in] If present and true, log this parameter as though it has the default value, even if there is no default.
- Call to
define_stringmom_error_handler::is_root_pemesghasbeendocumentedopen_doc_filetime_stringwritemessageanddesc
-
subroutine
mom_document/writemessageanddesc(doc, vmesg, desc, valueWasDefault, indent, layoutParam, debuggingParam)¶ This subroutine writes out the message and description to the documetation files.
- Parameters
doc :: [in] A pointer to a structure that controls where the documentation occurs and its formatting
vmesg :: [in] A message with the parameter name, units, and default value.
desc :: [in] A description of the parameter being documented
valuewasdefault :: [in] If true, this parameter has its default value
indent :: [in] An amount by which to indent this message
layoutparam :: [in] If present and true, this is a layout parameter.
debuggingparam :: [in] If present and true, this is a debugging parameter.
- Called from
doc_closeblockdoc_moduledoc_openblockdoc_param_chardoc_param_intdoc_param_int_arraydoc_param_logicaldoc_param_logical_arraydoc_param_nonedoc_param_realdoc_param_real_arraydoc_param_time
-
function
mom_document/time_string(time) [character(len=40)]¶ This function returns a string with a time type formatted as seconds (perhaps including a fractional number of seconds) and days.
- Parameters
time :: [in] The time type being translated
- Call to
- Called from
-
function
mom_document/real_string(val) [character(len=32)]¶ This function returns a string with a real formatted like ‘(G)’.
- Parameters
val :: [in] The value being written into a string
- Call to
- Called from
-
function
mom_document/real_array_string(vals, sep) [character(len=1320)]¶ Returns a character string of a comma-separated, compact formatted, reals e.g. “1., 2., 5*3., 5.E2”, that give the list of values.
- Return
undefined :: The output string listing vals
- Parameters
vals :: [in] The array of values to record
sep :: [in] The separator between successive values,
- Call to
- Called from
-
function
mom_document/testformattedfloatisreal(str, val) [logical]¶ This function tests whether a real value is encoded in a string.
- Parameters
str :: [in] The string that match val
val :: [in] The value being tested
- Called from
-
function
mom_document/int_string(val) [character(len=24)]¶ This function returns a string with an integer formatted like ‘(I)’.
- Parameters
val :: [in] The value being written into a string
- Called from
doc_param_intdoc_param_int_arrayreal_array_stringtime_string
-
function
mom_document/logical_string(val) [character(len=24)]¶ This function returns a string with an logical formatted like ‘(L)’.
- Parameters
val :: [in] The value being written into a string
-
function
mom_document/define_string(doc, varName, valString, units) [character(len=mlen)]¶ This function returns a string for formatted parameter assignment.
- Parameters
doc :: A pointer to a structure that controls where the documentation occurs and its formatting
varname :: [in] The name of the parameter being documented
valstring :: [in] A string containing the value of the parameter
units :: [in] The units of the parameter being documented
- Call to
mlen- Called from
doc_param_chardoc_param_intdoc_param_int_arraydoc_param_logicaldoc_param_logical_arraydoc_param_realdoc_param_real_arraydoc_param_time
-
function
mom_document/undef_string(doc, varName, units) [character(len=mlen)]¶ This function returns a string for formatted false logicals.
- Parameters
doc :: A pointer to a structure that controls where the documentation occurs and its formatting
varname :: [in] The name of the parameter being documented
units :: [in] The units of the parameter being documented
- Call to
string_false- Called from
-
subroutine
mom_document/doc_module(doc, modname, desc, log_to_all, all_default, layoutMod, debuggingMod)¶ This subroutine handles the module documentation.
- Parameters
doc :: A pointer to a structure that controls where the documentation occurs and its formatting
modname :: [in] The name of the module being documented
desc :: [in] A description of the module being documented
log_to_all :: [in] If present and true, log this parameter to the …_doc.all files, even if this module also has layout or debugging parameters.
all_default :: [in] If true, all parameters take their default values.
layoutmod :: [in] If present and true, this module has layout parameters.
debuggingmod :: [in] If present and true, this module has debugging parameters.
- Call to
mom_error_handler::is_root_peopen_doc_filewritemessageanddesc
-
subroutine
mom_document/doc_subroutine(doc, modname, subname, desc)¶ This subroutine handles the subroutine documentation.
- Parameters
doc :: A pointer to a structure that controls where the documentation occurs and its formatting
modname :: [in] The name of the module being documented
subname :: [in] The name of the subroutine being documented
desc :: [in] A description of the subroutine being documented
- Call to
-
subroutine
mom_document/doc_function(doc, modname, fnname, desc)¶ This subroutine handles the function documentation.
- Parameters
doc :: A pointer to a structure that controls where the documentation occurs and its formatting
modname :: [in] The name of the module being documented
fnname :: [in] The name of the function being documented
desc :: [in] A description of the function being documented
- Call to
-
subroutine
mom_document/doc_init(docFileBase, doc, minimal, complete, layout, debugging)¶ Initialize the parameter documentation.
- Parameters
docfilebase :: [in] The base file name for this set of parameters, for example MOM_parameter_doc
doc :: A pointer to a structure that controls where the documentation occurs and its formatting
minimal :: [in] If present and true, write out the files (.short) documenting those parameters that do not take on their default values.
complete :: [in] If present and true, write out the (.all) files documenting all parameters
layout :: [in] If present and true, write out the (.layout) files documenting the layout parameters
debugging :: [in] If present and true, write out the (.debugging) files documenting the debugging parameters
-
subroutine
mom_document/open_doc_file(doc)¶ This subroutine allocates and populates a structure that controls where the documentation occurs and its formatting, and opens up the files controlled by this structure.
- Parameters
doc :: A pointer to a structure that controls where the documentation occurs and its formatting
- Call to
find_unused_unit_numbermom_error_handler::is_root_pemom_error_handler::mom_error- Called from
doc_closeblockdoc_functiondoc_moduledoc_openblockdoc_param_chardoc_param_intdoc_param_int_arraydoc_param_logicaldoc_param_logical_arraydoc_param_nonedoc_param_realdoc_param_real_arraydoc_param_timedoc_subroutine
-
function
mom_document/find_unused_unit_number() [integer]¶ Find an unused unit number, returning >0 if found, and triggering a FATAL error if not.
- Call to
- Called from
-
subroutine
mom_document/doc_end(doc)¶ This subroutine closes the the files controlled by doc, and sets flags in doc to indicate that parameterization is no longer permitted.
- Parameters
doc :: A pointer to a structure that controls where the documentation occurs and its formatting
-
function
mom_document/mesghasbeendocumented(doc, varName, mesg) [logical]¶ Returns true if documentation has already been written.
- Parameters
doc :: A pointer to a structure that controls where the documentation occurs and its formatting
varname :: [in] The name of the parameter being documented
mesg :: [in] A message with parameter values, defaults, and descriptions to compare with the message that was written previously
- Call to
- Called from
doc_param_chardoc_param_intdoc_param_int_arraydoc_param_logicaldoc_param_logical_arraydoc_param_nonedoc_param_realdoc_param_real_arraydoc_param_time