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


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

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


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



\subsection{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}}
\subsubsection{\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{\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 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 202 of file M\+O\+M\+\_\+checksums.\+F90.


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


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