\hypertarget{namespacemom__document}{}\section{mom\+\_\+document Module Reference}
\label{namespacemom__document}\index{mom\+\_\+document@{mom\+\_\+document}}


\subsection{Detailed Description}
The subroutines here provide hooks for document generation functions at various levels of granularity. \subsection*{Data Types}
\begin{DoxyCompactItemize}
\item 
interface \mbox{\hyperlink{interfacemom__document_1_1doc__param}{doc\+\_\+param}}
\begin{DoxyCompactList}\small\item\em Document parameter values. \end{DoxyCompactList}\item 
type \mbox{\hyperlink{structmom__document_1_1doc__type}{doc\+\_\+type}}
\begin{DoxyCompactList}\small\item\em A structure that controls where the documentation occurs, its veborsity and formatting. \end{DoxyCompactList}\item 
type \mbox{\hyperlink{structmom__document_1_1link__msg}{link\+\_\+msg}}
\begin{DoxyCompactList}\small\item\em A linked list of the parameter documentation messages that have been issued so far. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine \mbox{\hyperlink{namespacemom__document_ab6438889d6e98b10d8c42d5ff6b00ef8}{doc\+\_\+param\+\_\+none}} (doc, varname, desc, units)
\begin{DoxyCompactList}\small\item\em This subroutine handles parameter documentation with no value. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{namespacemom__document_ac090c6143765bfcff274cbac281d9a0a}{doc\+\_\+param\+\_\+logical}} (doc, varname, desc, units, val, default, layout\+Param, debugging\+Param, like\+\_\+default)
\begin{DoxyCompactList}\small\item\em This subroutine handles parameter documentation for logicals. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{namespacemom__document_a63e852849c9cea4cd4994ac1348b2efd}{doc\+\_\+param\+\_\+logical\+\_\+array}} (doc, varname, desc, units, vals, default, layout\+Param, debugging\+Param, like\+\_\+default)
\begin{DoxyCompactList}\small\item\em This subroutine handles parameter documentation for arrays of logicals. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{namespacemom__document_a7f4a38d3eb81ce2aeeb9a98b80cce39a}{doc\+\_\+param\+\_\+int}} (doc, varname, desc, units, val, default, layout\+Param, debugging\+Param, like\+\_\+default)
\begin{DoxyCompactList}\small\item\em This subroutine handles parameter documentation for integers. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{namespacemom__document_a4926113e36b32dd776f91678f6a669cd}{doc\+\_\+param\+\_\+int\+\_\+array}} (doc, varname, desc, units, vals, default, layout\+Param, debugging\+Param, like\+\_\+default)
\begin{DoxyCompactList}\small\item\em This subroutine handles parameter documentation for arrays of integers. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{namespacemom__document_ac3ecbe40decde8a8cff456836d955445}{doc\+\_\+param\+\_\+real}} (doc, varname, desc, units, val, default, debugging\+Param, like\+\_\+default)
\begin{DoxyCompactList}\small\item\em This subroutine handles parameter documentation for reals. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{namespacemom__document_a7bf0ddcf50cd63dd19cc469035f3a001}{doc\+\_\+param\+\_\+real\+\_\+array}} (doc, varname, desc, units, vals, default, debugging\+Param, like\+\_\+default)
\begin{DoxyCompactList}\small\item\em This subroutine handles parameter documentation for arrays of reals. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{namespacemom__document_aa174faeac36ffe635b998f5c036987f6}{doc\+\_\+param\+\_\+char}} (doc, varname, desc, units, val, default, layout\+Param, debugging\+Param, like\+\_\+default)
\begin{DoxyCompactList}\small\item\em This subroutine handles parameter documentation for character strings. \end{DoxyCompactList}\item 
subroutine, public \mbox{\hyperlink{namespacemom__document_ada55c6a65638e04d2b550f419aafa929}{doc\+\_\+openblock}} (doc, block\+Name, desc)
\begin{DoxyCompactList}\small\item\em This subroutine handles documentation for opening a parameter block. \end{DoxyCompactList}\item 
subroutine, public \mbox{\hyperlink{namespacemom__document_a058916aee316efa7a6484b3bb1d3f3df}{doc\+\_\+closeblock}} (doc, block\+Name)
\begin{DoxyCompactList}\small\item\em This subroutine handles documentation for closing a parameter block. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{namespacemom__document_ac67a8062c94b2c2c734b6cb1bf0410a6}{doc\+\_\+param\+\_\+time}} (doc, varname, desc, val, default, units, debugging\+Param, like\+\_\+default)
\begin{DoxyCompactList}\small\item\em This subroutine handles parameter documentation for time-\/type variables. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{namespacemom__document_a249e7992a57539508d07c71c6fcabaeb}{writemessageanddesc}} (doc, vmesg, desc, value\+Was\+Default, indent, layout\+Param, debugging\+Param)
\begin{DoxyCompactList}\small\item\em This subroutine writes out the message and description to the documetation files. \end{DoxyCompactList}\item 
character(len=40) function \mbox{\hyperlink{namespacemom__document_afeda3e207b871227792c25425697f1cb}{time\+\_\+string}} (time)
\begin{DoxyCompactList}\small\item\em This function returns a string with a time type formatted as seconds (perhaps including a fractional number of seconds) and days. \end{DoxyCompactList}\item 
character(len=32) function \mbox{\hyperlink{namespacemom__document_a966b8926bf40ee436654a0048b2bf42a}{real\+\_\+string}} (val)
\begin{DoxyCompactList}\small\item\em This function returns a string with a real formatted like \textquotesingle{}(G)\textquotesingle{}. \end{DoxyCompactList}\item 
character(len=1320) function \mbox{\hyperlink{namespacemom__document_a436486f7289eafc7b4e8ba65812f3459}{real\+\_\+array\+\_\+string}} (vals, sep)
\begin{DoxyCompactList}\small\item\em Returns a character string of a comma-\/separated, compact formatted, reals e.\+g. \char`\"{}1., 2., 5$\ast$3., 5.\+E2\char`\"{}, that give the list of values. \end{DoxyCompactList}\item 
logical function \mbox{\hyperlink{namespacemom__document_acbd7bf94c8e359a48ace95fe1f3d3bb4}{testformattedfloatisreal}} (str, val)
\begin{DoxyCompactList}\small\item\em This function tests whether a real value is encoded in a string. \end{DoxyCompactList}\item 
character(len=24) function \mbox{\hyperlink{namespacemom__document_a546c1393f07adc49a43fe5f6af171730}{int\+\_\+string}} (val)
\begin{DoxyCompactList}\small\item\em This function returns a string with an integer formatted like \textquotesingle{}(I)\textquotesingle{}. \end{DoxyCompactList}\item 
character(len=24) function \mbox{\hyperlink{namespacemom__document_ae07562199e60bbfec5ddda1281d422f2}{logical\+\_\+string}} (val)
\begin{DoxyCompactList}\small\item\em This function returns a string with an logical formatted like \textquotesingle{}(L)\textquotesingle{}. \end{DoxyCompactList}\item 
character(len=\mbox{\hyperlink{namespacemom__document_a5f935652127fa61a918565aa50c23d31}{mlen}}) function \mbox{\hyperlink{namespacemom__document_aadc9c21a3f71a85107454b8080d6ec5c}{define\+\_\+string}} (doc, var\+Name, val\+String, units)
\begin{DoxyCompactList}\small\item\em This function returns a string for formatted parameter assignment. \end{DoxyCompactList}\item 
character(len=\mbox{\hyperlink{namespacemom__document_a5f935652127fa61a918565aa50c23d31}{mlen}}) function \mbox{\hyperlink{namespacemom__document_a9c86e696b2b0cda80be9ded5ca4a927f}{undef\+\_\+string}} (doc, var\+Name, units)
\begin{DoxyCompactList}\small\item\em This function returns a string for formatted false logicals. \end{DoxyCompactList}\item 
subroutine, public \mbox{\hyperlink{namespacemom__document_a76495ce5bfac286507d9af0fe0028539}{doc\+\_\+module}} (doc, modname, desc, log\+\_\+to\+\_\+all, all\+\_\+default, layout\+Mod, debugging\+Mod)
\begin{DoxyCompactList}\small\item\em This subroutine handles the module documentation. \end{DoxyCompactList}\item 
subroutine, public \mbox{\hyperlink{namespacemom__document_ab7020ae92729a51ce8915cd1f080bb14}{doc\+\_\+subroutine}} (doc, modname, subname, desc)
\begin{DoxyCompactList}\small\item\em This subroutine handles the subroutine documentation. \end{DoxyCompactList}\item 
subroutine, public \mbox{\hyperlink{namespacemom__document_a69dd076650308c992b1e19967804902a}{doc\+\_\+function}} (doc, modname, fnname, desc)
\begin{DoxyCompactList}\small\item\em This subroutine handles the function documentation. \end{DoxyCompactList}\item 
subroutine, public \mbox{\hyperlink{namespacemom__document_ab8afc4f0412fd30a01a48fecb340ef5e}{doc\+\_\+init}} (doc\+File\+Base, doc, minimal, complete, layout, debugging)
\begin{DoxyCompactList}\small\item\em Initialize the parameter documentation. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{namespacemom__document_aab976b6c6c9c01833438d217fca228a4}{open\+\_\+doc\+\_\+file}} (doc)
\begin{DoxyCompactList}\small\item\em 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. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{namespacemom__document_a5f2661445a72a7d0f774677e91366db5}\label{namespacemom__document_a5f2661445a72a7d0f774677e91366db5}} 
integer function \mbox{\hyperlink{namespacemom__document_a5f2661445a72a7d0f774677e91366db5}{find\+\_\+unused\+\_\+unit\+\_\+number}} ()
\begin{DoxyCompactList}\small\item\em Find an unused unit number, returning $>$0 if found, and triggering a F\+A\+T\+AL error if not. \end{DoxyCompactList}\item 
subroutine, public \mbox{\hyperlink{namespacemom__document_ab1e0e6fbee112ffcdfdd828e81c00703}{doc\+\_\+end}} (doc)
\begin{DoxyCompactList}\small\item\em This subroutine closes the the files controlled by doc, and sets flags in doc to indicate that parameterization is no longer permitted. \end{DoxyCompactList}\item 
logical function \mbox{\hyperlink{namespacemom__document_aa23ed2e58e74e88a71de374685ee11ec}{mesghasbeendocumented}} (doc, var\+Name, mesg)
\begin{DoxyCompactList}\small\item\em Returns true if documentation has already been written. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{namespacemom__document_a5f935652127fa61a918565aa50c23d31}\label{namespacemom__document_a5f935652127fa61a918565aa50c23d31}} 
integer, parameter \mbox{\hyperlink{namespacemom__document_a5f935652127fa61a918565aa50c23d31}{mlen}} = 1240
\begin{DoxyCompactList}\small\item\em Length of interface/message strings. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{namespacemom__document_a57b478dbe3e5dd19baef0f5800a3793e}\label{namespacemom__document_a57b478dbe3e5dd19baef0f5800a3793e}} 
character(len=4), parameter \mbox{\hyperlink{namespacemom__document_a57b478dbe3e5dd19baef0f5800a3793e}{string\+\_\+true}} = \textquotesingle{}True\textquotesingle{}
\begin{DoxyCompactList}\small\item\em A string for true logicals. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{namespacemom__document_a004bba1a29ecf574bc422fcae39ff419}\label{namespacemom__document_a004bba1a29ecf574bc422fcae39ff419}} 
character(len=5), parameter \mbox{\hyperlink{namespacemom__document_a004bba1a29ecf574bc422fcae39ff419}{string\+\_\+false}} = \textquotesingle{}False\textquotesingle{}
\begin{DoxyCompactList}\small\item\em A string for false logicals. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{namespacemom__document_aadc9c21a3f71a85107454b8080d6ec5c}\label{namespacemom__document_aadc9c21a3f71a85107454b8080d6ec5c}} 
\index{mom\+\_\+document@{mom\+\_\+document}!define\+\_\+string@{define\+\_\+string}}
\index{define\+\_\+string@{define\+\_\+string}!mom\+\_\+document@{mom\+\_\+document}}
\subsubsection{\texorpdfstring{define\+\_\+string()}{define\_string()}}
{\footnotesize\ttfamily character(len=\mbox{\hyperlink{namespacemom__document_a5f935652127fa61a918565aa50c23d31}{mlen}}) function mom\+\_\+document\+::define\+\_\+string (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__document_1_1doc__type}{doc\+\_\+type}}), pointer}]{doc,  }\item[{character(len=$\ast$), intent(in)}]{var\+Name,  }\item[{character(len=$\ast$), intent(in)}]{val\+String,  }\item[{character(len=$\ast$), intent(in)}]{units }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This function returns a string for formatted parameter assignment. 


\begin{DoxyParams}[1]{Parameters}
 & {\em doc} & A pointer to a structure that controls where the documentation occurs and its formatting\\
\hline
\mbox{\tt in}  & {\em varname} & The name of the parameter being documented\\
\hline
\mbox{\tt in}  & {\em valstring} & A string containing the value of the parameter\\
\hline
\mbox{\tt in}  & {\em units} & The units of the parameter being documented \\
\hline
\end{DoxyParams}


Definition at line 740 of file M\+O\+M\+\_\+document.\+F90.


\begin{DoxyCode}
740   \textcolor{keywordtype}{type}(doc\_type),   \textcolor{keywordtype}{pointer}    :: doc\textcolor{comment}{     !< A pointer to a structure that controls where the}
741 \textcolor{comment}{                                          !! documentation occurs and its formatting}
742   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: varName\textcolor{comment}{ !< The name of the parameter being documented}
743   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: valString\textcolor{comment}{ !< A string containing the value of the parameter}
744   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: units\textcolor{comment}{   !< The units of the parameter being documented}
745   \textcolor{keywordtype}{character(len=mLen)} :: define\_string
746 \textcolor{comment}{! This function returns a string for formatted parameter assignment}
747   \textcolor{keywordtype}{integer} :: numSpaces
748   define\_string = repeat(\textcolor{stringliteral}{" "},mlen) \textcolor{comment}{! Blank everything for safety}
749   \textcolor{keywordflow}{if} (doc%defineSyntax) \textcolor{keywordflow}{then}
750     define\_string = \textcolor{stringliteral}{"#define "}//trim(varname)//\textcolor{stringliteral}{" "}//valstring
751   \textcolor{keywordflow}{else}
752     define\_string = trim(varname)//\textcolor{stringliteral}{" = "}//valstring
753 \textcolor{keywordflow}{  endif}
754   numspaces = max(1, doc%commentColumn - len\_trim(define\_string) )
755   define\_string = trim(define\_string)//repeat(\textcolor{stringliteral}{" "},numspaces)//\textcolor{stringliteral}{"!"}
756   \textcolor{keywordflow}{if} (len\_trim(units) > 0) define\_string = trim(define\_string)//\textcolor{stringliteral}{"   ["}//trim(units)//\textcolor{stringliteral}{"]"}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__document_a058916aee316efa7a6484b3bb1d3f3df}\label{namespacemom__document_a058916aee316efa7a6484b3bb1d3f3df}} 
\index{mom\+\_\+document@{mom\+\_\+document}!doc\+\_\+closeblock@{doc\+\_\+closeblock}}
\index{doc\+\_\+closeblock@{doc\+\_\+closeblock}!mom\+\_\+document@{mom\+\_\+document}}
\subsubsection{\texorpdfstring{doc\+\_\+closeblock()}{doc\_closeblock()}}
{\footnotesize\ttfamily subroutine, public mom\+\_\+document\+::doc\+\_\+closeblock (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__document_1_1doc__type}{doc\+\_\+type}}), pointer}]{doc,  }\item[{character(len=$\ast$), intent(in)}]{block\+Name }\end{DoxyParamCaption})}



This subroutine handles documentation for closing a parameter block. 


\begin{DoxyParams}[1]{Parameters}
 & {\em doc} & A pointer to a structure that controls where the documentation occurs and its formatting\\
\hline
\mbox{\tt in}  & {\em blockname} & The name of the parameter block being closed \\
\hline
\end{DoxyParams}


Definition at line 411 of file M\+O\+M\+\_\+document.\+F90.


