\hypertarget{interfacemom__file__parser_1_1read__param}{}\section{mom\+\_\+file\+\_\+parser\+::read\+\_\+param Interface Reference}
\label{interfacemom__file__parser_1_1read__param}\index{mom\_file\_parser::read\_param@{mom\_file\_parser::read\_param}}


\subsection{Detailed Description}
An overloaded interface to read various types of parameters. 

Definition at line 90 of file M\+O\+M\+\_\+file\+\_\+parser.\+F90.

\subsection*{Private functions}
\begin{DoxyCompactItemize}
\item 
subroutine \mbox{\hyperlink{interfacemom__file__parser_1_1read__param_a2ec3af5c2d4cf6e92e86e40a69066c0b}{read\+\_\+param\+\_\+int}} (CS, varname, value, fail\+\_\+if\+\_\+missing)
\begin{DoxyCompactList}\small\item\em This subroutine reads the value of an integer model parameter from a parameter file. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{interfacemom__file__parser_1_1read__param_a1c0ef29e19c1415b1ebe9ccfe7b2fd1f}{read\+\_\+param\+\_\+real}} (CS, varname, value, fail\+\_\+if\+\_\+missing, scale)
\begin{DoxyCompactList}\small\item\em This subroutine reads the value of a real model parameter from a parameter file. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{interfacemom__file__parser_1_1read__param_ac597a6541686269074172edb615d9182}{read\+\_\+param\+\_\+logical}} (CS, varname, value, fail\+\_\+if\+\_\+missing)
\begin{DoxyCompactList}\small\item\em This subroutine reads the value of a logical model parameter from a parameter file. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{interfacemom__file__parser_1_1read__param_aa4432bf14f3758eb45ec97e5202cd3fe}{read\+\_\+param\+\_\+char}} (CS, varname, value, fail\+\_\+if\+\_\+missing)
\begin{DoxyCompactList}\small\item\em This subroutine reads the value of a character string model parameter from a parameter file. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{interfacemom__file__parser_1_1read__param_aa8c50149ca73ac6771ca7c786d8b6a29}{read\+\_\+param\+\_\+char\+\_\+array}} (CS, varname, value, fail\+\_\+if\+\_\+missing)
\begin{DoxyCompactList}\small\item\em This subroutine reads the values of an array of character string model parameters from a parameter file. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{interfacemom__file__parser_1_1read__param_abf7de1abb29512fb7496bd93df4f8f21}{read\+\_\+param\+\_\+time}} (CS, varname, value, timeunit, fail\+\_\+if\+\_\+missing, date\+\_\+format)
\begin{DoxyCompactList}\small\item\em This subroutine reads the value of a time\+\_\+type model parameter from a parameter file. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{interfacemom__file__parser_1_1read__param_abcb8b784ccf76a3dcb6748de0bf99c19}{read\+\_\+param\+\_\+int\+\_\+array}} (CS, varname, value, fail\+\_\+if\+\_\+missing)
\begin{DoxyCompactList}\small\item\em This subroutine reads the values of an array of integer model parameters from a parameter file. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{interfacemom__file__parser_1_1read__param_a18df4cad513e32d9341704169dbe4cee}{read\+\_\+param\+\_\+real\+\_\+array}} (CS, varname, value, fail\+\_\+if\+\_\+missing, scale)
\begin{DoxyCompactList}\small\item\em This subroutine reads the values of an array of real model parameters from a parameter file. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
An overloaded interface to read various types of parameters. 

Definition at line 90 of file M\+O\+M\+\_\+file\+\_\+parser.\+F90.



\subsection{Functions and subroutines}
\mbox{\Hypertarget{interfacemom__file__parser_1_1read__param_aa4432bf14f3758eb45ec97e5202cd3fe}\label{interfacemom__file__parser_1_1read__param_aa4432bf14f3758eb45ec97e5202cd3fe}} 
\index{mom\_file\_parser::read\_param@{mom\_file\_parser::read\_param}!read\_param\_char@{read\_param\_char}}
\index{read\_param\_char@{read\_param\_char}!mom\_file\_parser::read\_param@{mom\_file\_parser::read\_param}}
\subsubsection{\texorpdfstring{read\_param\_char()}{read\_param\_char()}}
{\footnotesize\ttfamily subroutine mom\+\_\+file\+\_\+parser\+::read\+\_\+param\+::read\+\_\+param\+\_\+char (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__file__parser_1_1param__file__type}{param\+\_\+file\+\_\+type}}), intent(in)}]{CS,  }\item[{character(len=$\ast$), intent(in)}]{varname,  }\item[{character(len=$\ast$), intent(inout)}]{value,  }\item[{logical, intent(in), optional}]{fail\+\_\+if\+\_\+missing }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine reads the value of a character string model parameter from a parameter file. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em cs} & The control structure for the file\+\_\+parser module, it is also a structure to parse for run-\/time parameters \\
\hline
\mbox{\texttt{ in}}  & {\em varname} & The case-\/sensitive name of the parameter to read \\
\hline
\mbox{\texttt{ in,out}}  & {\em value} & The value of the parameter that may be read from the parameter file \\
\hline
\mbox{\texttt{ in}}  & {\em fail\+\_\+if\+\_\+missing} & If present and true, a fatal error occurs if this variable is not found in the parameter file \\
\hline
\end{DoxyParams}


