\hypertarget{interfacemom__restart_1_1register__restart__field}{}\section{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}}


\subsection{Detailed Description}
Register fields for restarts. 

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

\subsection*{Private functions}
\begin{DoxyCompactItemize}
\item 
subroutine \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 \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 \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 \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 \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 \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 \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 \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 \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 \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}


\subsection{Detailed Description}
Register fields for restarts. 

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



\subsection{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}}
\subsubsection{\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(\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{\tt in}  & {\em f\+\_\+ptr} & A pointer to the field to be read or written\\
\hline
\mbox{\tt in}  & {\em name} & variable name to be used in the restart file\\
\hline
\mbox{\tt 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{\tt in}  & {\em longname} & variable long name\\
\hline
\mbox{\tt in}  & {\em units} & variable units\\
\hline
\mbox{\tt in}  & {\em t\+\_\+grid} & time description\+: s, p, or 1, \textquotesingle{}s\textquotesingle{} if absent \\
\hline
\end{DoxyParams}


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


\begin{DoxyCode}
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}
479   \textcolor{keywordtype}{character(len=*)},           \textcolor{keywordtype}{intent(in)} :: name\textcolor{comment}{      !< variable name to be used in the restart file}
480   \textcolor{keywordtype}{logical},                    \textcolor{keywordtype}{intent(in)} :: mandatory\textcolor{comment}{ !< If true, the run will abort if this field is not}
481 \textcolor{comment}{                                                      !! successfully read from the restart file.}
482   \textcolor{keywordtype}{type}(mom\_restart\_cs),       \textcolor{keywordtype}{pointer}    :: cs\textcolor{comment}{        !< A pointer to a MOM\_restart\_CS object (intent
       in/out)}
483   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: longname\textcolor{comment}{  !< variable long name}
484   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: units\textcolor{comment}{     !< variable units}
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}
486 
487   \textcolor{keywordtype}{type}(vardesc) :: vd
488   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(cs)) \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"MOM\_restart: "} // &
489       \textcolor{stringliteral}{"register\_restart\_field\_0d: Module must be initialized before "}//&
490       \textcolor{stringliteral}{"it is used to register "}//trim(name))
491   vd = var\_desc(name, units=units, longname=longname, hor\_grid=\textcolor{stringliteral}{'1'}, &
492                 z\_grid=\textcolor{stringliteral}{'1'}, t\_grid=t\_grid)
493 
494   \textcolor{keyword}{call }register\_restart\_field\_ptr0d(f\_ptr, vd, mandatory, cs)
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}}
\subsubsection{\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(\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{\tt in}  & {\em f\+\_\+ptr} & A pointer to the field to be read or written\\
\hline
\mbox{\tt in}  & {\em name} & variable name to be used in the restart file\\
\hline
\mbox{\tt 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{\tt in}  & {\em longname} & variable long name\\
\hline
\mbox{\tt in}  & {\em units} & variable units\\
\hline
\mbox{\tt in}  & {\em hor\+\_\+grid} & variable horizonal staggering, \textquotesingle{}1\textquotesingle{} if absent\\
\hline
\mbox{\tt in}  & {\em z\+\_\+grid} & variable vertical staggering, \textquotesingle{}L\textquotesingle{} if absent\\
\hline
\mbox{\tt in}  & {\em t\+\_\+grid} & time description\+: s, p, or 1, \textquotesingle{}s\textquotesingle{} if absent \\
\hline
\end{DoxyParams}


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


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


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


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


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


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


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


\begin{DoxyCode}
367   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:,:,:,:)}, &
368                       \textcolor{keywordtype}{target}, \textcolor{keywordtype}{intent(in)} :: f\_ptr\textcolor{comment}{     !< A pointer to the field to be read or written}
369   \textcolor{keywordtype}{character(len=*)},           \textcolor{keywordtype}{intent(in)} :: name\textcolor{comment}{      !< variable name to be used in the restart file}
370   \textcolor{keywordtype}{logical},                    \textcolor{keywordtype}{intent(in)} :: mandatory\textcolor{comment}{ !< If true, the run will abort if this field is not}
371 \textcolor{comment}{                                                      !! successfully read from the restart file.}
372   \textcolor{keywordtype}{type}(mom\_restart\_cs),       \textcolor{keywordtype}{pointer}    :: cs\textcolor{comment}{        !< A pointer to a MOM\_restart\_CS object (intent
       in/out)}
373   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: longname\textcolor{comment}{  !< variable long name}
374   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: units\textcolor{comment}{     !< variable units}
375   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: hor\_grid\textcolor{comment}{  !< variable horizonal staggering, 'h' if absent}
376   \textcolor{keywordtype}{character(len=*)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: z\_grid\textcolor{comment}{    !< variable vertical staggering, 'L' if absent}
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}
378 
379   \textcolor{keywordtype}{type}(vardesc) :: vd
380 
381   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(cs)) \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"MOM\_restart: "} // &
382       \textcolor{stringliteral}{"register\_restart\_field\_4d: Module must be initialized before "}//&
383       \textcolor{stringliteral}{"it is used to register "}//trim(name))
384   vd = var\_desc(name, units=units, longname=longname, hor\_grid=hor\_grid, &
385                 z\_grid=z\_grid, t\_grid=t\_grid)
386 
387   \textcolor{keyword}{call }register\_restart\_field\_ptr4d(f\_ptr, vd, mandatory, cs)
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}}
\subsubsection{\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(vardesc), intent(in)}]{var\+\_\+desc,  }\item[{logical, intent(in)}]{mandatory,  }\item[{type(\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{\tt in}  & {\em f\+\_\+ptr} & A pointer to the field to be read or written\\
\hline
\mbox{\tt in}  & {\em var\+\_\+desc} & A structure with metadata about this variable\\
\hline
\mbox{\tt 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 273 of file M\+O\+M\+\_\+restart.\+F90.


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


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


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


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


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