MOM_document module reference
The subroutines here provide hooks for document generation functions at various levels of granularity.
Data Types
Length of interface/message strings |
|
A linked list of the parameter documentation messages that have been issued so far. |
Generic Interfaces
Document parameter values |
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 documentation 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. "1., 2., 5*3., 5.E2", that give the list of values. |
|
Returns a character string of a comma-separated, compact formatted, integers e.g. "1, 2, 7*3, 500", that give the list of values. |
|
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 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 |
Type Documentation
- type, public :: doc_type
Length of interface/message strings
A structure that controls where the documentation occurs, its veborsity and formatting.
- Parameters
unitAll
The open unit number for docFileBase + .all.
unitShort
The open unit number for docFileBase + .short.
unitLayout
The open unit number for docFileBase + .layout.
unitDebugging
The open unit number for docFileBase + .debugging.
filesAreOpen
True if any files were successfully opened.
docFileBase
The basename of the files where run-time parameters, settings and defaults are documented.
complete
If true, document all parameters.
minimal
If true, document non-default parameters.
layout
If true, document layout parameters.
debugging
If true, document debugging parameters.
defineSyntax
If true, use '#def' syntax instead of a=b syntax
warnOnConflicts
Cause a WARNING error if defaults differ.
commentColumn
Number of spaces before the comment marker.
max_line_len
The maximum length of message lines.
chain_msg
Database of messages
blockPrefix
The full name of the current block.
- type :: link_msg
A linked list of the parameter documentation messages that have been issued so far.
- Parameters
next
Facilitates linked list
name
Parameter name
msg
Parameter value and default
Generic Interface Documentation
- interface doc_param
Document parameter values
Callers call graph
Text view
mom_file_parser::log_param_char → mom_document::interface::doc_param
mom_file_parser::log_param_int → mom_document::interface::doc_param
mom_file_parser::log_param_int_array → mom_document::interface::doc_param
mom_file_parser::log_param_logical → mom_document::interface::doc_param
mom_file_parser::log_param_real → mom_document::interface::doc_param
mom_file_parser::log_param_real_array → mom_document::interface::doc_param
mom_file_parser::log_param_time → mom_document::interface::doc_param
Functions/Subroutine Documentation
- subroutine 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
- subroutine 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.
Callees call graph
Text view
mom_document::doc_param_logical → mom_document::define_string
mom_document::doc_param_logical → mom_document::mesghasbeendocumented
mom_document::doc_param_logical → mom_document::open_doc_file
mom_document::doc_param_logical → mom_document::undef_string
mom_document::doc_param_logical → mom_document::writemessageanddesc
mom_document::doc_param_logical → mom_error_infra::is_root_pe
- subroutine 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.
Callees call graph
Text view
mom_document::doc_param_logical_array → mom_document::define_string
mom_document::doc_param_logical_array → mom_document::mesghasbeendocumented
mom_document::doc_param_logical_array → mom_document::open_doc_file
mom_document::doc_param_logical_array → mom_document::writemessageanddesc
mom_document::doc_param_logical_array → mom_error_infra::is_root_pe
- subroutine 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.
Callees call graph
- subroutine doc_param_int_array(doc, varname, desc, units, vals, default, defaults, 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 uniform default value of this parameter
defaults [in]
The element-wise default values 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.
Callees call graph
Text view
mom_document::doc_param_int_array → mom_document::define_string
mom_document::doc_param_int_array → mom_document::int_array_string
mom_document::doc_param_int_array → mom_document::int_string
mom_document::doc_param_int_array → mom_document::mesghasbeendocumented
mom_document::doc_param_int_array → mom_document::open_doc_file
mom_document::doc_param_int_array → mom_document::writemessageanddesc
mom_document::doc_param_int_array → mom_error_infra::is_root_pe
- subroutine 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.
Callees call graph
- subroutine doc_param_real_array(doc, varname, desc, units, vals, default, defaults, 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]
A uniform default value of this parameter
defaults [in]
The element-wise default values 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.
Callees call graph
Text view
mom_document::doc_param_real_array → mom_document::define_string
mom_document::doc_param_real_array → mom_document::mesghasbeendocumented
mom_document::doc_param_real_array → mom_document::open_doc_file
mom_document::doc_param_real_array → mom_document::real_array_string
mom_document::doc_param_real_array → mom_document::real_string
mom_document::doc_param_real_array → mom_document::writemessageanddesc
mom_document::doc_param_real_array → mom_error_infra::is_root_pe
- subroutine 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.
Callees call graph
- subroutine 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
Callees call graph
- subroutine 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
Callees call graph
- subroutine 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.
Callees call graph
- subroutine writeMessageAndDesc(doc, vmesg, desc, valueWasDefault, indent, layoutParam, debuggingParam)
This subroutine writes out the message and description to the documentation 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.
Callers call graph
Text view
mom_document::doc_closeblock → mom_document::writemessageanddesc
mom_document::doc_module → mom_document::writemessageanddesc
mom_document::doc_openblock → mom_document::writemessageanddesc
mom_document::doc_param_char → mom_document::writemessageanddesc
mom_document::doc_param_int → mom_document::writemessageanddesc
mom_document::doc_param_int_array → mom_document::writemessageanddesc
mom_document::doc_param_logical → mom_document::writemessageanddesc
mom_document::doc_param_logical_array → mom_document::writemessageanddesc
mom_document::doc_param_none → mom_document::writemessageanddesc
mom_document::doc_param_real → mom_document::writemessageanddesc
mom_document::doc_param_real_array → mom_document::writemessageanddesc
mom_document::doc_param_time → mom_document::writemessageanddesc
- function time_string(time)
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
External calls
- time_manager_mod
get_ticks_per_second (time_manager_mod::get_ticks_per_second)
get_time (time_manager_mod::get_time)
- function real_string(val)
This function returns a string with a real formatted like '(G)'
- Parameters
val [in]
The value being written into a string
- function real_array_string(vals, sep)
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.
- Parameters
real_array_string
The output string listing vals
vals [in]
The array of values to record
sep [in]
The separator between successive values, by default it is ', '.
Callees call graph
- function int_array_string(vals, sep)
Returns a character string of a comma-separated, compact formatted, integers e.g. "1, 2, 7*3, 500", that give the list of values.
- Parameters
int_array_string
The output string listing vals
vals [in]
The array of values to record
sep [in]
The separator between successive values, by default it is ', '.
- function testFormattedFloatIsReal(str, val)
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
- function int_string(val)
This function returns a string with an integer formatted like '(I)'
- Parameters
val [in]
The value being written into a string
Callers call graph
- function logical_string(val)
This function returns a string with an logical formatted like '(L)'
- Parameters
val [in]
The value being written into a string
- function define_string(doc, varName, valString, units)
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
- function undef_string(doc, varName, units)
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
- subroutine 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.
Callees call graph
- subroutine 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
Callees call graph
- subroutine 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
Callees call graph
- subroutine 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 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
Callees call graph
- function find_unused_unit_number()
Find an unused unit number, returning >0 if found, and triggering a FATAL error if not.
- subroutine doc_end(doc)
This subroutine closes 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 mesgHasBeenDocumented(doc, varName, mesg)
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
Callers call graph
Text view
mom_document::doc_param_char → mom_document::mesghasbeendocumented
mom_document::doc_param_int → mom_document::mesghasbeendocumented
mom_document::doc_param_int_array → mom_document::mesghasbeendocumented
mom_document::doc_param_logical → mom_document::mesghasbeendocumented
mom_document::doc_param_logical_array → mom_document::mesghasbeendocumented
mom_document::doc_param_none → mom_document::mesghasbeendocumented
mom_document::doc_param_real → mom_document::mesghasbeendocumented
mom_document::doc_param_real_array → mom_document::mesghasbeendocumented
mom_document::doc_param_time → mom_document::mesghasbeendocumented