\begin{DoxyCode}
411   \textcolor{keywordtype}{type}(doc\_type),   \textcolor{keywordtype}{pointer}    :: doc\textcolor{comment}{ !< A pointer to a structure that controls where the}
412 \textcolor{comment}{                                      !! documentation occurs and its formatting}
413   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: blockName\textcolor{comment}{ !< The name of the parameter block being closed}
414 \textcolor{comment}{! This subroutine handles documentation for closing a parameter block.}
415   \textcolor{keywordtype}{character(len=mLen)} :: mesg
416   \textcolor{keywordtype}{character(len=doc%commentColumn)} :: valstring
417   \textcolor{keywordtype}{integer} :: i
418 
419   \textcolor{keywordflow}{if} (.not. (is\_root\_pe() .and. \textcolor{keyword}{associated}(doc))) \textcolor{keywordflow}{return}
420   \textcolor{keyword}{call }open\_doc\_file(doc)
421 
422   \textcolor{keywordflow}{if} (doc%filesAreOpen) \textcolor{keywordflow}{then}
423     mesg = \textcolor{stringliteral}{'%'}//trim(blockname)
424 
425     \textcolor{keyword}{call }writemessageanddesc(doc, mesg, \textcolor{stringliteral}{''})
426 \textcolor{keywordflow}{  endif}
427   i = index(trim(doc%blockPrefix), trim(blockname)//\textcolor{stringliteral}{'%'}, .true.)
428   \textcolor{keywordflow}{if} (i>1) \textcolor{keywordflow}{then}
429     doc%blockPrefix = trim(doc%blockPrefix(1:i-1))
430   \textcolor{keywordflow}{else}
431     doc%blockPrefix = \textcolor{stringliteral}{''}
432 \textcolor{keywordflow}{  endif}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__document_ab1e0e6fbee112ffcdfdd828e81c00703}\label{namespacemom__document_ab1e0e6fbee112ffcdfdd828e81c00703}} 
\index{mom\+\_\+document@{mom\+\_\+document}!doc\+\_\+end@{doc\+\_\+end}}
\index{doc\+\_\+end@{doc\+\_\+end}!mom\+\_\+document@{mom\+\_\+document}}
\subsubsection{\texorpdfstring{doc\+\_\+end()}{doc\_end()}}
{\footnotesize\ttfamily subroutine, public mom\+\_\+document\+::doc\+\_\+end (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__document_1_1doc__type}{doc\+\_\+type}}), pointer}]{doc }\end{DoxyParamCaption})}



This subroutine closes the the files controlled by doc, and sets flags in doc to indicate that parameterization is no longer permitted. 


\begin{DoxyParams}{Parameters}
{\em doc} & A pointer to a structure that controls where the documentation occurs and its formatting \\
\hline
\end{DoxyParams}


Definition at line 995 of file M\+O\+M\+\_\+document.\+F90.


\begin{DoxyCode}
995   \textcolor{keywordtype}{type}(doc\_type), \textcolor{keywordtype}{pointer} :: doc\textcolor{comment}{ !< A pointer to a structure that controls where the}
996 \textcolor{comment}{                                 !! documentation occurs and its formatting}
997   \textcolor{keywordtype}{type}(link\_msg), \textcolor{keywordtype}{pointer} :: this => null(), next => null()
998 
999   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(doc)) \textcolor{keywordflow}{return}
1000 
1001   \textcolor{keywordflow}{if} (doc%unitAll > 0) \textcolor{keywordflow}{then}
1002     \textcolor{keyword}{close}(doc%unitAll)
1003     doc%unitAll = -2
1004 \textcolor{keywordflow}{  endif}
1005 
1006   \textcolor{keywordflow}{if} (doc%unitShort > 0) \textcolor{keywordflow}{then}
1007     \textcolor{keyword}{close}(doc%unitShort)
1008     doc%unitShort = -2
1009 \textcolor{keywordflow}{  endif}
1010 
1011   \textcolor{keywordflow}{if} (doc%unitLayout > 0) \textcolor{keywordflow}{then}
1012     \textcolor{keyword}{close}(doc%unitLayout)
1013     doc%unitLayout = -2
1014 \textcolor{keywordflow}{  endif}
1015 
1016   \textcolor{keywordflow}{if} (doc%unitDebugging > 0) \textcolor{keywordflow}{then}
1017     \textcolor{keyword}{close}(doc%unitDebugging)
1018     doc%unitDebugging = -2
1019 \textcolor{keywordflow}{  endif}
1020 
1021   doc%filesAreOpen = .false.
1022 
1023   this => doc%chain\_msg
1024   \textcolor{keywordflow}{do} \textcolor{keywordflow}{while}( \textcolor{keyword}{associated}(this) )
1025     next => this%next
1026     \textcolor{keyword}{deallocate}(this)
1027     this => next
1028 \textcolor{keywordflow}{  enddo}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__document_a69dd076650308c992b1e19967804902a}\label{namespacemom__document_a69dd076650308c992b1e19967804902a}} 
\index{mom\+\_\+document@{mom\+\_\+document}!doc\+\_\+function@{doc\+\_\+function}}
\index{doc\+\_\+function@{doc\+\_\+function}!mom\+\_\+document@{mom\+\_\+document}}
\subsubsection{\texorpdfstring{doc\+\_\+function()}{doc\_function()}}
{\footnotesize\ttfamily subroutine, public mom\+\_\+document\+::doc\+\_\+function (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__document_1_1doc__type}{doc\+\_\+type}}), pointer}]{doc,  }\item[{character(len=$\ast$), intent(in)}]{modname,  }\item[{character(len=$\ast$), intent(in)}]{fnname,  }\item[{character(len=$\ast$), intent(in)}]{desc }\end{DoxyParamCaption})}



This subroutine handles the function documentation. 


\begin{DoxyParams}[1]{Parameters}
 & {\em doc} & A pointer to a structure that controls where the documentation occurs and its formatting\\
\hline
\mbox{\tt in}  & {\em modname} & The name of the module being documented\\
\hline
\mbox{\tt in}  & {\em fnname} & The name of the function being documented\\
\hline
\mbox{\tt in}  & {\em desc} & A description of the function being documented \\
\hline
\end{DoxyParams}


Definition at line 838 of file M\+O\+M\+\_\+document.\+F90.


\begin{DoxyCode}
838   \textcolor{keywordtype}{type}(doc\_type),   \textcolor{keywordtype}{pointer}    :: doc\textcolor{comment}{     !< A pointer to a structure that controls where the}
839 \textcolor{comment}{                                          !! documentation occurs and its formatting}
840   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: modname\textcolor{comment}{ !< The name of the module being documented}
841   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: fnname\textcolor{comment}{  !< The name of the function being documented}
842   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: desc\textcolor{comment}{    !< A description of the function being documented}
843 \textcolor{comment}{! This subroutine handles the function documentation}
844   \textcolor{keywordflow}{if} (.not. (is\_root\_pe() .and. \textcolor{keyword}{associated}(doc))) \textcolor{keywordflow}{return}
845   \textcolor{keyword}{call }open\_doc\_file(doc)
846 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__document_ab8afc4f0412fd30a01a48fecb340ef5e}\label{namespacemom__document_ab8afc4f0412fd30a01a48fecb340ef5e}} 
\index{mom\+\_\+document@{mom\+\_\+document}!doc\+\_\+init@{doc\+\_\+init}}
\index{doc\+\_\+init@{doc\+\_\+init}!mom\+\_\+document@{mom\+\_\+document}}
\subsubsection{\texorpdfstring{doc\+\_\+init()}{doc\_init()}}
{\footnotesize\ttfamily subroutine, public mom\+\_\+document\+::doc\+\_\+init (\begin{DoxyParamCaption}\item[{character(len=$\ast$), intent(in)}]{doc\+File\+Base,  }\item[{type(\mbox{\hyperlink{structmom__document_1_1doc__type}{doc\+\_\+type}}), pointer}]{doc,  }\item[{logical, intent(in), optional}]{minimal,  }\item[{logical, intent(in), optional}]{complete,  }\item[{logical, intent(in), optional}]{layout,  }\item[{logical, intent(in), optional}]{debugging }\end{DoxyParamCaption})}



Initialize the parameter documentation. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em docfilebase} & The base file name for this set of parameters, for example M\+O\+M\+\_\+parameter\+\_\+doc\\
\hline
 & {\em doc} & A pointer to a structure that controls where the documentation occurs and its formatting\\
\hline
\mbox{\tt in}  & {\em minimal} & If present and true, write out the files (.short) documenting those parameters that do not take on their default values.\\
\hline
\mbox{\tt in}  & {\em complete} & If present and true, write out the (.all) files documenting all parameters\\
\hline
\mbox{\tt in}  & {\em layout} & If present and true, write out the (.layout) files documenting the layout parameters\\
\hline
\mbox{\tt in}  & {\em debugging} & If present and true, write out the (.debugging) files documenting the debugging parameters \\
\hline
\end{DoxyParams}


Definition at line 853 of file M\+O\+M\+\_\+document.\+F90.


\begin{DoxyCode}
853   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)}  :: docFileBase\textcolor{comment}{ !< The base file name for this set of parameters,}
854 \textcolor{comment}{                                             !! for example MOM\_parameter\_doc}
855   \textcolor{keywordtype}{type}(doc\_type),    \textcolor{keywordtype}{pointer}     :: doc\textcolor{comment}{      !< A pointer to a structure that controls where the}
856 \textcolor{comment}{                                             !! documentation occurs and its formatting}
857   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: minimal\textcolor{comment}{  !< If present and true, write out the files (.short)
       documenting}
858 \textcolor{comment}{                                             !! those parameters that do not take on their default values.}
859   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: complete\textcolor{comment}{ !< If present and true, write out the (.all) files documenting
       all}
860 \textcolor{comment}{                                             !! parameters}
861   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: layout\textcolor{comment}{   !< If present and true, write out the (.layout) files
       documenting}
862 \textcolor{comment}{                                             !! the layout parameters}
863   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: debugging\textcolor{comment}{ !< If present and true, write out the (.debugging) files
       documenting}
864 \textcolor{comment}{                                             !! the debugging parameters}
865 
866   \textcolor{keywordflow}{if} (.not. \textcolor{keyword}{associated}(doc)) \textcolor{keywordflow}{then}
867     \textcolor{keyword}{allocate}(doc)
868 \textcolor{keywordflow}{  endif}
869 
870   doc%docFileBase = docfilebase
871   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(minimal)) doc%minimal = minimal
872   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(complete)) doc%complete = complete
873   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(layout)) doc%layout = layout
874   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(debugging)) doc%debugging = debugging
875 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__document_a76495ce5bfac286507d9af0fe0028539}\label{namespacemom__document_a76495ce5bfac286507d9af0fe0028539}} 
\index{mom\+\_\+document@{mom\+\_\+document}!doc\+\_\+module@{doc\+\_\+module}}
\index{doc\+\_\+module@{doc\+\_\+module}!mom\+\_\+document@{mom\+\_\+document}}
\subsubsection{\texorpdfstring{doc\+\_\+module()}{doc\_module()}}
{\footnotesize\ttfamily subroutine, public mom\+\_\+document\+::doc\+\_\+module (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__document_1_1doc__type}{doc\+\_\+type}}), pointer}]{doc,  }\item[{character(len=$\ast$), intent(in)}]{modname,  }\item[{character(len=$\ast$), intent(in)}]{desc,  }\item[{logical, intent(in), optional}]{log\+\_\+to\+\_\+all,  }\item[{logical, intent(in), optional}]{all\+\_\+default,  }\item[{logical, intent(in), optional}]{layout\+Mod,  }\item[{logical, intent(in), optional}]{debugging\+Mod }\end{DoxyParamCaption})}



This subroutine handles the module documentation. 


\begin{DoxyParams}[1]{Parameters}
 & {\em doc} & A pointer to a structure that controls where the documentation occurs and its formatting\\
\hline
\mbox{\tt in}  & {\em modname} & The name of the module being documented\\
\hline
\mbox{\tt in}  & {\em desc} & A description of the module being documented\\
\hline
\mbox{\tt in}  & {\em log\+\_\+to\+\_\+all} & If present and true, log this parameter to the ...\+\_\+doc.\+all files, even if this module also has layout or debugging parameters.\\
\hline
\mbox{\tt in}  & {\em all\+\_\+default} & If true, all parameters take their default values.\\
\hline
\mbox{\tt in}  & {\em layoutmod} & If present and true, this module has layout parameters.\\
\hline
\mbox{\tt in}  & {\em debuggingmod} & If present and true, this module has debugging parameters. \\
\hline
\end{DoxyParams}


Definition at line 784 of file M\+O\+M\+\_\+document.\+F90.


\begin{DoxyCode}
784   \textcolor{keywordtype}{type}(doc\_type),   \textcolor{keywordtype}{pointer}    :: doc\textcolor{comment}{     !< A pointer to a structure that controls where the}
785 \textcolor{comment}{                                          !! documentation occurs and its formatting}
786   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: modname\textcolor{comment}{ !< The name of the module being documented}
787   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: desc\textcolor{comment}{    !< A description of the module being documented}
788   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: log\_to\_all\textcolor{comment}{ !< If present and true, log this parameter to the}
789 \textcolor{comment}{                                          !! ...\_doc.all files, even if this module also has layout}
790 \textcolor{comment}{                                          !! or debugging parameters.}
791   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: all\_default\textcolor{comment}{  !< If true, all parameters take their default values.}
792   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: layoutMod\textcolor{comment}{    !< If present and true, this module has layout parameters.}
793   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: debuggingMod\textcolor{comment}{ !< If present and true, this module has debugging
       parameters.}
794 
795   \textcolor{comment}{! This subroutine handles the module documentation}
796   \textcolor{keywordtype}{character(len=mLen)} :: mesg
797   \textcolor{keywordtype}{logical} :: repeat\_doc
798 
799   \textcolor{keywordflow}{if} (.not. (is\_root\_pe() .and. \textcolor{keyword}{associated}(doc))) \textcolor{keywordflow}{return}
800   \textcolor{keyword}{call }open\_doc\_file(doc)
801 
802   \textcolor{keywordflow}{if} (doc%filesAreOpen) \textcolor{keywordflow}{then}
803     \textcolor{comment}{! Add a blank line for delineation}
804     \textcolor{keyword}{call }writemessageanddesc(doc, \textcolor{stringliteral}{''}, \textcolor{stringliteral}{''}, valuewasdefault=all\_default, &
805                              layoutparam=layoutmod, debuggingparam=debuggingmod)
806     mesg = \textcolor{stringliteral}{"! === module "}//trim(modname)//\textcolor{stringliteral}{" ==="}
807     \textcolor{keyword}{call }writemessageanddesc(doc, mesg, desc, valuewasdefault=all\_default, indent=0, &
808                              layoutparam=layoutmod, debuggingparam=debuggingmod)
809     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(log\_to\_all)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (log\_to\_all) \textcolor{keywordflow}{then}
810       \textcolor{comment}{! Log the module version again if the previous call was intercepted for use to document}
811       \textcolor{comment}{! a layout or debugging module.}
812       repeat\_doc = .false.
813       \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(layoutmod)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (layoutmod) repeat\_doc = .true. ;\textcolor{keywordflow}{ endif}
814       \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(debuggingmod)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (debuggingmod) repeat\_doc = .true. ;\textcolor{keywordflow}{ endif}
815       \textcolor{keywordflow}{if} (repeat\_doc) \textcolor{keywordflow}{then}
816         \textcolor{keyword}{call }writemessageanddesc(doc, \textcolor{stringliteral}{''}, \textcolor{stringliteral}{''}, valuewasdefault=all\_default)
817         \textcolor{keyword}{call }writemessageanddesc(doc, mesg, desc, valuewasdefault=all\_default, indent=0)
818 \textcolor{keywordflow}{      endif}
819 \textcolor{keywordflow}{    endif} ;\textcolor{keywordflow}{ endif}
820 \textcolor{keywordflow}{  endif}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__document_ada55c6a65638e04d2b550f419aafa929}\label{namespacemom__document_ada55c6a65638e04d2b550f419aafa929}} 
\index{mom\+\_\+document@{mom\+\_\+document}!doc\+\_\+openblock@{doc\+\_\+openblock}}
\index{doc\+\_\+openblock@{doc\+\_\+openblock}!mom\+\_\+document@{mom\+\_\+document}}
\subsubsection{\texorpdfstring{doc\+\_\+openblock()}{doc\_openblock()}}
{\footnotesize\ttfamily subroutine, public mom\+\_\+document\+::doc\+\_\+openblock (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__document_1_1doc__type}{doc\+\_\+type}}), pointer}]{doc,  }\item[{character(len=$\ast$), intent(in)}]{block\+Name,  }\item[{character(len=$\ast$), intent(in), optional}]{desc }\end{DoxyParamCaption})}



