\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{\texttt{ in}}  & {\em varname} & The name of the parameter being documented \\
\hline
\mbox{\texttt{ in}}  & {\em valstring} & A string containing the value of the parameter \\
\hline
\mbox{\texttt{ 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}{0}
\DoxyCodeLine{740   \textcolor{keywordtype}{type}(doc\_type),   \textcolor{keywordtype}{pointer}    :: doc\textcolor{comment}{     !< A pointer to a structure that controls where the}}
\DoxyCodeLine{741 \textcolor{comment}{                                          !! documentation occurs and its formatting}}
\DoxyCodeLine{742   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: varName\textcolor{comment}{ !< The name of the parameter being documented}}
\DoxyCodeLine{743   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: valString\textcolor{comment}{ !< A string containing the value of the parameter}}
\DoxyCodeLine{744   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: units\textcolor{comment}{   !< The units of the parameter being documented}}
\DoxyCodeLine{745   \textcolor{keywordtype}{character(len=mLen)} :: define\_string}
\DoxyCodeLine{746 \textcolor{comment}{! This function returns a string for formatted parameter assignment}}
\DoxyCodeLine{747   \textcolor{keywordtype}{integer} :: numSpaces}
\DoxyCodeLine{748   define\_string = repeat(\textcolor{stringliteral}{" "},mlen) \textcolor{comment}{! Blank everything for safety}}
\DoxyCodeLine{749   \textcolor{keywordflow}{if} (doc\%defineSyntax) \textcolor{keywordflow}{then}}
\DoxyCodeLine{750     define\_string = \textcolor{stringliteral}{"\#define "}//trim(varname)//\textcolor{stringliteral}{" "}//valstring}
\DoxyCodeLine{751   \textcolor{keywordflow}{else}}
\DoxyCodeLine{752     define\_string = trim(varname)//\textcolor{stringliteral}{" = "}//valstring}
\DoxyCodeLine{753 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{754   numspaces = max(1, doc\%commentColumn - len\_trim(define\_string) )}
\DoxyCodeLine{755   define\_string = trim(define\_string)//repeat(\textcolor{stringliteral}{" "},numspaces)//\textcolor{stringliteral}{"!"}}
\DoxyCodeLine{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{\texttt{ 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}{0}
\DoxyCodeLine{411   \textcolor{keywordtype}{type}(doc\_type),   \textcolor{keywordtype}{pointer}    :: doc\textcolor{comment}{ !< A pointer to a structure that controls where the}}
\DoxyCodeLine{412 \textcolor{comment}{                                      !! documentation occurs and its formatting}}
\DoxyCodeLine{413   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: blockName\textcolor{comment}{ !< The name of the parameter block being closed}}
\DoxyCodeLine{414 \textcolor{comment}{! This subroutine handles documentation for closing a parameter block.}}
\DoxyCodeLine{415   \textcolor{keywordtype}{character(len=mLen)} :: mesg}
\DoxyCodeLine{416   \textcolor{keywordtype}{character(len=doc\%commentColumn)} :: valstring}
\DoxyCodeLine{417   \textcolor{keywordtype}{integer} :: i}
\DoxyCodeLine{418 }
\DoxyCodeLine{419   \textcolor{keywordflow}{if} (.not. (is\_root\_pe() .and. \textcolor{keyword}{associated}(doc))) \textcolor{keywordflow}{return}}
\DoxyCodeLine{420   \textcolor{keyword}{call }open\_doc\_file(doc)}
\DoxyCodeLine{421 }
\DoxyCodeLine{422   \textcolor{keywordflow}{if} (doc\%filesAreOpen) \textcolor{keywordflow}{then}}
\DoxyCodeLine{423     mesg = \textcolor{stringliteral}{'\%'}//trim(blockname)}
\DoxyCodeLine{424 }
\DoxyCodeLine{425     \textcolor{keyword}{call }writemessageanddesc(doc, mesg, \textcolor{stringliteral}{''})}
\DoxyCodeLine{426 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{427   i = index(trim(doc\%blockPrefix), trim(blockname)//\textcolor{stringliteral}{'\%'}, .true.)}
\DoxyCodeLine{428   \textcolor{keywordflow}{if} (i>1) \textcolor{keywordflow}{then}}
\DoxyCodeLine{429     doc\%blockPrefix = trim(doc\%blockPrefix(1:i-1))}
\DoxyCodeLine{430   \textcolor{keywordflow}{else}}
\DoxyCodeLine{431     doc\%blockPrefix = \textcolor{stringliteral}{''}}
\DoxyCodeLine{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}{0}
\DoxyCodeLine{995   \textcolor{keywordtype}{type}(doc\_type), \textcolor{keywordtype}{pointer} :: doc\textcolor{comment}{ !< A pointer to a structure that controls where the}}
\DoxyCodeLine{996 \textcolor{comment}{                                 !! documentation occurs and its formatting}}
\DoxyCodeLine{997   \textcolor{keywordtype}{type}(link\_msg), \textcolor{keywordtype}{pointer} :: this => null(), next => null()}
\DoxyCodeLine{998 }
\DoxyCodeLine{999   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(doc)) \textcolor{keywordflow}{return}}
\DoxyCodeLine{1000 }
\DoxyCodeLine{1001   \textcolor{keywordflow}{if} (doc\%unitAll > 0) \textcolor{keywordflow}{then}}
\DoxyCodeLine{1002     \textcolor{keyword}{close}(doc\%unitAll)}
\DoxyCodeLine{1003     doc\%unitAll = -2}
\DoxyCodeLine{1004 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{1005 }
\DoxyCodeLine{1006   \textcolor{keywordflow}{if} (doc\%unitShort > 0) \textcolor{keywordflow}{then}}
\DoxyCodeLine{1007     \textcolor{keyword}{close}(doc\%unitShort)}
\DoxyCodeLine{1008     doc\%unitShort = -2}
\DoxyCodeLine{1009 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{1010 }
\DoxyCodeLine{1011   \textcolor{keywordflow}{if} (doc\%unitLayout > 0) \textcolor{keywordflow}{then}}
\DoxyCodeLine{1012     \textcolor{keyword}{close}(doc\%unitLayout)}
\DoxyCodeLine{1013     doc\%unitLayout = -2}
\DoxyCodeLine{1014 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{1015 }
\DoxyCodeLine{1016   \textcolor{keywordflow}{if} (doc\%unitDebugging > 0) \textcolor{keywordflow}{then}}
\DoxyCodeLine{1017     \textcolor{keyword}{close}(doc\%unitDebugging)}
\DoxyCodeLine{1018     doc\%unitDebugging = -2}
\DoxyCodeLine{1019 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{1020 }
\DoxyCodeLine{1021   doc\%filesAreOpen = .false.}
\DoxyCodeLine{1022 }
\DoxyCodeLine{1023   this => doc\%chain\_msg}
\DoxyCodeLine{1024   \textcolor{keywordflow}{do} \textcolor{keywordflow}{while}( \textcolor{keyword}{associated}(this) )}
\DoxyCodeLine{1025     next => this\%next}
\DoxyCodeLine{1026     \textcolor{keyword}{deallocate}(this)}
\DoxyCodeLine{1027     this => next}
\DoxyCodeLine{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{\texttt{ in}}  & {\em modname} & The name of the module being documented \\
\hline
\mbox{\texttt{ in}}  & {\em fnname} & The name of the function being documented \\
\hline
\mbox{\texttt{ 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}{0}
\DoxyCodeLine{838   \textcolor{keywordtype}{type}(doc\_type),   \textcolor{keywordtype}{pointer}    :: doc\textcolor{comment}{     !< A pointer to a structure that controls where the}}
\DoxyCodeLine{839 \textcolor{comment}{                                          !! documentation occurs and its formatting}}
\DoxyCodeLine{840   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: modname\textcolor{comment}{ !< The name of the module being documented}}
\DoxyCodeLine{841   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: fnname\textcolor{comment}{  !< The name of the function being documented}}
\DoxyCodeLine{842   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: desc\textcolor{comment}{    !< A description of the function being documented}}
\DoxyCodeLine{843 \textcolor{comment}{! This subroutine handles the function documentation}}
\DoxyCodeLine{844   \textcolor{keywordflow}{if} (.not. (is\_root\_pe() .and. \textcolor{keyword}{associated}(doc))) \textcolor{keywordflow}{return}}
\DoxyCodeLine{845   \textcolor{keyword}{call }open\_doc\_file(doc)}
\DoxyCodeLine{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{\texttt{ 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{\texttt{ 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{\texttt{ in}}  & {\em complete} & If present and true, write out the (.all) files documenting all parameters \\
\hline
\mbox{\texttt{ in}}  & {\em layout} & If present and true, write out the (.layout) files documenting the layout parameters \\
\hline
\mbox{\texttt{ 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}{0}
\DoxyCodeLine{853   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)}  :: docFileBase\textcolor{comment}{ !< The base file name for this set of parameters,}}
\DoxyCodeLine{854 \textcolor{comment}{                                             !! for example MOM\_parameter\_doc}}
\DoxyCodeLine{855   \textcolor{keywordtype}{type}(doc\_type),    \textcolor{keywordtype}{pointer}     :: doc\textcolor{comment}{      !< A pointer to a structure that controls where the}}
\DoxyCodeLine{856 \textcolor{comment}{                                             !! documentation occurs and its formatting}}
\DoxyCodeLine{857   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: minimal\textcolor{comment}{  !< If present and true, write out the files (.short) documenting}}
\DoxyCodeLine{858 \textcolor{comment}{                                             !! those parameters that do not take on their default values.}}
\DoxyCodeLine{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}}
\DoxyCodeLine{860 \textcolor{comment}{                                             !! parameters}}
\DoxyCodeLine{861   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: layout\textcolor{comment}{   !< If present and true, write out the (.layout) files documenting}}
\DoxyCodeLine{862 \textcolor{comment}{                                             !! the layout parameters}}
\DoxyCodeLine{863   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: debugging\textcolor{comment}{ !< If present and true, write out the (.debugging) files documenting}}
\DoxyCodeLine{864 \textcolor{comment}{                                             !! the debugging parameters}}
\DoxyCodeLine{865 }
\DoxyCodeLine{866   \textcolor{keywordflow}{if} (.not. \textcolor{keyword}{associated}(doc)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{867     \textcolor{keyword}{allocate}(doc)}
\DoxyCodeLine{868 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{869 }
\DoxyCodeLine{870   doc\%docFileBase = docfilebase}
\DoxyCodeLine{871   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(minimal)) doc\%minimal = minimal}
\DoxyCodeLine{872   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(complete)) doc\%complete = complete}
\DoxyCodeLine{873   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(layout)) doc\%layout = layout}
\DoxyCodeLine{874   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(debugging)) doc\%debugging = debugging}
\DoxyCodeLine{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{\texttt{ in}}  & {\em modname} & The name of the module being documented \\
\hline
\mbox{\texttt{ in}}  & {\em desc} & A description of the module being documented \\
\hline
\mbox{\texttt{ 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{\texttt{ in}}  & {\em all\+\_\+default} & If true, all parameters take their default values. \\
\hline
\mbox{\texttt{ in}}  & {\em layoutmod} & If present and true, this module has layout parameters. \\
\hline
\mbox{\texttt{ 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}{0}
\DoxyCodeLine{784   \textcolor{keywordtype}{type}(doc\_type),   \textcolor{keywordtype}{pointer}    :: doc\textcolor{comment}{     !< A pointer to a structure that controls where the}}
\DoxyCodeLine{785 \textcolor{comment}{                                          !! documentation occurs and its formatting}}
\DoxyCodeLine{786   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: modname\textcolor{comment}{ !< The name of the module being documented}}
\DoxyCodeLine{787   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: desc\textcolor{comment}{    !< A description of the module being documented}}
\DoxyCodeLine{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}}
\DoxyCodeLine{789 \textcolor{comment}{                                          !! ...\_doc.all files, even if this module also has layout}}
\DoxyCodeLine{790 \textcolor{comment}{                                          !! or debugging parameters.}}
\DoxyCodeLine{791   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: all\_default\textcolor{comment}{  !< If true, all parameters take their default values.}}
\DoxyCodeLine{792   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: layoutMod\textcolor{comment}{    !< If present and true, this module has layout parameters.}}
\DoxyCodeLine{793   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: debuggingMod\textcolor{comment}{ !< If present and true, this module has debugging parameters.}}
\DoxyCodeLine{794 }
\DoxyCodeLine{795   \textcolor{comment}{! This subroutine handles the module documentation}}
\DoxyCodeLine{796   \textcolor{keywordtype}{character(len=mLen)} :: mesg}
\DoxyCodeLine{797   \textcolor{keywordtype}{logical} :: repeat\_doc}
\DoxyCodeLine{798 }
\DoxyCodeLine{799   \textcolor{keywordflow}{if} (.not. (is\_root\_pe() .and. \textcolor{keyword}{associated}(doc))) \textcolor{keywordflow}{return}}
\DoxyCodeLine{800   \textcolor{keyword}{call }open\_doc\_file(doc)}
\DoxyCodeLine{801 }
\DoxyCodeLine{802   \textcolor{keywordflow}{if} (doc\%filesAreOpen) \textcolor{keywordflow}{then}}
\DoxyCodeLine{803     \textcolor{comment}{! Add a blank line for delineation}}
\DoxyCodeLine{804     \textcolor{keyword}{call }writemessageanddesc(doc, \textcolor{stringliteral}{''}, \textcolor{stringliteral}{''}, valuewasdefault=all\_default, \&}
\DoxyCodeLine{805                              layoutparam=layoutmod, debuggingparam=debuggingmod)}
\DoxyCodeLine{806     mesg = \textcolor{stringliteral}{"! === module "}//trim(modname)//\textcolor{stringliteral}{" ==="}}
\DoxyCodeLine{807     \textcolor{keyword}{call }writemessageanddesc(doc, mesg, desc, valuewasdefault=all\_default, indent=0, \&}
\DoxyCodeLine{808                              layoutparam=layoutmod, debuggingparam=debuggingmod)}
\DoxyCodeLine{809     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(log\_to\_all)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (log\_to\_all) \textcolor{keywordflow}{then}}
\DoxyCodeLine{810       \textcolor{comment}{! Log the module version again if the previous call was intercepted for use to document}}
\DoxyCodeLine{811       \textcolor{comment}{! a layout or debugging module.}}
\DoxyCodeLine{812       repeat\_doc = .false.}
\DoxyCodeLine{813       \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(layoutmod)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (layoutmod) repeat\_doc = .true. ;\textcolor{keywordflow}{ endif}}
\DoxyCodeLine{814       \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(debuggingmod)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (debuggingmod) repeat\_doc = .true. ;\textcolor{keywordflow}{ endif}}
\DoxyCodeLine{815       \textcolor{keywordflow}{if} (repeat\_doc) \textcolor{keywordflow}{then}}
\DoxyCodeLine{816         \textcolor{keyword}{call }writemessageanddesc(doc, \textcolor{stringliteral}{''}, \textcolor{stringliteral}{''}, valuewasdefault=all\_default)}
\DoxyCodeLine{817         \textcolor{keyword}{call }writemessageanddesc(doc, mesg, desc, valuewasdefault=all\_default, indent=0)}
\DoxyCodeLine{818 \textcolor{keywordflow}{      endif}}
\DoxyCodeLine{819 \textcolor{keywordflow}{    endif} ;\textcolor{keywordflow}{ endif}}
\DoxyCodeLine{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{\texttt{ in}}  & {\em blockname} & The name of the parameter block being opened \\
\hline
\mbox{\texttt{ 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}{0}
\DoxyCodeLine{386   \textcolor{keywordtype}{type}(doc\_type),   \textcolor{keywordtype}{pointer}    :: doc\textcolor{comment}{       !< A pointer to a structure that controls where the}}
\DoxyCodeLine{387 \textcolor{comment}{                                            !! documentation occurs and its formatting}}
\DoxyCodeLine{388   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: blockName\textcolor{comment}{ !< The name of the parameter block being opened}}
\DoxyCodeLine{389   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: desc\textcolor{comment}{ !< A description of the parameter block being opened}}
\DoxyCodeLine{390 \textcolor{comment}{! This subroutine handles documentation for opening a parameter block.}}
\DoxyCodeLine{391   \textcolor{keywordtype}{character(len=mLen)} :: mesg}
\DoxyCodeLine{392   \textcolor{keywordtype}{character(len=doc\%commentColumn)} :: valstring}
\DoxyCodeLine{393 }
\DoxyCodeLine{394   \textcolor{keywordflow}{if} (.not. (is\_root\_pe() .and. \textcolor{keyword}{associated}(doc))) \textcolor{keywordflow}{return}}
\DoxyCodeLine{395   \textcolor{keyword}{call }open\_doc\_file(doc)}
\DoxyCodeLine{396 }
\DoxyCodeLine{397   \textcolor{keywordflow}{if} (doc\%filesAreOpen) \textcolor{keywordflow}{then}}
\DoxyCodeLine{398     mesg = trim(blockname)//\textcolor{stringliteral}{'\%'}}
\DoxyCodeLine{399 }
\DoxyCodeLine{400     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(desc)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{401       \textcolor{keyword}{call }writemessageanddesc(doc, mesg, desc)}
\DoxyCodeLine{402     \textcolor{keywordflow}{else}}
\DoxyCodeLine{403       \textcolor{keyword}{call }writemessageanddesc(doc, mesg, \textcolor{stringliteral}{''})}
\DoxyCodeLine{404 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{405 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{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{\texttt{ in}}  & {\em varname} & The name of the parameter being documented \\
\hline
\mbox{\texttt{ in}}  & {\em desc} & A description of the parameter being documented \\
\hline
\mbox{\texttt{ in}}  & {\em units} & The units of the parameter being documented \\
\hline
\mbox{\texttt{ in}}  & {\em val} & The value of the parameter \\
\hline
\mbox{\texttt{ in}}  & {\em default} & The default value of this parameter \\
\hline
\mbox{\texttt{ in}}  & {\em layoutparam} & If present and true, this is a layout parameter. \\
\hline
\mbox{\texttt{ in}}  & {\em debuggingparam} & If present and true, this is a debugging parameter. \\
\hline
\mbox{\texttt{ 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}{0}
\DoxyCodeLine{348   \textcolor{keywordtype}{type}(doc\_type),    \textcolor{keywordtype}{pointer}    :: doc\textcolor{comment}{     !< A pointer to a structure that controls where the}}
\DoxyCodeLine{349 \textcolor{comment}{                                           !! documentation occurs and its formatting}}
\DoxyCodeLine{350   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: varname\textcolor{comment}{ !< The name of the parameter being documented}}
\DoxyCodeLine{351   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: desc\textcolor{comment}{    !< A description of the parameter being documented}}
\DoxyCodeLine{352   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: units\textcolor{comment}{   !< The units of the parameter being documented}}
\DoxyCodeLine{353   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: val\textcolor{comment}{     !< The value of the parameter}}
\DoxyCodeLine{354   \textcolor{keywordtype}{character(len=*)}, \&}
\DoxyCodeLine{355            \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: default\textcolor{comment}{ !< The default value of this parameter}}
\DoxyCodeLine{356   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: layoutParam\textcolor{comment}{ !< If present and true, this is a layout parameter.}}
\DoxyCodeLine{357   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: debuggingParam\textcolor{comment}{ !< If present and true, this is a debugging parameter.}}
\DoxyCodeLine{358   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: like\_default\textcolor{comment}{ !< If present and true, log this parameter as though}}
\DoxyCodeLine{359 \textcolor{comment}{                                           !! it has the default value, even if there is no default.}}
\DoxyCodeLine{360 \textcolor{comment}{! This subroutine handles parameter documentation for character strings.}}
\DoxyCodeLine{361   \textcolor{keywordtype}{character(len=mLen)} :: mesg}
\DoxyCodeLine{362   \textcolor{keywordtype}{logical} :: equalsDefault}
\DoxyCodeLine{363 }
\DoxyCodeLine{364   \textcolor{keywordflow}{if} (.not. (is\_root\_pe() .and. \textcolor{keyword}{associated}(doc))) \textcolor{keywordflow}{return}}
\DoxyCodeLine{365   \textcolor{keyword}{call }open\_doc\_file(doc)}
\DoxyCodeLine{366 }
\DoxyCodeLine{367   \textcolor{keywordflow}{if} (doc\%filesAreOpen) \textcolor{keywordflow}{then}}
\DoxyCodeLine{368     mesg = define\_string(doc, varname, \textcolor{stringliteral}{'"'}//trim(val)//\textcolor{stringliteral}{'"'}, units)}
\DoxyCodeLine{369 }
\DoxyCodeLine{370     equalsdefault = .false.}
\DoxyCodeLine{371     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(like\_default)) equalsdefault = like\_default}
\DoxyCodeLine{372     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(default)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{373       \textcolor{keywordflow}{if} (trim(val) == trim(default)) equalsdefault = .true.}
\DoxyCodeLine{374       mesg = trim(mesg)//\textcolor{stringliteral}{' default = "'}//trim(adjustl(default))//\textcolor{stringliteral}{'"'}}
\DoxyCodeLine{375 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{376 }
\DoxyCodeLine{377     \textcolor{keywordflow}{if} (mesghasbeendocumented(doc, varname, mesg)) \textcolor{keywordflow}{return} \textcolor{comment}{! Avoid duplicates}}
\DoxyCodeLine{378     \textcolor{keyword}{call }writemessageanddesc(doc, mesg, desc, equalsdefault, \&}
\DoxyCodeLine{379                              layoutparam=layoutparam, debuggingparam=debuggingparam)}
\DoxyCodeLine{380 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{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{\texttt{ in}}  & {\em varname} & The name of the parameter being documented \\
\hline
\mbox{\texttt{ in}}  & {\em desc} & A description of the parameter being documented \\
\hline
\mbox{\texttt{ in}}  & {\em units} & The units of the parameter being documented \\
\hline
\mbox{\texttt{ in}}  & {\em val} & The value of this parameter \\
\hline
\mbox{\texttt{ in}}  & {\em default} & The default value of this parameter \\
\hline
\mbox{\texttt{ in}}  & {\em layoutparam} & If present and true, this is a layout parameter. \\
\hline
\mbox{\texttt{ in}}  & {\em debuggingparam} & If present and true, this is a debugging parameter. \\
\hline
\mbox{\texttt{ 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}{0}
\DoxyCodeLine{187   \textcolor{keywordtype}{type}(doc\_type),    \textcolor{keywordtype}{pointer}    :: doc\textcolor{comment}{     !< A pointer to a structure that controls where the}}
\DoxyCodeLine{188 \textcolor{comment}{                                           !! documentation occurs and its formatting}}
\DoxyCodeLine{189   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: varname\textcolor{comment}{ !< The name of the parameter being documented}}
\DoxyCodeLine{190   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: desc\textcolor{comment}{    !< A description of the parameter being documented}}
\DoxyCodeLine{191   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: units\textcolor{comment}{   !< The units of the parameter being documented}}
\DoxyCodeLine{192   \textcolor{keywordtype}{integer},           \textcolor{keywordtype}{intent(in)} :: val\textcolor{comment}{     !< The value of this parameter}}
\DoxyCodeLine{193   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: default\textcolor{comment}{ !< The default value of this parameter}}
\DoxyCodeLine{194   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: layoutParam\textcolor{comment}{ !< If present and true, this is a layout parameter.}}
\DoxyCodeLine{195   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: debuggingParam\textcolor{comment}{ !< If present and true, this is a debugging parameter.}}
\DoxyCodeLine{196   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: like\_default\textcolor{comment}{ !< If present and true, log this parameter as though}}
\DoxyCodeLine{197 \textcolor{comment}{                                           !! it has the default value, even if there is no default.}}
\DoxyCodeLine{198 \textcolor{comment}{! This subroutine handles parameter documentation for integers.}}
\DoxyCodeLine{199   \textcolor{keywordtype}{character(len=mLen)} :: mesg}
\DoxyCodeLine{200   \textcolor{keywordtype}{character(len=doc\%commentColumn)}  :: valstring}
\DoxyCodeLine{201   \textcolor{keywordtype}{logical} :: equalsDefault}
\DoxyCodeLine{202 }
\DoxyCodeLine{203   \textcolor{keywordflow}{if} (.not. (is\_root\_pe() .and. \textcolor{keyword}{associated}(doc))) \textcolor{keywordflow}{return}}
\DoxyCodeLine{204   \textcolor{keyword}{call }open\_doc\_file(doc)}
\DoxyCodeLine{205 }
\DoxyCodeLine{206   \textcolor{keywordflow}{if} (doc\%filesAreOpen) \textcolor{keywordflow}{then}}
\DoxyCodeLine{207     valstring = int\_string(val)}
\DoxyCodeLine{208     mesg = define\_string(doc, varname, valstring, units)}
\DoxyCodeLine{209 }
\DoxyCodeLine{210     equalsdefault = .false.}
\DoxyCodeLine{211     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(like\_default)) equalsdefault = like\_default}
\DoxyCodeLine{212     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(default)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{213       \textcolor{keywordflow}{if} (val == default) equalsdefault = .true.}
\DoxyCodeLine{214       mesg = trim(mesg)//\textcolor{stringliteral}{" default = "}//(trim(int\_string(default)))}
\DoxyCodeLine{215 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{216 }
\DoxyCodeLine{217     \textcolor{keywordflow}{if} (mesghasbeendocumented(doc, varname, mesg)) \textcolor{keywordflow}{return} \textcolor{comment}{! Avoid duplicates}}
\DoxyCodeLine{218     \textcolor{keyword}{call }writemessageanddesc(doc, mesg, desc, equalsdefault, \&}
\DoxyCodeLine{219                              layoutparam=layoutparam, debuggingparam=debuggingparam)}
\DoxyCodeLine{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{\texttt{ in}}  & {\em varname} & The name of the parameter being documented \\
\hline
\mbox{\texttt{ in}}  & {\em desc} & A description of the parameter being documented \\
\hline
\mbox{\texttt{ in}}  & {\em units} & The units of the parameter being documented \\
\hline
\mbox{\texttt{ in}}  & {\em vals} & The array of values to record \\
\hline
\mbox{\texttt{ in}}  & {\em default} & The default value of this parameter \\
\hline
\mbox{\texttt{ in}}  & {\em layoutparam} & If present and true, this is a layout parameter. \\
\hline
\mbox{\texttt{ in}}  & {\em debuggingparam} & If present and true, this is a debugging parameter. \\
\hline
\mbox{\texttt{ 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}{0}
\DoxyCodeLine{226   \textcolor{keywordtype}{type}(doc\_type),    \textcolor{keywordtype}{pointer}    :: doc\textcolor{comment}{     !< A pointer to a structure that controls where the}}
\DoxyCodeLine{227 \textcolor{comment}{                                           !! documentation occurs and its formatting}}
\DoxyCodeLine{228   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: varname\textcolor{comment}{ !< The name of the parameter being documented}}
\DoxyCodeLine{229   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: desc\textcolor{comment}{    !< A description of the parameter being documented}}
\DoxyCodeLine{230   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: units\textcolor{comment}{   !< The units of the parameter being documented}}
\DoxyCodeLine{231   \textcolor{keywordtype}{integer},           \textcolor{keywordtype}{intent(in)} :: vals(:)\textcolor{comment}{ !< The array of values to record}}
\DoxyCodeLine{232   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: default\textcolor{comment}{ !< The default value of this parameter}}
\DoxyCodeLine{233   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: layoutParam\textcolor{comment}{ !< If present and true, this is a layout parameter.}}
\DoxyCodeLine{234   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: debuggingParam\textcolor{comment}{ !< If present and true, this is a debugging parameter.}}
\DoxyCodeLine{235   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: like\_default\textcolor{comment}{ !< If present and true, log this parameter as though}}
\DoxyCodeLine{236 \textcolor{comment}{                                           !! it has the default value, even if there is no default.}}
\DoxyCodeLine{237 \textcolor{comment}{! This subroutine handles parameter documentation for arrays of integers.}}
\DoxyCodeLine{238   \textcolor{keywordtype}{integer} :: i}
\DoxyCodeLine{239   \textcolor{keywordtype}{character(len=mLen)} :: mesg}
\DoxyCodeLine{240   \textcolor{keywordtype}{character(len=mLen)}  :: valstring}
\DoxyCodeLine{241   \textcolor{keywordtype}{logical} :: equalsDefault}
\DoxyCodeLine{242 }
\DoxyCodeLine{243   \textcolor{keywordflow}{if} (.not. (is\_root\_pe() .and. \textcolor{keyword}{associated}(doc))) \textcolor{keywordflow}{return}}
\DoxyCodeLine{244   \textcolor{keyword}{call }open\_doc\_file(doc)}
\DoxyCodeLine{245 }
\DoxyCodeLine{246   \textcolor{keywordflow}{if} (doc\%filesAreOpen) \textcolor{keywordflow}{then}}
\DoxyCodeLine{247     valstring = int\_string(vals(1))}
\DoxyCodeLine{248     \textcolor{keywordflow}{do} i=2,min(\textcolor{keyword}{size}(vals),128)}
\DoxyCodeLine{249       valstring = trim(valstring)//\textcolor{stringliteral}{", "}//trim(int\_string(vals(i)))}
\DoxyCodeLine{250 \textcolor{keywordflow}{    enddo}}
\DoxyCodeLine{251 }
\DoxyCodeLine{252     mesg = define\_string(doc, varname, valstring, units)}
\DoxyCodeLine{253 }
\DoxyCodeLine{254     equalsdefault = .false.}
\DoxyCodeLine{255     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(default)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{256       equalsdefault = .true.}
\DoxyCodeLine{257       \textcolor{keywordflow}{do} i=1,\textcolor{keyword}{size}(vals) ; \textcolor{keywordflow}{if} (vals(i) /= default) equalsdefault = .false. ;\textcolor{keywordflow}{ enddo}}
\DoxyCodeLine{258       mesg = trim(mesg)//\textcolor{stringliteral}{" default = "}//(trim(int\_string(default)))}
\DoxyCodeLine{259 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{260     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(like\_default)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (like\_default) equalsdefault = .true. ;\textcolor{keywordflow}{ endif}}
\DoxyCodeLine{261 }
\DoxyCodeLine{262     \textcolor{keywordflow}{if} (mesghasbeendocumented(doc, varname, mesg)) \textcolor{keywordflow}{return} \textcolor{comment}{! Avoid duplicates}}
\DoxyCodeLine{263     \textcolor{keyword}{call }writemessageanddesc(doc, mesg, desc, equalsdefault, \&}
\DoxyCodeLine{264                              layoutparam=layoutparam, debuggingparam=debuggingparam)}
\DoxyCodeLine{265 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{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{\texttt{ in}}  & {\em varname} & The name of the parameter being documented \\
\hline
\mbox{\texttt{ in}}  & {\em desc} & A description of the parameter being documented \\
\hline
\mbox{\texttt{ in}}  & {\em units} & The units of the parameter being documented \\
\hline
\mbox{\texttt{ in}}  & {\em val} & The value of this parameter \\
\hline
\mbox{\texttt{ in}}  & {\em default} & The default value of this parameter \\
\hline
\mbox{\texttt{ in}}  & {\em layoutparam} & If present and true, this is a layout parameter. \\
\hline
\mbox{\texttt{ in}}  & {\em debuggingparam} & If present and true, this is a debugging parameter. \\
\hline
\mbox{\texttt{ 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}{0}
\DoxyCodeLine{89   \textcolor{keywordtype}{type}(doc\_type),    \textcolor{keywordtype}{pointer}    :: doc\textcolor{comment}{     !< A pointer to a structure that controls where the}}
\DoxyCodeLine{90 \textcolor{comment}{                                           !! documentation occurs and its formatting}}
\DoxyCodeLine{91   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: varname\textcolor{comment}{ !< The name of the parameter being documented}}
\DoxyCodeLine{92   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: desc\textcolor{comment}{    !< A description of the parameter being documented}}
\DoxyCodeLine{93   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: units\textcolor{comment}{   !< The units of the parameter being documented}}
\DoxyCodeLine{94   \textcolor{keywordtype}{logical},           \textcolor{keywordtype}{intent(in)} :: val\textcolor{comment}{     !< The value of this parameter}}
\DoxyCodeLine{95   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: default\textcolor{comment}{ !< The default value of this parameter}}
\DoxyCodeLine{96   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: layoutParam\textcolor{comment}{ !< If present and true, this is a layout parameter.}}
\DoxyCodeLine{97   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: debuggingParam\textcolor{comment}{ !< If present and true, this is a debugging parameter.}}
\DoxyCodeLine{98   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: like\_default\textcolor{comment}{ !< If present and true, log this parameter as though}}
\DoxyCodeLine{99 \textcolor{comment}{                                           !! it has the default value, even if there is no default.}}
\DoxyCodeLine{100 \textcolor{comment}{! This subroutine handles parameter documentation for logicals.}}
\DoxyCodeLine{101   \textcolor{keywordtype}{character(len=mLen)} :: mesg}
\DoxyCodeLine{102   \textcolor{keywordtype}{logical} :: equalsDefault}
\DoxyCodeLine{103 }
\DoxyCodeLine{104   \textcolor{keywordflow}{if} (.not. (is\_root\_pe() .and. \textcolor{keyword}{associated}(doc))) \textcolor{keywordflow}{return}}
\DoxyCodeLine{105   \textcolor{keyword}{call }open\_doc\_file(doc)}
\DoxyCodeLine{106 }
\DoxyCodeLine{107   \textcolor{keywordflow}{if} (doc\%filesAreOpen) \textcolor{keywordflow}{then}}
\DoxyCodeLine{108     \textcolor{keywordflow}{if} (val) \textcolor{keywordflow}{then}}
\DoxyCodeLine{109       mesg = define\_string(doc, varname, string\_true, units)}
\DoxyCodeLine{110     \textcolor{keywordflow}{else}}
\DoxyCodeLine{111       mesg = undef\_string(doc, varname, units)}
\DoxyCodeLine{112 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{113 }
\DoxyCodeLine{114     equalsdefault = .false.}
\DoxyCodeLine{115     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(like\_default)) equalsdefault = like\_default}
\DoxyCodeLine{116     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(default)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{117       \textcolor{keywordflow}{if} (val .eqv. default) equalsdefault = .true.}
\DoxyCodeLine{118       \textcolor{keywordflow}{if} (default) \textcolor{keywordflow}{then}}
\DoxyCodeLine{119         mesg = trim(mesg)//\textcolor{stringliteral}{" default = "}//string\_true}
\DoxyCodeLine{120       \textcolor{keywordflow}{else}}
\DoxyCodeLine{121         mesg = trim(mesg)//\textcolor{stringliteral}{" default = "}//string\_false}
\DoxyCodeLine{122 \textcolor{keywordflow}{      endif}}
\DoxyCodeLine{123 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{124 }
\DoxyCodeLine{125     \textcolor{keywordflow}{if} (mesghasbeendocumented(doc, varname, mesg)) \textcolor{keywordflow}{return} \textcolor{comment}{! Avoid duplicates}}
\DoxyCodeLine{126     \textcolor{keyword}{call }writemessageanddesc(doc, mesg, desc, equalsdefault, \&}
\DoxyCodeLine{127                              layoutparam=layoutparam, debuggingparam=debuggingparam)}
\DoxyCodeLine{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{\texttt{ in}}  & {\em varname} & The name of the parameter being documented \\
\hline
\mbox{\texttt{ in}}  & {\em desc} & A description of the parameter being documented \\
\hline
\mbox{\texttt{ in}}  & {\em units} & The units of the parameter being documented \\
\hline
\mbox{\texttt{ in}}  & {\em vals} & The array of values to record \\
\hline
\mbox{\texttt{ in}}  & {\em default} & The default value of this parameter \\
\hline
\mbox{\texttt{ in}}  & {\em layoutparam} & If present and true, this is a layout parameter. \\
\hline
\mbox{\texttt{ in}}  & {\em debuggingparam} & If present and true, this is a debugging parameter. \\
\hline
\mbox{\texttt{ 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}{0}
\DoxyCodeLine{134   \textcolor{keywordtype}{type}(doc\_type),    \textcolor{keywordtype}{pointer}    :: doc\textcolor{comment}{     !< A pointer to a structure that controls where the}}
\DoxyCodeLine{135 \textcolor{comment}{                                           !! documentation occurs and its formatting}}
\DoxyCodeLine{136   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: varname\textcolor{comment}{ !< The name of the parameter being documented}}
\DoxyCodeLine{137   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: desc\textcolor{comment}{    !< A description of the parameter being documented}}
\DoxyCodeLine{138   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: units\textcolor{comment}{   !< The units of the parameter being documented}}
\DoxyCodeLine{139   \textcolor{keywordtype}{logical},           \textcolor{keywordtype}{intent(in)} :: vals(:)\textcolor{comment}{ !< The array of values to record}}
\DoxyCodeLine{140   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: default\textcolor{comment}{ !< The default value of this parameter}}
\DoxyCodeLine{141   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: layoutParam\textcolor{comment}{ !< If present and true, this is a layout parameter.}}
\DoxyCodeLine{142   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: debuggingParam\textcolor{comment}{ !< If present and true, this is a debugging parameter.}}
\DoxyCodeLine{143   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: like\_default\textcolor{comment}{ !< If present and true, log this parameter as though}}
\DoxyCodeLine{144 \textcolor{comment}{                                           !! it has the default value, even if there is no default.}}
\DoxyCodeLine{145 \textcolor{comment}{! This subroutine handles parameter documentation for arrays of logicals.}}
\DoxyCodeLine{146   \textcolor{keywordtype}{integer} :: i}
\DoxyCodeLine{147   \textcolor{keywordtype}{character(len=mLen)} :: mesg}
\DoxyCodeLine{148   \textcolor{keywordtype}{character(len=mLen)} :: valstring}
\DoxyCodeLine{149   \textcolor{keywordtype}{logical} :: equalsDefault}
\DoxyCodeLine{150 }
\DoxyCodeLine{151   \textcolor{keywordflow}{if} (.not. (is\_root\_pe() .and. \textcolor{keyword}{associated}(doc))) \textcolor{keywordflow}{return}}
\DoxyCodeLine{152   \textcolor{keyword}{call }open\_doc\_file(doc)}
\DoxyCodeLine{153 }
\DoxyCodeLine{154   \textcolor{keywordflow}{if} (doc\%filesAreOpen) \textcolor{keywordflow}{then}}
\DoxyCodeLine{155     \textcolor{keywordflow}{if} (vals(1)) \textcolor{keywordflow}{then} ; valstring = string\_true ; \textcolor{keywordflow}{else} ; valstring = string\_false ;\textcolor{keywordflow}{ endif}}
\DoxyCodeLine{156     \textcolor{keywordflow}{do} i=2,min(\textcolor{keyword}{size}(vals),128)}
\DoxyCodeLine{157       \textcolor{keywordflow}{if} (vals(i)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{158         valstring = trim(valstring)//\textcolor{stringliteral}{", "}//string\_true}
\DoxyCodeLine{159       \textcolor{keywordflow}{else}}
\DoxyCodeLine{160         valstring = trim(valstring)//\textcolor{stringliteral}{", "}//string\_false}
\DoxyCodeLine{161 \textcolor{keywordflow}{      endif}}
\DoxyCodeLine{162 \textcolor{keywordflow}{    enddo}}
\DoxyCodeLine{163 }
\DoxyCodeLine{164     mesg = define\_string(doc, varname, valstring, units)}
\DoxyCodeLine{165 }
\DoxyCodeLine{166     equalsdefault = .false.}
\DoxyCodeLine{167     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(default)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{168       equalsdefault = .true.}
\DoxyCodeLine{169       \textcolor{keywordflow}{do} i=1,\textcolor{keyword}{size}(vals) ; \textcolor{keywordflow}{if} (vals(i) .neqv. default) equalsdefault = .false. ;\textcolor{keywordflow}{ enddo}}
\DoxyCodeLine{170       \textcolor{keywordflow}{if} (default) \textcolor{keywordflow}{then}}
\DoxyCodeLine{171         mesg = trim(mesg)//\textcolor{stringliteral}{" default = "}//string\_true}
\DoxyCodeLine{172       \textcolor{keywordflow}{else}}
\DoxyCodeLine{173         mesg = trim(mesg)//\textcolor{stringliteral}{" default = "}//string\_false}
\DoxyCodeLine{174 \textcolor{keywordflow}{      endif}}
\DoxyCodeLine{175 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{176     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(like\_default)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (like\_default) equalsdefault = .true. ;\textcolor{keywordflow}{ endif}}
\DoxyCodeLine{177 }
\DoxyCodeLine{178     \textcolor{keywordflow}{if} (mesghasbeendocumented(doc, varname, mesg)) \textcolor{keywordflow}{return} \textcolor{comment}{! Avoid duplicates}}
\DoxyCodeLine{179     \textcolor{keyword}{call }writemessageanddesc(doc, mesg, desc, equalsdefault, \&}
\DoxyCodeLine{180                              layoutparam=layoutparam, debuggingparam=debuggingparam)}
\DoxyCodeLine{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{\texttt{ in}}  & {\em varname} & The name of the parameter being documented \\
\hline
\mbox{\texttt{ in}}  & {\em desc} & A description of the parameter being documented \\
\hline
\mbox{\texttt{ 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}{0}
\DoxyCodeLine{64   \textcolor{keywordtype}{type}(doc\_type),   \textcolor{keywordtype}{pointer}    :: doc\textcolor{comment}{     !< A pointer to a structure that controls where the}}
\DoxyCodeLine{65 \textcolor{comment}{                                          !! documentation occurs and its formatting}}
\DoxyCodeLine{66   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: varname\textcolor{comment}{ !< The name of the parameter being documented}}
\DoxyCodeLine{67   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: desc\textcolor{comment}{    !< A description of the parameter being documented}}
\DoxyCodeLine{68   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: units\textcolor{comment}{   !< The units of the parameter being documented}}
\DoxyCodeLine{69 \textcolor{comment}{! This subroutine handles parameter documentation with no value.}}
\DoxyCodeLine{70   \textcolor{keywordtype}{integer} :: numspc}
\DoxyCodeLine{71   \textcolor{keywordtype}{character(len=mLen)} :: mesg}
\DoxyCodeLine{72 }
\DoxyCodeLine{73   \textcolor{keywordflow}{if} (.not. (is\_root\_pe() .and. \textcolor{keyword}{associated}(doc))) \textcolor{keywordflow}{return}}
\DoxyCodeLine{74   \textcolor{keyword}{call }open\_doc\_file(doc)}
\DoxyCodeLine{75 }
\DoxyCodeLine{76   \textcolor{keywordflow}{if} (doc\%filesAreOpen) \textcolor{keywordflow}{then}}
\DoxyCodeLine{77     numspc = max(1,doc\%commentColumn-8-len\_trim(varname))}
\DoxyCodeLine{78     mesg = \textcolor{stringliteral}{"\#define "}//trim(varname)//repeat(\textcolor{stringliteral}{" "},numspc)//\textcolor{stringliteral}{"!"}}
\DoxyCodeLine{79     \textcolor{keywordflow}{if} (len\_trim(units) > 0) mesg = trim(mesg)//\textcolor{stringliteral}{"   ["}//trim(units)//\textcolor{stringliteral}{"]"}}
\DoxyCodeLine{80 }
\DoxyCodeLine{81     \textcolor{keywordflow}{if} (mesghasbeendocumented(doc, varname, mesg)) \textcolor{keywordflow}{return} \textcolor{comment}{! Avoid duplicates}}
\DoxyCodeLine{82     \textcolor{keyword}{call }writemessageanddesc(doc, mesg, desc)}
\DoxyCodeLine{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{\texttt{ in}}  & {\em varname} & The name of the parameter being documented \\
\hline
\mbox{\texttt{ in}}  & {\em desc} & A description of the parameter being documented \\
\hline
\mbox{\texttt{ in}}  & {\em units} & The units of the parameter being documented \\
\hline
\mbox{\texttt{ in}}  & {\em val} & The value of this parameter \\
\hline
\mbox{\texttt{ in}}  & {\em default} & The default value of this parameter \\
\hline
\mbox{\texttt{ in}}  & {\em debuggingparam} & If present and true, this is a debugging parameter. \\
\hline
\mbox{\texttt{ 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}{0}
\DoxyCodeLine{271   \textcolor{keywordtype}{type}(doc\_type),    \textcolor{keywordtype}{pointer}    :: doc\textcolor{comment}{     !< A pointer to a structure that controls where the}}
\DoxyCodeLine{272 \textcolor{comment}{                                           !! documentation occurs and its formatting}}
\DoxyCodeLine{273   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: varname\textcolor{comment}{ !< The name of the parameter being documented}}
\DoxyCodeLine{274   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: desc\textcolor{comment}{    !< A description of the parameter being documented}}
\DoxyCodeLine{275   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: units\textcolor{comment}{   !< The units of the parameter being documented}}
\DoxyCodeLine{276 \textcolor{keywordtype}{  real},              \textcolor{keywordtype}{intent(in)} :: val\textcolor{comment}{     !< The value of this parameter}}
\DoxyCodeLine{277 \textcolor{keywordtype}{  real},    \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: default\textcolor{comment}{ !< The default value of this parameter}}
\DoxyCodeLine{278   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: debuggingParam\textcolor{comment}{ !< If present and true, this is a debugging parameter.}}
\DoxyCodeLine{279   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: like\_default\textcolor{comment}{ !< If present and true, log this parameter as though}}
\DoxyCodeLine{280 \textcolor{comment}{                                           !! it has the default value, even if there is no default.}}
\DoxyCodeLine{281 \textcolor{comment}{! This subroutine handles parameter documentation for reals.}}
\DoxyCodeLine{282   \textcolor{keywordtype}{character(len=mLen)} :: mesg}
\DoxyCodeLine{283   \textcolor{keywordtype}{character(len=doc\%commentColumn)}  :: valstring}
\DoxyCodeLine{284   \textcolor{keywordtype}{logical} :: equalsDefault}
\DoxyCodeLine{285 }
\DoxyCodeLine{286   \textcolor{keywordflow}{if} (.not. (is\_root\_pe() .and. \textcolor{keyword}{associated}(doc))) \textcolor{keywordflow}{return}}
\DoxyCodeLine{287   \textcolor{keyword}{call }open\_doc\_file(doc)}
\DoxyCodeLine{288 }
\DoxyCodeLine{289   \textcolor{keywordflow}{if} (doc\%filesAreOpen) \textcolor{keywordflow}{then}}
\DoxyCodeLine{290     valstring = real\_string(val)}
\DoxyCodeLine{291     mesg = define\_string(doc, varname, valstring, units)}
\DoxyCodeLine{292 }
\DoxyCodeLine{293     equalsdefault = .false.}
\DoxyCodeLine{294     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(like\_default)) equalsdefault = like\_default}
\DoxyCodeLine{295     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(default)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{296       \textcolor{keywordflow}{if} (val == default) equalsdefault = .true.}
\DoxyCodeLine{297       mesg = trim(mesg)//\textcolor{stringliteral}{" default = "}//trim(real\_string(default))}
\DoxyCodeLine{298 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{299 }
\DoxyCodeLine{300     \textcolor{keywordflow}{if} (mesghasbeendocumented(doc, varname, mesg)) \textcolor{keywordflow}{return} \textcolor{comment}{! Avoid duplicates}}
\DoxyCodeLine{301     \textcolor{keyword}{call }writemessageanddesc(doc, mesg, desc, equalsdefault, debuggingparam=debuggingparam)}
\DoxyCodeLine{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{\texttt{ in}}  & {\em varname} & The name of the parameter being documented \\
\hline
\mbox{\texttt{ in}}  & {\em desc} & A description of the parameter being documented \\
\hline
\mbox{\texttt{ in}}  & {\em units} & The units of the parameter being documented \\
\hline
\mbox{\texttt{ in}}  & {\em vals} & The array of values to record \\
\hline
\mbox{\texttt{ in}}  & {\em default} & The default value of this parameter \\
\hline
\mbox{\texttt{ in}}  & {\em debuggingparam} & If present and true, this is a debugging parameter. \\
\hline
\mbox{\texttt{ 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}{0}
\DoxyCodeLine{307   \textcolor{keywordtype}{type}(doc\_type),    \textcolor{keywordtype}{pointer}    :: doc\textcolor{comment}{     !< A pointer to a structure that controls where the}}
\DoxyCodeLine{308 \textcolor{comment}{                                           !! documentation occurs and its formatting}}
\DoxyCodeLine{309   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: varname\textcolor{comment}{ !< The name of the parameter being documented}}
\DoxyCodeLine{310   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: desc\textcolor{comment}{    !< A description of the parameter being documented}}
\DoxyCodeLine{311   \textcolor{keywordtype}{character(len=*)},  \textcolor{keywordtype}{intent(in)} :: units\textcolor{comment}{   !< The units of the parameter being documented}}
\DoxyCodeLine{312 \textcolor{keywordtype}{  real},              \textcolor{keywordtype}{intent(in)} :: vals(:)\textcolor{comment}{ !< The array of values to record}}
\DoxyCodeLine{313 \textcolor{keywordtype}{  real},    \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: default\textcolor{comment}{ !< The default value of this parameter}}
\DoxyCodeLine{314   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: debuggingParam\textcolor{comment}{ !< If present and true, this is a debugging parameter.}}
\DoxyCodeLine{315   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: like\_default\textcolor{comment}{ !< If present and true, log this parameter as though}}
\DoxyCodeLine{316 \textcolor{comment}{                                           !! it has the default value, even if there is no default.}}
\DoxyCodeLine{317 \textcolor{comment}{! This subroutine handles parameter documentation for arrays of reals.}}
\DoxyCodeLine{318   \textcolor{keywordtype}{integer} :: i}
\DoxyCodeLine{319   \textcolor{keywordtype}{character(len=mLen)} :: mesg}
\DoxyCodeLine{320   \textcolor{keywordtype}{character(len=mLen)} :: valstring}
\DoxyCodeLine{321   \textcolor{keywordtype}{logical} :: equalsDefault}
\DoxyCodeLine{322 }
\DoxyCodeLine{323   \textcolor{keywordflow}{if} (.not. (is\_root\_pe() .and. \textcolor{keyword}{associated}(doc))) \textcolor{keywordflow}{return}}
\DoxyCodeLine{324   \textcolor{keyword}{call }open\_doc\_file(doc)}
\DoxyCodeLine{325 }
\DoxyCodeLine{326   \textcolor{keywordflow}{if} (doc\%filesAreOpen) \textcolor{keywordflow}{then}}
\DoxyCodeLine{327     valstring = trim(real\_array\_string(vals(:)))}
\DoxyCodeLine{328 }
\DoxyCodeLine{329     mesg = define\_string(doc, varname, valstring, units)}
\DoxyCodeLine{330 }
\DoxyCodeLine{331     equalsdefault = .false.}
\DoxyCodeLine{332     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(default)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{333       equalsdefault = .true.}
\DoxyCodeLine{334       \textcolor{keywordflow}{do} i=1,\textcolor{keyword}{size}(vals) ; \textcolor{keywordflow}{if} (vals(i) /= default) equalsdefault = .false. ;\textcolor{keywordflow}{ enddo}}
\DoxyCodeLine{335       mesg = trim(mesg)//\textcolor{stringliteral}{" default = "}//trim(real\_string(default))}
\DoxyCodeLine{336 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{337     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(like\_default)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (like\_default) equalsdefault = .true. ;\textcolor{keywordflow}{ endif}}
\DoxyCodeLine{338 }
\DoxyCodeLine{339     \textcolor{keywordflow}{if} (mesghasbeendocumented(doc, varname, mesg)) \textcolor{keywordflow}{return} \textcolor{comment}{! Avoid duplicates}}
\DoxyCodeLine{340     \textcolor{keyword}{call }writemessageanddesc(doc, mesg, desc, equalsdefault, debuggingparam=debuggingparam)}
\DoxyCodeLine{341 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{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{\texttt{ in}}  & {\em varname} & The name of the parameter being documented \\
\hline
\mbox{\texttt{ in}}  & {\em desc} & A description of the parameter being documented \\
\hline
\mbox{\texttt{ in}}  & {\em val} & The value of the parameter \\
\hline
\mbox{\texttt{ in}}  & {\em default} & The default value of this parameter \\
\hline
\mbox{\texttt{ in}}  & {\em units} & The units of the parameter being documented \\
\hline
\mbox{\texttt{ in}}  & {\em debuggingparam} & If present and true, this is a debugging parameter. \\
\hline
\mbox{\texttt{ 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}{0}
\DoxyCodeLine{437   \textcolor{keywordtype}{type}(doc\_type),   \textcolor{keywordtype}{pointer}    :: doc\textcolor{comment}{     !< A pointer to a structure that controls where the}}
\DoxyCodeLine{438 \textcolor{comment}{                                          !! documentation occurs and its formatting}}
\DoxyCodeLine{439   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: varname\textcolor{comment}{ !< The name of the parameter being documented}}
\DoxyCodeLine{440   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: desc\textcolor{comment}{    !< A description of the parameter being documented}}
\DoxyCodeLine{441   \textcolor{keywordtype}{type}(time\_type),  \textcolor{keywordtype}{intent(in)} :: val\textcolor{comment}{     !< The value of the parameter}}
\DoxyCodeLine{442   \textcolor{keywordtype}{type}(time\_type),  \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: default\textcolor{comment}{ !< The default value of this parameter}}
\DoxyCodeLine{443   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: units\textcolor{comment}{   !< The units of the parameter being documented}}
\DoxyCodeLine{444   \textcolor{keywordtype}{logical},          \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: debuggingParam\textcolor{comment}{ !< If present and true, this is a debugging parameter.}}
\DoxyCodeLine{445   \textcolor{keywordtype}{logical},          \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: like\_default\textcolor{comment}{ !< If present and true, log this parameter as though}}
\DoxyCodeLine{446 \textcolor{comment}{                                             !! it has the default value, even if there is no default.}}
\DoxyCodeLine{447 }
\DoxyCodeLine{448   \textcolor{comment}{! Local varables}}
\DoxyCodeLine{449   \textcolor{keywordtype}{character(len=mLen)}              :: mesg          \textcolor{comment}{! The output message}}
\DoxyCodeLine{450   \textcolor{keywordtype}{character(len=doc\%commentColumn)} :: valstring     \textcolor{comment}{! A string with the formatted value.}}
\DoxyCodeLine{451   \textcolor{keywordtype}{logical}                          :: equalsDefault \textcolor{comment}{! True if val = default.}}
\DoxyCodeLine{452 }
\DoxyCodeLine{453   \textcolor{keywordflow}{if} (.not. (is\_root\_pe() .and. \textcolor{keyword}{associated}(doc))) \textcolor{keywordflow}{return}}
\DoxyCodeLine{454   \textcolor{keyword}{call }open\_doc\_file(doc)}
\DoxyCodeLine{455 }
\DoxyCodeLine{456   \textcolor{keywordflow}{if} (doc\%filesAreOpen) \textcolor{keywordflow}{then}}
\DoxyCodeLine{457     valstring = time\_string(val)}
\DoxyCodeLine{458     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(units)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{459       mesg = define\_string(doc, varname, valstring, units)}
\DoxyCodeLine{460     \textcolor{keywordflow}{else}}
\DoxyCodeLine{461       mesg = define\_string(doc, varname, valstring, \textcolor{stringliteral}{"[days : seconds]"})}
\DoxyCodeLine{462 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{463 }
\DoxyCodeLine{464     equalsdefault = .false.}
\DoxyCodeLine{465     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(like\_default)) equalsdefault = like\_default}
\DoxyCodeLine{466     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(default)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{467       \textcolor{keywordflow}{if} (val == default) equalsdefault = .true.}
\DoxyCodeLine{468       mesg = trim(mesg)//\textcolor{stringliteral}{" default = "}//trim(time\_string(default))}
\DoxyCodeLine{469 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{470 }
\DoxyCodeLine{471     \textcolor{keywordflow}{if} (mesghasbeendocumented(doc, varname, mesg)) \textcolor{keywordflow}{return} \textcolor{comment}{! Avoid duplicates}}
\DoxyCodeLine{472     \textcolor{keyword}{call }writemessageanddesc(doc, mesg, desc, equalsdefault, debuggingparam=debuggingparam)}
\DoxyCodeLine{473 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{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{\texttt{ in}}  & {\em modname} & The name of the module being documented \\
\hline
\mbox{\texttt{ in}}  & {\em subname} & The name of the subroutine being documented \\
\hline
\mbox{\texttt{ 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}{0}
\DoxyCodeLine{825   \textcolor{keywordtype}{type}(doc\_type),   \textcolor{keywordtype}{pointer}    :: doc\textcolor{comment}{     !< A pointer to a structure that controls where the}}
\DoxyCodeLine{826 \textcolor{comment}{                                          !! documentation occurs and its formatting}}
\DoxyCodeLine{827   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: modname\textcolor{comment}{ !< The name of the module being documented}}
\DoxyCodeLine{828   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: subname\textcolor{comment}{ !< The name of the subroutine being documented}}
\DoxyCodeLine{829   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: desc\textcolor{comment}{    !< A description of the subroutine being documented}}
\DoxyCodeLine{830 \textcolor{comment}{! This subroutine handles the subroutine documentation}}
\DoxyCodeLine{831   \textcolor{keywordflow}{if} (.not. (is\_root\_pe() .and. \textcolor{keyword}{associated}(doc))) \textcolor{keywordflow}{return}}
\DoxyCodeLine{832   \textcolor{keyword}{call }open\_doc\_file(doc)}
\DoxyCodeLine{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{\texttt{ 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}{0}
\DoxyCodeLine{722   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}  :: val\textcolor{comment}{ !< The value being written into a string}}
\DoxyCodeLine{723   \textcolor{keywordtype}{character(len=24)}    :: int\_string}
\DoxyCodeLine{724 \textcolor{comment}{! This function returns a string with an integer formatted like '(I)'}}
\DoxyCodeLine{725   \textcolor{keyword}{write}(int\_string, \textcolor{stringliteral}{'(i24)'}) val}
\DoxyCodeLine{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{\texttt{ 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}{0}
\DoxyCodeLine{731   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}  :: val\textcolor{comment}{ !< The value being written into a string}}
\DoxyCodeLine{732   \textcolor{keywordtype}{character(len=24)}    :: logical\_string}
\DoxyCodeLine{733 \textcolor{comment}{! This function returns a string with an logical formatted like '(L)'}}
\DoxyCodeLine{734   \textcolor{keyword}{write}(logical\_string, \textcolor{stringliteral}{'(l24)'}) val}
\DoxyCodeLine{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{\texttt{ in}}  & {\em varname} & The name of the parameter being documented \\
\hline
\mbox{\texttt{ 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}{0}
\DoxyCodeLine{1035   \textcolor{keywordtype}{type}(doc\_type),   \textcolor{keywordtype}{pointer}     :: doc\textcolor{comment}{  !< A pointer to a structure that controls where the}}
\DoxyCodeLine{1036 \textcolor{comment}{                                        !! documentation occurs and its formatting}}
\DoxyCodeLine{1037   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)}  :: varName\textcolor{comment}{ !< The name of the parameter being documented}}
\DoxyCodeLine{1038   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)}  :: mesg\textcolor{comment}{ !< A message with parameter values, defaults, and descriptions}}
\DoxyCodeLine{1039 \textcolor{comment}{                                        !! to compare with the message that was written previously}}
\DoxyCodeLine{1040   \textcolor{keywordtype}{logical}                       :: mesgHasBeenDocumented}
\DoxyCodeLine{1041 \textcolor{comment}{! Returns true if documentation has already been written}}
\DoxyCodeLine{1042   \textcolor{keywordtype}{type}(link\_msg), \textcolor{keywordtype}{pointer} :: newLink => null(), this => null(), last => null()}
\DoxyCodeLine{1043 }
\DoxyCodeLine{1044   mesghasbeendocumented = .false.}
\DoxyCodeLine{1045 }
\DoxyCodeLine{1046 \textcolor{comment}{!!if (mesg(1:1) == '!') return ! Ignore commented parameters}}
\DoxyCodeLine{1047 }
\DoxyCodeLine{1048   \textcolor{comment}{! Search through list for this parameter}}
\DoxyCodeLine{1049   last => null()}
\DoxyCodeLine{1050   this => doc\%chain\_msg}
\DoxyCodeLine{1051   \textcolor{keywordflow}{do} \textcolor{keywordflow}{while}( \textcolor{keyword}{associated}(this) )}
\DoxyCodeLine{1052     \textcolor{keywordflow}{if} (trim(doc\%blockPrefix)//trim(varname) == trim(this\%name)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{1053       mesghasbeendocumented = .true.}
\DoxyCodeLine{1054       \textcolor{keywordflow}{if} (trim(mesg) == trim(this\%msg)) \textcolor{keywordflow}{return}}
\DoxyCodeLine{1055       \textcolor{comment}{! If we fail the above test then cause an error}}
\DoxyCodeLine{1056       \textcolor{keywordflow}{if} (mesg(1:1) == \textcolor{stringliteral}{'!'}) \textcolor{keywordflow}{return} \textcolor{comment}{! Do not cause error for commented parameters}}
\DoxyCodeLine{1057       \textcolor{keyword}{call }mom\_error(warning, \textcolor{stringliteral}{"Previous msg:"}//trim(this\%msg))}
\DoxyCodeLine{1058       \textcolor{keyword}{call }mom\_error(warning, \textcolor{stringliteral}{"New message :"}//trim(mesg))}
\DoxyCodeLine{1059       \textcolor{keyword}{call }mom\_error(warning, \textcolor{stringliteral}{"Encountered inconsistent documentation line for parameter "}\&}
\DoxyCodeLine{1060                      //trim(varname)//\textcolor{stringliteral}{"!"})}
\DoxyCodeLine{1061 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{1062     last => this}
\DoxyCodeLine{1063     this => this\%next}
\DoxyCodeLine{1064 \textcolor{keywordflow}{  enddo}}
\DoxyCodeLine{1065 }
\DoxyCodeLine{1066   \textcolor{comment}{! Allocate a new link}}
\DoxyCodeLine{1067   \textcolor{keyword}{allocate}(newlink)}
\DoxyCodeLine{1068   newlink\%name = trim(doc\%blockPrefix)//trim(varname)}
\DoxyCodeLine{1069   newlink\%msg = trim(mesg)}
\DoxyCodeLine{1070   newlink\%next => null()}
\DoxyCodeLine{1071   \textcolor{keywordflow}{if} (.not. \textcolor{keyword}{associated}(doc\%chain\_msg)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{1072     doc\%chain\_msg => newlink}
\DoxyCodeLine{1073   \textcolor{keywordflow}{else}}
\DoxyCodeLine{1074     \textcolor{keywordflow}{if} (.not. \textcolor{keyword}{associated}(last)) \textcolor{keyword}{call }mom\_error(fatal, \&}
\DoxyCodeLine{1075          \textcolor{stringliteral}{"Unassociated LINK in mesgHasBeenDocumented: "}//trim(mesg))}
\DoxyCodeLine{1076     last\%next => newlink}
\DoxyCodeLine{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}{0}
\DoxyCodeLine{882   \textcolor{keywordtype}{type}(doc\_type), \textcolor{keywordtype}{pointer} :: doc\textcolor{comment}{ !< A pointer to a structure that controls where the}}
\DoxyCodeLine{883 \textcolor{comment}{                                 !! documentation occurs and its formatting}}
\DoxyCodeLine{884 }
\DoxyCodeLine{885   \textcolor{keywordtype}{logical} :: opened, new\_file}
\DoxyCodeLine{886   \textcolor{keywordtype}{integer} :: ios}
\DoxyCodeLine{887   \textcolor{keywordtype}{character(len=240)} :: fileName}
\DoxyCodeLine{888 }
\DoxyCodeLine{889   \textcolor{keywordflow}{if} (.not. (is\_root\_pe() .and. \textcolor{keyword}{associated}(doc))) \textcolor{keywordflow}{return}}
\DoxyCodeLine{890 }
\DoxyCodeLine{891   \textcolor{keywordflow}{if} ((len\_trim(doc\%docFileBase) > 0) .and. doc\%complete .and. (doc\%unitAll<0)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{892     new\_file = .true. ; \textcolor{keywordflow}{if} (doc\%unitAll /= -1) new\_file = .false.}
\DoxyCodeLine{893     doc\%unitAll = find\_unused\_unit\_number()}
\DoxyCodeLine{894 }
\DoxyCodeLine{895     \textcolor{keyword}{write}(filename(1:240),\textcolor{stringliteral}{'(a)'}) trim(doc\%docFileBase)//\textcolor{stringliteral}{'.all'}}
\DoxyCodeLine{896     \textcolor{keywordflow}{if} (new\_file) \textcolor{keywordflow}{then}}
\DoxyCodeLine{897       \textcolor{keyword}{open}(doc\%unitAll, file=trim(filename), access=\textcolor{stringliteral}{'SEQUENTIAL'}, form=\textcolor{stringliteral}{'FORMATTED'}, \&}
\DoxyCodeLine{898            action=\textcolor{stringliteral}{'WRITE'}, status=\textcolor{stringliteral}{'REPLACE'}, iostat=ios)}
\DoxyCodeLine{899       \textcolor{keyword}{write}(doc\%unitAll, \textcolor{stringliteral}{'(a)'}) \&}
\DoxyCodeLine{900        \textcolor{stringliteral}{'! This file was written by the model and records all non-layout '}//\&}
\DoxyCodeLine{901        \textcolor{stringliteral}{'or debugging parameters used at run-time.'}}
\DoxyCodeLine{902     \textcolor{keywordflow}{else} \textcolor{comment}{! This file is being reopened, and should be appended.}}
\DoxyCodeLine{903       \textcolor{keyword}{open}(doc\%unitAll, file=trim(filename), access=\textcolor{stringliteral}{'SEQUENTIAL'}, form=\textcolor{stringliteral}{'FORMATTED'}, \&}
\DoxyCodeLine{904            action=\textcolor{stringliteral}{'WRITE'}, status=\textcolor{stringliteral}{'OLD'}, position=\textcolor{stringliteral}{'APPEND'}, iostat=ios)}
\DoxyCodeLine{905 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{906     \textcolor{keyword}{inquire}(doc\%unitAll, opened=opened)}
\DoxyCodeLine{907     \textcolor{keywordflow}{if} ((.not.opened) .or. (ios /= 0)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{908       \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"Failed to open doc file "}//trim(filename)//\textcolor{stringliteral}{"."})}
\DoxyCodeLine{909 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{910     doc\%filesAreOpen = .true.}
\DoxyCodeLine{911 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{912 }
\DoxyCodeLine{913   \textcolor{keywordflow}{if} ((len\_trim(doc\%docFileBase) > 0) .and. doc\%minimal .and. (doc\%unitShort<0)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{914     new\_file = .true. ; \textcolor{keywordflow}{if} (doc\%unitShort /= -1) new\_file = .false.}
\DoxyCodeLine{915     doc\%unitShort = find\_unused\_unit\_number()}
\DoxyCodeLine{916 }
\DoxyCodeLine{917     \textcolor{keyword}{write}(filename(1:240),\textcolor{stringliteral}{'(a)'}) trim(doc\%docFileBase)//\textcolor{stringliteral}{'.short'}}
\DoxyCodeLine{918     \textcolor{keywordflow}{if} (new\_file) \textcolor{keywordflow}{then}}
\DoxyCodeLine{919       \textcolor{keyword}{open}(doc\%unitShort, file=trim(filename), access=\textcolor{stringliteral}{'SEQUENTIAL'}, form=\textcolor{stringliteral}{'FORMATTED'}, \&}
\DoxyCodeLine{920            action=\textcolor{stringliteral}{'WRITE'}, status=\textcolor{stringliteral}{'REPLACE'}, iostat=ios)}
\DoxyCodeLine{921       \textcolor{keyword}{write}(doc\%unitShort, \textcolor{stringliteral}{'(a)'}) \&}
\DoxyCodeLine{922        \textcolor{stringliteral}{'! This file was written by the model and records the non-default parameters used at run-time.'}}
\DoxyCodeLine{923     \textcolor{keywordflow}{else} \textcolor{comment}{! This file is being reopened, and should be appended.}}
\DoxyCodeLine{924       \textcolor{keyword}{open}(doc\%unitShort, file=trim(filename), access=\textcolor{stringliteral}{'SEQUENTIAL'}, form=\textcolor{stringliteral}{'FORMATTED'}, \&}
\DoxyCodeLine{925            action=\textcolor{stringliteral}{'WRITE'}, status=\textcolor{stringliteral}{'OLD'}, position=\textcolor{stringliteral}{'APPEND'}, iostat=ios)}
\DoxyCodeLine{926 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{927     \textcolor{keyword}{inquire}(doc\%unitShort, opened=opened)}
\DoxyCodeLine{928     \textcolor{keywordflow}{if} ((.not.opened) .or. (ios /= 0)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{929       \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"Failed to open doc file "}//trim(filename)//\textcolor{stringliteral}{"."})}
\DoxyCodeLine{930 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{931     doc\%filesAreOpen = .true.}
\DoxyCodeLine{932 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{933 }
\DoxyCodeLine{934   \textcolor{keywordflow}{if} ((len\_trim(doc\%docFileBase) > 0) .and. doc\%layout .and. (doc\%unitLayout<0)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{935     new\_file = .true. ; \textcolor{keywordflow}{if} (doc\%unitLayout /= -1) new\_file = .false.}
\DoxyCodeLine{936     doc\%unitLayout = find\_unused\_unit\_number()}
\DoxyCodeLine{937 }
\DoxyCodeLine{938     \textcolor{keyword}{write}(filename(1:240),\textcolor{stringliteral}{'(a)'}) trim(doc\%docFileBase)//\textcolor{stringliteral}{'.layout'}}
\DoxyCodeLine{939     \textcolor{keywordflow}{if} (new\_file) \textcolor{keywordflow}{then}}
\DoxyCodeLine{940       \textcolor{keyword}{open}(doc\%unitLayout, file=trim(filename), access=\textcolor{stringliteral}{'SEQUENTIAL'}, form=\textcolor{stringliteral}{'FORMATTED'}, \&}
\DoxyCodeLine{941            action=\textcolor{stringliteral}{'WRITE'}, status=\textcolor{stringliteral}{'REPLACE'}, iostat=ios)}
\DoxyCodeLine{942       \textcolor{keyword}{write}(doc\%unitLayout, \textcolor{stringliteral}{'(a)'}) \&}
\DoxyCodeLine{943        \textcolor{stringliteral}{'! This file was written by the model and records the layout parameters used at run-time.'}}
\DoxyCodeLine{944     \textcolor{keywordflow}{else} \textcolor{comment}{! This file is being reopened, and should be appended.}}
\DoxyCodeLine{945       \textcolor{keyword}{open}(doc\%unitLayout, file=trim(filename), access=\textcolor{stringliteral}{'SEQUENTIAL'}, form=\textcolor{stringliteral}{'FORMATTED'}, \&}
\DoxyCodeLine{946            action=\textcolor{stringliteral}{'WRITE'}, status=\textcolor{stringliteral}{'OLD'}, position=\textcolor{stringliteral}{'APPEND'}, iostat=ios)}
\DoxyCodeLine{947 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{948     \textcolor{keyword}{inquire}(doc\%unitLayout, opened=opened)}
\DoxyCodeLine{949     \textcolor{keywordflow}{if} ((.not.opened) .or. (ios /= 0)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{950       \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"Failed to open doc file "}//trim(filename)//\textcolor{stringliteral}{"."})}
\DoxyCodeLine{951 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{952     doc\%filesAreOpen = .true.}
\DoxyCodeLine{953 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{954 }
\DoxyCodeLine{955   \textcolor{keywordflow}{if} ((len\_trim(doc\%docFileBase) > 0) .and. doc\%debugging .and. (doc\%unitDebugging<0)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{956     new\_file = .true. ; \textcolor{keywordflow}{if} (doc\%unitDebugging /= -1) new\_file = .false.}
\DoxyCodeLine{957     doc\%unitDebugging = find\_unused\_unit\_number()}
\DoxyCodeLine{958 }
\DoxyCodeLine{959     \textcolor{keyword}{write}(filename(1:240),\textcolor{stringliteral}{'(a)'}) trim(doc\%docFileBase)//\textcolor{stringliteral}{'.debugging'}}
\DoxyCodeLine{960     \textcolor{keywordflow}{if} (new\_file) \textcolor{keywordflow}{then}}
\DoxyCodeLine{961       \textcolor{keyword}{open}(doc\%unitDebugging, file=trim(filename), access=\textcolor{stringliteral}{'SEQUENTIAL'}, form=\textcolor{stringliteral}{'FORMATTED'}, \&}
\DoxyCodeLine{962            action=\textcolor{stringliteral}{'WRITE'}, status=\textcolor{stringliteral}{'REPLACE'}, iostat=ios)}
\DoxyCodeLine{963       \textcolor{keyword}{write}(doc\%unitDebugging, \textcolor{stringliteral}{'(a)'}) \&}
\DoxyCodeLine{964        \textcolor{stringliteral}{'! This file was written by the model and records the debugging parameters used at run-time.'}}
\DoxyCodeLine{965     \textcolor{keywordflow}{else} \textcolor{comment}{! This file is being reopened, and should be appended.}}
\DoxyCodeLine{966       \textcolor{keyword}{open}(doc\%unitDebugging, file=trim(filename), access=\textcolor{stringliteral}{'SEQUENTIAL'}, form=\textcolor{stringliteral}{'FORMATTED'}, \&}
\DoxyCodeLine{967            action=\textcolor{stringliteral}{'WRITE'}, status=\textcolor{stringliteral}{'OLD'}, position=\textcolor{stringliteral}{'APPEND'}, iostat=ios)}
\DoxyCodeLine{968 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{969     \textcolor{keyword}{inquire}(doc\%unitDebugging, opened=opened)}
\DoxyCodeLine{970     \textcolor{keywordflow}{if} ((.not.opened) .or. (ios /= 0)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{971       \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"Failed to open doc file "}//trim(filename)//\textcolor{stringliteral}{"."})}
\DoxyCodeLine{972 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{973     doc\%filesAreOpen = .true.}
\DoxyCodeLine{974 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{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{\texttt{ in}}  & {\em vals} & The array of values to record \\
\hline
\mbox{\texttt{ in}}  & {\em sep} & The separator between successive values, \\
\hline
\end{DoxyParams}


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


\begin{DoxyCode}{0}
\DoxyCodeLine{664   \textcolor{keywordtype}{character(len=1320)}    :: real\_array\_string\textcolor{comment}{ !< The output string listing vals}}
\DoxyCodeLine{665 \textcolor{keywordtype}{  real},      \textcolor{keywordtype}{intent(in)}  :: vals(:)\textcolor{comment}{ !< The array of values to record}}
\DoxyCodeLine{666   \textcolor{keywordtype}{character(len=*)}, \&}
\DoxyCodeLine{667     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: sep\textcolor{comment}{     !< The separator between successive values,}}
\DoxyCodeLine{668 \textcolor{comment}{                                    !! by default it is ', '.}}
\DoxyCodeLine{669 \textcolor{comment}{! Returns a character string of a comma-separated, compact formatted, reals}}
\DoxyCodeLine{670 \textcolor{comment}{! e.g. "1., 2., 5*3., 5.E2"}}
\DoxyCodeLine{671   \textcolor{comment}{! Local variables}}
\DoxyCodeLine{672   \textcolor{keywordtype}{integer} :: j, n, b, ns}
\DoxyCodeLine{673   \textcolor{keywordtype}{logical} :: doWrite}
\DoxyCodeLine{674   \textcolor{keywordtype}{character(len=10)} :: separator}
\DoxyCodeLine{675   n=1 ; dowrite=.true. ; real\_array\_string=\textcolor{stringliteral}{''} ; b=1}
\DoxyCodeLine{676   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(sep)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{677     separator=sep ; ns=len(sep)}
\DoxyCodeLine{678   \textcolor{keywordflow}{else}}
\DoxyCodeLine{679     separator=\textcolor{stringliteral}{', '} ; ns=2}
\DoxyCodeLine{680 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{681   \textcolor{keywordflow}{do} j=1,\textcolor{keyword}{size}(vals)}
\DoxyCodeLine{682     dowrite=.true.}
\DoxyCodeLine{683     \textcolor{keywordflow}{if} (j<\textcolor{keyword}{size}(vals)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{684       \textcolor{keywordflow}{if} (vals(j)==vals(j+1)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{685         n=n+1}
\DoxyCodeLine{686         dowrite=.false.}
\DoxyCodeLine{687 \textcolor{keywordflow}{      endif}}
\DoxyCodeLine{688 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{689     \textcolor{keywordflow}{if} (dowrite) \textcolor{keywordflow}{then}}
\DoxyCodeLine{690       \textcolor{keywordflow}{if} (b>1) \textcolor{keywordflow}{then} \textcolor{comment}{! Write separator if a number has already been written}}
\DoxyCodeLine{691         \textcolor{keyword}{write}(real\_array\_string(b:),\textcolor{stringliteral}{'(A)'}) separator}
\DoxyCodeLine{692         b=b+ns}
\DoxyCodeLine{693 \textcolor{keywordflow}{      endif}}
\DoxyCodeLine{694       \textcolor{keywordflow}{if} (n>1) \textcolor{keywordflow}{then}}
\DoxyCodeLine{695         \textcolor{keyword}{write}(real\_array\_string(b:),\textcolor{stringliteral}{'(A,"*",A)'}) trim(int\_string(n)),trim(real\_string(vals(j)))}
\DoxyCodeLine{696       \textcolor{keywordflow}{else}}
\DoxyCodeLine{697         \textcolor{keyword}{write}(real\_array\_string(b:),\textcolor{stringliteral}{'(A)'}) trim(real\_string(vals(j)))}
\DoxyCodeLine{698 \textcolor{keywordflow}{      endif}}
\DoxyCodeLine{699       n=1 ; b=len\_trim(real\_array\_string)+1}
\DoxyCodeLine{700 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{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{\texttt{ 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}{0}
\DoxyCodeLine{611 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{intent(in)}  :: val\textcolor{comment}{ !< The value being written into a string}}
\DoxyCodeLine{612   \textcolor{keywordtype}{character(len=32)} :: real\_string}
\DoxyCodeLine{613 \textcolor{comment}{! This function returns a string with a real formatted like '(G)'}}
\DoxyCodeLine{614   \textcolor{keywordtype}{integer} :: len, ind}
\DoxyCodeLine{615 }
\DoxyCodeLine{616   \textcolor{keywordflow}{if} ((abs(val) < 1.0e4) .and. (abs(val) >= 1.0e-3)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{617     \textcolor{keyword}{write}(real\_string, \textcolor{stringliteral}{'(F30.11)'}) val}
\DoxyCodeLine{618     \textcolor{keywordflow}{if} (.not.testformattedfloatisreal(real\_string,val)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{619       \textcolor{keyword}{write}(real\_string, \textcolor{stringliteral}{'(F30.12)'}) val}
\DoxyCodeLine{620       \textcolor{keywordflow}{if} (.not.testformattedfloatisreal(real\_string,val)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{621         \textcolor{keyword}{write}(real\_string, \textcolor{stringliteral}{'(F30.13)'}) val}
\DoxyCodeLine{622         \textcolor{keywordflow}{if} (.not.testformattedfloatisreal(real\_string,val)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{623           \textcolor{keyword}{write}(real\_string, \textcolor{stringliteral}{'(F30.14)'}) val}
\DoxyCodeLine{624           \textcolor{keywordflow}{if} (.not.testformattedfloatisreal(real\_string,val)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{625             \textcolor{keyword}{write}(real\_string, \textcolor{stringliteral}{'(F30.15)'}) val}
\DoxyCodeLine{626             \textcolor{keywordflow}{if} (.not.testformattedfloatisreal(real\_string,val)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{627               \textcolor{keyword}{write}(real\_string, \textcolor{stringliteral}{'(F30.16)'}) val}
\DoxyCodeLine{628 \textcolor{keywordflow}{            endif}}
\DoxyCodeLine{629 \textcolor{keywordflow}{          endif}}
\DoxyCodeLine{630 \textcolor{keywordflow}{        endif}}
\DoxyCodeLine{631 \textcolor{keywordflow}{      endif}}
\DoxyCodeLine{632 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{633     \textcolor{keywordflow}{do}}
\DoxyCodeLine{634       len = len\_trim(real\_string)}
\DoxyCodeLine{635       \textcolor{keywordflow}{if} ((len<2) .or. (real\_string(len-1:len) == \textcolor{stringliteral}{".0"}) .or. \&}
\DoxyCodeLine{636           (real\_string(len:len) /= \textcolor{stringliteral}{"0"})) \textcolor{keywordflow}{exit}}
\DoxyCodeLine{637       real\_string(len:len) = \textcolor{stringliteral}{" "}}
\DoxyCodeLine{638 \textcolor{keywordflow}{    enddo}}
\DoxyCodeLine{639   \textcolor{keywordflow}{elseif} (val == 0.) \textcolor{keywordflow}{then}}
\DoxyCodeLine{640     real\_string = \textcolor{stringliteral}{"0.0"}}
\DoxyCodeLine{641   \textcolor{keywordflow}{else}}
\DoxyCodeLine{642     \textcolor{keywordflow}{if} ((abs(val) <= 1.0e-100) .or. (abs(val) >= 1.0e100)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{643       \textcolor{keyword}{write}(real\_string(1:32), \textcolor{stringliteral}{'(ES24.14E3)'}) val}
\DoxyCodeLine{644       \textcolor{keywordflow}{if} (.not.testformattedfloatisreal(real\_string,val)) \&}
\DoxyCodeLine{645         \textcolor{keyword}{write}(real\_string(1:32), \textcolor{stringliteral}{'(ES24.15E3)'}) val}
\DoxyCodeLine{646     \textcolor{keywordflow}{else}}
\DoxyCodeLine{647       \textcolor{keyword}{write}(real\_string(1:32), \textcolor{stringliteral}{'(ES23.14)'}) val}
\DoxyCodeLine{648       \textcolor{keywordflow}{if} (.not.testformattedfloatisreal(real\_string,val)) \&}
\DoxyCodeLine{649         \textcolor{keyword}{write}(real\_string(1:32), \textcolor{stringliteral}{'(ES23.15)'}) val}
\DoxyCodeLine{650 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{651     \textcolor{keywordflow}{do}}
\DoxyCodeLine{652       ind = index(real\_string,\textcolor{stringliteral}{"0E"})}
\DoxyCodeLine{653       \textcolor{keywordflow}{if} (ind == 0) \textcolor{keywordflow}{exit}}
\DoxyCodeLine{654       \textcolor{keywordflow}{if} (real\_string(ind-1:ind-1) == \textcolor{stringliteral}{"."}) \textcolor{keywordflow}{exit}}
\DoxyCodeLine{655       real\_string = real\_string(1:ind-1)//real\_string(ind+1:)}
\DoxyCodeLine{656 \textcolor{keywordflow}{    enddo}}
\DoxyCodeLine{657 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{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{\texttt{ in}}  & {\em str} & The string that match val \\
\hline
\mbox{\texttt{ in}}  & {\em val} & The value being tested \\
\hline
\end{DoxyParams}


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


\begin{DoxyCode}{0}
\DoxyCodeLine{706   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{intent(in)} :: str\textcolor{comment}{ !< The string that match val}}
\DoxyCodeLine{707 \textcolor{keywordtype}{  real},             \textcolor{keywordtype}{intent(in)} :: val\textcolor{comment}{ !< The value being tested}}
\DoxyCodeLine{708   \textcolor{keywordtype}{logical}                      :: testFormattedFloatIsReal}
\DoxyCodeLine{709   \textcolor{comment}{! Local variables}}
\DoxyCodeLine{710 \textcolor{keywordtype}{  real} :: scannedVal}
\DoxyCodeLine{711 }
\DoxyCodeLine{712   \textcolor{keyword}{read}(str(1:),*) scannedval}
\DoxyCodeLine{713   \textcolor{keywordflow}{if} (scannedval == val) \textcolor{keywordflow}{then}}
\DoxyCodeLine{714     testformattedfloatisreal=.true.}
\DoxyCodeLine{715   \textcolor{keywordflow}{else}}
\DoxyCodeLine{716     testformattedfloatisreal=.false.}
\DoxyCodeLine{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{\texttt{ in}}  & {\em time} & The time type being translated \\
\hline
\end{DoxyParams}


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


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

\end{DoxyCode}
