\hypertarget{interfacemom__checksums_1_1uvchksum}{}\section{mom\+\_\+checksums\+:\+:uvchksum Interface Reference}
\label{interfacemom__checksums_1_1uvchksum}\index{mom\+\_\+checksums\+::uvchksum@{mom\+\_\+checksums\+::uvchksum}}


\subsection{Detailed Description}
Checksums a pair velocity arrays (2d or 3d) staggered at C-\/grid locations. 

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

\subsection*{Private functions}
\begin{DoxyCompactItemize}
\item 
subroutine \mbox{\hyperlink{interfacemom__checksums_1_1uvchksum_a6c92dcacd3a676f9211697a8be2c4687}{chksum\+\_\+uv\+\_\+2d}} (mesg, arrayU, arrayV, HI, haloshift, symmetric, omit\+\_\+corners, scale, logunit, scalar\+\_\+pair)
\begin{DoxyCompactList}\small\item\em Checksums a pair of 2d velocity arrays staggered at C-\/grid locations. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{interfacemom__checksums_1_1uvchksum_ad30f8f369cb2e11391d44baa607339ca}{chksum\+\_\+uv\+\_\+3d}} (mesg, arrayU, arrayV, HI, haloshift, symmetric, omit\+\_\+corners, scale, logunit, scalar\+\_\+pair)
\begin{DoxyCompactList}\small\item\em Checksums a pair of 3d velocity arrays staggered at C-\/grid locations. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Checksums a pair velocity arrays (2d or 3d) staggered at C-\/grid locations. 

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



\subsection{Functions and subroutines}
\mbox{\Hypertarget{interfacemom__checksums_1_1uvchksum_a6c92dcacd3a676f9211697a8be2c4687}\label{interfacemom__checksums_1_1uvchksum_a6c92dcacd3a676f9211697a8be2c4687}} 
\index{mom\+\_\+checksums\+::uvchksum@{mom\+\_\+checksums\+::uvchksum}!chksum\+\_\+uv\+\_\+2d@{chksum\+\_\+uv\+\_\+2d}}
\index{chksum\+\_\+uv\+\_\+2d@{chksum\+\_\+uv\+\_\+2d}!mom\+\_\+checksums\+::uvchksum@{mom\+\_\+checksums\+::uvchksum}}
\subsubsection{\texorpdfstring{chksum\+\_\+uv\+\_\+2d()}{chksum\_uv\_2d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+checksums\+::uvchksum\+::chksum\+\_\+uv\+\_\+2d (\begin{DoxyParamCaption}\item[{character(len=$\ast$), intent(in)}]{mesg,  }\item[{real, dimension(hi\%isdb\+:,hi\%jsd\+:), intent(in), target}]{arrayU,  }\item[{real, dimension(hi\%isd\+:,hi\%jsdb\+:), intent(in), target}]{arrayV,  }\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 a pair of 2d velocity arrays staggered at C-\/grid locations. 


\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 arrayu} & The u-\/component array to be checksummed\\
\hline
\mbox{\tt in}  & {\em arrayv} & The v-\/component 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 these arrays.\\
\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 a scalar, rather than vector \\
\hline
\end{DoxyParams}


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


\begin{DoxyCode}
737   \textcolor{keywordtype}{character(len=*)},                  \textcolor{keywordtype}{intent(in)} :: mesg\textcolor{comment}{   !< Identifying messages}
738   \textcolor{keywordtype}{type}(hor\_index\_type),    \textcolor{keywordtype}{target},   \textcolor{keywordtype}{intent(in)} :: HI\textcolor{comment}{     !< A horizontal index type}
739   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(HI%IsdB:,HI%jsd:)}, \textcolor{keywordtype}{target}, \textcolor{keywordtype}{intent(in)} :: arrayU\textcolor{comment}{ !< The u-component array to be
       checksummed}
740   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(HI%isd:,HI%JsdB:)}, \textcolor{keywordtype}{target}, \textcolor{keywordtype}{intent(in)} :: arrayV\textcolor{comment}{ !< The v-component array to be
       checksummed}