Definition at line 720 of file M\+O\+M\+\_\+file\+\_\+parser.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{720   \textcolor{keywordtype}{type}(param\_file\_type),  \textcolor{keywordtype}{intent(in)} :: CS\textcolor{comment}{      !< The control structure for the file\_parser module,}}
\DoxyCodeLine{721 \textcolor{comment}{                                         !! it is also a structure to parse for run-time parameters}}
\DoxyCodeLine{722   \textcolor{keywordtype}{character(len=*)},       \textcolor{keywordtype}{intent(in)} :: varname\textcolor{comment}{ !< The case-sensitive name of the parameter to read}}
\DoxyCodeLine{723   \textcolor{keywordtype}{character(len=*)},    \textcolor{keywordtype}{intent(inout)} :: \textcolor{keywordtype}{value}\textcolor{comment}{   !< The value of the parameter that may be}}
\DoxyCodeLine{724 \textcolor{comment}{                                         !! read from the parameter file}}
\DoxyCodeLine{725   \textcolor{keywordtype}{logical},      \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: fail\_if\_missing\textcolor{comment}{ !< If present and true, a fatal error occurs}}
\DoxyCodeLine{726 \textcolor{comment}{                                         !! if this variable is not found in the parameter file}}
\DoxyCodeLine{727   \textcolor{comment}{! Local variables}}
\DoxyCodeLine{728   \textcolor{keywordtype}{character(len=INPUT\_STR\_LENGTH)} :: value\_string(1)}
\DoxyCodeLine{729   \textcolor{keywordtype}{logical}            :: found, defined}
\DoxyCodeLine{730 }
\DoxyCodeLine{731   \textcolor{keyword}{call }get\_variable\_line(cs, varname, found, defined, value\_string)}
\DoxyCodeLine{732   \textcolor{keywordflow}{if} (found) \textcolor{keywordflow}{then}}
\DoxyCodeLine{733     \textcolor{keywordtype}{value} = trim(strip\_quotes(value\_string(1)))}
\DoxyCodeLine{734   \textcolor{keywordflow}{elseif} (\textcolor{keyword}{present}(fail\_if\_missing)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (fail\_if\_missing) \textcolor{keywordflow}{then}}
\DoxyCodeLine{735     \textcolor{keyword}{call }mom\_error(fatal,\textcolor{stringliteral}{'Unable to find variable '}//trim(varname)// \&}
\DoxyCodeLine{736                          \textcolor{stringliteral}{' in any input files.'})}
\DoxyCodeLine{737 \textcolor{keywordflow}{  endif} ;\textcolor{keywordflow}{ endif}}
\DoxyCodeLine{738 }

\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__file__parser_1_1read__param_aa8c50149ca73ac6771ca7c786d8b6a29}\label{interfacemom__file__parser_1_1read__param_aa8c50149ca73ac6771ca7c786d8b6a29}} 
\index{mom\_file\_parser::read\_param@{mom\_file\_parser::read\_param}!read\_param\_char\_array@{read\_param\_char\_array}}
\index{read\_param\_char\_array@{read\_param\_char\_array}!mom\_file\_parser::read\_param@{mom\_file\_parser::read\_param}}
\subsubsection{\texorpdfstring{read\_param\_char\_array()}{read\_param\_char\_array()}}
{\footnotesize\ttfamily subroutine mom\+\_\+file\+\_\+parser\+::read\+\_\+param\+::read\+\_\+param\+\_\+char\+\_\+array (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__file__parser_1_1param__file__type}{param\+\_\+file\+\_\+type}}), intent(in)}]{CS,  }\item[{character(len=$\ast$), intent(in)}]{varname,  }\item[{character(len=$\ast$), dimension(\+:), intent(inout)}]{value,  }\item[{logical, intent(in), optional}]{fail\+\_\+if\+\_\+missing }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine reads the values of an array of character string model parameters from a parameter file. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em cs} & The control structure for the file\+\_\+parser module, it is also a structure to parse for run-\/time parameters \\
\hline
\mbox{\texttt{ in}}  & {\em varname} & The case-\/sensitive name of the parameter to read \\
\hline
\mbox{\texttt{ in,out}}  & {\em value} & The value of the parameter that may be read from the parameter file \\
\hline
\mbox{\texttt{ in}}  & {\em fail\+\_\+if\+\_\+missing} & If present and true, a fatal error occurs if this variable is not found in the parameter file \\
\hline
\end{DoxyParams}


Definition at line 743 of file M\+O\+M\+\_\+file\+\_\+parser.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{743   \textcolor{keywordtype}{type}(param\_file\_type),  \textcolor{keywordtype}{intent(in)} :: CS\textcolor{comment}{      !< The control structure for the file\_parser module,}}
\DoxyCodeLine{744 \textcolor{comment}{                                         !! it is also a structure to parse for run-time parameters}}
\DoxyCodeLine{745   \textcolor{keywordtype}{character(len=*)},       \textcolor{keywordtype}{intent(in)} :: varname\textcolor{comment}{ !< The case-sensitive name of the parameter to read}}
\DoxyCodeLine{746   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(inout)} :: \textcolor{keywordtype}{value}\textcolor{comment}{   !< The value of the parameter that may be}}
\DoxyCodeLine{747 \textcolor{comment}{                                         !! read from the parameter file}}
\DoxyCodeLine{748   \textcolor{keywordtype}{logical},      \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: fail\_if\_missing\textcolor{comment}{ !< If present and true, a fatal error occurs}}
\DoxyCodeLine{749 \textcolor{comment}{                                         !! if this variable is not found in the parameter file}}
\DoxyCodeLine{750 }
\DoxyCodeLine{751   \textcolor{comment}{! Local variables}}
\DoxyCodeLine{752   \textcolor{keywordtype}{character(len=INPUT\_STR\_LENGTH)} :: value\_string(1), loc\_string}
\DoxyCodeLine{753   \textcolor{keywordtype}{logical}            :: found, defined}
\DoxyCodeLine{754   \textcolor{keywordtype}{integer}            :: i, i\_out}
\DoxyCodeLine{755 }
\DoxyCodeLine{756   \textcolor{keyword}{call }get\_variable\_line(cs, varname, found, defined, value\_string)}
\DoxyCodeLine{757   \textcolor{keywordflow}{if} (found) \textcolor{keywordflow}{then}}
\DoxyCodeLine{758     loc\_string = trim(value\_string(1))}
\DoxyCodeLine{759     i = index(loc\_string,\textcolor{stringliteral}{","})}
\DoxyCodeLine{760     i\_out = 1}
\DoxyCodeLine{761     \textcolor{keywordflow}{do} \textcolor{keywordflow}{while}(i>0)}
\DoxyCodeLine{762       value(i\_out) = trim(strip\_quotes(loc\_string(:i-1)))}
\DoxyCodeLine{763       i\_out = i\_out+1}
\DoxyCodeLine{764       loc\_string = trim(adjustl(loc\_string(i+1:)))}
\DoxyCodeLine{765       i = index(loc\_string,\textcolor{stringliteral}{","})}
\DoxyCodeLine{766 \textcolor{keywordflow}{    enddo}}
\DoxyCodeLine{767     \textcolor{keywordflow}{if} (len\_trim(loc\_string)>0) \textcolor{keywordflow}{then}}
\DoxyCodeLine{768       value(i\_out) = trim(strip\_quotes(adjustl(loc\_string)))}
\DoxyCodeLine{769       i\_out = i\_out+1}
\DoxyCodeLine{770 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{771     \textcolor{keywordflow}{do} i=i\_out,\textcolor{keyword}{SIZE}(\textcolor{keywordtype}{value}) ; value(i) = \textcolor{stringliteral}{" "} ;\textcolor{keywordflow}{ enddo}}
\DoxyCodeLine{772   \textcolor{keywordflow}{elseif} (\textcolor{keyword}{present}(fail\_if\_missing)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (fail\_if\_missing) \textcolor{keywordflow}{then}}
\DoxyCodeLine{773     \textcolor{keyword}{call }mom\_error(fatal,\textcolor{stringliteral}{'Unable to find variable '}//trim(varname)// \&}
\DoxyCodeLine{774                          \textcolor{stringliteral}{' in any input files.'})}
\DoxyCodeLine{775 \textcolor{keywordflow}{  endif} ;\textcolor{keywordflow}{ endif}}
\DoxyCodeLine{776 }

\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__file__parser_1_1read__param_a2ec3af5c2d4cf6e92e86e40a69066c0b}\label{interfacemom__file__parser_1_1read__param_a2ec3af5c2d4cf6e92e86e40a69066c0b}} 
\index{mom\_file\_parser::read\_param@{mom\_file\_parser::read\_param}!read\_param\_int@{read\_param\_int}}
\index{read\_param\_int@{read\_param\_int}!mom\_file\_parser::read\_param@{mom\_file\_parser::read\_param}}
\subsubsection{\texorpdfstring{read\_param\_int()}{read\_param\_int()}}
{\footnotesize\ttfamily subroutine mom\+\_\+file\+\_\+parser\+::read\+\_\+param\+::read\+\_\+param\+\_\+int (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__file__parser_1_1param__file__type}{param\+\_\+file\+\_\+type}}), intent(in)}]{CS,  }\item[{character(len=$\ast$), intent(in)}]{varname,  }\item[{integer, intent(inout)}]{value,  }\item[{logical, intent(in), optional}]{fail\+\_\+if\+\_\+missing }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine reads the value of an integer model parameter from a parameter file. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em cs} & The control structure for the file\+\_\+parser module, it is also a structure to parse for run-\/time parameters \\
\hline
\mbox{\texttt{ in}}  & {\em varname} & The case-\/sensitive name of the parameter to read \\
\hline
\mbox{\texttt{ in,out}}  & {\em value} & The value of the parameter that may be read from the parameter file \\
\hline
\mbox{\texttt{ in}}  & {\em fail\+\_\+if\+\_\+missing} & If present and true, a fatal error occurs if this variable is not found in the parameter file \\
\hline
\end{DoxyParams}