This subroutine handles documentation for opening a parameter block. 


\begin{DoxyParams}[1]{Parameters}
 & {\em doc} & A pointer to a structure that controls where the documentation occurs and its formatting\\
\hline
\mbox{\tt in}  & {\em blockname} & The name of the parameter block being opened\\
\hline
\mbox{\tt in}  & {\em desc} & A description of the parameter block being opened \\
\hline
\end{DoxyParams}


Definition at line 386 of file M\+O\+M\+\_\+document.\+F90.


\begin{DoxyCode}
386   \textcolor{keywordtype}{type}(doc\_type),   \textcolor{keywordtype}{pointer}    :: doc\textcolor{comment}{       !< A pointer to a structure that controls where the}
387 \textcolor{comment}{                                            !! documentation occurs and its formatting}
388   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: blockName\textcolor{comment}{ !< The name of the parameter block being opened}
389   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: desc\textcolor{comment}{ !< A description of the parameter block being opened}
390 \textcolor{comment}{! This subroutine handles documentation for opening a parameter block.}
391   \textcolor{keywordtype}{character(len=mLen)} :: mesg
392   \textcolor{keywordtype}{character(len=doc%commentColumn)} :: valstring
393 
394   \textcolor{keywordflow}{if} (.not. (is\_root\_pe() .and. \textcolor{keyword}{associated}(doc))) \textcolor{keywordflow}{return}
395   \textcolor{keyword}{call }open\_doc\_file(doc)
396 
397   \textcolor{keywordflow}{if} (doc%filesAreOpen) \textcolor{keywordflow}{then}
398     mesg = trim(blockname)//\textcolor{stringliteral}{'%'}
399 
400     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(desc)) \textcolor{keywordflow}{then}
401       \textcolor{keyword}{call }writemessageanddesc(doc, mesg, desc)
402     \textcolor{keywordflow}{else}
403       \textcolor{keyword}{call }writemessageanddesc(doc, mesg, \textcolor{stringliteral}{''})
404 \textcolor{keywordflow}{    endif}
405 \textcolor{keywordflow}{  endif}
406   doc%blockPrefix = trim(doc%blockPrefix)//trim(blockname)//\textcolor{stringliteral}{'%'}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__document_aa174faeac36ffe635b998f5c036987f6}\label{namespacemom__document_aa174faeac36ffe635b998f5c036987f6}} 
\index{mom\+\_\+document@{mom\+\_\+document}!doc\+\_\+param\+\_\+char@{doc\+\_\+param\+\_\+char}}
\index{doc\+\_\+param\+\_\+char@{doc\+\_\+param\+\_\+char}!mom\+\_\+document@{mom\+\_\+document}}
\subsubsection{\texorpdfstring{doc\+\_\+param\+\_\+char()}{doc\_param\_char()}}
{\footnotesize\ttfamily subroutine mom\+\_\+document\+::doc\+\_\+param\+\_\+char (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__document_1_1doc__type}{doc\+\_\+type}}), pointer}]{doc,  }\item[{character(len=$\ast$), intent(in)}]{varname,  }\item[{character(len=$\ast$), intent(in)}]{desc,  }\item[{character(len=$\ast$), intent(in)}]{units,  }\item[{character(len=$\ast$), intent(in)}]{val,  }\item[{character(len=$\ast$), intent(in), optional}]{default,  }\item[{logical, intent(in), optional}]{layout\+Param,  }\item[{logical, intent(in), optional}]{debugging\+Param,  }\item[{logical, intent(in), optional}]{like\+\_\+default }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine handles parameter documentation for character strings. 


\begin{DoxyParams}[1]{Parameters}
 & {\em doc} & A pointer to a structure that controls where the documentation occurs and its formatting\\
\hline
\mbox{\tt in}  & {\em varname} & The name of the parameter being documented\\
\hline
\mbox{\tt in}  & {\em desc} & A description of the parameter being documented\\
\hline
\mbox{\tt in}  & {\em units} & The units of the parameter being documented\\
\hline
\mbox{\tt in}  & {\em val} & The value of the parameter\\
\hline
\mbox{\tt in}  & {\em default} & The default value of this parameter\\
\hline
\mbox{\tt in}  & {\em layoutparam} & If present and true, this is a layout parameter.\\
\hline
\mbox{\tt in}  & {\em debuggingparam} & If present and true, this is a debugging parameter.\\
\hline
\mbox{\tt in}  & {\em like\+\_\+default} & If present and true, log this parameter as though it has the default value, even if there is no default. \\
\hline
\end{DoxyParams}


Definition at line 348 of file M\+O\+M\+\_\+document.\+F90.


\begin{DoxyCode}
348   \textcolor{keywordtype}{type}(doc\_type),    \textcolor{keywordtype}{pointer}    :: doc\textcolor{comment}{     !< A pointer to a structure that controls where the}
349 \textcolor{comment}{                                           !! documentation occurs and its formatting}
350   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: varname\textcolor{comment}{ !< The name of the parameter being documented}
351   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: desc\textcolor{comment}{    !< A description of the parameter being documented}
352   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: units\textcolor{comment}{   !< The units of the parameter being documented}
353   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: val\textcolor{comment}{     !< The value of the parameter}
354   \textcolor{keywordtype}{character(len=*)}, &
355            \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: default\textcolor{comment}{ !< The default value of this parameter}
356   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: layoutParam\textcolor{comment}{ !< If present and true, this is a layout parameter.}
357   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: debuggingParam\textcolor{comment}{ !< If present and true, this is a debugging parameter.}
358   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: like\_default\textcolor{comment}{ !< If present and true, log this parameter as though}
359 \textcolor{comment}{                                           !! it has the default value, even if there is no default.}
360 \textcolor{comment}{! This subroutine handles parameter documentation for character strings.}
361   \textcolor{keywordtype}{character(len=mLen)} :: mesg
362   \textcolor{keywordtype}{logical} :: equalsDefault
363 
364   \textcolor{keywordflow}{if} (.not. (is\_root\_pe() .and. \textcolor{keyword}{associated}(doc))) \textcolor{keywordflow}{return}
365   \textcolor{keyword}{call }open\_doc\_file(doc)
366 
367   \textcolor{keywordflow}{if} (doc%filesAreOpen) \textcolor{keywordflow}{then}
368     mesg = define\_string(doc, varname, \textcolor{stringliteral}{'"'}//trim(val)//\textcolor{stringliteral}{'"'}, units)
369 
370     equalsdefault = .false.
371     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(like\_default)) equalsdefault = like\_default
372     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(default)) \textcolor{keywordflow}{then}
373       \textcolor{keywordflow}{if} (trim(val) == trim(default)) equalsdefault = .true.
374       mesg = trim(mesg)//\textcolor{stringliteral}{' default = "'}//trim(adjustl(default))//\textcolor{stringliteral}{'"'}
375 \textcolor{keywordflow}{    endif}
376 
377     \textcolor{keywordflow}{if} (mesghasbeendocumented(doc, varname, mesg)) \textcolor{keywordflow}{return} \textcolor{comment}{! Avoid duplicates}
378     \textcolor{keyword}{call }writemessageanddesc(doc, mesg, desc, equalsdefault, &
379                              layoutparam=layoutparam, debuggingparam=debuggingparam)
380 \textcolor{keywordflow}{  endif}
381 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__document_a7f4a38d3eb81ce2aeeb9a98b80cce39a}\label{namespacemom__document_a7f4a38d3eb81ce2aeeb9a98b80cce39a}} 
\index{mom\+\_\+document@{mom\+\_\+document}!doc\+\_\+param\+\_\+int@{doc\+\_\+param\+\_\+int}}
\index{doc\+\_\+param\+\_\+int@{doc\+\_\+param\+\_\+int}!mom\+\_\+document@{mom\+\_\+document}}
\subsubsection{\texorpdfstring{doc\+\_\+param\+\_\+int()}{doc\_param\_int()}}
{\footnotesize\ttfamily subroutine mom\+\_\+document\+::doc\+\_\+param\+\_\+int (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__document_1_1doc__type}{doc\+\_\+type}}), pointer}]{doc,  }\item[{character(len=$\ast$), intent(in)}]{varname,  }\item[{character(len=$\ast$), intent(in)}]{desc,  }\item[{character(len=$\ast$), intent(in)}]{units,  }\item[{integer, intent(in)}]{val,  }\item[{integer, intent(in), optional}]{default,  }\item[{logical, intent(in), optional}]{layout\+Param,  }\item[{logical, intent(in), optional}]{debugging\+Param,  }\item[{logical, intent(in), optional}]{like\+\_\+default }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine handles parameter documentation for integers. 


\begin{DoxyParams}[1]{Parameters}
 & {\em doc} & A pointer to a structure that controls where the documentation occurs and its formatting\\
\hline
\mbox{\tt in}  & {\em varname} & The name of the parameter being documented\\
\hline
\mbox{\tt in}  & {\em desc} & A description of the parameter being documented\\
\hline
\mbox{\tt in}  & {\em units} & The units of the parameter being documented\\
\hline
\mbox{\tt in}  & {\em val} & The value of this parameter\\
\hline
\mbox{\tt in}  & {\em default} & The default value of this parameter\\
\hline
\mbox{\tt in}  & {\em layoutparam} & If present and true, this is a layout parameter.\\
\hline
\mbox{\tt in}  & {\em debuggingparam} & If present and true, this is a debugging parameter.\\
\hline
\mbox{\tt in}  & {\em like\+\_\+default} & If present and true, log this parameter as though it has the default value, even if there is no default. \\
\hline
\end{DoxyParams}


Definition at line 187 of file M\+O\+M\+\_\+document.\+F90.


\begin{DoxyCode}
187   \textcolor{keywordtype}{type}(doc\_type),    \textcolor{keywordtype}{pointer}    :: doc\textcolor{comment}{     !< A pointer to a structure that controls where the}
188 \textcolor{comment}{                                           !! documentation occurs and its formatting}
189   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: varname\textcolor{comment}{ !< The name of the parameter being documented}
190   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: desc\textcolor{comment}{    !< A description of the parameter being documented}
191   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: units\textcolor{comment}{   !< The units of the parameter being documented}
192   \textcolor{keywordtype}{integer},           \textcolor{keywordtype}{intent(in)} :: val\textcolor{comment}{     !< The value of this parameter}
193   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: default\textcolor{comment}{ !< The default value of this parameter}
194   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: layoutParam\textcolor{comment}{ !< If present and true, this is a layout parameter.}
195   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: debuggingParam\textcolor{comment}{ !< If present and true, this is a debugging parameter.}
196   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: like\_default\textcolor{comment}{ !< If present and true, log this parameter as though}
197 \textcolor{comment}{                                           !! it has the default value, even if there is no default.}
198 \textcolor{comment}{! This subroutine handles parameter documentation for integers.}
199   \textcolor{keywordtype}{character(len=mLen)} :: mesg
200   \textcolor{keywordtype}{character(len=doc%commentColumn)}  :: valstring
201   \textcolor{keywordtype}{logical} :: equalsDefault
202 
203   \textcolor{keywordflow}{if} (.not. (is\_root\_pe() .and. \textcolor{keyword}{associated}(doc))) \textcolor{keywordflow}{return}
204   \textcolor{keyword}{call }open\_doc\_file(doc)
205 
206   \textcolor{keywordflow}{if} (doc%filesAreOpen) \textcolor{keywordflow}{then}
207     valstring = int\_string(val)
208     mesg = define\_string(doc, varname, valstring, units)
209 
210     equalsdefault = .false.
211     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(like\_default)) equalsdefault = like\_default
212     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(default)) \textcolor{keywordflow}{then}
213       \textcolor{keywordflow}{if} (val == default) equalsdefault = .true.
214       mesg = trim(mesg)//\textcolor{stringliteral}{" default = "}//(trim(int\_string(default)))
215 \textcolor{keywordflow}{    endif}
216 
217     \textcolor{keywordflow}{if} (mesghasbeendocumented(doc, varname, mesg)) \textcolor{keywordflow}{return} \textcolor{comment}{! Avoid duplicates}
218     \textcolor{keyword}{call }writemessageanddesc(doc, mesg, desc, equalsdefault, &
219                              layoutparam=layoutparam, debuggingparam=debuggingparam)
220 \textcolor{keywordflow}{  endif}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__document_a4926113e36b32dd776f91678f6a669cd}\label{namespacemom__document_a4926113e36b32dd776f91678f6a669cd}} 
\index{mom\+\_\+document@{mom\+\_\+document}!doc\+\_\+param\+\_\+int\+\_\+array@{doc\+\_\+param\+\_\+int\+\_\+array}}
\index{doc\+\_\+param\+\_\+int\+\_\+array@{doc\+\_\+param\+\_\+int\+\_\+array}!mom\+\_\+document@{mom\+\_\+document}}
\subsubsection{\texorpdfstring{doc\+\_\+param\+\_\+int\+\_\+array()}{doc\_param\_int\_array()}}
{\footnotesize\ttfamily subroutine mom\+\_\+document\+::doc\+\_\+param\+\_\+int\+\_\+array (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__document_1_1doc__type}{doc\+\_\+type}}), pointer}]{doc,  }\item[{character(len=$\ast$), intent(in)}]{varname,  }\item[{character(len=$\ast$), intent(in)}]{desc,  }\item[{character(len=$\ast$), intent(in)}]{units,  }\item[{integer, dimension(\+:), intent(in)}]{vals,  }\item[{integer, intent(in), optional}]{default,  }\item[{logical, intent(in), optional}]{layout\+Param,  }\item[{logical, intent(in), optional}]{debugging\+Param,  }\item[{logical, intent(in), optional}]{like\+\_\+default }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine handles parameter documentation for arrays of integers. 


\begin{DoxyParams}[1]{Parameters}
 & {\em doc} & A pointer to a structure that controls where the documentation occurs and its formatting\\
\hline
\mbox{\tt in}  & {\em varname} & The name of the parameter being documented\\
\hline
\mbox{\tt in}  & {\em desc} & A description of the parameter being documented\\
\hline
\mbox{\tt in}  & {\em units} & The units of the parameter being documented\\
\hline
\mbox{\tt in}  & {\em vals} & The array of values to record\\
\hline
\mbox{\tt in}  & {\em default} & The default value of this parameter\\
\hline
\mbox{\tt in}  & {\em layoutparam} & If present and true, this is a layout parameter.\\
\hline
\mbox{\tt in}  & {\em debuggingparam} & If present and true, this is a debugging parameter.\\
\hline
\mbox{\tt in}  & {\em like\+\_\+default} & If present and true, log this parameter as though it has the default value, even if there is no default. \\
\hline
\end{DoxyParams}


Definition at line 226 of file M\+O\+M\+\_\+document.\+F90.


