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


\subsection{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.

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


\subsection{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.



\subsection{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}}
\subsubsection{\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(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{\tt in}  & {\em mesg} & Identifying messages\\
\hline
\mbox{\tt in}  & {\em hi} & A horizontal index type\\
\hline
\mbox{\tt in}  & {\em arraya} & The first array to be checksummed\\
\hline
\mbox{\tt in}  & {\em arrayb} & The second array to be checksummed\\
\hline
\mbox{\tt in}  & {\em symmetric} & If true, do the checksums on the full symmetric computational domain.\\
\hline
\mbox{\tt in}  & {\em haloshift} & The width of halos to check (default 0)\\
\hline
\mbox{\tt in}  & {\em omit\+\_\+corners} & If true, avoid checking diagonal shifts\\
\hline
\mbox{\tt in}  & {\em scale} & A scaling factor for this array.\\
\hline
\mbox{\tt in}  & {\em logunit} & IO unit for checksum logging\\
\hline
\mbox{\tt in}  & {\em scalar\+\_\+pair} & If true, then the arrays describe a scalar, rather than vector \\
\hline
\end{DoxyParams}


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


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


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


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