\hypertarget{interfacemom__restart_1_1register__restart__field}{}\doxysection{mom\+\_\+restart\+::register\+\_\+restart\+\_\+field Interface Reference}
\label{interfacemom__restart_1_1register__restart__field}\index{mom\_restart::register\_restart\_field@{mom\_restart::register\_restart\_field}}


\doxysubsection{Detailed Description}
Register fields for restarts. 

Definition at line 111 of file M\+O\+M\+\_\+restart.\+F90.

\doxysubsection*{Private functions}
\begin{DoxyCompactItemize}
\item 
subroutine \mbox{\hyperlink{interfacemom__restart_1_1register__restart__field_a75939f6a7aaf7d72287712d72fc3cf57}{register\+\_\+restart\+\_\+field\+\_\+ptr4d}} (f\+\_\+ptr, var\+\_\+desc, mandatory, CS)
\begin{DoxyCompactList}\small\item\em Register a 4-\/d field for restarts, providing the metadata in a structure. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{interfacemom__restart_1_1register__restart__field_a2f658de76ac0b6188ec0a9b13ee7a079}{register\+\_\+restart\+\_\+field\+\_\+4d}} (f\+\_\+ptr, name, mandatory, CS, longname, units, hor\+\_\+grid, z\+\_\+grid, t\+\_\+grid)
\begin{DoxyCompactList}\small\item\em Register a 4-\/d field for restarts, providing the metadata as individual arguments. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{interfacemom__restart_1_1register__restart__field_a31a9f0b15b205b39e09972cd268eb8aa}{register\+\_\+restart\+\_\+field\+\_\+ptr3d}} (f\+\_\+ptr, var\+\_\+desc, mandatory, CS)
\begin{DoxyCompactList}\small\item\em Register a 3-\/d field for restarts, providing the metadata in a structure. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{interfacemom__restart_1_1register__restart__field_a89dcadd7204a729bb4ecc3d1ca1a6829}{register\+\_\+restart\+\_\+field\+\_\+3d}} (f\+\_\+ptr, name, mandatory, CS, longname, units, hor\+\_\+grid, z\+\_\+grid, t\+\_\+grid)
\begin{DoxyCompactList}\small\item\em Register a 3-\/d field for restarts, providing the metadata as individual arguments. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{interfacemom__restart_1_1register__restart__field_a97dd052567dc700af1baaa9aa0775679}{register\+\_\+restart\+\_\+field\+\_\+ptr2d}} (f\+\_\+ptr, var\+\_\+desc, mandatory, CS)
\begin{DoxyCompactList}\small\item\em Register a 2-\/d field for restarts, providing the metadata in a structure. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{interfacemom__restart_1_1register__restart__field_a8a18b9f0c27499b4678bb88009cd79f7}{register\+\_\+restart\+\_\+field\+\_\+2d}} (f\+\_\+ptr, name, mandatory, CS, longname, units, hor\+\_\+grid, z\+\_\+grid, t\+\_\+grid)
\begin{DoxyCompactList}\small\item\em Register a 2-\/d field for restarts, providing the metadata as individual arguments. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{interfacemom__restart_1_1register__restart__field_a0ac15c082e9e4b0370b7d22a79f93c32}{register\+\_\+restart\+\_\+field\+\_\+ptr1d}} (f\+\_\+ptr, var\+\_\+desc, mandatory, CS)
\begin{DoxyCompactList}\small\item\em Register a 1-\/d field for restarts, providing the metadata in a structure. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{interfacemom__restart_1_1register__restart__field_a315d793dab4d0c78a6d842df5e6b3c61}{register\+\_\+restart\+\_\+field\+\_\+1d}} (f\+\_\+ptr, name, mandatory, CS, longname, units, hor\+\_\+grid, z\+\_\+grid, t\+\_\+grid)
\begin{DoxyCompactList}\small\item\em Register a 1-\/d field for restarts, providing the metadata as individual arguments. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{interfacemom__restart_1_1register__restart__field_ad62c0d5dea1f783cebe395d646bda772}{register\+\_\+restart\+\_\+field\+\_\+ptr0d}} (f\+\_\+ptr, var\+\_\+desc, mandatory, CS)
\begin{DoxyCompactList}\small\item\em Register a 0-\/d field for restarts, providing the metadata in a structure. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{interfacemom__restart_1_1register__restart__field_a7c21cc55697e53fb27a8e2a74bff90db}{register\+\_\+restart\+\_\+field\+\_\+0d}} (f\+\_\+ptr, name, mandatory, CS, longname, units, t\+\_\+grid)
\begin{DoxyCompactList}\small\item\em Register a 0-\/d field for restarts, providing the metadata as individual arguments. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Register fields for restarts. 

Definition at line 111 of file M\+O\+M\+\_\+restart.\+F90.