\begin{DoxyCode}
226   \textcolor{keywordtype}{type}(doc\_type),    \textcolor{keywordtype}{pointer}    :: doc\textcolor{comment}{     !< A pointer to a structure that controls where the}
227 \textcolor{comment}{                                           !! documentation occurs and its formatting}
228   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: varname\textcolor{comment}{ !< The name of the parameter being documented}
229   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: desc\textcolor{comment}{    !< A description of the parameter being documented}
230   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: units\textcolor{comment}{   !< The units of the parameter being documented}
231   \textcolor{keywordtype}{integer},           \textcolor{keywordtype}{intent(in)} :: vals(:)\textcolor{comment}{ !< The array of values to record}
232   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: default\textcolor{comment}{ !< The default value of this parameter}
233   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: layoutParam\textcolor{comment}{ !< If present and true, this is a layout parameter.}
234   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: debuggingParam\textcolor{comment}{ !< If present and true, this is a debugging parameter.}
235   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: like\_default\textcolor{comment}{ !< If present and true, log this parameter as though}
236 \textcolor{comment}{                                           !! it has the default value, even if there is no default.}
237 \textcolor{comment}{! This subroutine handles parameter documentation for arrays of integers.}
238   \textcolor{keywordtype}{integer} :: i
239   \textcolor{keywordtype}{character(len=mLen)} :: mesg
240   \textcolor{keywordtype}{character(len=mLen)}  :: valstring
241   \textcolor{keywordtype}{logical} :: equalsDefault
242 
243   \textcolor{keywordflow}{if} (.not. (is\_root\_pe() .and. \textcolor{keyword}{associated}(doc))) \textcolor{keywordflow}{return}
244   \textcolor{keyword}{call }open\_doc\_file(doc)
245 
246   \textcolor{keywordflow}{if} (doc%filesAreOpen) \textcolor{keywordflow}{then}
247     valstring = int\_string(vals(1))
248     \textcolor{keywordflow}{do} i=2,min(\textcolor{keyword}{size}(vals),128)
249       valstring = trim(valstring)//\textcolor{stringliteral}{", "}//trim(int\_string(vals(i)))
250 \textcolor{keywordflow}{    enddo}
251 
252     mesg = define\_string(doc, varname, valstring, units)
253 
254     equalsdefault = .false.
255     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(default)) \textcolor{keywordflow}{then}
256       equalsdefault = .true.
257       \textcolor{keywordflow}{do} i=1,\textcolor{keyword}{size}(vals) ; \textcolor{keywordflow}{if} (vals(i) /= default) equalsdefault = .false. ;\textcolor{keywordflow}{ enddo}
258       mesg = trim(mesg)//\textcolor{stringliteral}{" default = "}//(trim(int\_string(default)))
259 \textcolor{keywordflow}{    endif}
260     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(like\_default)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (like\_default) equalsdefault = .true. ;\textcolor{keywordflow}{ endif}
261 
262     \textcolor{keywordflow}{if} (mesghasbeendocumented(doc, varname, mesg)) \textcolor{keywordflow}{return} \textcolor{comment}{! Avoid duplicates}
263     \textcolor{keyword}{call }writemessageanddesc(doc, mesg, desc, equalsdefault, &
264                              layoutparam=layoutparam, debuggingparam=debuggingparam)
265 \textcolor{keywordflow}{  endif}
266 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__document_ac090c6143765bfcff274cbac281d9a0a}\label{namespacemom__document_ac090c6143765bfcff274cbac281d9a0a}} 
\index{mom\+\_\+document@{mom\+\_\+document}!doc\+\_\+param\+\_\+logical@{doc\+\_\+param\+\_\+logical}}
\index{doc\+\_\+param\+\_\+logical@{doc\+\_\+param\+\_\+logical}!mom\+\_\+document@{mom\+\_\+document}}
\subsubsection{\texorpdfstring{doc\+\_\+param\+\_\+logical()}{doc\_param\_logical()}}
{\footnotesize\ttfamily subroutine mom\+\_\+document\+::doc\+\_\+param\+\_\+logical (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__document_1_1doc__type}{doc\+\_\+type}}), pointer}]{doc,  }\item[{character(len=$\ast$), intent(in)}]{varname,  }\item[{character(len=$\ast$), intent(in)}]{desc,  }\item[{character(len=$\ast$), intent(in)}]{units,  }\item[{logical, intent(in)}]{val,  }\item[{logical, intent(in), optional}]{default,  }\item[{logical, intent(in), optional}]{layout\+Param,  }\item[{logical, intent(in), optional}]{debugging\+Param,  }\item[{logical, intent(in), optional}]{like\+\_\+default }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine handles parameter documentation for logicals. 


\begin{DoxyParams}[1]{Parameters}
 & {\em doc} & A pointer to a structure that controls where the documentation occurs and its formatting\\
\hline
\mbox{\tt in}  & {\em varname} & The name of the parameter being documented\\
\hline
\mbox{\tt in}  & {\em desc} & A description of the parameter being documented\\
\hline
\mbox{\tt in}  & {\em units} & The units of the parameter being documented\\
\hline
\mbox{\tt in}  & {\em val} & The value of this parameter\\
\hline
\mbox{\tt in}  & {\em default} & The default value of this parameter\\
\hline
\mbox{\tt in}  & {\em layoutparam} & If present and true, this is a layout parameter.\\
\hline
\mbox{\tt in}  & {\em debuggingparam} & If present and true, this is a debugging parameter.\\
\hline
\mbox{\tt in}  & {\em like\+\_\+default} & If present and true, log this parameter as though it has the default value, even if there is no default. \\
\hline
\end{DoxyParams}


Definition at line 89 of file M\+O\+M\+\_\+document.\+F90.


\begin{DoxyCode}
89   \textcolor{keywordtype}{type}(doc\_type),    \textcolor{keywordtype}{pointer}    :: doc\textcolor{comment}{     !< A pointer to a structure that controls where the}
90 \textcolor{comment}{                                           !! documentation occurs and its formatting}
91   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: varname\textcolor{comment}{ !< The name of the parameter being documented}
92   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: desc\textcolor{comment}{    !< A description of the parameter being documented}
93   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: units\textcolor{comment}{   !< The units of the parameter being documented}
94   \textcolor{keywordtype}{logical},           \textcolor{keywordtype}{intent(in)} :: val\textcolor{comment}{     !< The value of this parameter}
95   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: default\textcolor{comment}{ !< The default value of this parameter}
96   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: layoutParam\textcolor{comment}{ !< If present and true, this is a layout parameter.}
97   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: debuggingParam\textcolor{comment}{ !< If present and true, this is a debugging parameter.}
98   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: like\_default\textcolor{comment}{ !< If present and true, log this parameter as though}
99 \textcolor{comment}{                                           !! it has the default value, even if there is no default.}
100 \textcolor{comment}{! This subroutine handles parameter documentation for logicals.}
101   \textcolor{keywordtype}{character(len=mLen)} :: mesg
102   \textcolor{keywordtype}{logical} :: equalsDefault
103 
104   \textcolor{keywordflow}{if} (.not. (is\_root\_pe() .and. \textcolor{keyword}{associated}(doc))) \textcolor{keywordflow}{return}
105   \textcolor{keyword}{call }open\_doc\_file(doc)
106 
107   \textcolor{keywordflow}{if} (doc%filesAreOpen) \textcolor{keywordflow}{then}
108     \textcolor{keywordflow}{if} (val) \textcolor{keywordflow}{then}
109       mesg = define\_string(doc, varname, string\_true, units)
110     \textcolor{keywordflow}{else}
111       mesg = undef\_string(doc, varname, units)
112 \textcolor{keywordflow}{    endif}
113 
114     equalsdefault = .false.
115     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(like\_default)) equalsdefault = like\_default
116     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(default)) \textcolor{keywordflow}{then}
117       \textcolor{keywordflow}{if} (val .eqv. default) equalsdefault = .true.
118       \textcolor{keywordflow}{if} (default) \textcolor{keywordflow}{then}
119         mesg = trim(mesg)//\textcolor{stringliteral}{" default = "}//string\_true
120       \textcolor{keywordflow}{else}
121         mesg = trim(mesg)//\textcolor{stringliteral}{" default = "}//string\_false
122 \textcolor{keywordflow}{      endif}
123 \textcolor{keywordflow}{    endif}
124 
125     \textcolor{keywordflow}{if} (mesghasbeendocumented(doc, varname, mesg)) \textcolor{keywordflow}{return} \textcolor{comment}{! Avoid duplicates}
126     \textcolor{keyword}{call }writemessageanddesc(doc, mesg, desc, equalsdefault, &
127                              layoutparam=layoutparam, debuggingparam=debuggingparam)
128 \textcolor{keywordflow}{  endif}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__document_a63e852849c9cea4cd4994ac1348b2efd}\label{namespacemom__document_a63e852849c9cea4cd4994ac1348b2efd}} 
\index{mom\+\_\+document@{mom\+\_\+document}!doc\+\_\+param\+\_\+logical\+\_\+array@{doc\+\_\+param\+\_\+logical\+\_\+array}}
\index{doc\+\_\+param\+\_\+logical\+\_\+array@{doc\+\_\+param\+\_\+logical\+\_\+array}!mom\+\_\+document@{mom\+\_\+document}}
\subsubsection{\texorpdfstring{doc\+\_\+param\+\_\+logical\+\_\+array()}{doc\_param\_logical\_array()}}
{\footnotesize\ttfamily subroutine mom\+\_\+document\+::doc\+\_\+param\+\_\+logical\+\_\+array (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__document_1_1doc__type}{doc\+\_\+type}}), pointer}]{doc,  }\item[{character(len=$\ast$), intent(in)}]{varname,  }\item[{character(len=$\ast$), intent(in)}]{desc,  }\item[{character(len=$\ast$), intent(in)}]{units,  }\item[{logical, dimension(\+:), intent(in)}]{vals,  }\item[{logical, intent(in), optional}]{default,  }\item[{logical, intent(in), optional}]{layout\+Param,  }\item[{logical, intent(in), optional}]{debugging\+Param,  }\item[{logical, intent(in), optional}]{like\+\_\+default }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine handles parameter documentation for arrays of logicals. 


\begin{DoxyParams}[1]{Parameters}
 & {\em doc} & A pointer to a structure that controls where the documentation occurs and its formatting\\
\hline
\mbox{\tt in}  & {\em varname} & The name of the parameter being documented\\
\hline
\mbox{\tt in}  & {\em desc} & A description of the parameter being documented\\
\hline
\mbox{\tt in}  & {\em units} & The units of the parameter being documented\\
\hline
\mbox{\tt in}  & {\em vals} & The array of values to record\\
\hline
\mbox{\tt in}  & {\em default} & The default value of this parameter\\
\hline
\mbox{\tt in}  & {\em layoutparam} & If present and true, this is a layout parameter.\\
\hline
\mbox{\tt in}  & {\em debuggingparam} & If present and true, this is a debugging parameter.\\
\hline
\mbox{\tt in}  & {\em like\+\_\+default} & If present and true, log this parameter as though it has the default value, even if there is no default. \\
\hline
\end{DoxyParams}


Definition at line 134 of file M\+O\+M\+\_\+document.\+F90.


\begin{DoxyCode}
134   \textcolor{keywordtype}{type}(doc\_type),    \textcolor{keywordtype}{pointer}    :: doc\textcolor{comment}{     !< A pointer to a structure that controls where the}
135 \textcolor{comment}{                                           !! documentation occurs and its formatting}
136   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: varname\textcolor{comment}{ !< The name of the parameter being documented}
137   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: desc\textcolor{comment}{    !< A description of the parameter being documented}
138   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: units\textcolor{comment}{   !< The units of the parameter being documented}
139   \textcolor{keywordtype}{logical},           \textcolor{keywordtype}{intent(in)} :: vals(:)\textcolor{comment}{ !< The array of values to record}
140   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: default\textcolor{comment}{ !< The default value of this parameter}
141   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: layoutParam\textcolor{comment}{ !< If present and true, this is a layout parameter.}
142   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: debuggingParam\textcolor{comment}{ !< If present and true, this is a debugging parameter.}
143   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: like\_default\textcolor{comment}{ !< If present and true, log this parameter as though}
144 \textcolor{comment}{                                           !! it has the default value, even if there is no default.}
145 \textcolor{comment}{! This subroutine handles parameter documentation for arrays of logicals.}
146   \textcolor{keywordtype}{integer} :: i
147   \textcolor{keywordtype}{character(len=mLen)} :: mesg
148   \textcolor{keywordtype}{character(len=mLen)} :: valstring
149   \textcolor{keywordtype}{logical} :: equalsDefault
150 
151   \textcolor{keywordflow}{if} (.not. (is\_root\_pe() .and. \textcolor{keyword}{associated}(doc))) \textcolor{keywordflow}{return}
152   \textcolor{keyword}{call }open\_doc\_file(doc)
153 
154   \textcolor{keywordflow}{if} (doc%filesAreOpen) \textcolor{keywordflow}{then}
155     \textcolor{keywordflow}{if} (vals(1)) \textcolor{keywordflow}{then} ; valstring = string\_true ; \textcolor{keywordflow}{else} ; valstring = string\_false ;\textcolor{keywordflow}{ endif}
156     \textcolor{keywordflow}{do} i=2,min(\textcolor{keyword}{size}(vals),128)
157       \textcolor{keywordflow}{if} (vals(i)) \textcolor{keywordflow}{then}
158         valstring = trim(valstring)//\textcolor{stringliteral}{", "}//string\_true
159       \textcolor{keywordflow}{else}
160         valstring = trim(valstring)//\textcolor{stringliteral}{", "}//string\_false
161 \textcolor{keywordflow}{      endif}
162 \textcolor{keywordflow}{    enddo}
163 
164     mesg = define\_string(doc, varname, valstring, units)
165 
166     equalsdefault = .false.
167     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(default)) \textcolor{keywordflow}{then}
168       equalsdefault = .true.
169       \textcolor{keywordflow}{do} i=1,\textcolor{keyword}{size}(vals) ; \textcolor{keywordflow}{if} (vals(i) .neqv. default) equalsdefault = .false. ;\textcolor{keywordflow}{ enddo}
170       \textcolor{keywordflow}{if} (default) \textcolor{keywordflow}{then}
171         mesg = trim(mesg)//\textcolor{stringliteral}{" default = "}//string\_true
172       \textcolor{keywordflow}{else}
173         mesg = trim(mesg)//\textcolor{stringliteral}{" default = "}//string\_false
174 \textcolor{keywordflow}{      endif}
175 \textcolor{keywordflow}{    endif}
176     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(like\_default)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (like\_default) equalsdefault = .true. ;\textcolor{keywordflow}{ endif}
177 
178     \textcolor{keywordflow}{if} (mesghasbeendocumented(doc, varname, mesg)) \textcolor{keywordflow}{return} \textcolor{comment}{! Avoid duplicates}
179     \textcolor{keyword}{call }writemessageanddesc(doc, mesg, desc, equalsdefault, &
180                              layoutparam=layoutparam, debuggingparam=debuggingparam)
181 \textcolor{keywordflow}{  endif}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__document_ab6438889d6e98b10d8c42d5ff6b00ef8}\label{namespacemom__document_ab6438889d6e98b10d8c42d5ff6b00ef8}} 
\index{mom\+\_\+document@{mom\+\_\+document}!doc\+\_\+param\+\_\+none@{doc\+\_\+param\+\_\+none}}
\index{doc\+\_\+param\+\_\+none@{doc\+\_\+param\+\_\+none}!mom\+\_\+document@{mom\+\_\+document}}
\subsubsection{\texorpdfstring{doc\+\_\+param\+\_\+none()}{doc\_param\_none()}}
{\footnotesize\ttfamily subroutine mom\+\_\+document\+::doc\+\_\+param\+\_\+none (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__document_1_1doc__type}{doc\+\_\+type}}), pointer}]{doc,  }\item[{character(len=$\ast$), intent(in)}]{varname,  }\item[{character(len=$\ast$), intent(in)}]{desc,  }\item[{character(len=$\ast$), intent(in)}]{units }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine handles parameter documentation with no value. 


\begin{DoxyParams}[1]{Parameters}
 & {\em doc} & A pointer to a structure that controls where the documentation occurs and its formatting\\
\hline
\mbox{\tt in}  & {\em varname} & The name of the parameter being documented\\
\hline
\mbox{\tt in}  & {\em desc} & A description of the parameter being documented\\
\hline
\mbox{\tt in}  & {\em units} & The units of the parameter being documented \\
\hline
\end{DoxyParams}


Definition at line 64 of file M\+O\+M\+\_\+document.\+F90.


