\hypertarget{interfacemom__checksums_1_1hchksum__pair}{}\doxysection{mom\+\_\+checksums\+::hchksum\+\_\+pair Interface Reference}
\label{interfacemom__checksums_1_1hchksum__pair}\index{mom\_checksums::hchksum\_pair@{mom\_checksums::hchksum\_pair}}


\doxysubsection{Detailed Description}
Checksums a pair of arrays (2d or 3d) staggered at tracer points. 

Definition at line 24 of file M\+O\+M\+\_\+checksums.\+F90.

\doxysubsection*{Private functions}
\begin{DoxyCompactItemize}
\item 
subroutine \mbox{\hyperlink{interfacemom__checksums_1_1hchksum__pair_a6e01954e421d1cfa073d666fb35eec46}{chksum\+\_\+pair\+\_\+h\+\_\+2d}} (mesg, arrayA, arrayB, HI, haloshift, omit\+\_\+corners, scale, logunit, scalar\+\_\+pair)
\begin{DoxyCompactList}\small\item\em Checksums on a pair of 2d arrays staggered at tracer points. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{interfacemom__checksums_1_1hchksum__pair_a4e7dffe8666c9a3551a2606b6183300a}{chksum\+\_\+pair\+\_\+h\+\_\+3d}} (mesg, arrayA, arrayB, HI, haloshift, omit\+\_\+corners, scale, logunit, scalar\+\_\+pair)
\begin{DoxyCompactList}\small\item\em Checksums on a pair of 3d arrays staggered at tracer points. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Checksums a pair of arrays (2d or 3d) staggered at tracer points. 

Definition at line 24 of file M\+O\+M\+\_\+checksums.\+F90.