\doxysubsection{Functions and subroutines}
\mbox{\Hypertarget{interfacemom__restart_1_1register__restart__field_a7c21cc55697e53fb27a8e2a74bff90db}\label{interfacemom__restart_1_1register__restart__field_a7c21cc55697e53fb27a8e2a74bff90db}} 
\index{mom\_restart::register\_restart\_field@{mom\_restart::register\_restart\_field}!register\_restart\_field\_0d@{register\_restart\_field\_0d}}
\index{register\_restart\_field\_0d@{register\_restart\_field\_0d}!mom\_restart::register\_restart\_field@{mom\_restart::register\_restart\_field}}
\doxysubsubsection{\texorpdfstring{register\_restart\_field\_0d()}{register\_restart\_field\_0d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+restart\+::register\+\_\+restart\+\_\+field\+::register\+\_\+restart\+\_\+field\+\_\+0d (\begin{DoxyParamCaption}\item[{real, intent(in), target}]{f\+\_\+ptr,  }\item[{character(len=$\ast$), intent(in)}]{name,  }\item[{logical, intent(in)}]{mandatory,  }\item[{type(\mbox{\hyperlink{structmom__restart_1_1mom__restart__cs}{mom\+\_\+restart\+\_\+cs}}), pointer}]{CS,  }\item[{character(len=$\ast$), intent(in), optional}]{longname,  }\item[{character(len=$\ast$), intent(in), optional}]{units,  }\item[{character(len=$\ast$), intent(in), optional}]{t\+\_\+grid }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Register a 0-\/d field for restarts, providing the metadata as individual arguments. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em f\+\_\+ptr} & A pointer to the field to be read or written \\
\hline
\mbox{\texttt{ in}}  & {\em name} & variable name to be used in the restart file \\
\hline
\mbox{\texttt{ in}}  & {\em mandatory} & If true, the run will abort if this field is not successfully read from the restart file. \\
\hline
 & {\em cs} & A pointer to a M\+O\+M\+\_\+restart\+\_\+\+CS object (intent in/out) \\
\hline
\mbox{\texttt{ in}}  & {\em longname} & variable long name \\
\hline
\mbox{\texttt{ in}}  & {\em units} & variable units \\
\hline
\mbox{\texttt{ in}}  & {\em t\+\_\+grid} & time description\+: s, p, or 1, \textquotesingle{}s\textquotesingle{} if absent \\
\hline
\end{DoxyParams}


Definition at line 476 of file M\+O\+M\+\_\+restart.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{478 \textcolor{keywordtype}{  real},               \textcolor{keywordtype}{target}, \textcolor{keywordtype}{intent(in)} :: f\_ptr\textcolor{comment}{     !< A pointer to the field to be read or written}}
\DoxyCodeLine{479   \textcolor{keywordtype}{character(len=*)},           \textcolor{keywordtype}{intent(in)} :: name\textcolor{comment}{      !< variable name to be used in the restart file}}
\DoxyCodeLine{480   \textcolor{keywordtype}{logical},                    \textcolor{keywordtype}{intent(in)} :: mandatory\textcolor{comment}{ !< If true, the run will abort if this field is not}}
\DoxyCodeLine{481 \textcolor{comment}{                                                      !! successfully read from the restart file.}}
\DoxyCodeLine{482   \textcolor{keywordtype}{type}(MOM\_restart\_CS),       \textcolor{keywordtype}{pointer}    :: CS\textcolor{comment}{        !< A pointer to a MOM\_restart\_CS object (intent in/out)}}
\DoxyCodeLine{483   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: longname\textcolor{comment}{  !< variable long name}}
\DoxyCodeLine{484   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: units\textcolor{comment}{     !< variable units}}
\DoxyCodeLine{485   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: t\_grid\textcolor{comment}{    !< time description: s, p, or 1, 's' if absent}}
\DoxyCodeLine{486 }
\DoxyCodeLine{487   \textcolor{keywordtype}{type}(vardesc) :: vd}
\DoxyCodeLine{488   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(cs)) \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"{}MOM\_restart: "{}} // \&}
\DoxyCodeLine{489       \textcolor{stringliteral}{"{}register\_restart\_field\_0d: Module must be initialized before "{}}//\&}
\DoxyCodeLine{490       \textcolor{stringliteral}{"{}it is used to register "{}}//trim(name))}
\DoxyCodeLine{491   vd = var\_desc(name, units=units, longname=longname, hor\_grid=\textcolor{stringliteral}{'1'}, \&}
\DoxyCodeLine{492                 z\_grid=\textcolor{stringliteral}{'1'}, t\_grid=t\_grid)}
\DoxyCodeLine{493 }
\DoxyCodeLine{494   \textcolor{keyword}{call }register\_restart\_field\_ptr0d(f\_ptr, vd, mandatory, cs)}
\DoxyCodeLine{495 }

\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__restart_1_1register__restart__field_a315d793dab4d0c78a6d842df5e6b3c61}\label{interfacemom__restart_1_1register__restart__field_a315d793dab4d0c78a6d842df5e6b3c61}} 
\index{mom\_restart::register\_restart\_field@{mom\_restart::register\_restart\_field}!register\_restart\_field\_1d@{register\_restart\_field\_1d}}
\index{register\_restart\_field\_1d@{register\_restart\_field\_1d}!mom\_restart::register\_restart\_field@{mom\_restart::register\_restart\_field}}
\doxysubsubsection{\texorpdfstring{register\_restart\_field\_1d()}{register\_restart\_field\_1d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+restart\+::register\+\_\+restart\+\_\+field\+::register\+\_\+restart\+\_\+field\+\_\+1d (\begin{DoxyParamCaption}\item[{real, dimension(\+:), intent(in), target}]{f\+\_\+ptr,  }\item[{character(len=$\ast$), intent(in)}]{name,  }\item[{logical, intent(in)}]{mandatory,  }\item[{type(\mbox{\hyperlink{structmom__restart_1_1mom__restart__cs}{mom\+\_\+restart\+\_\+cs}}), pointer}]{CS,  }\item[{character(len=$\ast$), intent(in), optional}]{longname,  }\item[{character(len=$\ast$), intent(in), optional}]{units,  }\item[{character(len=$\ast$), intent(in), optional}]{hor\+\_\+grid,  }\item[{character(len=$\ast$), intent(in), optional}]{z\+\_\+grid,  }\item[{character(len=$\ast$), intent(in), optional}]{t\+\_\+grid }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Register a 1-\/d field for restarts, providing the metadata as individual arguments. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em f\+\_\+ptr} & A pointer to the field to be read or written \\
\hline
\mbox{\texttt{ in}}  & {\em name} & variable name to be used in the restart file \\
\hline
\mbox{\texttt{ in}}  & {\em mandatory} & If true, the run will abort if this field is not successfully read from the restart file. \\
\hline
 & {\em cs} & A pointer to a M\+O\+M\+\_\+restart\+\_\+\+CS object (intent in/out) \\
\hline
\mbox{\texttt{ in}}  & {\em longname} & variable long name \\
\hline
\mbox{\texttt{ in}}  & {\em units} & variable units \\
\hline
\mbox{\texttt{ in}}  & {\em hor\+\_\+grid} & variable horizonal staggering, \textquotesingle{}1\textquotesingle{} if absent \\
\hline
\mbox{\texttt{ in}}  & {\em z\+\_\+grid} & variable vertical staggering, \textquotesingle{}L\textquotesingle{} if absent \\
\hline
\mbox{\texttt{ in}}  & {\em t\+\_\+grid} & time description\+: s, p, or 1, \textquotesingle{}s\textquotesingle{} if absent \\
\hline
\end{DoxyParams}


Definition at line 448 of file M\+O\+M\+\_\+restart.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{450 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{target}, \textcolor{keywordtype}{intent(in)} :: f\_ptr\textcolor{comment}{     !< A pointer to the field to be read or written}}
\DoxyCodeLine{451   \textcolor{keywordtype}{character(len=*)},           \textcolor{keywordtype}{intent(in)} :: name\textcolor{comment}{      !< variable name to be used in the restart file}}
\DoxyCodeLine{452   \textcolor{keywordtype}{logical},                    \textcolor{keywordtype}{intent(in)} :: mandatory\textcolor{comment}{ !< If true, the run will abort if this field is not}}
\DoxyCodeLine{453 \textcolor{comment}{                                                      !! successfully read from the restart file.}}
\DoxyCodeLine{454   \textcolor{keywordtype}{type}(MOM\_restart\_CS),       \textcolor{keywordtype}{pointer}    :: CS\textcolor{comment}{        !< A pointer to a MOM\_restart\_CS object (intent in/out)}}
\DoxyCodeLine{455   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: longname\textcolor{comment}{  !< variable long name}}
\DoxyCodeLine{456   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: units\textcolor{comment}{     !< variable units}}
\DoxyCodeLine{457   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: hor\_grid\textcolor{comment}{  !< variable horizonal staggering, '1' if absent}}
\DoxyCodeLine{458   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: z\_grid\textcolor{comment}{    !< variable vertical staggering, 'L' if absent}}
\DoxyCodeLine{459   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: t\_grid\textcolor{comment}{    !< time description: s, p, or 1, 's' if absent}}
\DoxyCodeLine{460 }
\DoxyCodeLine{461   \textcolor{keywordtype}{type}(vardesc) :: vd}
\DoxyCodeLine{462   \textcolor{keywordtype}{character(len=8)} :: hgrid}
\DoxyCodeLine{463 }
\DoxyCodeLine{464   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(cs)) \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"{}MOM\_restart: "{}} // \&}
\DoxyCodeLine{465       \textcolor{stringliteral}{"{}register\_restart\_field\_3d: Module must be initialized before "{}}//\&}
\DoxyCodeLine{466       \textcolor{stringliteral}{"{}it is used to register "{}}//trim(name))}
\DoxyCodeLine{467   hgrid = \textcolor{stringliteral}{'1'} ; \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(hor\_grid)) hgrid = hor\_grid}
\DoxyCodeLine{468   vd = var\_desc(name, units=units, longname=longname, hor\_grid=hgrid, \&}
\DoxyCodeLine{469                 z\_grid=z\_grid, t\_grid=t\_grid)}
\DoxyCodeLine{470 }
\DoxyCodeLine{471   \textcolor{keyword}{call }register\_restart\_field\_ptr1d(f\_ptr, vd, mandatory, cs)}
\DoxyCodeLine{472 }

\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__restart_1_1register__restart__field_a8a18b9f0c27499b4678bb88009cd79f7}\label{interfacemom__restart_1_1register__restart__field_a8a18b9f0c27499b4678bb88009cd79f7}} 
\index{mom\_restart::register\_restart\_field@{mom\_restart::register\_restart\_field}!register\_restart\_field\_2d@{register\_restart\_field\_2d}}
\index{register\_restart\_field\_2d@{register\_restart\_field\_2d}!mom\_restart::register\_restart\_field@{mom\_restart::register\_restart\_field}}
\doxysubsubsection{\texorpdfstring{register\_restart\_field\_2d()}{register\_restart\_field\_2d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+restart\+::register\+\_\+restart\+\_\+field\+::register\+\_\+restart\+\_\+field\+\_\+2d (\begin{DoxyParamCaption}\item[{real, dimension(\+:,\+:), intent(in), target}]{f\+\_\+ptr,  }\item[{character(len=$\ast$), intent(in)}]{name,  }\item[{logical, intent(in)}]{mandatory,  }\item[{type(\mbox{\hyperlink{structmom__restart_1_1mom__restart__cs}{mom\+\_\+restart\+\_\+cs}}), pointer}]{CS,  }\item[{character(len=$\ast$), intent(in), optional}]{longname,  }\item[{character(len=$\ast$), intent(in), optional}]{units,  }\item[{character(len=$\ast$), intent(in), optional}]{hor\+\_\+grid,  }\item[{character(len=$\ast$), intent(in), optional}]{z\+\_\+grid,  }\item[{character(len=$\ast$), intent(in), optional}]{t\+\_\+grid }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Register a 2-\/d field for restarts, providing the metadata as individual arguments. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em f\+\_\+ptr} & A pointer to the field to be read or written \\
\hline
\mbox{\texttt{ in}}  & {\em name} & variable name to be used in the restart file \\
\hline
\mbox{\texttt{ in}}  & {\em mandatory} & If true, the run will abort if this field is not successfully read from the restart file. \\
\hline
 & {\em cs} & A pointer to a M\+O\+M\+\_\+restart\+\_\+\+CS object (intent in/out) \\
\hline
\mbox{\texttt{ in}}  & {\em longname} & variable long name \\
\hline
\mbox{\texttt{ in}}  & {\em units} & variable units \\
\hline
\mbox{\texttt{ in}}  & {\em hor\+\_\+grid} & variable horizonal staggering, \textquotesingle{}h\textquotesingle{} if absent \\
\hline
\mbox{\texttt{ in}}  & {\em z\+\_\+grid} & variable vertical staggering, \textquotesingle{}1\textquotesingle{} if absent \\
\hline
\mbox{\texttt{ in}}  & {\em t\+\_\+grid} & time description\+: s, p, or 1, \textquotesingle{}s\textquotesingle{} if absent \\
\hline
\end{DoxyParams}


Definition at line 419 of file M\+O\+M\+\_\+restart.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{421 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:,:)}, \&}
\DoxyCodeLine{422                       \textcolor{keywordtype}{target}, \textcolor{keywordtype}{intent(in)} :: f\_ptr\textcolor{comment}{     !< A pointer to the field to be read or written}}
\DoxyCodeLine{423   \textcolor{keywordtype}{character(len=*)},           \textcolor{keywordtype}{intent(in)} :: name\textcolor{comment}{      !< variable name to be used in the restart file}}
\DoxyCodeLine{424   \textcolor{keywordtype}{logical},                    \textcolor{keywordtype}{intent(in)} :: mandatory\textcolor{comment}{ !< If true, the run will abort if this field is not}}
\DoxyCodeLine{425 \textcolor{comment}{                                                      !! successfully read from the restart file.}}
\DoxyCodeLine{426   \textcolor{keywordtype}{type}(MOM\_restart\_CS),       \textcolor{keywordtype}{pointer}    :: CS\textcolor{comment}{        !< A pointer to a MOM\_restart\_CS object (intent in/out)}}
\DoxyCodeLine{427   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: longname\textcolor{comment}{  !< variable long name}}
\DoxyCodeLine{428   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: units\textcolor{comment}{     !< variable units}}
\DoxyCodeLine{429   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: hor\_grid\textcolor{comment}{  !< variable horizonal staggering, 'h' if absent}}
\DoxyCodeLine{430   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: z\_grid\textcolor{comment}{    !< variable vertical staggering, '1' if absent}}
\DoxyCodeLine{431   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: t\_grid\textcolor{comment}{    !< time description: s, p, or 1, 's' if absent}}
\DoxyCodeLine{432 }
\DoxyCodeLine{433   \textcolor{keywordtype}{type}(vardesc) :: vd}
\DoxyCodeLine{434   \textcolor{keywordtype}{character(len=8)} :: Zgrid}
\DoxyCodeLine{435 }
\DoxyCodeLine{436   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(cs)) \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"{}MOM\_restart: "{}} // \&}
\DoxyCodeLine{437       \textcolor{stringliteral}{"{}register\_restart\_field\_2d: Module must be initialized before "{}}//\&}
\DoxyCodeLine{438       \textcolor{stringliteral}{"{}it is used to register "{}}//trim(name))}
\DoxyCodeLine{439   zgrid = \textcolor{stringliteral}{'1'} ; \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(z\_grid)) zgrid = z\_grid}
\DoxyCodeLine{440   vd = var\_desc(name, units=units, longname=longname, hor\_grid=hor\_grid, \&}
\DoxyCodeLine{441                 z\_grid=zgrid, t\_grid=t\_grid)}
\DoxyCodeLine{442 }
\DoxyCodeLine{443   \textcolor{keyword}{call }register\_restart\_field\_ptr2d(f\_ptr, vd, mandatory, cs)}
\DoxyCodeLine{444 }

\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__restart_1_1register__restart__field_a89dcadd7204a729bb4ecc3d1ca1a6829}\label{interfacemom__restart_1_1register__restart__field_a89dcadd7204a729bb4ecc3d1ca1a6829}} 
\index{mom\_restart::register\_restart\_field@{mom\_restart::register\_restart\_field}!register\_restart\_field\_3d@{register\_restart\_field\_3d}}
\index{register\_restart\_field\_3d@{register\_restart\_field\_3d}!mom\_restart::register\_restart\_field@{mom\_restart::register\_restart\_field}}
\doxysubsubsection{\texorpdfstring{register\_restart\_field\_3d()}{register\_restart\_field\_3d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+restart\+::register\+\_\+restart\+\_\+field\+::register\+\_\+restart\+\_\+field\+\_\+3d (\begin{DoxyParamCaption}\item[{real, dimension(\+:,\+:,\+:), intent(in), target}]{f\+\_\+ptr,  }\item[{character(len=$\ast$), intent(in)}]{name,  }\item[{logical, intent(in)}]{mandatory,  }\item[{type(\mbox{\hyperlink{structmom__restart_1_1mom__restart__cs}{mom\+\_\+restart\+\_\+cs}}), pointer}]{CS,  }\item[{character(len=$\ast$), intent(in), optional}]{longname,  }\item[{character(len=$\ast$), intent(in), optional}]{units,  }\item[{character(len=$\ast$), intent(in), optional}]{hor\+\_\+grid,  }\item[{character(len=$\ast$), intent(in), optional}]{z\+\_\+grid,  }\item[{character(len=$\ast$), intent(in), optional}]{t\+\_\+grid }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Register a 3-\/d field for restarts, providing the metadata as individual arguments. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em f\+\_\+ptr} & A pointer to the field to be read or written \\
\hline
\mbox{\texttt{ in}}  & {\em name} & variable name to be used in the restart file \\
\hline
\mbox{\texttt{ in}}  & {\em mandatory} & If true, the run will abort if this field is not successfully read from the restart file. \\
\hline
 & {\em cs} & A pointer to a M\+O\+M\+\_\+restart\+\_\+\+CS object (intent in/out) \\
\hline
\mbox{\texttt{ in}}  & {\em longname} & variable long name \\
\hline
\mbox{\texttt{ in}}  & {\em units} & variable units \\
\hline
\mbox{\texttt{ in}}  & {\em hor\+\_\+grid} & variable horizonal staggering, \textquotesingle{}h\textquotesingle{} if absent \\
\hline
\mbox{\texttt{ in}}  & {\em z\+\_\+grid} & variable vertical staggering, \textquotesingle{}L\textquotesingle{} if absent \\
\hline
\mbox{\texttt{ in}}  & {\em t\+\_\+grid} & time description\+: s, p, or 1, \textquotesingle{}s\textquotesingle{} if absent \\
\hline
\end{DoxyParams}


Definition at line 392 of file M\+O\+M\+\_\+restart.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{394 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:,:,:)}, \&}
\DoxyCodeLine{395                       \textcolor{keywordtype}{target}, \textcolor{keywordtype}{intent(in)} :: f\_ptr\textcolor{comment}{     !< A pointer to the field to be read or written}}
\DoxyCodeLine{396   \textcolor{keywordtype}{character(len=*)},           \textcolor{keywordtype}{intent(in)} :: name\textcolor{comment}{      !< variable name to be used in the restart file}}
\DoxyCodeLine{397   \textcolor{keywordtype}{logical},                    \textcolor{keywordtype}{intent(in)} :: mandatory\textcolor{comment}{ !< If true, the run will abort if this field is not}}
\DoxyCodeLine{398 \textcolor{comment}{                                                      !! successfully read from the restart file.}}
\DoxyCodeLine{399   \textcolor{keywordtype}{type}(MOM\_restart\_CS),       \textcolor{keywordtype}{pointer}    :: CS\textcolor{comment}{        !< A pointer to a MOM\_restart\_CS object (intent in/out)}}
\DoxyCodeLine{400   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: longname\textcolor{comment}{  !< variable long name}}
\DoxyCodeLine{401   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: units\textcolor{comment}{     !< variable units}}
\DoxyCodeLine{402   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: hor\_grid\textcolor{comment}{  !< variable horizonal staggering, 'h' if absent}}
\DoxyCodeLine{403   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: z\_grid\textcolor{comment}{    !< variable vertical staggering, 'L' if absent}}
\DoxyCodeLine{404   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: t\_grid\textcolor{comment}{    !< time description: s, p, or 1, 's' if absent}}
\DoxyCodeLine{405 }
\DoxyCodeLine{406   \textcolor{keywordtype}{type}(vardesc) :: vd}
\DoxyCodeLine{407 }
\DoxyCodeLine{408   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(cs)) \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"{}MOM\_restart: "{}} // \&}
\DoxyCodeLine{409       \textcolor{stringliteral}{"{}register\_restart\_field\_3d: Module must be initialized before "{}}//\&}
\DoxyCodeLine{410       \textcolor{stringliteral}{"{}it is used to register "{}}//trim(name))}
\DoxyCodeLine{411   vd = var\_desc(name, units=units, longname=longname, hor\_grid=hor\_grid, \&}
\DoxyCodeLine{412                 z\_grid=z\_grid, t\_grid=t\_grid)}
\DoxyCodeLine{413 }
\DoxyCodeLine{414   \textcolor{keyword}{call }register\_restart\_field\_ptr3d(f\_ptr, vd, mandatory, cs)}
\DoxyCodeLine{415 }

\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__restart_1_1register__restart__field_a2f658de76ac0b6188ec0a9b13ee7a079}\label{interfacemom__restart_1_1register__restart__field_a2f658de76ac0b6188ec0a9b13ee7a079}} 
\index{mom\_restart::register\_restart\_field@{mom\_restart::register\_restart\_field}!register\_restart\_field\_4d@{register\_restart\_field\_4d}}
\index{register\_restart\_field\_4d@{register\_restart\_field\_4d}!mom\_restart::register\_restart\_field@{mom\_restart::register\_restart\_field}}
\doxysubsubsection{\texorpdfstring{register\_restart\_field\_4d()}{register\_restart\_field\_4d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+restart\+::register\+\_\+restart\+\_\+field\+::register\+\_\+restart\+\_\+field\+\_\+4d (\begin{DoxyParamCaption}\item[{real, dimension(\+:,\+:,\+:,\+:), intent(in), target}]{f\+\_\+ptr,  }\item[{character(len=$\ast$), intent(in)}]{name,  }\item[{logical, intent(in)}]{mandatory,  }\item[{type(\mbox{\hyperlink{structmom__restart_1_1mom__restart__cs}{mom\+\_\+restart\+\_\+cs}}), pointer}]{CS,  }\item[{character(len=$\ast$), intent(in), optional}]{longname,  }\item[{character(len=$\ast$), intent(in), optional}]{units,  }\item[{character(len=$\ast$), intent(in), optional}]{hor\+\_\+grid,  }\item[{character(len=$\ast$), intent(in), optional}]{z\+\_\+grid,  }\item[{character(len=$\ast$), intent(in), optional}]{t\+\_\+grid }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Register a 4-\/d field for restarts, providing the metadata as individual arguments. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em f\+\_\+ptr} & A pointer to the field to be read or written \\
\hline
\mbox{\texttt{ in}}  & {\em name} & variable name to be used in the restart file \\
\hline
\mbox{\texttt{ in}}  & {\em mandatory} & If true, the run will abort if this field is not successfully read from the restart file. \\
\hline
 & {\em cs} & A pointer to a M\+O\+M\+\_\+restart\+\_\+\+CS object (intent in/out) \\
\hline
\mbox{\texttt{ in}}  & {\em longname} & variable long name \\
\hline
\mbox{\texttt{ in}}  & {\em units} & variable units \\
\hline
\mbox{\texttt{ in}}  & {\em hor\+\_\+grid} & variable horizonal staggering, \textquotesingle{}h\textquotesingle{} if absent \\
\hline
\mbox{\texttt{ in}}  & {\em z\+\_\+grid} & variable vertical staggering, \textquotesingle{}L\textquotesingle{} if absent \\
\hline
\mbox{\texttt{ in}}  & {\em t\+\_\+grid} & time description\+: s, p, or 1, \textquotesingle{}s\textquotesingle{} if absent \\
\hline
\end{DoxyParams}


Definition at line 365 of file M\+O\+M\+\_\+restart.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{367 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:,:,:,:)}, \&}
\DoxyCodeLine{368                       \textcolor{keywordtype}{target}, \textcolor{keywordtype}{intent(in)} :: f\_ptr\textcolor{comment}{     !< A pointer to the field to be read or written}}
\DoxyCodeLine{369   \textcolor{keywordtype}{character(len=*)},           \textcolor{keywordtype}{intent(in)} :: name\textcolor{comment}{      !< variable name to be used in the restart file}}
\DoxyCodeLine{370   \textcolor{keywordtype}{logical},                    \textcolor{keywordtype}{intent(in)} :: mandatory\textcolor{comment}{ !< If true, the run will abort if this field is not}}
\DoxyCodeLine{371 \textcolor{comment}{                                                      !! successfully read from the restart file.}}
\DoxyCodeLine{372   \textcolor{keywordtype}{type}(MOM\_restart\_CS),       \textcolor{keywordtype}{pointer}    :: CS\textcolor{comment}{        !< A pointer to a MOM\_restart\_CS object (intent in/out)}}
\DoxyCodeLine{373   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: longname\textcolor{comment}{  !< variable long name}}
\DoxyCodeLine{374   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: units\textcolor{comment}{     !< variable units}}
\DoxyCodeLine{375   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: hor\_grid\textcolor{comment}{  !< variable horizonal staggering, 'h' if absent}}
\DoxyCodeLine{376   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: z\_grid\textcolor{comment}{    !< variable vertical staggering, 'L' if absent}}
\DoxyCodeLine{377   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: t\_grid\textcolor{comment}{    !< time description: s, p, or 1, 's' if absent}}
\DoxyCodeLine{378 }
\DoxyCodeLine{379   \textcolor{keywordtype}{type}(vardesc) :: vd}
\DoxyCodeLine{380 }
\DoxyCodeLine{381   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(cs)) \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"{}MOM\_restart: "{}} // \&}
\DoxyCodeLine{382       \textcolor{stringliteral}{"{}register\_restart\_field\_4d: Module must be initialized before "{}}//\&}
\DoxyCodeLine{383       \textcolor{stringliteral}{"{}it is used to register "{}}//trim(name))}
\DoxyCodeLine{384   vd = var\_desc(name, units=units, longname=longname, hor\_grid=hor\_grid, \&}
\DoxyCodeLine{385                 z\_grid=z\_grid, t\_grid=t\_grid)}
\DoxyCodeLine{386 }
\DoxyCodeLine{387   \textcolor{keyword}{call }register\_restart\_field\_ptr4d(f\_ptr, vd, mandatory, cs)}
\DoxyCodeLine{388 }

\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__restart_1_1register__restart__field_ad62c0d5dea1f783cebe395d646bda772}\label{interfacemom__restart_1_1register__restart__field_ad62c0d5dea1f783cebe395d646bda772}} 
\index{mom\_restart::register\_restart\_field@{mom\_restart::register\_restart\_field}!register\_restart\_field\_ptr0d@{register\_restart\_field\_ptr0d}}
\index{register\_restart\_field\_ptr0d@{register\_restart\_field\_ptr0d}!mom\_restart::register\_restart\_field@{mom\_restart::register\_restart\_field}}
\doxysubsubsection{\texorpdfstring{register\_restart\_field\_ptr0d()}{register\_restart\_field\_ptr0d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+restart\+::register\+\_\+restart\+\_\+field\+::register\+\_\+restart\+\_\+field\+\_\+ptr0d (\begin{DoxyParamCaption}\item[{real, intent(in), target}]{f\+\_\+ptr,  }\item[{type(\mbox{\hyperlink{structmom__io_1_1vardesc}{vardesc}}), intent(in)}]{var\+\_\+desc,  }\item[{logical, intent(in)}]{mandatory,  }\item[{type(\mbox{\hyperlink{structmom__restart_1_1mom__restart__cs}{mom\+\_\+restart\+\_\+cs}}), pointer}]{CS }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Register a 0-\/d field for restarts, providing the metadata in a structure. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em f\+\_\+ptr} & A pointer to the field to be read or written \\
\hline
\mbox{\texttt{ in}}  & {\em var\+\_\+desc} & A structure with metadata about this variable \\
\hline
\mbox{\texttt{ in}}  & {\em mandatory} & If true, the run will abort if this field is not successfully read from the restart file. \\
\hline
 & {\em cs} & A pointer to a M\+O\+M\+\_\+restart\+\_\+\+CS object (intent in/out) \\
\hline
\end{DoxyParams}


Definition at line 272 of file M\+O\+M\+\_\+restart.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{273 \textcolor{keywordtype}{  real},               \textcolor{keywordtype}{target}, \textcolor{keywordtype}{intent(in)} :: f\_ptr\textcolor{comment}{     !< A pointer to the field to be read or written}}
\DoxyCodeLine{274   \textcolor{keywordtype}{type}(vardesc),              \textcolor{keywordtype}{intent(in)} :: var\_desc\textcolor{comment}{  !< A structure with metadata about this variable}}
\DoxyCodeLine{275   \textcolor{keywordtype}{logical},                    \textcolor{keywordtype}{intent(in)} :: mandatory\textcolor{comment}{ !< If true, the run will abort if this field is not}}
\DoxyCodeLine{276 \textcolor{comment}{                                                      !! successfully read from the restart file.}}
\DoxyCodeLine{277   \textcolor{keywordtype}{type}(MOM\_restart\_CS),       \textcolor{keywordtype}{pointer}    :: CS\textcolor{comment}{        !< A pointer to a MOM\_restart\_CS object (intent in/out)}}
\DoxyCodeLine{278 }
\DoxyCodeLine{279   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(cs)) \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"{}MOM\_restart "{}} // \&}
\DoxyCodeLine{280       \textcolor{stringliteral}{"{}register\_restart\_field: Module must be initialized before it is used."{}})}
\DoxyCodeLine{281 }
\DoxyCodeLine{282   cs\%novars = cs\%novars+1}
\DoxyCodeLine{283   \textcolor{keywordflow}{if} (cs\%novars > cs\%max\_fields) \textcolor{keywordflow}{return} \textcolor{comment}{! This is an error that will be reported}}
\DoxyCodeLine{284                                      \textcolor{comment}{! once the total number of fields is known.}}
\DoxyCodeLine{285 }
\DoxyCodeLine{286   cs\%restart\_field(cs\%novars)\%vars = var\_desc}
\DoxyCodeLine{287   cs\%restart\_field(cs\%novars)\%mand\_var = mandatory}
\DoxyCodeLine{288   cs\%restart\_field(cs\%novars)\%initialized = .false.}
\DoxyCodeLine{289   \textcolor{keyword}{call }query\_vardesc(cs\%restart\_field(cs\%novars)\%vars, \&}
\DoxyCodeLine{290                      name=cs\%restart\_field(cs\%novars)\%var\_name, \&}
\DoxyCodeLine{291                      caller=\textcolor{stringliteral}{"{}register\_restart\_field\_ptr0d"{}})}
\DoxyCodeLine{292 }
\DoxyCodeLine{293   cs\%var\_ptr0d(cs\%novars)\%p => f\_ptr}
\DoxyCodeLine{294   cs\%var\_ptr4d(cs\%novars)\%p => null()}
\DoxyCodeLine{295   cs\%var\_ptr3d(cs\%novars)\%p => null()}
\DoxyCodeLine{296   cs\%var\_ptr2d(cs\%novars)\%p => null()}
\DoxyCodeLine{297   cs\%var\_ptr1d(cs\%novars)\%p => null()}
\DoxyCodeLine{298 }