Definition at line 581 of file M\+O\+M\+\_\+file\+\_\+parser.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{581   \textcolor{keywordtype}{type}(param\_file\_type),  \textcolor{keywordtype}{intent(in)} :: CS\textcolor{comment}{      !< The control structure for the file\_parser module,}}
\DoxyCodeLine{582 \textcolor{comment}{                                         !! it is also a structure to parse for run-time parameters}}
\DoxyCodeLine{583   \textcolor{keywordtype}{character(len=*)},       \textcolor{keywordtype}{intent(in)} :: varname\textcolor{comment}{ !< The case-sensitive name of the parameter to read}}
\DoxyCodeLine{584   \textcolor{keywordtype}{integer},             \textcolor{keywordtype}{intent(inout)} :: \textcolor{keywordtype}{value}\textcolor{comment}{   !< The value of the parameter that may be}}
\DoxyCodeLine{585 \textcolor{comment}{                                         !! read from the parameter file}}
\DoxyCodeLine{586   \textcolor{keywordtype}{logical},      \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: fail\_if\_missing\textcolor{comment}{ !< If present and true, a fatal error occurs}}
\DoxyCodeLine{587 \textcolor{comment}{                                         !! if this variable is not found in the parameter file}}
\DoxyCodeLine{588   \textcolor{comment}{! Local variables}}
\DoxyCodeLine{589   \textcolor{keywordtype}{character(len=INPUT\_STR\_LENGTH)} :: value\_string(1)}
\DoxyCodeLine{590   \textcolor{keywordtype}{logical}            :: found, defined}
\DoxyCodeLine{591 }
\DoxyCodeLine{592   \textcolor{keyword}{call }get\_variable\_line(cs, varname, found, defined, value\_string)}
\DoxyCodeLine{593   \textcolor{keywordflow}{if} (found .and. defined .and. (len\_trim(value\_string(1)) > 0)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{594     \textcolor{keyword}{read}(value\_string(1),*,err = 1001) \textcolor{keywordtype}{value}}
\DoxyCodeLine{595   \textcolor{keywordflow}{else}}
\DoxyCodeLine{596     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(fail\_if\_missing)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (fail\_if\_missing) \textcolor{keywordflow}{then}}
\DoxyCodeLine{597       \textcolor{keywordflow}{if} (.not.found) \textcolor{keywordflow}{then}}
\DoxyCodeLine{598         \textcolor{keyword}{call }mom\_error(fatal,\textcolor{stringliteral}{'read\_param\_int: Unable to find variable '}//trim(varname)// \&}
\DoxyCodeLine{599                              \textcolor{stringliteral}{' in any input files.'})}
\DoxyCodeLine{600       \textcolor{keywordflow}{else}}
\DoxyCodeLine{601         \textcolor{keyword}{call }mom\_error(fatal,\textcolor{stringliteral}{'read\_param\_int: Variable '}//trim(varname)// \&}
\DoxyCodeLine{602                              \textcolor{stringliteral}{' found but not set in input files.'})}
\DoxyCodeLine{603 \textcolor{keywordflow}{      endif}}
\DoxyCodeLine{604 \textcolor{keywordflow}{    endif} ;\textcolor{keywordflow}{ endif}}
\DoxyCodeLine{605 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{606   \textcolor{keywordflow}{return}}
\DoxyCodeLine{607  1001 \textcolor{keyword}{call }mom\_error(fatal,\textcolor{stringliteral}{'read\_param\_int: read error for integer variable '}//trim(varname)// \&}
\DoxyCodeLine{608                              \textcolor{stringliteral}{' parsing "'}//trim(value\_string(1))//\textcolor{stringliteral}{'"'})}

\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__file__parser_1_1read__param_abcb8b784ccf76a3dcb6748de0bf99c19}\label{interfacemom__file__parser_1_1read__param_abcb8b784ccf76a3dcb6748de0bf99c19}} 
\index{mom\_file\_parser::read\_param@{mom\_file\_parser::read\_param}!read\_param\_int\_array@{read\_param\_int\_array}}
\index{read\_param\_int\_array@{read\_param\_int\_array}!mom\_file\_parser::read\_param@{mom\_file\_parser::read\_param}}
\subsubsection{\texorpdfstring{read\_param\_int\_array()}{read\_param\_int\_array()}}
{\footnotesize\ttfamily subroutine mom\+\_\+file\+\_\+parser\+::read\+\_\+param\+::read\+\_\+param\+\_\+int\+\_\+array (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__file__parser_1_1param__file__type}{param\+\_\+file\+\_\+type}}), intent(in)}]{CS,  }\item[{character(len=$\ast$), intent(in)}]{varname,  }\item[{integer, dimension(\+:), intent(inout)}]{value,  }\item[{logical, intent(in), optional}]{fail\+\_\+if\+\_\+missing }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine reads the values of an array of integer model parameters from a parameter file. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em cs} & The control structure for the file\+\_\+parser module, it is also a structure to parse for run-\/time parameters \\
\hline
\mbox{\texttt{ in}}  & {\em varname} & The case-\/sensitive name of the parameter to read \\
\hline
\mbox{\texttt{ in,out}}  & {\em value} & The value of the parameter that may be read from the parameter file \\
\hline
\mbox{\texttt{ in}}  & {\em fail\+\_\+if\+\_\+missing} & If present and true, a fatal error occurs if this variable is not found in the parameter file \\
\hline
\end{DoxyParams}


Definition at line 613 of file M\+O\+M\+\_\+file\+\_\+parser.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{613   \textcolor{keywordtype}{type}(param\_file\_type),  \textcolor{keywordtype}{intent(in)} :: CS\textcolor{comment}{      !< The control structure for the file\_parser module,}}
\DoxyCodeLine{614 \textcolor{comment}{                                         !! it is also a structure to parse for run-time parameters}}
\DoxyCodeLine{615   \textcolor{keywordtype}{character(len=*)},       \textcolor{keywordtype}{intent(in)} :: varname\textcolor{comment}{ !< The case-sensitive name of the parameter to read}}
\DoxyCodeLine{616   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{dimension(:)},  \textcolor{keywordtype}{intent(inout)} :: \textcolor{keywordtype}{value}\textcolor{comment}{   !< The value of the parameter that may be}}
\DoxyCodeLine{617 \textcolor{comment}{                                         !! read from the parameter file}}
\DoxyCodeLine{618   \textcolor{keywordtype}{logical},      \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: fail\_if\_missing\textcolor{comment}{ !< If present and true, a fatal error occurs}}
\DoxyCodeLine{619 \textcolor{comment}{                                         !! if this variable is not found in the parameter file}}
\DoxyCodeLine{620   \textcolor{comment}{! Local variables}}
\DoxyCodeLine{621   \textcolor{keywordtype}{character(len=INPUT\_STR\_LENGTH)} :: value\_string(1)}
\DoxyCodeLine{622   \textcolor{keywordtype}{logical}            :: found, defined}
\DoxyCodeLine{623 }
\DoxyCodeLine{624   \textcolor{keyword}{call }get\_variable\_line(cs, varname, found, defined, value\_string)}
\DoxyCodeLine{625   \textcolor{keywordflow}{if} (found .and. defined .and. (len\_trim(value\_string(1)) > 0)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{626     \textcolor{keyword}{read}(value\_string(1),*,end=991,err=1002) \textcolor{keywordtype}{value}}
\DoxyCodeLine{627  991 \textcolor{keywordflow}{return}}
\DoxyCodeLine{628   \textcolor{keywordflow}{else}}
\DoxyCodeLine{629     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(fail\_if\_missing)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (fail\_if\_missing) \textcolor{keywordflow}{then}}
\DoxyCodeLine{630       \textcolor{keywordflow}{if} (.not.found) \textcolor{keywordflow}{then}}
\DoxyCodeLine{631         \textcolor{keyword}{call }mom\_error(fatal,\textcolor{stringliteral}{'read\_param\_int\_array: Unable to find variable '}//trim(varname)// \&}
\DoxyCodeLine{632                              \textcolor{stringliteral}{' in any input files.'})}
\DoxyCodeLine{633       \textcolor{keywordflow}{else}}
\DoxyCodeLine{634         \textcolor{keyword}{call }mom\_error(fatal,\textcolor{stringliteral}{'read\_param\_int\_array: Variable '}//trim(varname)// \&}
\DoxyCodeLine{635                              \textcolor{stringliteral}{' found but not set in input files.'})}
\DoxyCodeLine{636 \textcolor{keywordflow}{      endif}}
\DoxyCodeLine{637 \textcolor{keywordflow}{    endif} ;\textcolor{keywordflow}{ endif}}
\DoxyCodeLine{638 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{639   \textcolor{keywordflow}{return}}
\DoxyCodeLine{640  1002 \textcolor{keyword}{call }mom\_error(fatal,\textcolor{stringliteral}{'read\_param\_int\_array: read error for integer array '}//trim(varname)// \&}
\DoxyCodeLine{641                              \textcolor{stringliteral}{' parsing "'}//trim(value\_string(1))//\textcolor{stringliteral}{'"'})}

\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__file__parser_1_1read__param_ac597a6541686269074172edb615d9182}\label{interfacemom__file__parser_1_1read__param_ac597a6541686269074172edb615d9182}} 
\index{mom\_file\_parser::read\_param@{mom\_file\_parser::read\_param}!read\_param\_logical@{read\_param\_logical}}
\index{read\_param\_logical@{read\_param\_logical}!mom\_file\_parser::read\_param@{mom\_file\_parser::read\_param}}
\subsubsection{\texorpdfstring{read\_param\_logical()}{read\_param\_logical()}}
{\footnotesize\ttfamily subroutine mom\+\_\+file\+\_\+parser\+::read\+\_\+param\+::read\+\_\+param\+\_\+logical (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__file__parser_1_1param__file__type}{param\+\_\+file\+\_\+type}}), intent(in)}]{CS,  }\item[{character(len=$\ast$), intent(in)}]{varname,  }\item[{logical, intent(inout)}]{value,  }\item[{logical, intent(in), optional}]{fail\+\_\+if\+\_\+missing }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine reads the value of a logical model parameter from a parameter file. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em cs} & The control structure for the file\+\_\+parser module, it is also a structure to parse for run-\/time parameters \\
\hline
\mbox{\texttt{ in}}  & {\em varname} & The case-\/sensitive name of the parameter to read \\
\hline
\mbox{\texttt{ in,out}}  & {\em value} & The value of the parameter that may be read from the parameter file \\
\hline
\mbox{\texttt{ in}}  & {\em fail\+\_\+if\+\_\+missing} & If present and true, a fatal error occurs if this variable is not found in the parameter file \\
\hline
\end{DoxyParams}


Definition at line 781 of file M\+O\+M\+\_\+file\+\_\+parser.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{781   \textcolor{keywordtype}{type}(param\_file\_type),  \textcolor{keywordtype}{intent(in)} :: CS\textcolor{comment}{      !< The control structure for the file\_parser module,}}
\DoxyCodeLine{782 \textcolor{comment}{                                         !! it is also a structure to parse for run-time parameters}}
\DoxyCodeLine{783   \textcolor{keywordtype}{character(len=*)},       \textcolor{keywordtype}{intent(in)} :: varname\textcolor{comment}{ !< The case-sensitive name of the parameter to read}}
\DoxyCodeLine{784   \textcolor{keywordtype}{logical},             \textcolor{keywordtype}{intent(inout)} :: \textcolor{keywordtype}{value}\textcolor{comment}{   !< The value of the parameter that may be}}
\DoxyCodeLine{785 \textcolor{comment}{                                         !! read from the parameter file}}
\DoxyCodeLine{786   \textcolor{keywordtype}{logical},      \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: fail\_if\_missing\textcolor{comment}{ !< If present and true, a fatal error occurs}}
\DoxyCodeLine{787 \textcolor{comment}{                                         !! if this variable is not found in the parameter file}}
\DoxyCodeLine{788 }
\DoxyCodeLine{789   \textcolor{comment}{! Local variables}}
\DoxyCodeLine{790   \textcolor{keywordtype}{character(len=INPUT\_STR\_LENGTH)} :: value\_string(1)}
\DoxyCodeLine{791   \textcolor{keywordtype}{logical}            :: found, defined}
\DoxyCodeLine{792 }
\DoxyCodeLine{793   \textcolor{keyword}{call }get\_variable\_line(cs, varname, found, defined, value\_string, paramislogical=.true.)}
\DoxyCodeLine{794   \textcolor{keywordflow}{if} (found) \textcolor{keywordflow}{then}}
\DoxyCodeLine{795     \textcolor{keywordtype}{value} = defined}
\DoxyCodeLine{796   \textcolor{keywordflow}{elseif} (\textcolor{keyword}{present}(fail\_if\_missing)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (fail\_if\_missing) \textcolor{keywordflow}{then}}
\DoxyCodeLine{797     \textcolor{keyword}{call }mom\_error(fatal,\textcolor{stringliteral}{'Unable to find variable '}//trim(varname)// \&}
\DoxyCodeLine{798                          \textcolor{stringliteral}{' in any input files.'})}
\DoxyCodeLine{799 \textcolor{keywordflow}{  endif} ;\textcolor{keywordflow}{ endif}}

\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__file__parser_1_1read__param_a1c0ef29e19c1415b1ebe9ccfe7b2fd1f}\label{interfacemom__file__parser_1_1read__param_a1c0ef29e19c1415b1ebe9ccfe7b2fd1f}} 
\index{mom\_file\_parser::read\_param@{mom\_file\_parser::read\_param}!read\_param\_real@{read\_param\_real}}
\index{read\_param\_real@{read\_param\_real}!mom\_file\_parser::read\_param@{mom\_file\_parser::read\_param}}
\subsubsection{\texorpdfstring{read\_param\_real()}{read\_param\_real()}}
{\footnotesize\ttfamily subroutine mom\+\_\+file\+\_\+parser\+::read\+\_\+param\+::read\+\_\+param\+\_\+real (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__file__parser_1_1param__file__type}{param\+\_\+file\+\_\+type}}), intent(in)}]{CS,  }\item[{character(len=$\ast$), intent(in)}]{varname,  }\item[{real, intent(inout)}]{value,  }\item[{logical, intent(in), optional}]{fail\+\_\+if\+\_\+missing,  }\item[{real, intent(in), optional}]{scale }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine reads the value of a real model parameter from a parameter file. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em cs} & The control structure for the file\+\_\+parser module, it is also a structure to parse for run-\/time parameters \\
\hline
\mbox{\texttt{ in}}  & {\em varname} & The case-\/sensitive name of the parameter to read \\
\hline
\mbox{\texttt{ in,out}}  & {\em value} & The value of the parameter that may be read from the parameter file \\
\hline
\mbox{\texttt{ in}}  & {\em fail\+\_\+if\+\_\+missing} & If present and true, a fatal error occurs if this variable is not found in the parameter file \\
\hline
\mbox{\texttt{ in}}  & {\em scale} & A scaling factor that the parameter is multiplied by before it is returned. \\
\hline
\end{DoxyParams}