\doxysubsection{Functions and subroutines}
\mbox{\Hypertarget{interfacemom__checksums_1_1hchksum__pair_a6e01954e421d1cfa073d666fb35eec46}\label{interfacemom__checksums_1_1hchksum__pair_a6e01954e421d1cfa073d666fb35eec46}} 
\index{mom\_checksums::hchksum\_pair@{mom\_checksums::hchksum\_pair}!chksum\_pair\_h\_2d@{chksum\_pair\_h\_2d}}
\index{chksum\_pair\_h\_2d@{chksum\_pair\_h\_2d}!mom\_checksums::hchksum\_pair@{mom\_checksums::hchksum\_pair}}
\doxysubsubsection{\texorpdfstring{chksum\_pair\_h\_2d()}{chksum\_pair\_h\_2d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+checksums\+::hchksum\+\_\+pair\+::chksum\+\_\+pair\+\_\+h\+\_\+2d (\begin{DoxyParamCaption}\item[{character(len=$\ast$), intent(in)}]{mesg,  }\item[{real, dimension(hi\%isd\+:,hi\%jsd\+:), intent(in), target}]{arrayA,  }\item[{real, dimension(hi\%isd\+:,hi\%jsd\+:), intent(in), target}]{arrayB,  }\item[{type(hor\+\_\+index\+\_\+type), intent(in), target}]{HI,  }\item[{integer, intent(in), optional}]{haloshift,  }\item[{logical, intent(in), optional}]{omit\+\_\+corners,  }\item[{real, intent(in), optional}]{scale,  }\item[{integer, intent(in), optional}]{logunit,  }\item[{logical, intent(in), optional}]{scalar\+\_\+pair }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Checksums on a pair of 2d arrays staggered at tracer points. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em mesg} & Identifying messages \\
\hline
\mbox{\texttt{ in}}  & {\em hi} & A horizontal index type \\
\hline
\mbox{\texttt{ in}}  & {\em arraya} & The first array to be checksummed \\
\hline
\mbox{\texttt{ in}}  & {\em arrayb} & The second array to be checksummed \\
\hline
\mbox{\texttt{ in}}  & {\em haloshift} & The width of halos to check (default 0) \\
\hline
\mbox{\texttt{ in}}  & {\em omit\+\_\+corners} & If true, avoid checking diagonal shifts \\
\hline
\mbox{\texttt{ in}}  & {\em scale} & A scaling factor for this array. \\
\hline
\mbox{\texttt{ in}}  & {\em logunit} & IO unit for checksum logging \\
\hline
\mbox{\texttt{ in}}  & {\em scalar\+\_\+pair} & If true, then the arrays describe a scalar, rather than vector \\
\hline
\end{DoxyParams}


Definition at line 202 of file M\+O\+M\+\_\+checksums.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{202   \textcolor{keywordtype}{character(len=*)},                 \textcolor{keywordtype}{intent(in)} :: mesg\textcolor{comment}{ !< Identifying messages}}
\DoxyCodeLine{203   \textcolor{keywordtype}{type}(hor\_index\_type),   \textcolor{keywordtype}{target},   \textcolor{keywordtype}{intent(in)} :: HI\textcolor{comment}{     !< A horizontal index type}}
\DoxyCodeLine{204 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(HI\%isd:,HI\%jsd:)}, \textcolor{keywordtype}{target}, \textcolor{keywordtype}{intent(in)} :: arrayA\textcolor{comment}{ !< The first array to be checksummed}}
\DoxyCodeLine{205 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(HI\%isd:,HI\%jsd:)}, \textcolor{keywordtype}{target}, \textcolor{keywordtype}{intent(in)} :: arrayB\textcolor{comment}{ !< The second array to be checksummed}}
\DoxyCodeLine{206   \textcolor{keywordtype}{integer},                \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: haloshift\textcolor{comment}{ !< The width of halos to check (default 0)}}
\DoxyCodeLine{207   \textcolor{keywordtype}{logical},                \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: omit\_corners\textcolor{comment}{ !< If true, avoid checking diagonal shifts}}
\DoxyCodeLine{208 \textcolor{keywordtype}{  real},                   \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: scale\textcolor{comment}{     !< A scaling factor for this array.}}
\DoxyCodeLine{209   \textcolor{keywordtype}{integer},                \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: logunit\textcolor{comment}{ !< IO unit for checksum logging}}
\DoxyCodeLine{210   \textcolor{keywordtype}{logical},                \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: scalar\_pair\textcolor{comment}{ !< If true, then the arrays describe}}
\DoxyCodeLine{211 \textcolor{comment}{                                                              !! a scalar, rather than vector}}
\DoxyCodeLine{212   \textcolor{keywordtype}{logical} :: vector\_pair}
\DoxyCodeLine{213   \textcolor{keywordtype}{integer} :: turns}
\DoxyCodeLine{214   \textcolor{keywordtype}{type}(hor\_index\_type), \textcolor{keywordtype}{pointer} :: HI\_in}
\DoxyCodeLine{215 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:,:)}, \textcolor{keywordtype}{pointer} :: arrayA\_in, arrayB\_in}
\DoxyCodeLine{216 }
\DoxyCodeLine{217   vector\_pair = .true.}
\DoxyCodeLine{218   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(scalar\_pair)) vector\_pair = .not. scalar\_pair}
\DoxyCodeLine{219 }
\DoxyCodeLine{220   turns = hi\%turns}
\DoxyCodeLine{221   \textcolor{keywordflow}{if} (modulo(turns, 4) /= 0) \textcolor{keywordflow}{then}}
\DoxyCodeLine{222     \textcolor{comment}{! Rotate field back to the input grid}}
\DoxyCodeLine{223     \textcolor{keyword}{allocate}(hi\_in)}
\DoxyCodeLine{224     \textcolor{keyword}{call }rotate\_hor\_index(hi, -\/turns, hi\_in)}
\DoxyCodeLine{225     \textcolor{keyword}{allocate}(arraya\_in(hi\_in\%isd:hi\_in\%ied, hi\_in\%jsd:hi\_in\%jed))}
\DoxyCodeLine{226     \textcolor{keyword}{allocate}(arrayb\_in(hi\_in\%isd:hi\_in\%ied, hi\_in\%jsd:hi\_in\%jed))}
\DoxyCodeLine{227 }
\DoxyCodeLine{228     \textcolor{keywordflow}{if} (vector\_pair) \textcolor{keywordflow}{then}}
\DoxyCodeLine{229       \textcolor{keyword}{call }rotate\_vector(arraya, arrayb, -\/turns, arraya\_in, arrayb\_in)}
\DoxyCodeLine{230     \textcolor{keywordflow}{else}}
\DoxyCodeLine{231       \textcolor{keyword}{call }rotate\_array\_pair(arraya, arrayb, -\/turns, arraya\_in, arrayb\_in)}
\DoxyCodeLine{232 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{233   \textcolor{keywordflow}{else}}
\DoxyCodeLine{234     hi\_in => hi}
\DoxyCodeLine{235     arraya\_in => arraya}
\DoxyCodeLine{236     arrayb\_in => arrayb}
\DoxyCodeLine{237 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{238 }
\DoxyCodeLine{239   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(haloshift)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{240     \textcolor{keyword}{call }chksum\_h\_2d(arraya\_in, \textcolor{stringliteral}{'x '}//mesg, hi\_in, haloshift, omit\_corners, \&}
\DoxyCodeLine{241                      scale=scale, logunit=logunit)}
\DoxyCodeLine{242     \textcolor{keyword}{call }chksum\_h\_2d(arrayb\_in, \textcolor{stringliteral}{'y '}//mesg, hi\_in, haloshift, omit\_corners, \&}
\DoxyCodeLine{243                      scale=scale, logunit=logunit)}
\DoxyCodeLine{244   \textcolor{keywordflow}{else}}
\DoxyCodeLine{245     \textcolor{keyword}{call }chksum\_h\_2d(arraya\_in, \textcolor{stringliteral}{'x '}//mesg, hi\_in, scale=scale, logunit=logunit)}
\DoxyCodeLine{246     \textcolor{keyword}{call }chksum\_h\_2d(arrayb\_in, \textcolor{stringliteral}{'y '}//mesg, hi\_in, scale=scale, logunit=logunit)}
\DoxyCodeLine{247 \textcolor{keywordflow}{  endif}}

\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__checksums_1_1hchksum__pair_a4e7dffe8666c9a3551a2606b6183300a}\label{interfacemom__checksums_1_1hchksum__pair_a4e7dffe8666c9a3551a2606b6183300a}} 
\index{mom\_checksums::hchksum\_pair@{mom\_checksums::hchksum\_pair}!chksum\_pair\_h\_3d@{chksum\_pair\_h\_3d}}
\index{chksum\_pair\_h\_3d@{chksum\_pair\_h\_3d}!mom\_checksums::hchksum\_pair@{mom\_checksums::hchksum\_pair}}
\doxysubsubsection{\texorpdfstring{chksum\_pair\_h\_3d()}{chksum\_pair\_h\_3d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+checksums\+::hchksum\+\_\+pair\+::chksum\+\_\+pair\+\_\+h\+\_\+3d (\begin{DoxyParamCaption}\item[{character(len=$\ast$), intent(in)}]{mesg,  }\item[{real, dimension(hi\%isd\+:,hi\%jsd\+:, \+:), intent(in), target}]{arrayA,  }\item[{real, dimension(hi\%isd\+:,hi\%jsd\+:, \+:), intent(in), target}]{arrayB,  }\item[{type(hor\+\_\+index\+\_\+type), intent(in), target}]{HI,  }\item[{integer, intent(in), optional}]{haloshift,  }\item[{logical, intent(in), optional}]{omit\+\_\+corners,  }\item[{real, intent(in), optional}]{scale,  }\item[{integer, intent(in), optional}]{logunit,  }\item[{logical, intent(in), optional}]{scalar\+\_\+pair }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Checksums on a pair of 3d arrays staggered at tracer points. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em mesg} & Identifying messages \\
\hline
\mbox{\texttt{ in}}  & {\em hi} & A horizontal index type \\
\hline
\mbox{\texttt{ in}}  & {\em arraya} & The first array to be checksummed \\
\hline
\mbox{\texttt{ in}}  & {\em arrayb} & The second array to be checksummed \\
\hline
\mbox{\texttt{ in}}  & {\em haloshift} & The width of halos to check (default 0) \\
\hline
\mbox{\texttt{ in}}  & {\em omit\+\_\+corners} & If true, avoid checking diagonal shifts \\
\hline
\mbox{\texttt{ in}}  & {\em scale} & A scaling factor for this array. \\
\hline
\mbox{\texttt{ in}}  & {\em logunit} & IO unit for checksum logging \\
\hline
\mbox{\texttt{ in}}  & {\em scalar\+\_\+pair} & If true, then the arrays describe a scalar, rather than vector \\
\hline
\end{DoxyParams}


Definition at line 253 of file M\+O\+M\+\_\+checksums.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{253   \textcolor{keywordtype}{character(len=*)},                    \textcolor{keywordtype}{intent(in)} :: mesg\textcolor{comment}{ !< Identifying messages}}
\DoxyCodeLine{254   \textcolor{keywordtype}{type}(hor\_index\_type),      \textcolor{keywordtype}{target},   \textcolor{keywordtype}{intent(in)} :: HI\textcolor{comment}{   !< A horizontal index type}}
\DoxyCodeLine{255 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(HI\%isd:,HI\%jsd:, :)}, \textcolor{keywordtype}{target}, \textcolor{keywordtype}{intent(in)} :: arrayA\textcolor{comment}{ !< The first array to be checksummed}}
\DoxyCodeLine{256 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(HI\%isd:,HI\%jsd:, :)}, \textcolor{keywordtype}{target}, \textcolor{keywordtype}{intent(in)} :: arrayB\textcolor{comment}{ !< The second array to be checksummed}}
\DoxyCodeLine{257   \textcolor{keywordtype}{integer},                   \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: haloshift\textcolor{comment}{ !< The width of halos to check (default 0)}}
\DoxyCodeLine{258   \textcolor{keywordtype}{logical},                   \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: omit\_corners\textcolor{comment}{ !< If true, avoid checking diagonal shifts}}
\DoxyCodeLine{259 \textcolor{keywordtype}{  real},                      \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: scale\textcolor{comment}{     !< A scaling factor for this array.}}
\DoxyCodeLine{260   \textcolor{keywordtype}{integer},                   \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: logunit\textcolor{comment}{ !< IO unit for checksum logging}}
\DoxyCodeLine{261 }
\DoxyCodeLine{262   \textcolor{keywordtype}{logical},                \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: scalar\_pair\textcolor{comment}{ !< If true, then the arrays describe}}
\DoxyCodeLine{263 \textcolor{comment}{                                                              !! a scalar, rather than vector}}
\DoxyCodeLine{264   \textcolor{keywordtype}{logical} :: vector\_pair}
\DoxyCodeLine{265   \textcolor{keywordtype}{integer} :: turns}
\DoxyCodeLine{266   \textcolor{keywordtype}{type}(hor\_index\_type), \textcolor{keywordtype}{pointer} :: HI\_in}
\DoxyCodeLine{267 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:,:,:)}, \textcolor{keywordtype}{pointer} :: arrayA\_in, arrayB\_in}
\DoxyCodeLine{268 }
\DoxyCodeLine{269   vector\_pair = .true.}
\DoxyCodeLine{270   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(scalar\_pair)) vector\_pair = .not. scalar\_pair}
\DoxyCodeLine{271 }
\DoxyCodeLine{272   turns = hi\%turns}
\DoxyCodeLine{273   \textcolor{keywordflow}{if} (modulo(turns, 4) /= 0) \textcolor{keywordflow}{then}}
\DoxyCodeLine{274     \textcolor{comment}{! Rotate field back to the input grid}}
\DoxyCodeLine{275     \textcolor{keyword}{allocate}(hi\_in)}
\DoxyCodeLine{276     \textcolor{keyword}{call }rotate\_hor\_index(hi, -\/turns, hi\_in)}
\DoxyCodeLine{277     \textcolor{keyword}{allocate}(arraya\_in(hi\_in\%isd:hi\_in\%ied, hi\_in\%jsd:hi\_in\%jed, \textcolor{keyword}{size}(arraya, 3)))}
\DoxyCodeLine{278     \textcolor{keyword}{allocate}(arrayb\_in(hi\_in\%isd:hi\_in\%ied, hi\_in\%jsd:hi\_in\%jed, \textcolor{keyword}{size}(arrayb, 3)))}
\DoxyCodeLine{279 }
\DoxyCodeLine{280     \textcolor{keywordflow}{if} (vector\_pair) \textcolor{keywordflow}{then}}
\DoxyCodeLine{281       \textcolor{keyword}{call }rotate\_vector(arraya, arrayb, -\/turns, arraya\_in, arrayb\_in)}
\DoxyCodeLine{282     \textcolor{keywordflow}{else}}
\DoxyCodeLine{283       \textcolor{keyword}{call }rotate\_array\_pair(arraya, arrayb, -\/turns, arraya\_in, arrayb\_in)}
\DoxyCodeLine{284 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{285   \textcolor{keywordflow}{else}}
\DoxyCodeLine{286     hi\_in => hi}
\DoxyCodeLine{287     arraya\_in => arraya}
\DoxyCodeLine{288     arrayb\_in => arrayb}
\DoxyCodeLine{289 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{290 }
\DoxyCodeLine{291   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(haloshift)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{292     \textcolor{keyword}{call }chksum\_h\_3d(arraya\_in, \textcolor{stringliteral}{'x '}//mesg, hi\_in, haloshift, omit\_corners, \&}
\DoxyCodeLine{293                      scale=scale, logunit=logunit)}
\DoxyCodeLine{294     \textcolor{keyword}{call }chksum\_h\_3d(arrayb\_in, \textcolor{stringliteral}{'y '}//mesg, hi\_in, haloshift, omit\_corners, \&}
\DoxyCodeLine{295                      scale=scale, logunit=logunit)}
\DoxyCodeLine{296   \textcolor{keywordflow}{else}}
\DoxyCodeLine{297     \textcolor{keyword}{call }chksum\_h\_3d(arraya\_in, \textcolor{stringliteral}{'x '}//mesg, hi\_in, scale=scale, logunit=logunit)}
\DoxyCodeLine{298     \textcolor{keyword}{call }chksum\_h\_3d(arrayb\_in, \textcolor{stringliteral}{'y '}//mesg, hi\_in, scale=scale, logunit=logunit)}
\DoxyCodeLine{299 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{300 }
\DoxyCodeLine{301   \textcolor{comment}{! NOTE: automatic deallocation of array[AB]\_in}}

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