\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__restart_1_1register__restart__field_a0ac15c082e9e4b0370b7d22a79f93c32}\label{interfacemom__restart_1_1register__restart__field_a0ac15c082e9e4b0370b7d22a79f93c32}} 
\index{mom\_restart::register\_restart\_field@{mom\_restart::register\_restart\_field}!register\_restart\_field\_ptr1d@{register\_restart\_field\_ptr1d}}
\index{register\_restart\_field\_ptr1d@{register\_restart\_field\_ptr1d}!mom\_restart::register\_restart\_field@{mom\_restart::register\_restart\_field}}
\doxysubsubsection{\texorpdfstring{register\_restart\_field\_ptr1d()}{register\_restart\_field\_ptr1d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+restart\+::register\+\_\+restart\+\_\+field\+::register\+\_\+restart\+\_\+field\+\_\+ptr1d (\begin{DoxyParamCaption}\item[{real, dimension(\+:), intent(in), target}]{f\+\_\+ptr,  }\item[{type(\mbox{\hyperlink{structmom__io_1_1vardesc}{vardesc}}), intent(in)}]{var\+\_\+desc,  }\item[{logical, intent(in)}]{mandatory,  }\item[{type(\mbox{\hyperlink{structmom__restart_1_1mom__restart__cs}{mom\+\_\+restart\+\_\+cs}}), pointer}]{CS }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Register a 1-\/d field for restarts, providing the metadata in a structure. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em f\+\_\+ptr} & A pointer to the field to be read or written \\
\hline
\mbox{\texttt{ in}}  & {\em var\+\_\+desc} & A structure with metadata about this variable \\
\hline
\mbox{\texttt{ in}}  & {\em mandatory} & If true, the run will abort if this field is not successfully read from the restart file. \\
\hline
 & {\em cs} & A pointer to a M\+O\+M\+\_\+restart\+\_\+\+CS object (intent in/out) \\
\hline
\end{DoxyParams}


Definition at line 242 of file M\+O\+M\+\_\+restart.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{243 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{target}, \textcolor{keywordtype}{intent(in)} :: f\_ptr\textcolor{comment}{     !< A pointer to the field to be read or written}}
\DoxyCodeLine{244   \textcolor{keywordtype}{type}(vardesc),              \textcolor{keywordtype}{intent(in)} :: var\_desc\textcolor{comment}{  !< A structure with metadata about this variable}}
\DoxyCodeLine{245   \textcolor{keywordtype}{logical},                    \textcolor{keywordtype}{intent(in)} :: mandatory\textcolor{comment}{ !< If true, the run will abort if this field is not}}
\DoxyCodeLine{246 \textcolor{comment}{                                                      !! successfully read from the restart file.}}
\DoxyCodeLine{247   \textcolor{keywordtype}{type}(MOM\_restart\_CS),       \textcolor{keywordtype}{pointer}    :: CS\textcolor{comment}{        !< A pointer to a MOM\_restart\_CS object (intent in/out)}}
\DoxyCodeLine{248 }
\DoxyCodeLine{249   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(cs)) \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"{}MOM\_restart "{}} // \&}
\DoxyCodeLine{250       \textcolor{stringliteral}{"{}register\_restart\_field: Module must be initialized before it is used."{}})}
\DoxyCodeLine{251 }
\DoxyCodeLine{252   cs\%novars = cs\%novars+1}
\DoxyCodeLine{253   \textcolor{keywordflow}{if} (cs\%novars > cs\%max\_fields) \textcolor{keywordflow}{return} \textcolor{comment}{! This is an error that will be reported}}
\DoxyCodeLine{254                                      \textcolor{comment}{! once the total number of fields is known.}}
\DoxyCodeLine{255 }
\DoxyCodeLine{256   cs\%restart\_field(cs\%novars)\%vars = var\_desc}
\DoxyCodeLine{257   cs\%restart\_field(cs\%novars)\%mand\_var = mandatory}
\DoxyCodeLine{258   cs\%restart\_field(cs\%novars)\%initialized = .false.}
\DoxyCodeLine{259   \textcolor{keyword}{call }query\_vardesc(cs\%restart\_field(cs\%novars)\%vars, \&}
\DoxyCodeLine{260                      name=cs\%restart\_field(cs\%novars)\%var\_name, \&}
\DoxyCodeLine{261                      caller=\textcolor{stringliteral}{"{}register\_restart\_field\_ptr1d"{}})}
\DoxyCodeLine{262 }
\DoxyCodeLine{263   cs\%var\_ptr1d(cs\%novars)\%p => f\_ptr}
\DoxyCodeLine{264   cs\%var\_ptr4d(cs\%novars)\%p => null()}
\DoxyCodeLine{265   cs\%var\_ptr3d(cs\%novars)\%p => null()}
\DoxyCodeLine{266   cs\%var\_ptr2d(cs\%novars)\%p => null()}
\DoxyCodeLine{267   cs\%var\_ptr0d(cs\%novars)\%p => null()}
\DoxyCodeLine{268 }

