MOM6
|
The subroutines here provide hooks for document generation functions at various levels of granularity.
Data Types | |
interface | doc_param |
Document parameter values. More... | |
type | doc_type |
A structure that controls where the documentation occurs, its veborsity and formatting. More... | |
type | link_msg |
A linked list of the parameter documentation messages that have been issued so far. More... | |
Functions/Subroutines | |
subroutine | doc_param_none (doc, varname, desc, units) |
This subroutine handles parameter documentation with no value. More... | |
subroutine | doc_param_logical (doc, varname, desc, units, val, default, layoutParam, debuggingParam) |
This subroutine handles parameter documentation for logicals. More... | |
subroutine | doc_param_logical_array (doc, varname, desc, units, vals, default, layoutParam, debuggingParam) |
This subroutine handles parameter documentation for arrays of logicals. More... | |
subroutine | doc_param_int (doc, varname, desc, units, val, default, layoutParam, debuggingParam) |
This subroutine handles parameter documentation for integers. More... | |
subroutine | doc_param_int_array (doc, varname, desc, units, vals, default, layoutParam, debuggingParam) |
This subroutine handles parameter documentation for arrays of integers. More... | |
subroutine | doc_param_real (doc, varname, desc, units, val, default, debuggingParam) |
This subroutine handles parameter documentation for reals. More... | |
subroutine | doc_param_real_array (doc, varname, desc, units, vals, default, debuggingParam) |
This subroutine handles parameter documentation for arrays of reals. More... | |
subroutine | doc_param_char (doc, varname, desc, units, val, default, layoutParam, debuggingParam) |
This subroutine handles parameter documentation for character strings. More... | |
subroutine, public | doc_openblock (doc, blockName, desc) |
This subroutine handles documentation for opening a parameter block. More... | |
subroutine, public | doc_closeblock (doc, blockName) |
This subroutine handles documentation for closing a parameter block. More... | |
subroutine | doc_param_time (doc, varname, desc, units, val, default, layoutParam, debuggingParam) |
This subroutine handles parameter documentation for time-type variables. More... | |
subroutine | writemessageanddesc (doc, vmesg, desc, valueWasDefault, indent, layoutParam, debuggingParam) |
This subroutine writes out the message and description to the documetation files. More... | |
character(len=32) function | real_string (val) |
This function returns a string with a real formatted like '(G)'. More... | |
character(len=1320) 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. More... | |
logical function | testformattedfloatisreal (str, val) |
This function tests whether a real value is encoded in a string. More... | |
character(len=24) function | int_string (val) |
This function returns a string with an integer formatted like '(I)'. More... | |
character(len=24) function | logical_string (val) |
This function returns a string with an logical formatted like '(L)'. More... | |
character(len=mlen) function | define_string (doc, varName, valString, units) |
This function returns a string for formatted parameter assignment. More... | |
character(len=mlen) function | undef_string (doc, varName, units) |
This function returns a string for formatted false logicals. More... | |
subroutine, public | doc_module (doc, modname, desc) |
This subroutine handles the module documentation. More... | |
subroutine, public | doc_subroutine (doc, modname, subname, desc) |
This subroutine handles the subroutine documentation. More... | |
subroutine, public | doc_function (doc, modname, fnname, desc) |
This subroutine handles the function documentation. More... | |
subroutine, public | doc_init (docFileBase, doc, minimal, complete, layout, debugging) |
Initialize the parameter documentation. More... | |
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. More... | |
integer function | find_unused_unit_number () |
Find an unused unit number, returning >0 if found, and triggering a FATAL error if not. More... | |
subroutine, public | 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. More... | |
logical function | mesghasbeendocumented (doc, varName, mesg) |
Returns true if documentation has already been written. More... | |
Variables | |
integer, parameter | mlen = 1240 |
Length of interface/message strings. More... | |
character(len=4), parameter | string_true = 'True' |
A string for true logicals. More... | |
character(len=5), parameter | string_false = 'False' |
A string for false logicals. More... | |
|
private |
This function returns a string for formatted parameter assignment.
doc | A pointer to a structure that controls where the documentation occurs and its formatting | |
[in] | varname | The name of the parameter being documented |
[in] | valstring | A string containing the value of the parameter |
[in] | units | The units of the parameter being documented |
Definition at line 679 of file MOM_document.F90.
References mlen.
Referenced by doc_param_char(), doc_param_int(), doc_param_int_array(), doc_param_logical(), doc_param_logical_array(), doc_param_real(), and doc_param_real_array().
subroutine, public mom_document::doc_closeblock | ( | type(doc_type), pointer | doc, |
character(len=*), intent(in) | blockName | ||
) |
This subroutine handles documentation for closing a parameter block.
doc | A pointer to a structure that controls where the documentation occurs and its formatting | |
[in] | blockname | The name of the parameter block being closed |
Definition at line 392 of file MOM_document.F90.
References mom_error_handler::is_root_pe(), open_doc_file(), and writemessageanddesc().
subroutine, public mom_document::doc_end | ( | type(doc_type), pointer | doc | ) |
This subroutine closes the the files controlled by doc, and sets flags in doc to indicate that parameterization is no longer permitted.
doc | A pointer to a structure that controls where the documentation occurs and its formatting |
Definition at line 912 of file MOM_document.F90.
subroutine, public mom_document::doc_function | ( | type(doc_type), pointer | doc, |
character(len=*), intent(in) | modname, | ||
character(len=*), intent(in) | fnname, | ||
character(len=*), intent(in) | desc | ||
) |
This subroutine handles the function documentation.
doc | A pointer to a structure that controls where the documentation occurs and its formatting | |
[in] | modname | The name of the module being documented |
[in] | fnname | The name of the function being documented |
[in] | desc | A description of the function being documented |
Definition at line 755 of file MOM_document.F90.
References mom_error_handler::is_root_pe(), and open_doc_file().
subroutine, public mom_document::doc_init | ( | character(len=*), intent(in) | docFileBase, |
type(doc_type), pointer | doc, | ||
logical, intent(in), optional | minimal, | ||
logical, intent(in), optional | complete, | ||
logical, intent(in), optional | layout, | ||
logical, intent(in), optional | debugging | ||
) |
Initialize the parameter documentation.
[in] | docfilebase | 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 | |
[in] | minimal | If present and true, write out the files (.short) documenting those parameters that do not take on their default values. |
[in] | complete | If present and true, write out the (.all) files documenting all parameters |
[in] | layout | If present and true, write out the (.layout) files documenting the layout parameters |
[in] | debugging | If present and true, write out the (.debugging) files documenting the debugging parameters |
Definition at line 770 of file MOM_document.F90.
subroutine, public mom_document::doc_module | ( | type(doc_type), pointer | doc, |
character(len=*), intent(in) | modname, | ||
character(len=*), intent(in) | desc | ||
) |
This subroutine handles the module documentation.
doc | A pointer to a structure that controls where the documentation occurs and its formatting | |
[in] | modname | The name of the module being documented |
[in] | desc | A description of the module being documented |
Definition at line 723 of file MOM_document.F90.
References mom_error_handler::is_root_pe(), open_doc_file(), and writemessageanddesc().
subroutine, public mom_document::doc_openblock | ( | type(doc_type), pointer | doc, |
character(len=*), intent(in) | blockName, | ||
character(len=*), intent(in), optional | desc | ||
) |
This subroutine handles documentation for opening a parameter block.
doc | A pointer to a structure that controls where the documentation occurs and its formatting | |
[in] | blockname | The name of the parameter block being opened |
[in] | desc | A description of the parameter block being opened |
Definition at line 367 of file MOM_document.F90.
References mom_error_handler::is_root_pe(), open_doc_file(), and writemessageanddesc().
|
private |
This subroutine handles parameter documentation for character strings.
doc | A pointer to a structure that controls where the documentation occurs and its formatting | |
[in] | varname | The name of the parameter being documented |
[in] | desc | A description of the parameter being documented |
[in] | units | The units of the parameter being documented |
[in] | val | The value of the parameter |
[in] | default | The default value of this parameter |
[in] | layoutparam | If present and true, this is a layout parameter. |
[in] | debuggingparam | If present and true, this is a debugging parameter. |
Definition at line 332 of file MOM_document.F90.
References define_string(), mom_error_handler::is_root_pe(), mesghasbeendocumented(), open_doc_file(), and writemessageanddesc().
|
private |
This subroutine handles parameter documentation for integers.
doc | A pointer to a structure that controls where the documentation occurs and its formatting | |
[in] | varname | The name of the parameter being documented |
[in] | desc | A description of the parameter being documented |
[in] | units | The units of the parameter being documented |
[in] | val | The value of this parameter |
[in] | default | The default value of this parameter |
[in] | layoutparam | If present and true, this is a layout parameter. |
[in] | debuggingparam | If present and true, this is a debugging parameter. |
Definition at line 181 of file MOM_document.F90.
References define_string(), int_string(), mom_error_handler::is_root_pe(), mesghasbeendocumented(), open_doc_file(), and writemessageanddesc().
|
private |
This subroutine handles parameter documentation for arrays of integers.
doc | A pointer to a structure that controls where the documentation occurs and its formatting | |
[in] | varname | The name of the parameter being documented |
[in] | desc | A description of the parameter being documented |
[in] | units | The units of the parameter being documented |
[in] | vals | The array of values to record |
[in] | default | The default value of this parameter |
[in] | layoutparam | If present and true, this is a layout parameter. |
[in] | debuggingparam | If present and true, this is a debugging parameter. |
Definition at line 217 of file MOM_document.F90.
References define_string(), int_string(), mom_error_handler::is_root_pe(), mesghasbeendocumented(), open_doc_file(), and writemessageanddesc().
|
private |
This subroutine handles parameter documentation for logicals.
doc | A pointer to a structure that controls where the documentation occurs and its formatting | |
[in] | varname | The name of the parameter being documented |
[in] | desc | A description of the parameter being documented |
[in] | units | The units of the parameter being documented |
[in] | val | The value of this parameter |
[in] | default | The default value of this parameter |
[in] | layoutparam | If present and true, this is a layout parameter. |
[in] | debuggingparam | If present and true, this is a debugging parameter. |
Definition at line 89 of file MOM_document.F90.
References define_string(), mom_error_handler::is_root_pe(), mesghasbeendocumented(), open_doc_file(), string_false, string_true, undef_string(), and writemessageanddesc().
|
private |
This subroutine handles parameter documentation for arrays of logicals.
doc | A pointer to a structure that controls where the documentation occurs and its formatting | |
[in] | varname | The name of the parameter being documented |
[in] | desc | A description of the parameter being documented |
[in] | units | The units of the parameter being documented |
[in] | vals | The array of values to record |
[in] | default | The default value of this parameter |
[in] | layoutparam | If present and true, this is a layout parameter. |
[in] | debuggingparam | If present and true, this is a debugging parameter. |
Definition at line 131 of file MOM_document.F90.
References define_string(), mom_error_handler::is_root_pe(), mesghasbeendocumented(), open_doc_file(), string_false, string_true, and writemessageanddesc().
|
private |
This subroutine handles parameter documentation with no value.
doc | A pointer to a structure that controls where the documentation occurs and its formatting | |
[in] | varname | The name of the parameter being documented |
[in] | desc | A description of the parameter being documented |
[in] | units | The units of the parameter being documented |
Definition at line 64 of file MOM_document.F90.
References mom_error_handler::is_root_pe(), mesghasbeendocumented(), open_doc_file(), and writemessageanddesc().
|
private |
This subroutine handles parameter documentation for reals.
doc | A pointer to a structure that controls where the documentation occurs and its formatting | |
[in] | varname | The name of the parameter being documented |
[in] | desc | A description of the parameter being documented |
[in] | units | The units of the parameter being documented |
[in] | val | The value of this parameter |
[in] | default | The default value of this parameter |
[in] | debuggingparam | If present and true, this is a debugging parameter. |
Definition at line 259 of file MOM_document.F90.
References define_string(), mom_error_handler::is_root_pe(), mesghasbeendocumented(), open_doc_file(), real_string(), and writemessageanddesc().
|
private |
This subroutine handles parameter documentation for arrays of reals.
doc | A pointer to a structure that controls where the documentation occurs and its formatting | |
[in] | varname | The name of the parameter being documented |
[in] | desc | A description of the parameter being documented |
[in] | units | The units of the parameter being documented |
[in] | vals | The array of values to record |
[in] | default | The default value of this parameter |
[in] | debuggingparam | If present and true, this is a debugging parameter. |
Definition at line 293 of file MOM_document.F90.
References define_string(), mom_error_handler::is_root_pe(), mesghasbeendocumented(), open_doc_file(), real_array_string(), real_string(), and writemessageanddesc().
|
private |
This subroutine handles parameter documentation for time-type variables.
doc | A pointer to a structure that controls where the documentation occurs and its formatting | |
[in] | varname | The name of the parameter being documented |
[in] | desc | A description of the parameter being documented |
[in] | units | The units of the parameter being documented |
[in] | val | The value of the parameter |
[in] | default | The default value of this parameter |
[in] | layoutparam | If present and true, this is a layout parameter. |
[in] | debuggingparam | If present and true, this is a debugging parameter. |
Definition at line 419 of file MOM_document.F90.
References mom_error_handler::is_root_pe(), mesghasbeendocumented(), open_doc_file(), and writemessageanddesc().
subroutine, public mom_document::doc_subroutine | ( | type(doc_type), pointer | doc, |
character(len=*), intent(in) | modname, | ||
character(len=*), intent(in) | subname, | ||
character(len=*), intent(in) | desc | ||
) |
This subroutine handles the subroutine documentation.
doc | A pointer to a structure that controls where the documentation occurs and its formatting | |
[in] | modname | The name of the module being documented |
[in] | subname | The name of the subroutine being documented |
[in] | desc | A description of the subroutine being documented |
Definition at line 742 of file MOM_document.F90.
References mom_error_handler::is_root_pe(), and open_doc_file().
|
private |
Find an unused unit number, returning >0 if found, and triggering a FATAL error if not.
Definition at line 897 of file MOM_document.F90.
References mom_error_handler::mom_error().
Referenced by open_doc_file().
|
private |
This function returns a string with an integer formatted like '(I)'.
[in] | val | The value being written into a string |
Definition at line 661 of file MOM_document.F90.
Referenced by doc_param_int(), doc_param_int_array(), and real_array_string().
|
private |
This function returns a string with an logical formatted like '(L)'.
[in] | val | The value being written into a string |
Definition at line 670 of file MOM_document.F90.
|
private |
Returns true if documentation has already been written.
doc | A pointer to a structure that controls where the documentation occurs and its formatting | |
[in] | varname | The name of the parameter being documented |
[in] | mesg | A message with parameter values, defaults, and descriptions to compare with the message that was written previously |
Definition at line 952 of file MOM_document.F90.
References mom_error_handler::mom_error().
Referenced by doc_param_char(), doc_param_int(), doc_param_int_array(), doc_param_logical(), doc_param_logical_array(), doc_param_none(), doc_param_real(), doc_param_real_array(), and doc_param_time().
|
private |
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.
doc | A pointer to a structure that controls where the documentation occurs and its formatting |
Definition at line 799 of file MOM_document.F90.
References find_unused_unit_number(), mom_error_handler::is_root_pe(), and mom_error_handler::mom_error().
Referenced by doc_closeblock(), doc_function(), doc_module(), doc_openblock(), doc_param_char(), doc_param_int(), doc_param_int_array(), doc_param_logical(), doc_param_logical_array(), doc_param_none(), doc_param_real(), doc_param_real_array(), doc_param_time(), and doc_subroutine().
|
private |
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.
[in] | vals | The array of values to record |
[in] | sep | The separator between successive values, |
Definition at line 603 of file MOM_document.F90.
References int_string(), and real_string().
Referenced by doc_param_real_array().
|
private |
This function returns a string with a real formatted like '(G)'.
[in] | val | The value being written into a string |
Definition at line 550 of file MOM_document.F90.
References testformattedfloatisreal().
Referenced by doc_param_real(), doc_param_real_array(), and real_array_string().
|
private |
This function tests whether a real value is encoded in a string.
[in] | str | The string that match val |
[in] | val | The value being tested |
Definition at line 645 of file MOM_document.F90.
Referenced by real_string().
|
private |
This function returns a string for formatted false logicals.
doc | A pointer to a structure that controls where the documentation occurs and its formatting | |
[in] | varname | The name of the parameter being documented |
[in] | units | The units of the parameter being documented |
Definition at line 700 of file MOM_document.F90.
References string_false.
Referenced by doc_param_logical().
|
private |
This subroutine writes out the message and description to the documetation files.
[in] | doc | A pointer to a structure that controls where the documentation occurs and its formatting |
[in] | vmesg | A message with the parameter name, units, and default value. |
[in] | desc | A description of the parameter being documented |
[in] | valuewasdefault | If true, this parameter has its default value |
[in] | indent | An amount by which to indent this message |
[in] | layoutparam | If present and true, this is a layout parameter. |
[in] | debuggingparam | If present and true, this is a debugging parameter. |
Definition at line 453 of file MOM_document.F90.
Referenced by doc_closeblock(), doc_module(), doc_openblock(), doc_param_char(), doc_param_int(), doc_param_int_array(), doc_param_logical(), doc_param_logical_array(), doc_param_none(), doc_param_real(), doc_param_real_array(), and doc_param_time().
|
private |
Length of interface/message strings.
Definition at line 25 of file MOM_document.F90.
Referenced by define_string().
|
private |
A string for false logicals.
Definition at line 56 of file MOM_document.F90.
Referenced by doc_param_logical(), doc_param_logical_array(), and undef_string().
|
private |
A string for true logicals.
Definition at line 55 of file MOM_document.F90.
Referenced by doc_param_logical(), and doc_param_logical_array().