\begin{DoxyCode}
64   \textcolor{keywordtype}{type}(doc\_type),   \textcolor{keywordtype}{pointer}    :: doc\textcolor{comment}{     !< A pointer to a structure that controls where the}
65 \textcolor{comment}{                                          !! documentation occurs and its formatting}
66   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: varname\textcolor{comment}{ !< The name of the parameter being documented}
67   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: desc\textcolor{comment}{    !< A description of the parameter being documented}
68   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: units\textcolor{comment}{   !< The units of the parameter being documented}
69 \textcolor{comment}{! This subroutine handles parameter documentation with no value.}
70   \textcolor{keywordtype}{integer} :: numspc
71   \textcolor{keywordtype}{character(len=mLen)} :: mesg
72 
73   \textcolor{keywordflow}{if} (.not. (is\_root\_pe() .and. \textcolor{keyword}{associated}(doc))) \textcolor{keywordflow}{return}
74   \textcolor{keyword}{call }open\_doc\_file(doc)
75 
76   \textcolor{keywordflow}{if} (doc%filesAreOpen) \textcolor{keywordflow}{then}
77     numspc = max(1,doc%commentColumn-8-len\_trim(varname))
78     mesg = \textcolor{stringliteral}{"#define "}//trim(varname)//repeat(\textcolor{stringliteral}{" "},numspc)//\textcolor{stringliteral}{"!"}
79     \textcolor{keywordflow}{if} (len\_trim(units) > 0) mesg = trim(mesg)//\textcolor{stringliteral}{"   ["}//trim(units)//\textcolor{stringliteral}{"]"}
80 
81     \textcolor{keywordflow}{if} (mesghasbeendocumented(doc, varname, mesg)) \textcolor{keywordflow}{return} \textcolor{comment}{! Avoid duplicates}
82     \textcolor{keyword}{call }writemessageanddesc(doc, mesg, desc)
83 \textcolor{keywordflow}{  endif}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__document_ac3ecbe40decde8a8cff456836d955445}\label{namespacemom__document_ac3ecbe40decde8a8cff456836d955445}} 
\index{mom\+\_\+document@{mom\+\_\+document}!doc\+\_\+param\+\_\+real@{doc\+\_\+param\+\_\+real}}
\index{doc\+\_\+param\+\_\+real@{doc\+\_\+param\+\_\+real}!mom\+\_\+document@{mom\+\_\+document}}
\subsubsection{\texorpdfstring{doc\+\_\+param\+\_\+real()}{doc\_param\_real()}}
{\footnotesize\ttfamily subroutine mom\+\_\+document\+::doc\+\_\+param\+\_\+real (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__document_1_1doc__type}{doc\+\_\+type}}), pointer}]{doc,  }\item[{character(len=$\ast$), intent(in)}]{varname,  }\item[{character(len=$\ast$), intent(in)}]{desc,  }\item[{character(len=$\ast$), intent(in)}]{units,  }\item[{real, intent(in)}]{val,  }\item[{real, intent(in), optional}]{default,  }\item[{logical, intent(in), optional}]{debugging\+Param,  }\item[{logical, intent(in), optional}]{like\+\_\+default }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine handles parameter documentation for reals. 


\begin{DoxyParams}[1]{Parameters}
 & {\em doc} & A pointer to a structure that controls where the documentation occurs and its formatting\\
\hline
\mbox{\tt in}  & {\em varname} & The name of the parameter being documented\\
\hline
\mbox{\tt in}  & {\em desc} & A description of the parameter being documented\\
\hline
\mbox{\tt in}  & {\em units} & The units of the parameter being documented\\
\hline
\mbox{\tt in}  & {\em val} & The value of this parameter\\
\hline
\mbox{\tt in}  & {\em default} & The default value of this parameter\\
\hline
\mbox{\tt in}  & {\em debuggingparam} & If present and true, this is a debugging parameter.\\
\hline
\mbox{\tt in}  & {\em like\+\_\+default} & If present and true, log this parameter as though it has the default value, even if there is no default. \\
\hline
\end{DoxyParams}


Definition at line 271 of file M\+O\+M\+\_\+document.\+F90.


\begin{DoxyCode}
271   \textcolor{keywordtype}{type}(doc\_type),    \textcolor{keywordtype}{pointer}    :: doc\textcolor{comment}{     !< A pointer to a structure that controls where the}
272 \textcolor{comment}{                                           !! documentation occurs and its formatting}
273   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: varname\textcolor{comment}{ !< The name of the parameter being documented}
274   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: desc\textcolor{comment}{    !< A description of the parameter being documented}
275   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: units\textcolor{comment}{   !< The units of the parameter being documented}
276   \textcolor{keywordtype}{real},              \textcolor{keywordtype}{intent(in)} :: val\textcolor{comment}{     !< The value of this parameter}
277   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: default\textcolor{comment}{ !< The default value of this parameter}
278   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: debuggingParam\textcolor{comment}{ !< If present and true, this is a debugging parameter.}
279   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: like\_default\textcolor{comment}{ !< If present and true, log this parameter as though}
280 \textcolor{comment}{                                           !! it has the default value, even if there is no default.}
281 \textcolor{comment}{! This subroutine handles parameter documentation for reals.}
282   \textcolor{keywordtype}{character(len=mLen)} :: mesg
283   \textcolor{keywordtype}{character(len=doc%commentColumn)}  :: valstring
284   \textcolor{keywordtype}{logical} :: equalsDefault
285 
286   \textcolor{keywordflow}{if} (.not. (is\_root\_pe() .and. \textcolor{keyword}{associated}(doc))) \textcolor{keywordflow}{return}
287   \textcolor{keyword}{call }open\_doc\_file(doc)
288 
289   \textcolor{keywordflow}{if} (doc%filesAreOpen) \textcolor{keywordflow}{then}
290     valstring = real\_string(val)
291     mesg = define\_string(doc, varname, valstring, units)
292 
293     equalsdefault = .false.
294     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(like\_default)) equalsdefault = like\_default
295     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(default)) \textcolor{keywordflow}{then}
296       \textcolor{keywordflow}{if} (val == default) equalsdefault = .true.
297       mesg = trim(mesg)//\textcolor{stringliteral}{" default = "}//trim(real\_string(default))
298 \textcolor{keywordflow}{    endif}
299 
300     \textcolor{keywordflow}{if} (mesghasbeendocumented(doc, varname, mesg)) \textcolor{keywordflow}{return} \textcolor{comment}{! Avoid duplicates}
301     \textcolor{keyword}{call }writemessageanddesc(doc, mesg, desc, equalsdefault, debuggingparam=debuggingparam)
302 \textcolor{keywordflow}{  endif}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__document_a7bf0ddcf50cd63dd19cc469035f3a001}\label{namespacemom__document_a7bf0ddcf50cd63dd19cc469035f3a001}} 
\index{mom\+\_\+document@{mom\+\_\+document}!doc\+\_\+param\+\_\+real\+\_\+array@{doc\+\_\+param\+\_\+real\+\_\+array}}
\index{doc\+\_\+param\+\_\+real\+\_\+array@{doc\+\_\+param\+\_\+real\+\_\+array}!mom\+\_\+document@{mom\+\_\+document}}
\subsubsection{\texorpdfstring{doc\+\_\+param\+\_\+real\+\_\+array()}{doc\_param\_real\_array()}}
{\footnotesize\ttfamily subroutine mom\+\_\+document\+::doc\+\_\+param\+\_\+real\+\_\+array (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__document_1_1doc__type}{doc\+\_\+type}}), pointer}]{doc,  }\item[{character(len=$\ast$), intent(in)}]{varname,  }\item[{character(len=$\ast$), intent(in)}]{desc,  }\item[{character(len=$\ast$), intent(in)}]{units,  }\item[{real, dimension(\+:), intent(in)}]{vals,  }\item[{real, intent(in), optional}]{default,  }\item[{logical, intent(in), optional}]{debugging\+Param,  }\item[{logical, intent(in), optional}]{like\+\_\+default }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine handles parameter documentation for arrays of reals. 


\begin{DoxyParams}[1]{Parameters}
 & {\em doc} & A pointer to a structure that controls where the documentation occurs and its formatting\\
\hline
\mbox{\tt in}  & {\em varname} & The name of the parameter being documented\\
\hline
\mbox{\tt in}  & {\em desc} & A description of the parameter being documented\\
\hline
\mbox{\tt in}  & {\em units} & The units of the parameter being documented\\
\hline
\mbox{\tt in}  & {\em vals} & The array of values to record\\
\hline
\mbox{\tt in}  & {\em default} & The default value of this parameter\\
\hline
\mbox{\tt in}  & {\em debuggingparam} & If present and true, this is a debugging parameter.\\
\hline
\mbox{\tt in}  & {\em like\+\_\+default} & If present and true, log this parameter as though it has the default value, even if there is no default. \\
\hline
\end{DoxyParams}


Definition at line 307 of file M\+O\+M\+\_\+document.\+F90.


\begin{DoxyCode}
307   \textcolor{keywordtype}{type}(doc\_type),    \textcolor{keywordtype}{pointer}    :: doc\textcolor{comment}{     !< A pointer to a structure that controls where the}
308 \textcolor{comment}{                                           !! documentation occurs and its formatting}
309   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: varname\textcolor{comment}{ !< The name of the parameter being documented}
310   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: desc\textcolor{comment}{    !< A description of the parameter being documented}
311   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: units\textcolor{comment}{   !< The units of the parameter being documented}
312   \textcolor{keywordtype}{real},              \textcolor{keywordtype}{intent(in)} :: vals(:)\textcolor{comment}{ !< The array of values to record}
313   \textcolor{keywordtype}{real},    \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: default\textcolor{comment}{ !< The default value of this parameter}
314   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: debuggingParam\textcolor{comment}{ !< If present and true, this is a debugging parameter.}
315   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: like\_default\textcolor{comment}{ !< If present and true, log this parameter as though}
316 \textcolor{comment}{                                           !! it has the default value, even if there is no default.}
317 \textcolor{comment}{! This subroutine handles parameter documentation for arrays of reals.}
318   \textcolor{keywordtype}{integer} :: i
319   \textcolor{keywordtype}{character(len=mLen)} :: mesg
320   \textcolor{keywordtype}{character(len=mLen)} :: valstring
321   \textcolor{keywordtype}{logical} :: equalsDefault
322 
323   \textcolor{keywordflow}{if} (.not. (is\_root\_pe() .and. \textcolor{keyword}{associated}(doc))) \textcolor{keywordflow}{return}
324   \textcolor{keyword}{call }open\_doc\_file(doc)
325 
326   \textcolor{keywordflow}{if} (doc%filesAreOpen) \textcolor{keywordflow}{then}
327     valstring = trim(real\_array\_string(vals(:)))
328 
329     mesg = define\_string(doc, varname, valstring, units)
330 
331     equalsdefault = .false.
332     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(default)) \textcolor{keywordflow}{then}
333       equalsdefault = .true.
334       \textcolor{keywordflow}{do} i=1,\textcolor{keyword}{size}(vals) ; \textcolor{keywordflow}{if} (vals(i) /= default) equalsdefault = .false. ;\textcolor{keywordflow}{ enddo}
335       mesg = trim(mesg)//\textcolor{stringliteral}{" default = "}//trim(real\_string(default))
336 \textcolor{keywordflow}{    endif}
337     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(like\_default)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (like\_default) equalsdefault = .true. ;\textcolor{keywordflow}{ endif}
338 
339     \textcolor{keywordflow}{if} (mesghasbeendocumented(doc, varname, mesg)) \textcolor{keywordflow}{return} \textcolor{comment}{! Avoid duplicates}
340     \textcolor{keyword}{call }writemessageanddesc(doc, mesg, desc, equalsdefault, debuggingparam=debuggingparam)
341 \textcolor{keywordflow}{  endif}
342 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__document_ac67a8062c94b2c2c734b6cb1bf0410a6}\label{namespacemom__document_ac67a8062c94b2c2c734b6cb1bf0410a6}} 
\index{mom\+\_\+document@{mom\+\_\+document}!doc\+\_\+param\+\_\+time@{doc\+\_\+param\+\_\+time}}
\index{doc\+\_\+param\+\_\+time@{doc\+\_\+param\+\_\+time}!mom\+\_\+document@{mom\+\_\+document}}
\subsubsection{\texorpdfstring{doc\+\_\+param\+\_\+time()}{doc\_param\_time()}}
{\footnotesize\ttfamily subroutine mom\+\_\+document\+::doc\+\_\+param\+\_\+time (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__document_1_1doc__type}{doc\+\_\+type}}), pointer}]{doc,  }\item[{character(len=$\ast$), intent(in)}]{varname,  }\item[{character(len=$\ast$), intent(in)}]{desc,  }\item[{type(time\+\_\+type), intent(in)}]{val,  }\item[{type(time\+\_\+type), intent(in), optional}]{default,  }\item[{character(len=$\ast$), intent(in), optional}]{units,  }\item[{logical, intent(in), optional}]{debugging\+Param,  }\item[{logical, intent(in), optional}]{like\+\_\+default }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine handles parameter documentation for time-\/type variables. 


\begin{DoxyParams}[1]{Parameters}
 & {\em doc} & A pointer to a structure that controls where the documentation occurs and its formatting\\
\hline
\mbox{\tt in}  & {\em varname} & The name of the parameter being documented\\
\hline
\mbox{\tt in}  & {\em desc} & A description of the parameter being documented\\
\hline
\mbox{\tt in}  & {\em val} & The value of the parameter\\
\hline
\mbox{\tt in}  & {\em default} & The default value of this parameter\\
\hline
\mbox{\tt in}  & {\em units} & The units of the parameter being documented\\
\hline
\mbox{\tt in}  & {\em debuggingparam} & If present and true, this is a debugging parameter.\\
\hline
\mbox{\tt in}  & {\em like\+\_\+default} & If present and true, log this parameter as though it has the default value, even if there is no default. \\
\hline
\end{DoxyParams}


Definition at line 437 of file M\+O\+M\+\_\+document.\+F90.


\begin{DoxyCode}
437   \textcolor{keywordtype}{type}(doc\_type),   \textcolor{keywordtype}{pointer}    :: doc\textcolor{comment}{     !< A pointer to a structure that controls where the}
438 \textcolor{comment}{                                          !! documentation occurs and its formatting}
439   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: varname\textcolor{comment}{ !< The name of the parameter being documented}
440   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: desc\textcolor{comment}{    !< A description of the parameter being documented}
441   \textcolor{keywordtype}{type}(time\_type),  \textcolor{keywordtype}{intent(in)} :: val\textcolor{comment}{     !< The value of the parameter}
442   \textcolor{keywordtype}{type}(time\_type),  \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: default\textcolor{comment}{ !< The default value of this parameter}
443   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: units\textcolor{comment}{   !< The units of the parameter being documented}
444   \textcolor{keywordtype}{logical},          \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: debuggingParam\textcolor{comment}{ !< If present and true, this is a debugging
       parameter.}
445   \textcolor{keywordtype}{logical},          \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: like\_default\textcolor{comment}{ !< If present and true, log this parameter as
       though}
446 \textcolor{comment}{                                             !! it has the default value, even if there is no default.}
447 
448   \textcolor{comment}{! Local varables}
449   \textcolor{keywordtype}{character(len=mLen)}              :: mesg          \textcolor{comment}{! The output message}
450   \textcolor{keywordtype}{character(len=doc%commentColumn)} :: valstring     \textcolor{comment}{! A string with the formatted value.}
451   \textcolor{keywordtype}{logical}                          :: equalsDefault \textcolor{comment}{! True if val = default.}
452 
453   \textcolor{keywordflow}{if} (.not. (is\_root\_pe() .and. \textcolor{keyword}{associated}(doc))) \textcolor{keywordflow}{return}
454   \textcolor{keyword}{call }open\_doc\_file(doc)
455 
456   \textcolor{keywordflow}{if} (doc%filesAreOpen) \textcolor{keywordflow}{then}
457     valstring = time\_string(val)
458     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(units)) \textcolor{keywordflow}{then}
459       mesg = define\_string(doc, varname, valstring, units)
460     \textcolor{keywordflow}{else}
461       mesg = define\_string(doc, varname, valstring, \textcolor{stringliteral}{"[days : seconds]"})
462 \textcolor{keywordflow}{    endif}
463 
464     equalsdefault = .false.
465     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(like\_default)) equalsdefault = like\_default
466     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(default)) \textcolor{keywordflow}{then}
467       \textcolor{keywordflow}{if} (val == default) equalsdefault = .true.
468       mesg = trim(mesg)//\textcolor{stringliteral}{" default = "}//trim(time\_string(default))
469 \textcolor{keywordflow}{    endif}
470 
471     \textcolor{keywordflow}{if} (mesghasbeendocumented(doc, varname, mesg)) \textcolor{keywordflow}{return} \textcolor{comment}{! Avoid duplicates}
472     \textcolor{keyword}{call }writemessageanddesc(doc, mesg, desc, equalsdefault, debuggingparam=debuggingparam)
473 \textcolor{keywordflow}{  endif}
474 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__document_ab7020ae92729a51ce8915cd1f080bb14}\label{namespacemom__document_ab7020ae92729a51ce8915cd1f080bb14}} 
\index{mom\+\_\+document@{mom\+\_\+document}!doc\+\_\+subroutine@{doc\+\_\+subroutine}}
\index{doc\+\_\+subroutine@{doc\+\_\+subroutine}!mom\+\_\+document@{mom\+\_\+document}}
\subsubsection{\texorpdfstring{doc\+\_\+subroutine()}{doc\_subroutine()}}
{\footnotesize\ttfamily subroutine, public mom\+\_\+document\+::doc\+\_\+subroutine (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__document_1_1doc__type}{doc\+\_\+type}}), pointer}]{doc,  }\item[{character(len=$\ast$), intent(in)}]{modname,  }\item[{character(len=$\ast$), intent(in)}]{subname,  }\item[{character(len=$\ast$), intent(in)}]{desc }\end{DoxyParamCaption})}