\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__restart_1_1register__restart__field_a97dd052567dc700af1baaa9aa0775679}\label{interfacemom__restart_1_1register__restart__field_a97dd052567dc700af1baaa9aa0775679}} 
\index{mom\_restart::register\_restart\_field@{mom\_restart::register\_restart\_field}!register\_restart\_field\_ptr2d@{register\_restart\_field\_ptr2d}}
\index{register\_restart\_field\_ptr2d@{register\_restart\_field\_ptr2d}!mom\_restart::register\_restart\_field@{mom\_restart::register\_restart\_field}}
\doxysubsubsection{\texorpdfstring{register\_restart\_field\_ptr2d()}{register\_restart\_field\_ptr2d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+restart\+::register\+\_\+restart\+\_\+field\+::register\+\_\+restart\+\_\+field\+\_\+ptr2d (\begin{DoxyParamCaption}\item[{real, dimension(\+:,\+:), intent(in), target}]{f\+\_\+ptr,  }\item[{type(\mbox{\hyperlink{structmom__io_1_1vardesc}{vardesc}}), intent(in)}]{var\+\_\+desc,  }\item[{logical, intent(in)}]{mandatory,  }\item[{type(\mbox{\hyperlink{structmom__restart_1_1mom__restart__cs}{mom\+\_\+restart\+\_\+cs}}), pointer}]{CS }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Register a 2-\/d field for restarts, providing the metadata in a structure. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em f\+\_\+ptr} & A pointer to the field to be read or written \\
\hline
\mbox{\texttt{ in}}  & {\em var\+\_\+desc} & A structure with metadata about this variable \\
\hline
\mbox{\texttt{ in}}  & {\em mandatory} & If true, the run will abort if this field is not successfully read from the restart file. \\
\hline
 & {\em cs} & A pointer to a M\+O\+M\+\_\+restart\+\_\+\+CS object (intent in/out) \\
\hline
\end{DoxyParams}


Definition at line 211 of file M\+O\+M\+\_\+restart.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{212 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:,:)}, \&}
\DoxyCodeLine{213                       \textcolor{keywordtype}{target}, \textcolor{keywordtype}{intent(in)} :: f\_ptr\textcolor{comment}{     !< A pointer to the field to be read or written}}
\DoxyCodeLine{214   \textcolor{keywordtype}{type}(vardesc),              \textcolor{keywordtype}{intent(in)} :: var\_desc\textcolor{comment}{  !< A structure with metadata about this variable}}
\DoxyCodeLine{215   \textcolor{keywordtype}{logical},                    \textcolor{keywordtype}{intent(in)} :: mandatory\textcolor{comment}{ !< If true, the run will abort if this field is not}}
\DoxyCodeLine{216 \textcolor{comment}{                                                      !! successfully read from the restart file.}}
\DoxyCodeLine{217   \textcolor{keywordtype}{type}(MOM\_restart\_CS),       \textcolor{keywordtype}{pointer}    :: CS\textcolor{comment}{        !< A pointer to a MOM\_restart\_CS object (intent in/out)}}
\DoxyCodeLine{218 }
\DoxyCodeLine{219   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(cs)) \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"{}MOM\_restart "{}} // \&}
\DoxyCodeLine{220       \textcolor{stringliteral}{"{}register\_restart\_field: Module must be initialized before it is used."{}})}
\DoxyCodeLine{221 }
\DoxyCodeLine{222   cs\%novars = cs\%novars+1}
\DoxyCodeLine{223   \textcolor{keywordflow}{if} (cs\%novars > cs\%max\_fields) \textcolor{keywordflow}{return} \textcolor{comment}{! This is an error that will be reported}}
\DoxyCodeLine{224                                      \textcolor{comment}{! once the total number of fields is known.}}
\DoxyCodeLine{225 }
\DoxyCodeLine{226   cs\%restart\_field(cs\%novars)\%vars = var\_desc}
\DoxyCodeLine{227   cs\%restart\_field(cs\%novars)\%mand\_var = mandatory}
\DoxyCodeLine{228   cs\%restart\_field(cs\%novars)\%initialized = .false.}
\DoxyCodeLine{229   \textcolor{keyword}{call }query\_vardesc(cs\%restart\_field(cs\%novars)\%vars, \&}
\DoxyCodeLine{230                      name=cs\%restart\_field(cs\%novars)\%var\_name, \&}
\DoxyCodeLine{231                      caller=\textcolor{stringliteral}{"{}register\_restart\_field\_ptr2d"{}})}
\DoxyCodeLine{232 }
\DoxyCodeLine{233   cs\%var\_ptr2d(cs\%novars)\%p => f\_ptr}
\DoxyCodeLine{234   cs\%var\_ptr4d(cs\%novars)\%p => null()}
\DoxyCodeLine{235   cs\%var\_ptr3d(cs\%novars)\%p => null()}
\DoxyCodeLine{236   cs\%var\_ptr1d(cs\%novars)\%p => null()}
\DoxyCodeLine{237   cs\%var\_ptr0d(cs\%novars)\%p => null()}
\DoxyCodeLine{238 }