741   \textcolor{keywordtype}{integer},                 \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: haloshift\textcolor{comment}{ !< The width of halos to check (default 0)}
742   \textcolor{keywordtype}{logical},                 \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: symmetric\textcolor{comment}{ !< If true, do the checksums on the full}
743 \textcolor{comment}{                                                             !! symmetric computational domain.}
744   \textcolor{keywordtype}{logical},                 \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: omit\_corners\textcolor{comment}{ !< If true, avoid checking diagonal shifts}
745   \textcolor{keywordtype}{real},                    \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: scale\textcolor{comment}{     !< A scaling factor for these arrays.}
746   \textcolor{keywordtype}{integer},                 \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: logunit\textcolor{comment}{ !< IO unit for checksum logging}
747   \textcolor{keywordtype}{logical},                 \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: scalar\_pair\textcolor{comment}{ !< If true, then the arrays describe a}
748 \textcolor{comment}{                                                               !! a scalar, rather than vector}
749   \textcolor{keywordtype}{logical} :: vector\_pair
750   \textcolor{keywordtype}{integer} :: turns
751   \textcolor{keywordtype}{type}(hor\_index\_type), \textcolor{keywordtype}{pointer} :: HI\_in
752   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:,:)}, \textcolor{keywordtype}{pointer} :: arrayU\_in, arrayV\_in
753 
754   vector\_pair = .true.
755   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(scalar\_pair)) vector\_pair = .not. scalar\_pair
756 
757   turns = hi%turns
758   \textcolor{keywordflow}{if} (modulo(turns, 4) /= 0) \textcolor{keywordflow}{then}
759     \textcolor{comment}{! Rotate field back to the input grid}
760     \textcolor{keyword}{allocate}(hi\_in)
761     \textcolor{keyword}{call }rotate\_hor\_index(hi, -turns, hi\_in)
762     \textcolor{keyword}{allocate}(arrayu\_in(hi\_in%IsdB:hi\_in%IedB, hi\_in%jsd:hi\_in%jed))
763     \textcolor{keyword}{allocate}(arrayv\_in(hi\_in%isd:hi\_in%ied, hi\_in%JsdB:hi\_in%JedB))
764 
765     \textcolor{keywordflow}{if} (vector\_pair) \textcolor{keywordflow}{then}
766       \textcolor{keyword}{call }rotate\_vector(arrayu, arrayv, -turns, arrayu\_in, arrayv\_in)
767     \textcolor{keywordflow}{else}
768       \textcolor{keyword}{call }rotate\_array\_pair(arrayu, arrayv, -turns, arrayu\_in, arrayv\_in)
769 \textcolor{keywordflow}{    endif}
770   \textcolor{keywordflow}{else}
771     hi\_in => hi
772     arrayu\_in => arrayu
773     arrayv\_in => arrayv
774 \textcolor{keywordflow}{  endif}
775 
776   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(haloshift)) \textcolor{keywordflow}{then}
777     \textcolor{keyword}{call }chksum\_u\_2d(arrayu\_in, \textcolor{stringliteral}{'u '}//mesg, hi\_in, haloshift, symmetric, &
778                      omit\_corners, scale=scale, logunit=logunit)
779     \textcolor{keyword}{call }chksum\_v\_2d(arrayv\_in, \textcolor{stringliteral}{'v '}//mesg, hi\_in, haloshift, symmetric, &
780                      omit\_corners, scale=scale, logunit=logunit)
781   \textcolor{keywordflow}{else}
782     \textcolor{keyword}{call }chksum\_u\_2d(arrayu\_in, \textcolor{stringliteral}{'u '}//mesg, hi\_in, symmetric=symmetric, &
783                      scale=scale, logunit=logunit)
784     \textcolor{keyword}{call }chksum\_v\_2d(arrayv\_in, \textcolor{stringliteral}{'v '}//mesg, hi\_in, symmetric=symmetric, &
785                      scale=scale, logunit=logunit)
786 \textcolor{keywordflow}{  endif}
\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__checksums_1_1uvchksum_ad30f8f369cb2e11391d44baa607339ca}\label{interfacemom__checksums_1_1uvchksum_ad30f8f369cb2e11391d44baa607339ca}} 
\index{mom\+\_\+checksums\+::uvchksum@{mom\+\_\+checksums\+::uvchksum}!chksum\+\_\+uv\+\_\+3d@{chksum\+\_\+uv\+\_\+3d}}
\index{chksum\+\_\+uv\+\_\+3d@{chksum\+\_\+uv\+\_\+3d}!mom\+\_\+checksums\+::uvchksum@{mom\+\_\+checksums\+::uvchksum}}
\subsubsection{\texorpdfstring{chksum\+\_\+uv\+\_\+3d()}{chksum\_uv\_3d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+checksums\+::uvchksum\+::chksum\+\_\+uv\+\_\+3d (\begin{DoxyParamCaption}\item[{character(len=$\ast$), intent(in)}]{mesg,  }\item[{real, dimension(hi\%isdb\+:,hi\%jsd\+:,\+:), intent(in), target}]{arrayU,  }\item[{real, dimension(hi\%isd\+:,hi\%jsdb\+:,\+:), intent(in), target}]{arrayV,  }\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 a pair of 3d velocity arrays staggered at C-\/grid locations. 


\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 arrayu} & The u-\/component array to be checksummed\\
\hline
\mbox{\tt in}  & {\em arrayv} & The v-\/component 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 these arrays.\\
\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 a scalar, rather than vector \\
\hline
\end{DoxyParams}


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


\begin{DoxyCode}
792   \textcolor{keywordtype}{character(len=*)},                    \textcolor{keywordtype}{intent(in)} :: mesg\textcolor{comment}{   !< Identifying messages}
793   \textcolor{keywordtype}{type}(hor\_index\_type),      \textcolor{keywordtype}{target},   \textcolor{keywordtype}{intent(in)} :: HI\textcolor{comment}{     !< A horizontal index type}
794   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(HI%IsdB:,HI%jsd:,:)}, \textcolor{keywordtype}{target}, \textcolor{keywordtype}{intent(in)} :: arrayU\textcolor{comment}{ !< The u-component array to be
       checksummed}
795   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(HI%isd:,HI%JsdB:,:)}, \textcolor{keywordtype}{target}, \textcolor{keywordtype}{intent(in)} :: arrayV\textcolor{comment}{ !< The v-component array to be
       checksummed}