This subroutine handles the subroutine documentation. 


\begin{DoxyParams}[1]{Parameters}
 & {\em doc} & A pointer to a structure that controls where the documentation occurs and its formatting\\
\hline
\mbox{\tt in}  & {\em modname} & The name of the module being documented\\
\hline
\mbox{\tt in}  & {\em subname} & The name of the subroutine being documented\\
\hline
\mbox{\tt in}  & {\em desc} & A description of the subroutine being documented \\
\hline
\end{DoxyParams}


Definition at line 825 of file M\+O\+M\+\_\+document.\+F90.


\begin{DoxyCode}
825   \textcolor{keywordtype}{type}(doc\_type),   \textcolor{keywordtype}{pointer}    :: doc\textcolor{comment}{     !< A pointer to a structure that controls where the}
826 \textcolor{comment}{                                          !! documentation occurs and its formatting}
827   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: modname\textcolor{comment}{ !< The name of the module being documented}
828   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: subname\textcolor{comment}{ !< The name of the subroutine being documented}
829   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: desc\textcolor{comment}{    !< A description of the subroutine being documented}
830 \textcolor{comment}{! This subroutine handles the subroutine documentation}
831   \textcolor{keywordflow}{if} (.not. (is\_root\_pe() .and. \textcolor{keyword}{associated}(doc))) \textcolor{keywordflow}{return}
832   \textcolor{keyword}{call }open\_doc\_file(doc)
833 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__document_a546c1393f07adc49a43fe5f6af171730}\label{namespacemom__document_a546c1393f07adc49a43fe5f6af171730}} 
\index{mom\+\_\+document@{mom\+\_\+document}!int\+\_\+string@{int\+\_\+string}}
\index{int\+\_\+string@{int\+\_\+string}!mom\+\_\+document@{mom\+\_\+document}}
\subsubsection{\texorpdfstring{int\+\_\+string()}{int\_string()}}
{\footnotesize\ttfamily character(len=24) function mom\+\_\+document\+::int\+\_\+string (\begin{DoxyParamCaption}\item[{integer, intent(in)}]{val }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This function returns a string with an integer formatted like \textquotesingle{}(I)\textquotesingle{}. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em val} & The value being written into a string \\
\hline
\end{DoxyParams}


Definition at line 722 of file M\+O\+M\+\_\+document.\+F90.


\begin{DoxyCode}
722   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}  :: val\textcolor{comment}{ !< The value being written into a string}
723   \textcolor{keywordtype}{character(len=24)}    :: int\_string
724 \textcolor{comment}{! This function returns a string with an integer formatted like '(I)'}
725   \textcolor{keyword}{write}(int\_string, \textcolor{stringliteral}{'(i24)'}) val
726   int\_string = adjustl(int\_string)
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__document_ae07562199e60bbfec5ddda1281d422f2}\label{namespacemom__document_ae07562199e60bbfec5ddda1281d422f2}} 
\index{mom\+\_\+document@{mom\+\_\+document}!logical\+\_\+string@{logical\+\_\+string}}
\index{logical\+\_\+string@{logical\+\_\+string}!mom\+\_\+document@{mom\+\_\+document}}
\subsubsection{\texorpdfstring{logical\+\_\+string()}{logical\_string()}}
{\footnotesize\ttfamily character(len=24) function mom\+\_\+document\+::logical\+\_\+string (\begin{DoxyParamCaption}\item[{logical, intent(in)}]{val }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This function returns a string with an logical formatted like \textquotesingle{}(L)\textquotesingle{}. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em val} & The value being written into a string \\
\hline
\end{DoxyParams}


Definition at line 731 of file M\+O\+M\+\_\+document.\+F90.


\begin{DoxyCode}
731   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}  :: val\textcolor{comment}{ !< The value being written into a string}
732   \textcolor{keywordtype}{character(len=24)}    :: logical\_string
733 \textcolor{comment}{! This function returns a string with an logical formatted like '(L)'}
734   \textcolor{keyword}{write}(logical\_string, \textcolor{stringliteral}{'(l24)'}) val
735   logical\_string = adjustl(logical\_string)
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__document_aa23ed2e58e74e88a71de374685ee11ec}\label{namespacemom__document_aa23ed2e58e74e88a71de374685ee11ec}} 
\index{mom\+\_\+document@{mom\+\_\+document}!mesghasbeendocumented@{mesghasbeendocumented}}
\index{mesghasbeendocumented@{mesghasbeendocumented}!mom\+\_\+document@{mom\+\_\+document}}
\subsubsection{\texorpdfstring{mesghasbeendocumented()}{mesghasbeendocumented()}}
{\footnotesize\ttfamily logical function mom\+\_\+document\+::mesghasbeendocumented (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__document_1_1doc__type}{doc\+\_\+type}}), pointer}]{doc,  }\item[{character(len=$\ast$), intent(in)}]{var\+Name,  }\item[{character(len=$\ast$), intent(in)}]{mesg }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Returns true if documentation has already been written. 


\begin{DoxyParams}[1]{Parameters}
 & {\em doc} & A pointer to a structure that controls where the documentation occurs and its formatting\\
\hline
\mbox{\tt in}  & {\em varname} & The name of the parameter being documented\\
\hline
\mbox{\tt in}  & {\em mesg} & A message with parameter values, defaults, and descriptions to compare with the message that was written previously \\
\hline
\end{DoxyParams}


Definition at line 1035 of file M\+O\+M\+\_\+document.\+F90.