\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__restart_1_1register__restart__field_a31a9f0b15b205b39e09972cd268eb8aa}\label{interfacemom__restart_1_1register__restart__field_a31a9f0b15b205b39e09972cd268eb8aa}} 
\index{mom\_restart::register\_restart\_field@{mom\_restart::register\_restart\_field}!register\_restart\_field\_ptr3d@{register\_restart\_field\_ptr3d}}
\index{register\_restart\_field\_ptr3d@{register\_restart\_field\_ptr3d}!mom\_restart::register\_restart\_field@{mom\_restart::register\_restart\_field}}
\doxysubsubsection{\texorpdfstring{register\_restart\_field\_ptr3d()}{register\_restart\_field\_ptr3d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+restart\+::register\+\_\+restart\+\_\+field\+::register\+\_\+restart\+\_\+field\+\_\+ptr3d (\begin{DoxyParamCaption}\item[{real, dimension(\+:,\+:,\+:), intent(in), target}]{f\+\_\+ptr,  }\item[{type(\mbox{\hyperlink{structmom__io_1_1vardesc}{vardesc}}), intent(in)}]{var\+\_\+desc,  }\item[{logical, intent(in)}]{mandatory,  }\item[{type(\mbox{\hyperlink{structmom__restart_1_1mom__restart__cs}{mom\+\_\+restart\+\_\+cs}}), pointer}]{CS }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Register a 3-\/d field for restarts, providing the metadata in a structure. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em f\+\_\+ptr} & A pointer to the field to be read or written \\
\hline
\mbox{\texttt{ in}}  & {\em var\+\_\+desc} & A structure with metadata about this variable \\
\hline
\mbox{\texttt{ in}}  & {\em mandatory} & If true, the run will abort if this field is not successfully read from the restart file. \\
\hline
 & {\em cs} & A pointer to a M\+O\+M\+\_\+restart\+\_\+\+CS object (intent in/out) \\
\hline
\end{DoxyParams}


Definition at line 149 of file M\+O\+M\+\_\+restart.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{150 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:,:,:)}, \&}
\DoxyCodeLine{151                       \textcolor{keywordtype}{target}, \textcolor{keywordtype}{intent(in)} :: f\_ptr\textcolor{comment}{     !< A pointer to the field to be read or written}}
\DoxyCodeLine{152   \textcolor{keywordtype}{type}(vardesc),              \textcolor{keywordtype}{intent(in)} :: var\_desc\textcolor{comment}{  !< A structure with metadata about this variable}}
\DoxyCodeLine{153   \textcolor{keywordtype}{logical},                    \textcolor{keywordtype}{intent(in)} :: mandatory\textcolor{comment}{ !< If true, the run will abort if this field is not}}
\DoxyCodeLine{154 \textcolor{comment}{                                                      !! successfully read from the restart file.}}
\DoxyCodeLine{155   \textcolor{keywordtype}{type}(MOM\_restart\_CS),       \textcolor{keywordtype}{pointer}    :: CS\textcolor{comment}{        !< A pointer to a MOM\_restart\_CS object (intent in/out)}}
\DoxyCodeLine{156 }
\DoxyCodeLine{157   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(cs)) \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"{}MOM\_restart "{}} // \&}
\DoxyCodeLine{158       \textcolor{stringliteral}{"{}register\_restart\_field: Module must be initialized before it is used."{}})}
\DoxyCodeLine{159 }
\DoxyCodeLine{160   cs\%novars = cs\%novars+1}
\DoxyCodeLine{161   \textcolor{keywordflow}{if} (cs\%novars > cs\%max\_fields) \textcolor{keywordflow}{return} \textcolor{comment}{! This is an error that will be reported}}
\DoxyCodeLine{162                                      \textcolor{comment}{! once the total number of fields is known.}}
\DoxyCodeLine{163 }
\DoxyCodeLine{164   cs\%restart\_field(cs\%novars)\%vars = var\_desc}
\DoxyCodeLine{165   cs\%restart\_field(cs\%novars)\%mand\_var = mandatory}
\DoxyCodeLine{166   cs\%restart\_field(cs\%novars)\%initialized = .false.}
\DoxyCodeLine{167   \textcolor{keyword}{call }query\_vardesc(cs\%restart\_field(cs\%novars)\%vars, \&}
\DoxyCodeLine{168                      name=cs\%restart\_field(cs\%novars)\%var\_name, \&}
\DoxyCodeLine{169                      caller=\textcolor{stringliteral}{"{}register\_restart\_field\_ptr3d"{}})}
\DoxyCodeLine{170 }
\DoxyCodeLine{171   cs\%var\_ptr3d(cs\%novars)\%p => f\_ptr}
\DoxyCodeLine{172   cs\%var\_ptr4d(cs\%novars)\%p => null()}
\DoxyCodeLine{173   cs\%var\_ptr2d(cs\%novars)\%p => null()}
\DoxyCodeLine{174   cs\%var\_ptr1d(cs\%novars)\%p => null()}
\DoxyCodeLine{175   cs\%var\_ptr0d(cs\%novars)\%p => null()}
\DoxyCodeLine{176 }