796   \textcolor{keywordtype}{integer},                   \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: haloshift\textcolor{comment}{ !< The width of halos to check (default 0)}
797   \textcolor{keywordtype}{logical},                   \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: symmetric\textcolor{comment}{ !< If true, do the checksums on the full}
798 \textcolor{comment}{                                                               !! symmetric computational domain.}
799   \textcolor{keywordtype}{logical},                   \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: omit\_corners\textcolor{comment}{ !< If true, avoid checking diagonal
       shifts}
800   \textcolor{keywordtype}{real},                      \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: scale\textcolor{comment}{     !< A scaling factor for these arrays.}
801   \textcolor{keywordtype}{integer},                   \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: logunit\textcolor{comment}{ !< IO unit for checksum logging}
802   \textcolor{keywordtype}{logical},                 \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: scalar\_pair\textcolor{comment}{ !< If true, then the arrays describe a}
803 \textcolor{comment}{                                                               !! a scalar, rather than vector}
804   \textcolor{keywordtype}{logical} :: vector\_pair
805   \textcolor{keywordtype}{integer} :: turns
806   \textcolor{keywordtype}{type}(hor\_index\_type), \textcolor{keywordtype}{pointer} :: HI\_in
807   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:,:,:)}, \textcolor{keywordtype}{pointer} :: arrayU\_in, arrayV\_in
808 
809   vector\_pair = .true.
810   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(scalar\_pair)) vector\_pair = .not. scalar\_pair
811 
812   turns = hi%turns
813   \textcolor{keywordflow}{if} (modulo(turns, 4) /= 0) \textcolor{keywordflow}{then}
814     \textcolor{comment}{! Rotate field back to the input grid}
815     \textcolor{keyword}{allocate}(hi\_in)
816     \textcolor{keyword}{call }rotate\_hor\_index(hi, -turns, hi\_in)
817     \textcolor{keyword}{allocate}(arrayu\_in(hi\_in%IsdB:hi\_in%IedB, hi\_in%jsd:hi\_in%jed, \textcolor{keyword}{size}(arrayu, 3)))
818     \textcolor{keyword}{allocate}(arrayv\_in(hi\_in%isd:hi\_in%ied, hi\_in%JsdB:hi\_in%JedB, \textcolor{keyword}{size}(arrayv, 3)))
819 
820     \textcolor{keywordflow}{if} (vector\_pair) \textcolor{keywordflow}{then}
821       \textcolor{keyword}{call }rotate\_vector(arrayu, arrayv, -turns, arrayu\_in, arrayv\_in)
822     \textcolor{keywordflow}{else}
823       \textcolor{keyword}{call }rotate\_array\_pair(arrayu, arrayv, -turns, arrayu\_in, arrayv\_in)
824 \textcolor{keywordflow}{    endif}
825   \textcolor{keywordflow}{else}
826     hi\_in => hi
827     arrayu\_in => arrayu
828     arrayv\_in => arrayv
829 \textcolor{keywordflow}{  endif}
830 
831   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(haloshift)) \textcolor{keywordflow}{then}
832     \textcolor{keyword}{call }chksum\_u\_3d(arrayu\_in, \textcolor{stringliteral}{'u '}//mesg, hi\_in, haloshift, symmetric, &
833                      omit\_corners, scale=scale, logunit=logunit)
834     \textcolor{keyword}{call }chksum\_v\_3d(arrayv\_in, \textcolor{stringliteral}{'v '}//mesg, hi\_in, haloshift, symmetric, &
835                      omit\_corners, scale=scale, logunit=logunit)
836   \textcolor{keywordflow}{else}
837     \textcolor{keyword}{call }chksum\_u\_3d(arrayu\_in, \textcolor{stringliteral}{'u '}//mesg, hi\_in, symmetric=symmetric, &
838                      scale=scale, logunit=logunit)
839     \textcolor{keyword}{call }chksum\_v\_3d(arrayv\_in, \textcolor{stringliteral}{'v '}//mesg, hi\_in, symmetric=symmetric, &
840                      scale=scale, logunit=logunit)
841 \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}