\begin{DoxyCode}
1035   \textcolor{keywordtype}{type}(doc\_type),   \textcolor{keywordtype}{pointer}     :: doc\textcolor{comment}{  !< A pointer to a structure that controls where the}
1036 \textcolor{comment}{                                        !! documentation occurs and its formatting}
1037   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)}  :: varName\textcolor{comment}{ !< The name of the parameter being documented}
1038   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)}  :: mesg\textcolor{comment}{ !< A message with parameter values, defaults, and descriptions}
1039 \textcolor{comment}{                                        !! to compare with the message that was written previously}
1040   \textcolor{keywordtype}{logical}                       :: mesgHasBeenDocumented
1041 \textcolor{comment}{! Returns true if documentation has already been written}
1042   \textcolor{keywordtype}{type}(link\_msg), \textcolor{keywordtype}{pointer} :: newLink => null(), this => null(), last => null()
1043 
1044   mesghasbeendocumented = .false.
1045 
1046 \textcolor{comment}{!!if (mesg(1:1) == '!') return ! Ignore commented parameters}
1047 
1048   \textcolor{comment}{! Search through list for this parameter}
1049   last => null()
1050   this => doc%chain\_msg
1051   \textcolor{keywordflow}{do} \textcolor{keywordflow}{while}( \textcolor{keyword}{associated}(this) )
1052     \textcolor{keywordflow}{if} (trim(doc%blockPrefix)//trim(varname) == trim(this%name)) \textcolor{keywordflow}{then}
1053       mesghasbeendocumented = .true.
1054       \textcolor{keywordflow}{if} (trim(mesg) == trim(this%msg)) \textcolor{keywordflow}{return}
1055       \textcolor{comment}{! If we fail the above test then cause an error}
1056       \textcolor{keywordflow}{if} (mesg(1:1) == \textcolor{stringliteral}{'!'}) \textcolor{keywordflow}{return} \textcolor{comment}{! Do not cause error for commented parameters}
1057       \textcolor{keyword}{call }mom\_error(warning, \textcolor{stringliteral}{"Previous msg:"}//trim(this%msg))
1058       \textcolor{keyword}{call }mom\_error(warning, \textcolor{stringliteral}{"New message :"}//trim(mesg))
1059       \textcolor{keyword}{call }mom\_error(warning, \textcolor{stringliteral}{"Encountered inconsistent documentation line for parameter "}&
1060                      //trim(varname)//\textcolor{stringliteral}{"!"})
1061 \textcolor{keywordflow}{    endif}
1062     last => this
1063     this => this%next
1064 \textcolor{keywordflow}{  enddo}
1065 
1066   \textcolor{comment}{! Allocate a new link}
1067   \textcolor{keyword}{allocate}(newlink)
1068   newlink%name = trim(doc%blockPrefix)//trim(varname)
1069   newlink%msg = trim(mesg)
1070   newlink%next => null()
1071   \textcolor{keywordflow}{if} (.not. \textcolor{keyword}{associated}(doc%chain\_msg)) \textcolor{keywordflow}{then}
1072     doc%chain\_msg => newlink
1073   \textcolor{keywordflow}{else}
1074     \textcolor{keywordflow}{if} (.not. \textcolor{keyword}{associated}(last)) \textcolor{keyword}{call }mom\_error(fatal, &
1075          \textcolor{stringliteral}{"Unassociated LINK in mesgHasBeenDocumented: "}//trim(mesg))
1076     last%next => newlink
1077 \textcolor{keywordflow}{  endif}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__document_aab976b6c6c9c01833438d217fca228a4}\label{namespacemom__document_aab976b6c6c9c01833438d217fca228a4}} 
\index{mom\+\_\+document@{mom\+\_\+document}!open\+\_\+doc\+\_\+file@{open\+\_\+doc\+\_\+file}}
\index{open\+\_\+doc\+\_\+file@{open\+\_\+doc\+\_\+file}!mom\+\_\+document@{mom\+\_\+document}}
\subsubsection{\texorpdfstring{open\+\_\+doc\+\_\+file()}{open\_doc\_file()}}
{\footnotesize\ttfamily subroutine mom\+\_\+document\+::open\+\_\+doc\+\_\+file (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__document_1_1doc__type}{doc\+\_\+type}}), pointer}]{doc }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [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. 


\begin{DoxyParams}{Parameters}
{\em doc} & A pointer to a structure that controls where the documentation occurs and its formatting \\
\hline
\end{DoxyParams}


Definition at line 882 of file M\+O\+M\+\_\+document.\+F90.


\begin{DoxyCode}
882   \textcolor{keywordtype}{type}(doc\_type), \textcolor{keywordtype}{pointer} :: doc\textcolor{comment}{ !< A pointer to a structure that controls where the}
883 \textcolor{comment}{                                 !! documentation occurs and its formatting}
884 
885   \textcolor{keywordtype}{logical} :: opened, new\_file
886   \textcolor{keywordtype}{integer} :: ios
887   \textcolor{keywordtype}{character(len=240)} :: fileName
888 
889   \textcolor{keywordflow}{if} (.not. (is\_root\_pe() .and. \textcolor{keyword}{associated}(doc))) \textcolor{keywordflow}{return}
890 
891   \textcolor{keywordflow}{if} ((len\_trim(doc%docFileBase) > 0) .and. doc%complete .and. (doc%unitAll<0)) \textcolor{keywordflow}{then}
892     new\_file = .true. ; \textcolor{keywordflow}{if} (doc%unitAll /= -1) new\_file = .false.
893     doc%unitAll = find\_unused\_unit\_number()
894 
895     \textcolor{keyword}{write}(filename(1:240),\textcolor{stringliteral}{'(a)'}) trim(doc%docFileBase)//\textcolor{stringliteral}{'.all'}
896     \textcolor{keywordflow}{if} (new\_file) \textcolor{keywordflow}{then}
897       \textcolor{keyword}{open}(doc%unitAll, file=trim(filename), access=\textcolor{stringliteral}{'SEQUENTIAL'}, form=\textcolor{stringliteral}{'FORMATTED'}, &
898            action=\textcolor{stringliteral}{'WRITE'}, status=\textcolor{stringliteral}{'REPLACE'}, iostat=ios)
899       \textcolor{keyword}{write}(doc%unitAll, \textcolor{stringliteral}{'(a)'}) &
900        \textcolor{stringliteral}{'! This file was written by the model and records all non-layout '}//&
901        \textcolor{stringliteral}{'or debugging parameters used at run-time.'}
902     \textcolor{keywordflow}{else} \textcolor{comment}{! This file is being reopened, and should be appended.}
903       \textcolor{keyword}{open}(doc%unitAll, file=trim(filename), access=\textcolor{stringliteral}{'SEQUENTIAL'}, form=\textcolor{stringliteral}{'FORMATTED'}, &
904            action=\textcolor{stringliteral}{'WRITE'}, status=\textcolor{stringliteral}{'OLD'}, position=\textcolor{stringliteral}{'APPEND'}, iostat=ios)
905 \textcolor{keywordflow}{    endif}
906     \textcolor{keyword}{inquire}(doc%unitAll, opened=opened)
907     \textcolor{keywordflow}{if} ((.not.opened) .or. (ios /= 0)) \textcolor{keywordflow}{then}
908       \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"Failed to open doc file "}//trim(filename)//\textcolor{stringliteral}{"."})
909 \textcolor{keywordflow}{    endif}
910     doc%filesAreOpen = .true.
911 \textcolor{keywordflow}{  endif}
912 
913   \textcolor{keywordflow}{if} ((len\_trim(doc%docFileBase) > 0) .and. doc%minimal .and. (doc%unitShort<0)) \textcolor{keywordflow}{then}
914     new\_file = .true. ; \textcolor{keywordflow}{if} (doc%unitShort /= -1) new\_file = .false.
915     doc%unitShort = find\_unused\_unit\_number()
916 
917     \textcolor{keyword}{write}(filename(1:240),\textcolor{stringliteral}{'(a)'}) trim(doc%docFileBase)//\textcolor{stringliteral}{'.short'}
918     \textcolor{keywordflow}{if} (new\_file) \textcolor{keywordflow}{then}
919       \textcolor{keyword}{open}(doc%unitShort, file=trim(filename), access=\textcolor{stringliteral}{'SEQUENTIAL'}, form=\textcolor{stringliteral}{'FORMATTED'}, &
920            action=\textcolor{stringliteral}{'WRITE'}, status=\textcolor{stringliteral}{'REPLACE'}, iostat=ios)
921       \textcolor{keyword}{write}(doc%unitShort, \textcolor{stringliteral}{'(a)'}) &
922        \textcolor{stringliteral}{'! This file was written by the model and records the non-default parameters used at run-time.'}
923     \textcolor{keywordflow}{else} \textcolor{comment}{! This file is being reopened, and should be appended.}
924       \textcolor{keyword}{open}(doc%unitShort, file=trim(filename), access=\textcolor{stringliteral}{'SEQUENTIAL'}, form=\textcolor{stringliteral}{'FORMATTED'}, &
925            action=\textcolor{stringliteral}{'WRITE'}, status=\textcolor{stringliteral}{'OLD'}, position=\textcolor{stringliteral}{'APPEND'}, iostat=ios)
926 \textcolor{keywordflow}{    endif}
927     \textcolor{keyword}{inquire}(doc%unitShort, opened=opened)
928     \textcolor{keywordflow}{if} ((.not.opened) .or. (ios /= 0)) \textcolor{keywordflow}{then}
929       \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"Failed to open doc file "}//trim(filename)//\textcolor{stringliteral}{"."})
930 \textcolor{keywordflow}{    endif}
931     doc%filesAreOpen = .true.
932 \textcolor{keywordflow}{  endif}
933 
934   \textcolor{keywordflow}{if} ((len\_trim(doc%docFileBase) > 0) .and. doc%layout .and. (doc%unitLayout<0)) \textcolor{keywordflow}{then}
935     new\_file = .true. ; \textcolor{keywordflow}{if} (doc%unitLayout /= -1) new\_file = .false.
936     doc%unitLayout = find\_unused\_unit\_number()
937 
938     \textcolor{keyword}{write}(filename(1:240),\textcolor{stringliteral}{'(a)'}) trim(doc%docFileBase)//\textcolor{stringliteral}{'.layout'}
939     \textcolor{keywordflow}{if} (new\_file) \textcolor{keywordflow}{then}
940       \textcolor{keyword}{open}(doc%unitLayout, file=trim(filename), access=\textcolor{stringliteral}{'SEQUENTIAL'}, form=\textcolor{stringliteral}{'FORMATTED'}, &
941            action=\textcolor{stringliteral}{'WRITE'}, status=\textcolor{stringliteral}{'REPLACE'}, iostat=ios)
942       \textcolor{keyword}{write}(doc%unitLayout, \textcolor{stringliteral}{'(a)'}) &
943        \textcolor{stringliteral}{'! This file was written by the model and records the layout parameters used at run-time.'}
944     \textcolor{keywordflow}{else} \textcolor{comment}{! This file is being reopened, and should be appended.}
945       \textcolor{keyword}{open}(doc%unitLayout, file=trim(filename), access=\textcolor{stringliteral}{'SEQUENTIAL'}, form=\textcolor{stringliteral}{'FORMATTED'}, &
946            action=\textcolor{stringliteral}{'WRITE'}, status=\textcolor{stringliteral}{'OLD'}, position=\textcolor{stringliteral}{'APPEND'}, iostat=ios)
947 \textcolor{keywordflow}{    endif}
948     \textcolor{keyword}{inquire}(doc%unitLayout, opened=opened)
949     \textcolor{keywordflow}{if} ((.not.opened) .or. (ios /= 0)) \textcolor{keywordflow}{then}
950       \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"Failed to open doc file "}//trim(filename)//\textcolor{stringliteral}{"."})
951 \textcolor{keywordflow}{    endif}
952     doc%filesAreOpen = .true.
953 \textcolor{keywordflow}{  endif}
954 
955   \textcolor{keywordflow}{if} ((len\_trim(doc%docFileBase) > 0) .and. doc%debugging .and. (doc%unitDebugging<0)) \textcolor{keywordflow}{then}
956     new\_file = .true. ; \textcolor{keywordflow}{if} (doc%unitDebugging /= -1) new\_file = .false.
957     doc%unitDebugging = find\_unused\_unit\_number()
958 
959     \textcolor{keyword}{write}(filename(1:240),\textcolor{stringliteral}{'(a)'}) trim(doc%docFileBase)//\textcolor{stringliteral}{'.debugging'}
960     \textcolor{keywordflow}{if} (new\_file) \textcolor{keywordflow}{then}
961       \textcolor{keyword}{open}(doc%unitDebugging, file=trim(filename), access=\textcolor{stringliteral}{'SEQUENTIAL'}, form=\textcolor{stringliteral}{'FORMATTED'}, &
962            action=\textcolor{stringliteral}{'WRITE'}, status=\textcolor{stringliteral}{'REPLACE'}, iostat=ios)
963       \textcolor{keyword}{write}(doc%unitDebugging, \textcolor{stringliteral}{'(a)'}) &
964        \textcolor{stringliteral}{'! This file was written by the model and records the debugging parameters used at run-time.'}
965     \textcolor{keywordflow}{else} \textcolor{comment}{! This file is being reopened, and should be appended.}
966       \textcolor{keyword}{open}(doc%unitDebugging, file=trim(filename), access=\textcolor{stringliteral}{'SEQUENTIAL'}, form=\textcolor{stringliteral}{'FORMATTED'}, &
967            action=\textcolor{stringliteral}{'WRITE'}, status=\textcolor{stringliteral}{'OLD'}, position=\textcolor{stringliteral}{'APPEND'}, iostat=ios)
968 \textcolor{keywordflow}{    endif}
969     \textcolor{keyword}{inquire}(doc%unitDebugging, opened=opened)
970     \textcolor{keywordflow}{if} ((.not.opened) .or. (ios /= 0)) \textcolor{keywordflow}{then}
971       \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"Failed to open doc file "}//trim(filename)//\textcolor{stringliteral}{"."})
972 \textcolor{keywordflow}{    endif}
973     doc%filesAreOpen = .true.
974 \textcolor{keywordflow}{  endif}
975 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__document_a436486f7289eafc7b4e8ba65812f3459}\label{namespacemom__document_a436486f7289eafc7b4e8ba65812f3459}} 
\index{mom\+\_\+document@{mom\+\_\+document}!real\+\_\+array\+\_\+string@{real\+\_\+array\+\_\+string}}
\index{real\+\_\+array\+\_\+string@{real\+\_\+array\+\_\+string}!mom\+\_\+document@{mom\+\_\+document}}
\subsubsection{\texorpdfstring{real\+\_\+array\+\_\+string()}{real\_array\_string()}}
{\footnotesize\ttfamily character(len=1320) function mom\+\_\+document\+::real\+\_\+array\+\_\+string (\begin{DoxyParamCaption}\item[{real, dimension(\+:), intent(in)}]{vals,  }\item[{character(len=$\ast$), intent(in), optional}]{sep }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Returns a character string of a comma-\/separated, compact formatted, reals e.\+g. \char`\"{}1., 2., 5$\ast$3., 5.\+E2\char`\"{}, that give the list of values. 

\begin{DoxyReturn}{Returns}
The output string listing vals
\end{DoxyReturn}

\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em vals} & The array of values to record\\
\hline
\mbox{\tt in}  & {\em sep} & The separator between successive values, \\
\hline
\end{DoxyParams}


Definition at line 664 of file M\+O\+M\+\_\+document.\+F90.


\begin{DoxyCode}
664   \textcolor{keywordtype}{character(len=1320)}    :: real\_array\_string\textcolor{comment}{ !< The output string listing vals}
665   \textcolor{keywordtype}{real},      \textcolor{keywordtype}{intent(in)}  :: vals(:)\textcolor{comment}{ !< The array of values to record}
666   \textcolor{keywordtype}{character(len=*)}, &
667     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: sep\textcolor{comment}{     !< The separator between successive values,}
668 \textcolor{comment}{                                    !! by default it is ', '.}
669 \textcolor{comment}{! Returns a character string of a comma-separated, compact formatted, reals}
670 \textcolor{comment}{! e.g. "1., 2., 5*3., 5.E2"}
671   \textcolor{comment}{! Local variables}
672   \textcolor{keywordtype}{integer} :: j, n, b, ns
673   \textcolor{keywordtype}{logical} :: doWrite
674   \textcolor{keywordtype}{character(len=10)} :: separator
675   n=1 ; dowrite=.true. ; real\_array\_string=\textcolor{stringliteral}{''} ; b=1
676   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(sep)) \textcolor{keywordflow}{then}
677     separator=sep ; ns=len(sep)
678   \textcolor{keywordflow}{else}
679     separator=\textcolor{stringliteral}{', '} ; ns=2
680 \textcolor{keywordflow}{  endif}
681   \textcolor{keywordflow}{do} j=1,\textcolor{keyword}{size}(vals)
682     dowrite=.true.
683     \textcolor{keywordflow}{if} (j<\textcolor{keyword}{size}(vals)) \textcolor{keywordflow}{then}
684       \textcolor{keywordflow}{if} (vals(j)==vals(j+1)) \textcolor{keywordflow}{then}
685         n=n+1
686         dowrite=.false.
687 \textcolor{keywordflow}{      endif}
688 \textcolor{keywordflow}{    endif}
689     \textcolor{keywordflow}{if} (dowrite) \textcolor{keywordflow}{then}
690       \textcolor{keywordflow}{if} (b>1) \textcolor{keywordflow}{then} \textcolor{comment}{! Write separator if a number has already been written}
691         \textcolor{keyword}{write}(real\_array\_string(b:),\textcolor{stringliteral}{'(A)'}) separator
692         b=b+ns
693 \textcolor{keywordflow}{      endif}
694       \textcolor{keywordflow}{if} (n>1) \textcolor{keywordflow}{then}
695         \textcolor{keyword}{write}(real\_array\_string(b:),\textcolor{stringliteral}{'(A,"*",A)'}) trim(int\_string(n)),trim(real\_string(vals(j)))
696       \textcolor{keywordflow}{else}
697         \textcolor{keyword}{write}(real\_array\_string(b:),\textcolor{stringliteral}{'(A)'}) trim(real\_string(vals(j)))
698 \textcolor{keywordflow}{      endif}
699       n=1 ; b=len\_trim(real\_array\_string)+1
700 \textcolor{keywordflow}{    endif}
701 \textcolor{keywordflow}{  enddo}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__document_a966b8926bf40ee436654a0048b2bf42a}\label{namespacemom__document_a966b8926bf40ee436654a0048b2bf42a}} 
\index{mom\+\_\+document@{mom\+\_\+document}!real\+\_\+string@{real\+\_\+string}}
\index{real\+\_\+string@{real\+\_\+string}!mom\+\_\+document@{mom\+\_\+document}}
\subsubsection{\texorpdfstring{real\+\_\+string()}{real\_string()}}
{\footnotesize\ttfamily character(len=32) function mom\+\_\+document\+::real\+\_\+string (\begin{DoxyParamCaption}\item[{real, intent(in)}]{val }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This function returns a string with a real formatted like \textquotesingle{}(G)\textquotesingle{}. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em val} & The value being written into a string \\
\hline
\end{DoxyParams}


Definition at line 611 of file M\+O\+M\+\_\+document.\+F90.


\begin{DoxyCode}
611   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}  :: val\textcolor{comment}{ !< The value being written into a string}
612   \textcolor{keywordtype}{character(len=32)} :: real\_string
613 \textcolor{comment}{! This function returns a string with a real formatted like '(G)'}
614   \textcolor{keywordtype}{integer} :: len, ind
615 
616   \textcolor{keywordflow}{if} ((abs(val) < 1.0e4) .and. (abs(val) >= 1.0e-3)) \textcolor{keywordflow}{then}
617     \textcolor{keyword}{write}(real\_string, \textcolor{stringliteral}{'(F30.11)'}) val
618     \textcolor{keywordflow}{if} (.not.testformattedfloatisreal(real\_string,val)) \textcolor{keywordflow}{then}
619       \textcolor{keyword}{write}(real\_string, \textcolor{stringliteral}{'(F30.12)'}) val
620       \textcolor{keywordflow}{if} (.not.testformattedfloatisreal(real\_string,val)) \textcolor{keywordflow}{then}
621         \textcolor{keyword}{write}(real\_string, \textcolor{stringliteral}{'(F30.13)'}) val
622         \textcolor{keywordflow}{if} (.not.testformattedfloatisreal(real\_string,val)) \textcolor{keywordflow}{then}
623           \textcolor{keyword}{write}(real\_string, \textcolor{stringliteral}{'(F30.14)'}) val
624           \textcolor{keywordflow}{if} (.not.testformattedfloatisreal(real\_string,val)) \textcolor{keywordflow}{then}
625             \textcolor{keyword}{write}(real\_string, \textcolor{stringliteral}{'(F30.15)'}) val
626             \textcolor{keywordflow}{if} (.not.testformattedfloatisreal(real\_string,val)) \textcolor{keywordflow}{then}
627               \textcolor{keyword}{write}(real\_string, \textcolor{stringliteral}{'(F30.16)'}) val
628 \textcolor{keywordflow}{            endif}
629 \textcolor{keywordflow}{          endif}
630 \textcolor{keywordflow}{        endif}
631 \textcolor{keywordflow}{      endif}
632 \textcolor{keywordflow}{    endif}
633     \textcolor{keywordflow}{do}
634       len = len\_trim(real\_string)
635       \textcolor{keywordflow}{if} ((len<2) .or. (real\_string(len-1:len) == \textcolor{stringliteral}{".0"}) .or. &
636           (real\_string(len:len) /= \textcolor{stringliteral}{"0"})) \textcolor{keywordflow}{exit}
637       real\_string(len:len) = \textcolor{stringliteral}{" "}
638 \textcolor{keywordflow}{    enddo}
639   \textcolor{keywordflow}{elseif} (val == 0.) \textcolor{keywordflow}{then}
640     real\_string = \textcolor{stringliteral}{"0.0"}
641   \textcolor{keywordflow}{else}
642     \textcolor{keywordflow}{if} ((abs(val) <= 1.0e-100) .or. (abs(val) >= 1.0e100)) \textcolor{keywordflow}{then}
643       \textcolor{keyword}{write}(real\_string(1:32), \textcolor{stringliteral}{'(ES24.14E3)'}) val
644       \textcolor{keywordflow}{if} (.not.testformattedfloatisreal(real\_string,val)) &
645         \textcolor{keyword}{write}(real\_string(1:32), \textcolor{stringliteral}{'(ES24.15E3)'}) val
646     \textcolor{keywordflow}{else}
647       \textcolor{keyword}{write}(real\_string(1:32), \textcolor{stringliteral}{'(ES23.14)'}) val
648       \textcolor{keywordflow}{if} (.not.testformattedfloatisreal(real\_string,val)) &
649         \textcolor{keyword}{write}(real\_string(1:32), \textcolor{stringliteral}{'(ES23.15)'}) val
650 \textcolor{keywordflow}{    endif}
651     \textcolor{keywordflow}{do}
652       ind = index(real\_string,\textcolor{stringliteral}{"0E"})
653       \textcolor{keywordflow}{if} (ind == 0) \textcolor{keywordflow}{exit}
654       \textcolor{keywordflow}{if} (real\_string(ind-1:ind-1) == \textcolor{stringliteral}{"."}) \textcolor{keywordflow}{exit}
655       real\_string = real\_string(1:ind-1)//real\_string(ind+1:)
656 \textcolor{keywordflow}{    enddo}
657 \textcolor{keywordflow}{  endif}
658   real\_string = adjustl(real\_string)
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__document_acbd7bf94c8e359a48ace95fe1f3d3bb4}\label{namespacemom__document_acbd7bf94c8e359a48ace95fe1f3d3bb4}} 
\index{mom\+\_\+document@{mom\+\_\+document}!testformattedfloatisreal@{testformattedfloatisreal}}
\index{testformattedfloatisreal@{testformattedfloatisreal}!mom\+\_\+document@{mom\+\_\+document}}
\subsubsection{\texorpdfstring{testformattedfloatisreal()}{testformattedfloatisreal()}}
{\footnotesize\ttfamily logical function mom\+\_\+document\+::testformattedfloatisreal (\begin{DoxyParamCaption}\item[{character(len=$\ast$), intent(in)}]{str,  }\item[{real, intent(in)}]{val }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This function tests whether a real value is encoded in a string. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em str} & The string that match val\\
\hline
\mbox{\tt in}  & {\em val} & The value being tested \\
\hline
\end{DoxyParams}


Definition at line 706 of file M\+O\+M\+\_\+document.\+F90.


\begin{DoxyCode}
706   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: str\textcolor{comment}{ !< The string that match val}
707   \textcolor{keywordtype}{real},             \textcolor{keywordtype}{intent(in)} :: val\textcolor{comment}{ !< The value being tested}
708   \textcolor{keywordtype}{logical}                      :: testFormattedFloatIsReal
709   \textcolor{comment}{! Local variables}
710   \textcolor{keywordtype}{real} :: scannedVal
711 
712   \textcolor{keyword}{read}(str(1:),*) scannedval
713   \textcolor{keywordflow}{if} (scannedval == val) \textcolor{keywordflow}{then}
714     testformattedfloatisreal=.true.
715   \textcolor{keywordflow}{else}
716     testformattedfloatisreal=.false.
717 \textcolor{keywordflow}{  endif}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__document_afeda3e207b871227792c25425697f1cb}\label{namespacemom__document_afeda3e207b871227792c25425697f1cb}} 
\index{mom\+\_\+document@{mom\+\_\+document}!time\+\_\+string@{time\+\_\+string}}
\index{time\+\_\+string@{time\+\_\+string}!mom\+\_\+document@{mom\+\_\+document}}
\subsubsection{\texorpdfstring{time\+\_\+string()}{time\_string()}}
{\footnotesize\ttfamily character(len=40) function mom\+\_\+document\+::time\+\_\+string (\begin{DoxyParamCaption}\item[{type(time\+\_\+type), intent(in)}]{time }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This function returns a string with a time type formatted as seconds (perhaps including a fractional number of seconds) and days. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em time} & The time type being translated \\
\hline
\end{DoxyParams}


Definition at line 592 of file M\+O\+M\+\_\+document.\+F90.


\begin{DoxyCode}
592   \textcolor{keywordtype}{type}(time\_type), \textcolor{keywordtype}{intent(in)} :: time\textcolor{comment}{ !< The time type being translated}
593   \textcolor{keywordtype}{character(len=40)} :: time\_string
594 
595   \textcolor{comment}{! Local variables}
596   \textcolor{keywordtype}{integer} :: secs, days, ticks, ticks\_per\_sec
597 
598   \textcolor{keyword}{call }get\_time(time, secs, days, ticks)
599 
600   time\_string = trim(adjustl(int\_string(days))) // \textcolor{stringliteral}{":"} // trim(adjustl(int\_string(secs)))
601   \textcolor{keywordflow}{if} (ticks /= 0) \textcolor{keywordflow}{then}
602     ticks\_per\_sec = get\_ticks\_per\_second()
603     time\_string = trim(time\_string) // \textcolor{stringliteral}{":"} // &
604                   trim(adjustl(int\_string(ticks)))//\textcolor{stringliteral}{"/"}//trim(adjustl(int\_string(ticks\_per\_sec)))
605 \textcolor{keywordflow}{  endif}
606 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__document_a9c86e696b2b0cda80be9ded5ca4a927f}\label{namespacemom__document_a9c86e696b2b0cda80be9ded5ca4a927f}} 
\index{mom\+\_\+document@{mom\+\_\+document}!undef\+\_\+string@{undef\+\_\+string}}
\index{undef\+\_\+string@{undef\+\_\+string}!mom\+\_\+document@{mom\+\_\+document}}
\subsubsection{\texorpdfstring{undef\+\_\+string()}{undef\_string()}}
{\footnotesize\ttfamily character(len=\mbox{\hyperlink{namespacemom__document_a5f935652127fa61a918565aa50c23d31}{mlen}}) function mom\+\_\+document\+::undef\+\_\+string (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__document_1_1doc__type}{doc\+\_\+type}}), pointer}]{doc,  }\item[{character(len=$\ast$), intent(in)}]{var\+Name,  }\item[{character(len=$\ast$), intent(in)}]{units }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This function returns a string for formatted false logicals. 