Definition at line 646 of file M\+O\+M\+\_\+file\+\_\+parser.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{646   \textcolor{keywordtype}{type}(param\_file\_type), \textcolor{keywordtype}{intent(in)} :: CS\textcolor{comment}{      !< The control structure for the file\_parser module,}}
\DoxyCodeLine{647 \textcolor{comment}{                                         !! it is also a structure to parse for run-time parameters}}
\DoxyCodeLine{648   \textcolor{keywordtype}{character(len=*)},      \textcolor{keywordtype}{intent(in)} :: varname\textcolor{comment}{ !< The case-sensitive name of the parameter to read}}
\DoxyCodeLine{649 \textcolor{keywordtype}{  real},               \textcolor{keywordtype}{intent(inout)} :: \textcolor{keywordtype}{value}\textcolor{comment}{   !< The value of the parameter that may be}}
\DoxyCodeLine{650 \textcolor{comment}{                                         !! read from the parameter file}}
\DoxyCodeLine{651   \textcolor{keywordtype}{logical},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: fail\_if\_missing\textcolor{comment}{ !< If present and true, a fatal error occurs}}
\DoxyCodeLine{652 \textcolor{comment}{                                         !! if this variable is not found in the parameter file}}
\DoxyCodeLine{653 \textcolor{keywordtype}{  real},        \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: scale\textcolor{comment}{   !< A scaling factor that the parameter is multiplied}}
\DoxyCodeLine{654 \textcolor{comment}{                                         !! by before it is returned.}}
\DoxyCodeLine{655 }
\DoxyCodeLine{656   \textcolor{comment}{! Local variables}}
\DoxyCodeLine{657   \textcolor{keywordtype}{character(len=INPUT\_STR\_LENGTH)} :: value\_string(1)}
\DoxyCodeLine{658   \textcolor{keywordtype}{logical}            :: found, defined}
\DoxyCodeLine{659 }
\DoxyCodeLine{660   \textcolor{keyword}{call }get\_variable\_line(cs, varname, found, defined, value\_string)}
\DoxyCodeLine{661   \textcolor{keywordflow}{if} (found .and. defined .and. (len\_trim(value\_string(1)) > 0)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{662     \textcolor{keyword}{read}(value\_string(1),*,err=1003) \textcolor{keywordtype}{value}}
\DoxyCodeLine{663     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(scale)) \textcolor{keywordtype}{value} = scale*\textcolor{keywordtype}{value}}
\DoxyCodeLine{664   \textcolor{keywordflow}{else}}
\DoxyCodeLine{665     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(fail\_if\_missing)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (fail\_if\_missing) \textcolor{keywordflow}{then}}
\DoxyCodeLine{666       \textcolor{keywordflow}{if} (.not.found) \textcolor{keywordflow}{then}}
\DoxyCodeLine{667         \textcolor{keyword}{call }mom\_error(fatal,\textcolor{stringliteral}{'read\_param\_real: Unable to find variable '}//trim(varname)// \&}
\DoxyCodeLine{668                              \textcolor{stringliteral}{' in any input files.'})}
\DoxyCodeLine{669       \textcolor{keywordflow}{else}}
\DoxyCodeLine{670         \textcolor{keyword}{call }mom\_error(fatal,\textcolor{stringliteral}{'read\_param\_real: Variable '}//trim(varname)// \&}
\DoxyCodeLine{671                              \textcolor{stringliteral}{' found but not set in input files.'})}
\DoxyCodeLine{672 \textcolor{keywordflow}{      endif}}
\DoxyCodeLine{673 \textcolor{keywordflow}{    endif} ;\textcolor{keywordflow}{ endif}}
\DoxyCodeLine{674 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{675   \textcolor{keywordflow}{return}}
\DoxyCodeLine{676  1003 \textcolor{keyword}{call }mom\_error(fatal,\textcolor{stringliteral}{'read\_param\_real: read error for real variable '}//trim(varname)// \&}
\DoxyCodeLine{677                              \textcolor{stringliteral}{' parsing "'}//trim(value\_string(1))//\textcolor{stringliteral}{'"'})}

\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__file__parser_1_1read__param_a18df4cad513e32d9341704169dbe4cee}\label{interfacemom__file__parser_1_1read__param_a18df4cad513e32d9341704169dbe4cee}} 
\index{mom\_file\_parser::read\_param@{mom\_file\_parser::read\_param}!read\_param\_real\_array@{read\_param\_real\_array}}
\index{read\_param\_real\_array@{read\_param\_real\_array}!mom\_file\_parser::read\_param@{mom\_file\_parser::read\_param}}
\subsubsection{\texorpdfstring{read\_param\_real\_array()}{read\_param\_real\_array()}}
{\footnotesize\ttfamily subroutine mom\+\_\+file\+\_\+parser\+::read\+\_\+param\+::read\+\_\+param\+\_\+real\+\_\+array (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__file__parser_1_1param__file__type}{param\+\_\+file\+\_\+type}}), intent(in)}]{CS,  }\item[{character(len=$\ast$), intent(in)}]{varname,  }\item[{real, dimension(\+:), intent(inout)}]{value,  }\item[{logical, intent(in), optional}]{fail\+\_\+if\+\_\+missing,  }\item[{real, intent(in), optional}]{scale }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine reads the values of an array of real model parameters from a parameter file. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em cs} & The control structure for the file\+\_\+parser module, it is also a structure to parse for run-\/time parameters \\
\hline
\mbox{\texttt{ in}}  & {\em varname} & The case-\/sensitive name of the parameter to read \\
\hline
\mbox{\texttt{ in,out}}  & {\em value} & The value of the parameter that may be read from the parameter file \\
\hline
\mbox{\texttt{ in}}  & {\em fail\+\_\+if\+\_\+missing} & If present and true, a fatal error occurs if this variable is not found in the parameter file \\
\hline
\mbox{\texttt{ in}}  & {\em scale} & A scaling factor that the parameter is multiplied by before it is returned. \\
\hline
\end{DoxyParams}


Definition at line 682 of file M\+O\+M\+\_\+file\+\_\+parser.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{682   \textcolor{keywordtype}{type}(param\_file\_type), \textcolor{keywordtype}{intent(in)} :: CS\textcolor{comment}{      !< The control structure for the file\_parser module,}}
\DoxyCodeLine{683 \textcolor{comment}{                                         !! it is also a structure to parse for run-time parameters}}
\DoxyCodeLine{684   \textcolor{keywordtype}{character(len=*)},      \textcolor{keywordtype}{intent(in)} :: varname\textcolor{comment}{ !< The case-sensitive name of the parameter to read}}
\DoxyCodeLine{685 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{intent(inout)} :: \textcolor{keywordtype}{value}\textcolor{comment}{   !< The value of the parameter that may be}}
\DoxyCodeLine{686 \textcolor{comment}{                                         !! read from the parameter file}}
\DoxyCodeLine{687   \textcolor{keywordtype}{logical},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: fail\_if\_missing\textcolor{comment}{ !< If present and true, a fatal error occurs}}
\DoxyCodeLine{688 \textcolor{comment}{                                         !! if this variable is not found in the parameter file}}
\DoxyCodeLine{689 \textcolor{keywordtype}{  real},        \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: scale\textcolor{comment}{   !< A scaling factor that the parameter is multiplied}}
\DoxyCodeLine{690 \textcolor{comment}{                                         !! by before it is returned.}}
\DoxyCodeLine{691 }
\DoxyCodeLine{692   \textcolor{comment}{! Local variables}}
\DoxyCodeLine{693   \textcolor{keywordtype}{character(len=INPUT\_STR\_LENGTH)} :: value\_string(1)}
\DoxyCodeLine{694   \textcolor{keywordtype}{logical}                         :: found, defined}
\DoxyCodeLine{695 }
\DoxyCodeLine{696   \textcolor{keyword}{call }get\_variable\_line(cs, varname, found, defined, value\_string)}
\DoxyCodeLine{697   \textcolor{keywordflow}{if} (found .and. defined .and. (len\_trim(value\_string(1)) > 0)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{698     \textcolor{keyword}{read}(value\_string(1),*,end=991,err=1004) \textcolor{keywordtype}{value}}
\DoxyCodeLine{699 991 \textcolor{keywordflow}{continue}}
\DoxyCodeLine{700     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(scale)) value(:) = scale*value(:)}
\DoxyCodeLine{701     \textcolor{keywordflow}{return}}
\DoxyCodeLine{702   \textcolor{keywordflow}{else}}
\DoxyCodeLine{703     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(fail\_if\_missing)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (fail\_if\_missing) \textcolor{keywordflow}{then}}
\DoxyCodeLine{704       \textcolor{keywordflow}{if} (.not.found) \textcolor{keywordflow}{then}}
\DoxyCodeLine{705         \textcolor{keyword}{call }mom\_error(fatal,\textcolor{stringliteral}{'read\_param\_real\_array: Unable to find variable '}//trim(varname)// \&}
\DoxyCodeLine{706                              \textcolor{stringliteral}{' in any input files.'})}
\DoxyCodeLine{707       \textcolor{keywordflow}{else}}
\DoxyCodeLine{708         \textcolor{keyword}{call }mom\_error(fatal,\textcolor{stringliteral}{'read\_param\_real\_array: Variable '}//trim(varname)// \&}
\DoxyCodeLine{709                              \textcolor{stringliteral}{' found but not set in input files.'})}
\DoxyCodeLine{710 \textcolor{keywordflow}{      endif}}
\DoxyCodeLine{711 \textcolor{keywordflow}{    endif} ;\textcolor{keywordflow}{ endif}}
\DoxyCodeLine{712 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{713   \textcolor{keywordflow}{return}}
\DoxyCodeLine{714  1004 \textcolor{keyword}{call }mom\_error(fatal,\textcolor{stringliteral}{'read\_param\_real\_array: read error for real array '}//trim(varname)// \&}
\DoxyCodeLine{715                              \textcolor{stringliteral}{' parsing "'}//trim(value\_string(1))//\textcolor{stringliteral}{'"'})}

\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__file__parser_1_1read__param_abf7de1abb29512fb7496bd93df4f8f21}\label{interfacemom__file__parser_1_1read__param_abf7de1abb29512fb7496bd93df4f8f21}} 
\index{mom\_file\_parser::read\_param@{mom\_file\_parser::read\_param}!read\_param\_time@{read\_param\_time}}
\index{read\_param\_time@{read\_param\_time}!mom\_file\_parser::read\_param@{mom\_file\_parser::read\_param}}
\subsubsection{\texorpdfstring{read\_param\_time()}{read\_param\_time()}}
{\footnotesize\ttfamily subroutine mom\+\_\+file\+\_\+parser\+::read\+\_\+param\+::read\+\_\+param\+\_\+time (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__file__parser_1_1param__file__type}{param\+\_\+file\+\_\+type}}), intent(in)}]{CS,  }\item[{character(len=$\ast$), intent(in)}]{varname,  }\item[{type(time\+\_\+type), intent(inout)}]{value,  }\item[{real, intent(in), optional}]{timeunit,  }\item[{logical, intent(in), optional}]{fail\+\_\+if\+\_\+missing,  }\item[{logical, intent(out), optional}]{date\+\_\+format }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine reads the value of a time\+\_\+type model parameter from a parameter file. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em cs} & The control structure for the file\+\_\+parser module, it is also a structure to parse for run-\/time parameters \\
\hline
\mbox{\texttt{ in}}  & {\em varname} & The case-\/sensitive name of the parameter to read \\
\hline
\mbox{\texttt{ in,out}}  & {\em value} & The value of the parameter that may be read from the parameter file \\
\hline
\mbox{\texttt{ in}}  & {\em timeunit} & The number of seconds in a time unit for real-\/number input. \\
\hline
\mbox{\texttt{ in}}  & {\em fail\+\_\+if\+\_\+missing} & If present and true, a fatal error occurs if this variable is not found in the parameter file \\
\hline
\mbox{\texttt{ out}}  & {\em date\+\_\+format} & If present, this indicates whether this parameter was read in a date format, so that it can later be logged in the same format. \\
\hline
\end{DoxyParams}


Definition at line 804 of file M\+O\+M\+\_\+file\+\_\+parser.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{804   \textcolor{keywordtype}{type}(param\_file\_type),  \textcolor{keywordtype}{intent(in)} :: CS\textcolor{comment}{      !< The control structure for the file\_parser module,}}
\DoxyCodeLine{805 \textcolor{comment}{                                         !! it is also a structure to parse for run-time parameters}}
\DoxyCodeLine{806   \textcolor{keywordtype}{character(len=*)},       \textcolor{keywordtype}{intent(in)} :: varname\textcolor{comment}{ !< The case-sensitive name of the parameter to read}}
\DoxyCodeLine{807   \textcolor{keywordtype}{type}(time\_type),     \textcolor{keywordtype}{intent(inout)} :: \textcolor{keywordtype}{value}\textcolor{comment}{   !< The value of the parameter that may be}}
\DoxyCodeLine{808 \textcolor{comment}{                                         !! read from the parameter file}}
\DoxyCodeLine{809 \textcolor{keywordtype}{  real},         \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: timeunit\textcolor{comment}{ !< The number of seconds in a time unit for real-number input.}}
\DoxyCodeLine{810   \textcolor{keywordtype}{logical},      \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: fail\_if\_missing\textcolor{comment}{ !< If present and true, a fatal error occurs}}
\DoxyCodeLine{811 \textcolor{comment}{                                         !! if this variable is not found in the parameter file}}
\DoxyCodeLine{812   \textcolor{keywordtype}{logical},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(out)} :: date\_format\textcolor{comment}{ !< If present, this indicates whether this}}
\DoxyCodeLine{813 \textcolor{comment}{                                         !! parameter was read in a date format, so that it can}}
\DoxyCodeLine{814 \textcolor{comment}{                                         !! later be logged in the same format.}}
\DoxyCodeLine{815 }
\DoxyCodeLine{816   \textcolor{comment}{! Local variables}}
\DoxyCodeLine{817   \textcolor{keywordtype}{character(len=INPUT\_STR\_LENGTH)} :: value\_string(1)}
\DoxyCodeLine{818   \textcolor{keywordtype}{character(len=240)} :: err\_msg}
\DoxyCodeLine{819   \textcolor{keywordtype}{logical}            :: found, defined}
\DoxyCodeLine{820 \textcolor{keywordtype}{  real}               :: real\_time, time\_unit}
\DoxyCodeLine{821   \textcolor{keywordtype}{integer}            :: vals(7)}
\DoxyCodeLine{822 }
\DoxyCodeLine{823   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(date\_format)) date\_format = .false.}
\DoxyCodeLine{824 }
\DoxyCodeLine{825   \textcolor{keyword}{call }get\_variable\_line(cs, varname, found, defined, value\_string)}
\DoxyCodeLine{826   \textcolor{keywordflow}{if} (found .and. defined .and. (len\_trim(value\_string(1)) > 0)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{827     \textcolor{comment}{! Determine whether value string should be parsed for a real number}}
\DoxyCodeLine{828     \textcolor{comment}{! or a date, in either a string format or a comma-delimited list of values.}}
\DoxyCodeLine{829     \textcolor{keywordflow}{if} ((index(value\_string(1),\textcolor{stringliteral}{'-'}) > 0) .and. \&}
\DoxyCodeLine{830         (index(value\_string(1),\textcolor{stringliteral}{'-'},back=.true.) > index(value\_string(1),\textcolor{stringliteral}{'-'}))) \textcolor{keywordflow}{then}}
\DoxyCodeLine{831       \textcolor{comment}{! There are two dashes, so this must be a date format.}}
\DoxyCodeLine{832       \textcolor{keywordtype}{value} = set\_date(value\_string(1), err\_msg=err\_msg)}
\DoxyCodeLine{833       \textcolor{keywordflow}{if} (len\_trim(err\_msg) > 0) \textcolor{keyword}{call }mom\_error(fatal,\textcolor{stringliteral}{'read\_param\_time: '}//\&}
\DoxyCodeLine{834           trim(err\_msg)//\textcolor{stringliteral}{' in integer list read error for time-type variable '}//\&}
\DoxyCodeLine{835           trim(varname)// \textcolor{stringliteral}{' parsing "'}//trim(value\_string(1))//\textcolor{stringliteral}{'"'})}
\DoxyCodeLine{836       \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(date\_format)) date\_format = .true.}
\DoxyCodeLine{837     \textcolor{keywordflow}{elseif} (index(value\_string(1),\textcolor{stringliteral}{','}) > 0) \textcolor{keywordflow}{then}}
\DoxyCodeLine{838       \textcolor{comment}{! Initialize vals with an invalid date.}}
\DoxyCodeLine{839       vals(:) = (/ -999, -999, -999, 0, 0, 0, 0 /)}
\DoxyCodeLine{840       \textcolor{keyword}{read}(value\_string(1),*,end=995,err=1005) vals}
\DoxyCodeLine{841      995 \textcolor{keywordflow}{continue}}
\DoxyCodeLine{842       \textcolor{keywordflow}{if} ((vals(1) < 0) .or. (vals(2) < 0) .or. (vals(3) < 0)) \&}
\DoxyCodeLine{843         \textcolor{keyword}{call }mom\_error(fatal,\textcolor{stringliteral}{'read\_param\_time: integer list read error for time-type variable '}//\&}
\DoxyCodeLine{844                        trim(varname)// \textcolor{stringliteral}{' parsing "'}//trim(value\_string(1))//\textcolor{stringliteral}{'"'})}
\DoxyCodeLine{845       \textcolor{keywordtype}{value} = set\_date(vals(1), vals(2), vals(3), vals(4), vals(5), vals(6), \&}
\DoxyCodeLine{846                        vals(7), err\_msg=err\_msg)}
\DoxyCodeLine{847       \textcolor{keywordflow}{if} (len\_trim(err\_msg) > 0) \textcolor{keyword}{call }mom\_error(fatal,\textcolor{stringliteral}{'read\_param\_time: '}//\&}
\DoxyCodeLine{848           trim(err\_msg)//\textcolor{stringliteral}{' in integer list read error for time-type variable '}//\&}
\DoxyCodeLine{849           trim(varname)// \textcolor{stringliteral}{' parsing "'}//trim(value\_string(1))//\textcolor{stringliteral}{'"'})}
\DoxyCodeLine{850       \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(date\_format)) date\_format = .true.}
\DoxyCodeLine{851     \textcolor{keywordflow}{else}}
\DoxyCodeLine{852       time\_unit = 1.0 ; \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(timeunit)) time\_unit = timeunit}
\DoxyCodeLine{853       \textcolor{keyword}{read}( value\_string(1), *) real\_time}
\DoxyCodeLine{854       \textcolor{keywordtype}{value} = real\_to\_time(real\_time*time\_unit)}
\DoxyCodeLine{855 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{856   \textcolor{keywordflow}{else}}
\DoxyCodeLine{857     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(fail\_if\_missing)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (fail\_if\_missing) \textcolor{keywordflow}{then}}
\DoxyCodeLine{858       \textcolor{keywordflow}{if} (.not.found) \textcolor{keywordflow}{then}}
\DoxyCodeLine{859         \textcolor{keyword}{call }mom\_error(fatal,\textcolor{stringliteral}{'Unable to find variable '}//trim(varname)// \&}
\DoxyCodeLine{860                              \textcolor{stringliteral}{' in any input files.'})}
\DoxyCodeLine{861       \textcolor{keywordflow}{else}}
\DoxyCodeLine{862         \textcolor{keyword}{call }mom\_error(fatal,\textcolor{stringliteral}{'Variable '}//trim(varname)// \&}
\DoxyCodeLine{863                              \textcolor{stringliteral}{' found but not set in input files.'})}
\DoxyCodeLine{864 \textcolor{keywordflow}{      endif}}
\DoxyCodeLine{865 \textcolor{keywordflow}{    endif} ;\textcolor{keywordflow}{ endif}}
\DoxyCodeLine{866 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{867   \textcolor{keywordflow}{return}}
\DoxyCodeLine{868  1005 \textcolor{keyword}{call }mom\_error(fatal,\textcolor{stringliteral}{'read\_param\_time: read error for time-type variable '}//\&}
\DoxyCodeLine{869                            trim(varname)// \textcolor{stringliteral}{' parsing "'}//trim(value\_string(1))//\textcolor{stringliteral}{'"'})}

\end{DoxyCode}


The documentation for this interface was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
/home/cermak/src/\+M\+O\+M6.\+devrob/src/framework/M\+O\+M\+\_\+file\+\_\+parser.\+F90\end{DoxyCompactItemize}
