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


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

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

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


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

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



\doxysubsection{Functions and subroutines}
\mbox{\Hypertarget{interfacemom__checksums_1_1bchksum__pair_af4337b19cca8b9186428de8aaaac4fe7}\label{interfacemom__checksums_1_1bchksum__pair_af4337b19cca8b9186428de8aaaac4fe7}} 
\index{mom\_checksums::bchksum\_pair@{mom\_checksums::bchksum\_pair}!chksum\_pair\_b\_2d@{chksum\_pair\_b\_2d}}
\index{chksum\_pair\_b\_2d@{chksum\_pair\_b\_2d}!mom\_checksums::bchksum\_pair@{mom\_checksums::bchksum\_pair}}
\doxysubsubsection{\texorpdfstring{chksum\_pair\_b\_2d()}{chksum\_pair\_b\_2d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+checksums\+::bchksum\+\_\+pair\+::chksum\+\_\+pair\+\_\+b\+\_\+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(\mbox{\hyperlink{structmom__hor__index_1_1hor__index__type}{hor\+\_\+index\+\_\+type}}), intent(in), target}]{HI,  }\item[{integer, intent(in), optional}]{haloshift,  }\item[{logical, intent(in), optional}]{symmetric,  }\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 q-\/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 symmetric} & If true, do the checksums on the full symmetric computational domain. \\
\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 451 of file M\+O\+M\+\_\+checksums.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{453   \textcolor{keywordtype}{character(len=*)},                 \textcolor{keywordtype}{intent(in)} :: mesg\textcolor{comment}{   !< Identifying messages}}
\DoxyCodeLine{454   \textcolor{keywordtype}{type}(hor\_index\_type),   \textcolor{keywordtype}{target},   \textcolor{keywordtype}{intent(in)} :: HI\textcolor{comment}{     !< A horizontal index type}}
\DoxyCodeLine{455 \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{456 \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{457   \textcolor{keywordtype}{logical},                \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: symmetric\textcolor{comment}{ !< If true, do the checksums on the full}}
\DoxyCodeLine{458 \textcolor{comment}{                                                            !! symmetric computational domain.}}
\DoxyCodeLine{459   \textcolor{keywordtype}{integer},                \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: haloshift\textcolor{comment}{ !< The width of halos to check (default 0)}}
\DoxyCodeLine{460   \textcolor{keywordtype}{logical},                \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: omit\_corners\textcolor{comment}{ !< If true, avoid checking diagonal shifts}}
\DoxyCodeLine{461 \textcolor{keywordtype}{  real},                   \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: scale\textcolor{comment}{     !< A scaling factor for this array.}}
\DoxyCodeLine{462   \textcolor{keywordtype}{integer},                \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: logunit\textcolor{comment}{ !< IO unit for checksum logging}}
\DoxyCodeLine{463   \textcolor{keywordtype}{logical},                \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: scalar\_pair\textcolor{comment}{ !< If true, then the arrays describe}}
\DoxyCodeLine{464 \textcolor{comment}{                                                              !! a scalar, rather than vector}}
\DoxyCodeLine{465 }
\DoxyCodeLine{466   \textcolor{keywordtype}{logical} :: sym}
\DoxyCodeLine{467   \textcolor{keywordtype}{logical} :: vector\_pair}
\DoxyCodeLine{468   \textcolor{keywordtype}{integer} :: turns}
\DoxyCodeLine{469   \textcolor{keywordtype}{type}(hor\_index\_type), \textcolor{keywordtype}{pointer} :: HI\_in}
\DoxyCodeLine{470 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:,:)}, \textcolor{keywordtype}{pointer} :: arrayA\_in, arrayB\_in}
\DoxyCodeLine{471 }
\DoxyCodeLine{472   vector\_pair = .true.}
\DoxyCodeLine{473   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(scalar\_pair)) vector\_pair = .not. scalar\_pair}
\DoxyCodeLine{474 }
\DoxyCodeLine{475   turns = hi\%turns}
\DoxyCodeLine{476   \textcolor{keywordflow}{if} (modulo(turns, 4) /= 0) \textcolor{keywordflow}{then}}
\DoxyCodeLine{477     \textcolor{comment}{! Rotate field back to the input grid}}
\DoxyCodeLine{478     \textcolor{keyword}{allocate}(hi\_in)}
\DoxyCodeLine{479     \textcolor{keyword}{call }rotate\_hor\_index(hi, -\/turns, hi\_in)}
\DoxyCodeLine{480     \textcolor{keyword}{allocate}(arraya\_in(hi\_in\%IsdB:hi\_in\%IedB, hi\_in\%JsdB:hi\_in\%JedB))}
\DoxyCodeLine{481     \textcolor{keyword}{allocate}(arrayb\_in(hi\_in\%IsdB:hi\_in\%IedB, hi\_in\%JsdB:hi\_in\%JedB))}
\DoxyCodeLine{482 }
\DoxyCodeLine{483     \textcolor{keywordflow}{if} (vector\_pair) \textcolor{keywordflow}{then}}
\DoxyCodeLine{484       \textcolor{keyword}{call }rotate\_vector(arraya, arrayb, -\/turns, arraya\_in, arrayb\_in)}
\DoxyCodeLine{485     \textcolor{keywordflow}{else}}
\DoxyCodeLine{486       \textcolor{keyword}{call }rotate\_array\_pair(arraya, arrayb, -\/turns, arraya\_in, arrayb\_in)}
\DoxyCodeLine{487 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{488   \textcolor{keywordflow}{else}}
\DoxyCodeLine{489     hi\_in => hi}
\DoxyCodeLine{490     arraya\_in => arraya}
\DoxyCodeLine{491     arrayb\_in => arrayb}
\DoxyCodeLine{492 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{493 }
\DoxyCodeLine{494   sym = .false. ; \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(symmetric)) sym = symmetric}
\DoxyCodeLine{495 }
\DoxyCodeLine{496   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(haloshift)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{497     \textcolor{keyword}{call }chksum\_b\_2d(arraya\_in, \textcolor{stringliteral}{'x '}//mesg, hi\_in, haloshift, symmetric=sym, \&}
\DoxyCodeLine{498                      omit\_corners=omit\_corners, scale=scale, logunit=logunit)}
\DoxyCodeLine{499     \textcolor{keyword}{call }chksum\_b\_2d(arrayb\_in, \textcolor{stringliteral}{'y '}//mesg, hi\_in, haloshift, symmetric=sym, \&}
\DoxyCodeLine{500                      omit\_corners=omit\_corners, scale=scale, logunit=logunit)}
\DoxyCodeLine{501   \textcolor{keywordflow}{else}}
\DoxyCodeLine{502     \textcolor{keyword}{call }chksum\_b\_2d(arraya\_in, \textcolor{stringliteral}{'x '}//mesg, hi\_in, symmetric=sym, scale=scale, \&}
\DoxyCodeLine{503                      logunit=logunit)}
\DoxyCodeLine{504     \textcolor{keyword}{call }chksum\_b\_2d(arrayb\_in, \textcolor{stringliteral}{'y '}//mesg, hi\_in, symmetric=sym, scale=scale, \&}
\DoxyCodeLine{505                      logunit=logunit)}
\DoxyCodeLine{506 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{507 }

\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__checksums_1_1bchksum__pair_af807576dd2d6bc537db0bc1698fdeb58}\label{interfacemom__checksums_1_1bchksum__pair_af807576dd2d6bc537db0bc1698fdeb58}} 
\index{mom\_checksums::bchksum\_pair@{mom\_checksums::bchksum\_pair}!chksum\_pair\_b\_3d@{chksum\_pair\_b\_3d}}
\index{chksum\_pair\_b\_3d@{chksum\_pair\_b\_3d}!mom\_checksums::bchksum\_pair@{mom\_checksums::bchksum\_pair}}
\doxysubsubsection{\texorpdfstring{chksum\_pair\_b\_3d()}{chksum\_pair\_b\_3d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+checksums\+::bchksum\+\_\+pair\+::chksum\+\_\+pair\+\_\+b\+\_\+3d (\begin{DoxyParamCaption}\item[{character(len=$\ast$), intent(in)}]{mesg,  }\item[{real, dimension(hi\%isdb\+:,hi\%jsdb\+:, \+:), intent(in), target}]{arrayA,  }\item[{real, dimension(hi\%isdb\+:,hi\%jsdb\+:, \+:), intent(in), target}]{arrayB,  }\item[{type(\mbox{\hyperlink{structmom__hor__index_1_1hor__index__type}{hor\+\_\+index\+\_\+type}}), intent(in), target}]{HI,  }\item[{integer, intent(in), optional}]{haloshift,  }\item[{logical, intent(in), optional}]{symmetric,  }\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 q-\/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 symmetric} & If true, do the checksums on the full symmetric computational domain. \\
\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 511 of file M\+O\+M\+\_\+checksums.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{513   \textcolor{keywordtype}{character(len=*)},                    \textcolor{keywordtype}{intent(in)} :: mesg\textcolor{comment}{ !< Identifying messages}}
\DoxyCodeLine{514   \textcolor{keywordtype}{type}(hor\_index\_type),      \textcolor{keywordtype}{target},   \textcolor{keywordtype}{intent(in)} :: HI\textcolor{comment}{     !< A horizontal index type}}
\DoxyCodeLine{515 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(HI\%IsdB:,HI\%JsdB:, :)}, \textcolor{keywordtype}{target}, \textcolor{keywordtype}{intent(in)} :: arrayA\textcolor{comment}{ !< The first array to be checksummed}}
\DoxyCodeLine{516 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(HI\%IsdB:,HI\%JsdB:, :)}, \textcolor{keywordtype}{target}, \textcolor{keywordtype}{intent(in)} :: arrayB\textcolor{comment}{ !< The second array to be checksummed}}
\DoxyCodeLine{517   \textcolor{keywordtype}{integer},                   \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: haloshift\textcolor{comment}{ !< The width of halos to check (default 0)}}
\DoxyCodeLine{518   \textcolor{keywordtype}{logical},                   \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: symmetric\textcolor{comment}{ !< If true, do the checksums on the full}}
\DoxyCodeLine{519 \textcolor{comment}{                                                               !! symmetric computational domain.}}
\DoxyCodeLine{520   \textcolor{keywordtype}{logical},                   \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: omit\_corners\textcolor{comment}{ !< If true, avoid checking diagonal shifts}}
\DoxyCodeLine{521 \textcolor{keywordtype}{  real},                      \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: scale\textcolor{comment}{     !< A scaling factor for this array.}}
\DoxyCodeLine{522   \textcolor{keywordtype}{integer},                   \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: logunit\textcolor{comment}{ !< IO unit for checksum logging}}
\DoxyCodeLine{523   \textcolor{keywordtype}{logical},                   \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: scalar\_pair\textcolor{comment}{ !< If true, then the arrays describe}}
\DoxyCodeLine{524 \textcolor{comment}{                                                              !! a scalar, rather than vector}}
\DoxyCodeLine{525 }
\DoxyCodeLine{526   \textcolor{keywordtype}{logical} :: sym}
\DoxyCodeLine{527   \textcolor{keywordtype}{logical} :: vector\_pair}
\DoxyCodeLine{528   \textcolor{keywordtype}{integer} :: turns}
\DoxyCodeLine{529   \textcolor{keywordtype}{type}(hor\_index\_type), \textcolor{keywordtype}{pointer} :: HI\_in}
\DoxyCodeLine{530 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:,:,:)}, \textcolor{keywordtype}{pointer} :: arrayA\_in, arrayB\_in}
\DoxyCodeLine{531 }
\DoxyCodeLine{532   vector\_pair = .true.}
\DoxyCodeLine{533   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(scalar\_pair)) vector\_pair = .not. scalar\_pair}
\DoxyCodeLine{534 }
\DoxyCodeLine{535   turns = hi\%turns}
\DoxyCodeLine{536   \textcolor{keywordflow}{if} (modulo(turns, 4) /= 0) \textcolor{keywordflow}{then}}
\DoxyCodeLine{537     \textcolor{comment}{! Rotate field back to the input grid}}
\DoxyCodeLine{538     \textcolor{keyword}{allocate}(hi\_in)}
\DoxyCodeLine{539     \textcolor{keyword}{call }rotate\_hor\_index(hi, -\/turns, hi\_in)}
\DoxyCodeLine{540     \textcolor{keyword}{allocate}(arraya\_in(hi\_in\%IsdB:hi\_in\%IedB, hi\_in\%JsdB:hi\_in\%JedB, \textcolor{keyword}{size}(arraya, 3)))}
\DoxyCodeLine{541     \textcolor{keyword}{allocate}(arrayb\_in(hi\_in\%IsdB:hi\_in\%IedB, hi\_in\%JsdB:hi\_in\%JedB, \textcolor{keyword}{size}(arrayb, 3)))}
\DoxyCodeLine{542 }
\DoxyCodeLine{543     \textcolor{keywordflow}{if} (vector\_pair) \textcolor{keywordflow}{then}}
\DoxyCodeLine{544       \textcolor{keyword}{call }rotate\_vector(arraya, arrayb, -\/turns, arraya\_in, arrayb\_in)}
\DoxyCodeLine{545     \textcolor{keywordflow}{else}}
\DoxyCodeLine{546       \textcolor{keyword}{call }rotate\_array\_pair(arraya, arrayb, -\/turns, arraya\_in, arrayb\_in)}
\DoxyCodeLine{547 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{548   \textcolor{keywordflow}{else}}
\DoxyCodeLine{549     hi\_in => hi}
\DoxyCodeLine{550     arraya\_in => arraya}
\DoxyCodeLine{551     arrayb\_in => arrayb}
\DoxyCodeLine{552 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{553 }
\DoxyCodeLine{554   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(haloshift)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{555     \textcolor{keyword}{call }chksum\_b\_3d(arraya\_in, \textcolor{stringliteral}{'x '}//mesg, hi\_in, haloshift, symmetric, \&}
\DoxyCodeLine{556                      omit\_corners, scale=scale, logunit=logunit)}
\DoxyCodeLine{557     \textcolor{keyword}{call }chksum\_b\_3d(arrayb\_in, \textcolor{stringliteral}{'y '}//mesg, hi\_in, haloshift, symmetric, \&}
\DoxyCodeLine{558                      omit\_corners, scale=scale, logunit=logunit)}
\DoxyCodeLine{559   \textcolor{keywordflow}{else}}
\DoxyCodeLine{560     \textcolor{keyword}{call }chksum\_b\_3d(arraya\_in, \textcolor{stringliteral}{'x '}//mesg, hi\_in, symmetric=symmetric, scale=scale, \&}
\DoxyCodeLine{561                      logunit=logunit)}
\DoxyCodeLine{562     \textcolor{keyword}{call }chksum\_b\_3d(arrayb\_in, \textcolor{stringliteral}{'y '}//mesg, hi\_in, symmetric=symmetric, scale=scale, \&}
\DoxyCodeLine{563                      logunit=logunit)}
\DoxyCodeLine{564 \textcolor{keywordflow}{  endif}}

\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}