\begin{DoxyParams}[1]{Parameters}
 & {\em doc} & A pointer to a structure that controls where the documentation occurs and its formatting\\
\hline
\mbox{\tt in}  & {\em varname} & The name of the parameter being documented\\
\hline
\mbox{\tt in}  & {\em units} & The units of the parameter being documented \\
\hline
\end{DoxyParams}


Definition at line 761 of file M\+O\+M\+\_\+document.\+F90.


\begin{DoxyCode}
761   \textcolor{keywordtype}{type}(doc\_type),   \textcolor{keywordtype}{pointer}    :: doc\textcolor{comment}{     !< A pointer to a structure that controls where the}
762 \textcolor{comment}{                                          !! documentation occurs and its formatting}
763   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: varName\textcolor{comment}{ !< The name of the parameter being documented}
764   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: units\textcolor{comment}{   !< The units of the parameter being documented}
765   \textcolor{keywordtype}{character(len=mLen)} :: undef\_string
766 \textcolor{comment}{! This function returns a string for formatted false logicals}
767   \textcolor{keywordtype}{integer} :: numSpaces
768   undef\_string = repeat(\textcolor{stringliteral}{" "},240) \textcolor{comment}{! Blank everything for safety}
769   undef\_string = \textcolor{stringliteral}{"#undef "}//trim(varname)
770   \textcolor{keywordflow}{if} (doc%defineSyntax) \textcolor{keywordflow}{then}
771     undef\_string = \textcolor{stringliteral}{"#undef "}//trim(varname)
772   \textcolor{keywordflow}{else}
773     undef\_string = trim(varname)//\textcolor{stringliteral}{" = "}//string\_false
774 \textcolor{keywordflow}{  endif}
775   numspaces = max(1, doc%commentColumn - len\_trim(undef\_string) )
776   undef\_string = trim(undef\_string)//repeat(\textcolor{stringliteral}{" "},numspaces)//\textcolor{stringliteral}{"!"}
777   \textcolor{keywordflow}{if} (len\_trim(units) > 0) undef\_string = trim(undef\_string)//\textcolor{stringliteral}{"   ["}//trim(units)//\textcolor{stringliteral}{"]"}
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__document_a249e7992a57539508d07c71c6fcabaeb}\label{namespacemom__document_a249e7992a57539508d07c71c6fcabaeb}} 
\index{mom\+\_\+document@{mom\+\_\+document}!writemessageanddesc@{writemessageanddesc}}
\index{writemessageanddesc@{writemessageanddesc}!mom\+\_\+document@{mom\+\_\+document}}
\subsubsection{\texorpdfstring{writemessageanddesc()}{writemessageanddesc()}}
{\footnotesize\ttfamily subroutine mom\+\_\+document\+::writemessageanddesc (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__document_1_1doc__type}{doc\+\_\+type}}), intent(in)}]{doc,  }\item[{character(len=$\ast$), intent(in)}]{vmesg,  }\item[{character(len=$\ast$), intent(in)}]{desc,  }\item[{logical, intent(in), optional}]{value\+Was\+Default,  }\item[{integer, intent(in), optional}]{indent,  }\item[{logical, intent(in), optional}]{layout\+Param,  }\item[{logical, intent(in), optional}]{debugging\+Param }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine writes out the message and description to the documetation files. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em doc} & A pointer to a structure that controls where the documentation occurs and its formatting\\
\hline
\mbox{\tt in}  & {\em vmesg} & A message with the parameter name, units, and default value.\\
\hline
\mbox{\tt in}  & {\em desc} & A description of the parameter being documented\\
\hline
\mbox{\tt in}  & {\em valuewasdefault} & If true, this parameter has its default value\\
\hline
\mbox{\tt in}  & {\em indent} & An amount by which to indent this message\\
\hline
\mbox{\tt in}  & {\em layoutparam} & If present and true, this is a layout parameter.\\
\hline
\mbox{\tt in}  & {\em debuggingparam} & If present and true, this is a debugging parameter. \\
\hline
\end{DoxyParams}


Definition at line 480 of file M\+O\+M\+\_\+document.\+F90.


\begin{DoxyCode}
480   \textcolor{keywordtype}{type}(doc\_type),    \textcolor{keywordtype}{intent(in)} :: doc\textcolor{comment}{     !< A pointer to a structure that controls where the}
481 \textcolor{comment}{                                           !! documentation occurs and its formatting}
482   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: vmesg\textcolor{comment}{   !< A message with the parameter name, units, and default value.}
483   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: desc\textcolor{comment}{    !< A description of the parameter being documented}
484   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: valueWasDefault\textcolor{comment}{ !< If true, this parameter has its default value}
485   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: indent\textcolor{comment}{      !< An amount by which to indent this message}
486   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: layoutParam\textcolor{comment}{ !< If present and true, this is a layout parameter.}
487   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: debuggingParam\textcolor{comment}{ !< If present and true, this is a debugging parameter.}
488 
489   \textcolor{comment}{! Local variables}
490   \textcolor{keywordtype}{character(len=mLen)} :: mesg          \textcolor{comment}{! A full line of a message including indents.}
491   \textcolor{keywordtype}{character(len=mLen)} :: mesg\_text     \textcolor{comment}{! A line of message text without preliminary indents.}
492   \textcolor{keywordtype}{integer} :: start\_ind = 1             \textcolor{comment}{! The starting index in the description for the next line.}
493   \textcolor{keywordtype}{integer} :: nl\_ind, tab\_ind, end\_ind  \textcolor{comment}{! The indices of new-lines, tabs, and the end of a line.}
494   \textcolor{keywordtype}{integer} :: len\_text, len\_tab, len\_nl \textcolor{comment}{! The lengths of the text string, tabs and new-lines.}
495   \textcolor{keywordtype}{integer} :: len\_cor                   \textcolor{comment}{! The permitted length corrected for tab sizes in a line.}
496   \textcolor{keywordtype}{integer} :: len\_desc                  \textcolor{comment}{! The non-whitespace length of the description.}
497   \textcolor{keywordtype}{integer} :: substr\_start              \textcolor{comment}{! The starting index of a substring to search for tabs.}
498   \textcolor{keywordtype}{integer} :: indnt, msg\_pad            \textcolor{comment}{! Space counts used to format a message.}
499   \textcolor{keywordtype}{logical} :: msg\_done, reset\_msg\_pad   \textcolor{comment}{! Logicals used to format messages.}
500   \textcolor{keywordtype}{logical} :: all, short, layout, debug \textcolor{comment}{! Flags indicating which files to write into.}
501 
502   layout = .false. ; \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(layoutparam)) layout = layoutparam
503   debug = .false. ; \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(debuggingparam)) debug = debuggingparam
504   all = doc%complete .and. (doc%unitAll > 0) .and. .not. (layout .or. debug)
505   short = doc%minimal .and. (doc%unitShort > 0) .and. .not. (layout .or. debug)
506   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(valuewasdefault)) short = short .and. (.not. valuewasdefault)
507 
508   \textcolor{keywordflow}{if} (all) \textcolor{keyword}{write}(doc%unitAll, \textcolor{stringliteral}{'(a)'}) trim(vmesg)
509   \textcolor{keywordflow}{if} (short) \textcolor{keyword}{write}(doc%unitShort, \textcolor{stringliteral}{'(a)'}) trim(vmesg)
510   \textcolor{keywordflow}{if} (layout) \textcolor{keyword}{write}(doc%unitLayout, \textcolor{stringliteral}{'(a)'}) trim(vmesg)
511   \textcolor{keywordflow}{if} (debug) \textcolor{keyword}{write}(doc%unitDebugging, \textcolor{stringliteral}{'(a)'}) trim(vmesg)
512 
513   \textcolor{keywordflow}{if} (len\_trim(desc) == 0) \textcolor{keywordflow}{return}
514 
515   len\_tab = len\_trim(\textcolor{stringliteral}{"\_\(\backslash\)t\_"}) - 2
516   len\_nl = len\_trim(\textcolor{stringliteral}{"\_\(\backslash\)n\_"}) - 2
517 
518   indnt = doc%commentColumn ; \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(indent)) indnt = indent
519   len\_text = doc%max\_line\_len - (indnt + 2)
520   start\_ind = 1 ; msg\_pad = 0 ; msg\_done = .false.
521   \textcolor{keywordflow}{do}
522     \textcolor{keywordflow}{if} (len\_trim(desc(start\_ind:)) < 1) \textcolor{keywordflow}{exit}
523 
524     len\_cor = len\_text - msg\_pad
525 
526     substr\_start = start\_ind
527     len\_desc = len\_trim(desc)
528     \textcolor{keywordflow}{do} \textcolor{comment}{! Adjust the available line length for anomalies in the size of tabs, counting \(\backslash\)t as 2 spaces.}
529       \textcolor{keywordflow}{if} (substr\_start >= start\_ind+len\_cor) \textcolor{keywordflow}{exit}
530       tab\_ind = index(desc(substr\_start:min(len\_desc,start\_ind+len\_cor)), \textcolor{stringliteral}{"\(\backslash\)t"})
531       \textcolor{keywordflow}{if} (tab\_ind == 0) \textcolor{keywordflow}{exit}
532       substr\_start = substr\_start + tab\_ind
533       len\_cor = len\_cor + (len\_tab - 2)
534 \textcolor{keywordflow}{    enddo}
535 
536     nl\_ind = index(desc(start\_ind:), \textcolor{stringliteral}{"\(\backslash\)n"})
537 \textcolor{keyword}{    end}\_ind = 0
538     \textcolor{keywordflow}{if} ((nl\_ind > 0) .and. (len\_trim(desc(start\_ind:start\_ind+nl\_ind-2)) > len\_cor)) \textcolor{keywordflow}{then}
539       \textcolor{comment}{! This line is too long despite the new-line character.  Look for an earlier space to break.}
540 \textcolor{keyword}{      end}\_ind = scan(desc(start\_ind:start\_ind+len\_cor), \textcolor{stringliteral}{" "}, back=.true.) - 1
541       \textcolor{keywordflow}{if} (end\_ind > 0) nl\_ind = 0
542     \textcolor{keywordflow}{elseif} ((nl\_ind == 0) .and. (len\_trim(desc(start\_ind:)) > len\_cor)) \textcolor{keywordflow}{then}
543       \textcolor{comment}{! This line is too long and does not have a new-line character.  Look for a space to break.}
544 \textcolor{keyword}{      end}\_ind = scan(desc(start\_ind:start\_ind+len\_cor), \textcolor{stringliteral}{" "}, back=.true.) - 1
545 \textcolor{keywordflow}{    endif}
546 
547     reset\_msg\_pad = .false.
548     \textcolor{keywordflow}{if} (nl\_ind > 0) \textcolor{keywordflow}{then}
549       mesg\_text = trim(desc(start\_ind:start\_ind+nl\_ind-2))
550       start\_ind = start\_ind + nl\_ind + len\_nl - 1
551       reset\_msg\_pad = .true.
552     \textcolor{keywordflow}{elseif} (end\_ind > 0) \textcolor{keywordflow}{then}
553       mesg\_text = trim(desc(start\_ind:start\_ind+end\_ind))
554       start\_ind = start\_ind + end\_ind + 1
555       \textcolor{comment}{! Adjust the starting point to move past leading spaces.}
556       start\_ind = start\_ind + (len\_trim(desc(start\_ind:)) - len\_trim(adjustl(desc(start\_ind:))))
557     \textcolor{keywordflow}{else}
558       mesg\_text = trim(desc(start\_ind:))
559       msg\_done = .true.
560 \textcolor{keywordflow}{    endif}
561 
562     \textcolor{keywordflow}{do} ; tab\_ind = index(mesg\_text, \textcolor{stringliteral}{"\(\backslash\)t"}) \textcolor{comment}{! Replace \(\backslash\)t with 2 spaces.}
563       \textcolor{keywordflow}{if} (tab\_ind == 0) \textcolor{keywordflow}{exit}
564       mesg\_text(tab\_ind:) = \textcolor{stringliteral}{"  "}//trim(mesg\_text(tab\_ind+len\_tab:))
565 \textcolor{keywordflow}{    enddo}
566 
567     mesg = repeat(\textcolor{stringliteral}{" "},indnt)//\textcolor{stringliteral}{"! "}//repeat(\textcolor{stringliteral}{" "},msg\_pad)//trim(mesg\_text)
568 
569     \textcolor{keywordflow}{if} (reset\_msg\_pad) \textcolor{keywordflow}{then}
570       msg\_pad = 0
571     \textcolor{keywordflow}{elseif} (msg\_pad == 0) \textcolor{keywordflow}{then} \textcolor{comment}{! Indent continuation lines.}
572       msg\_pad = len\_trim(mesg\_text) - len\_trim(adjustl(mesg\_text))
573       \textcolor{comment}{! If already indented, indent an additional 2 spaces.}
574       \textcolor{keywordflow}{if} (msg\_pad >= 2) msg\_pad = msg\_pad + 2
575 \textcolor{keywordflow}{    endif}
576 
577     \textcolor{keywordflow}{if} (all) \textcolor{keyword}{write}(doc%unitAll, \textcolor{stringliteral}{'(a)'}) trim(mesg)
578     \textcolor{keywordflow}{if} (short) \textcolor{keyword}{write}(doc%unitShort, \textcolor{stringliteral}{'(a)'}) trim(mesg)
579     \textcolor{keywordflow}{if} (layout) \textcolor{keyword}{write}(doc%unitLayout, \textcolor{stringliteral}{'(a)'}) trim(mesg)
580     \textcolor{keywordflow}{if} (debug) \textcolor{keyword}{write}(doc%unitDebugging, \textcolor{stringliteral}{'(a)'}) trim(mesg)
581 
582     \textcolor{keywordflow}{if} (msg\_done) \textcolor{keywordflow}{exit}
583 \textcolor{keywordflow}{  enddo}
584 
\end{DoxyCode}