\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__restart_1_1register__restart__field_a75939f6a7aaf7d72287712d72fc3cf57}\label{interfacemom__restart_1_1register__restart__field_a75939f6a7aaf7d72287712d72fc3cf57}} 
\index{mom\_restart::register\_restart\_field@{mom\_restart::register\_restart\_field}!register\_restart\_field\_ptr4d@{register\_restart\_field\_ptr4d}}
\index{register\_restart\_field\_ptr4d@{register\_restart\_field\_ptr4d}!mom\_restart::register\_restart\_field@{mom\_restart::register\_restart\_field}}
\doxysubsubsection{\texorpdfstring{register\_restart\_field\_ptr4d()}{register\_restart\_field\_ptr4d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+restart\+::register\+\_\+restart\+\_\+field\+::register\+\_\+restart\+\_\+field\+\_\+ptr4d (\begin{DoxyParamCaption}\item[{real, dimension(\+:,\+:,\+:,\+:), intent(in), target}]{f\+\_\+ptr,  }\item[{type(\mbox{\hyperlink{structmom__io_1_1vardesc}{vardesc}}), intent(in)}]{var\+\_\+desc,  }\item[{logical, intent(in)}]{mandatory,  }\item[{type(\mbox{\hyperlink{structmom__restart_1_1mom__restart__cs}{mom\+\_\+restart\+\_\+cs}}), pointer}]{CS }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Register a 4-\/d field for restarts, providing the metadata in a structure. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em f\+\_\+ptr} & A pointer to the field to be read or written \\
\hline
\mbox{\texttt{ in}}  & {\em var\+\_\+desc} & A structure with metadata about this variable \\
\hline
\mbox{\texttt{ in}}  & {\em mandatory} & If true, the run will abort if this field is not successfully read from the restart file. \\
\hline
 & {\em cs} & A pointer to a M\+O\+M\+\_\+restart\+\_\+\+CS object (intent in/out) \\
\hline
\end{DoxyParams}


Definition at line 180 of file M\+O\+M\+\_\+restart.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{181 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:,:,:,:)}, \&}
\DoxyCodeLine{182                       \textcolor{keywordtype}{target}, \textcolor{keywordtype}{intent(in)} :: f\_ptr\textcolor{comment}{     !< A pointer to the field to be read or written}}
\DoxyCodeLine{183   \textcolor{keywordtype}{type}(vardesc),              \textcolor{keywordtype}{intent(in)} :: var\_desc\textcolor{comment}{  !< A structure with metadata about this variable}}
\DoxyCodeLine{184   \textcolor{keywordtype}{logical},                    \textcolor{keywordtype}{intent(in)} :: mandatory\textcolor{comment}{ !< If true, the run will abort if this field is not}}
\DoxyCodeLine{185 \textcolor{comment}{                                                      !! successfully read from the restart file.}}
\DoxyCodeLine{186   \textcolor{keywordtype}{type}(MOM\_restart\_CS),       \textcolor{keywordtype}{pointer}    :: CS\textcolor{comment}{        !< A pointer to a MOM\_restart\_CS object (intent in/out)}}
\DoxyCodeLine{187 }
\DoxyCodeLine{188   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(cs)) \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"{}MOM\_restart "{}} // \&}
\DoxyCodeLine{189       \textcolor{stringliteral}{"{}register\_restart\_field: Module must be initialized before it is used."{}})}
\DoxyCodeLine{190 }
\DoxyCodeLine{191   cs\%novars = cs\%novars+1}
\DoxyCodeLine{192   \textcolor{keywordflow}{if} (cs\%novars > cs\%max\_fields) \textcolor{keywordflow}{return} \textcolor{comment}{! This is an error that will be reported}}
\DoxyCodeLine{193                                      \textcolor{comment}{! once the total number of fields is known.}}
\DoxyCodeLine{194 }
\DoxyCodeLine{195   cs\%restart\_field(cs\%novars)\%vars = var\_desc}
\DoxyCodeLine{196   cs\%restart\_field(cs\%novars)\%mand\_var = mandatory}
\DoxyCodeLine{197   cs\%restart\_field(cs\%novars)\%initialized = .false.}
\DoxyCodeLine{198   \textcolor{keyword}{call }query\_vardesc(cs\%restart\_field(cs\%novars)\%vars, \&}
\DoxyCodeLine{199                      name=cs\%restart\_field(cs\%novars)\%var\_name, \&}
\DoxyCodeLine{200                      caller=\textcolor{stringliteral}{"{}register\_restart\_field\_ptr4d"{}})}
\DoxyCodeLine{201 }
\DoxyCodeLine{202   cs\%var\_ptr4d(cs\%novars)\%p => f\_ptr}
\DoxyCodeLine{203   cs\%var\_ptr3d(cs\%novars)\%p => null()}
\DoxyCodeLine{204   cs\%var\_ptr2d(cs\%novars)\%p => null()}
\DoxyCodeLine{205   cs\%var\_ptr1d(cs\%novars)\%p => null()}
\DoxyCodeLine{206   cs\%var\_ptr0d(cs\%novars)\%p => null()}
\DoxyCodeLine{207 }

\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\+\_\+restart.\+F90\end{DoxyCompactItemize}
