\hypertarget{interfacemom__array__transform_1_1rotate__array__pair}{}\doxysection{mom\+\_\+array\+\_\+transform\+::rotate\+\_\+array\+\_\+pair Interface Reference}
\label{interfacemom__array__transform_1_1rotate__array__pair}\index{mom\_array\_transform::rotate\_array\_pair@{mom\_array\_transform::rotate\_array\_pair}}


\doxysubsection{Detailed Description}
Rotate a pair of arrays which map to a rotated set of indices. Rotation is applied across the first and second axes of the array. This rotation should be applied when one field is mapped onto the other. For example, a tracer indexed along u or v face points will map from one to the other after a quarter turn, and back onto itself after a half turn. 

Definition at line 41 of file M\+O\+M\+\_\+array\+\_\+transform.\+F90.

\doxysubsection*{Private functions}
\begin{DoxyCompactItemize}
\item 
subroutine \mbox{\hyperlink{interfacemom__array__transform_1_1rotate__array__pair_a43e4ac2ba9d832d42029aa6d57573edf}{rotate\+\_\+array\+\_\+pair\+\_\+real\+\_\+2d}} (A\+\_\+in, B\+\_\+in, turns, A, B)
\begin{DoxyCompactList}\small\item\em Rotate the elements of a 2d real array pair along first and second axes. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{interfacemom__array__transform_1_1rotate__array__pair_aa3905ddbbe3ec10f90667a5614ad877c}{rotate\+\_\+array\+\_\+pair\+\_\+real\+\_\+3d}} (A\+\_\+in, B\+\_\+in, turns, A, B)
\begin{DoxyCompactList}\small\item\em Rotate the elements of a 3d real array pair along first and second axes. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{interfacemom__array__transform_1_1rotate__array__pair_acf668986fd2189007b01de579452a0f9}{rotate\+\_\+array\+\_\+pair\+\_\+integer}} (A\+\_\+in, B\+\_\+in, turns, A, B)
\begin{DoxyCompactList}\small\item\em Rotate the elements of a 4d real array pair along first and second axes. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Rotate a pair of arrays which map to a rotated set of indices. Rotation is applied across the first and second axes of the array. This rotation should be applied when one field is mapped onto the other. For example, a tracer indexed along u or v face points will map from one to the other after a quarter turn, and back onto itself after a half turn. 

Definition at line 41 of file M\+O\+M\+\_\+array\+\_\+transform.\+F90.



\doxysubsection{Functions and subroutines}
\mbox{\Hypertarget{interfacemom__array__transform_1_1rotate__array__pair_acf668986fd2189007b01de579452a0f9}\label{interfacemom__array__transform_1_1rotate__array__pair_acf668986fd2189007b01de579452a0f9}} 
\index{mom\_array\_transform::rotate\_array\_pair@{mom\_array\_transform::rotate\_array\_pair}!rotate\_array\_pair\_integer@{rotate\_array\_pair\_integer}}
\index{rotate\_array\_pair\_integer@{rotate\_array\_pair\_integer}!mom\_array\_transform::rotate\_array\_pair@{mom\_array\_transform::rotate\_array\_pair}}
\doxysubsubsection{\texorpdfstring{rotate\_array\_pair\_integer()}{rotate\_array\_pair\_integer()}}
{\footnotesize\ttfamily subroutine mom\+\_\+array\+\_\+transform\+::rotate\+\_\+array\+\_\+pair\+::rotate\+\_\+array\+\_\+pair\+\_\+integer (\begin{DoxyParamCaption}\item[{integer, dimension(\+:,\+:), intent(in)}]{A\+\_\+in,  }\item[{integer, dimension(\+:,\+:), intent(in)}]{B\+\_\+in,  }\item[{integer, intent(in)}]{turns,  }\item[{integer, dimension(\+:,\+:), intent(out)}]{A,  }\item[{integer, dimension(\+:,\+:), intent(out)}]{B }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Rotate the elements of a 4d real array pair along first and second axes. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em a\+\_\+in} & Unrotated scalar array pair \\
\hline
\mbox{\texttt{ in}}  & {\em b\+\_\+in} & Unrotated scalar array pair \\
\hline
\mbox{\texttt{ in}}  & {\em turns} & Number of quarter turns \\
\hline
\mbox{\texttt{ out}}  & {\em a} & Rotated scalar array pair \\
\hline
\mbox{\texttt{ out}}  & {\em b} & Rotated scalar array pair \\
\hline
\end{DoxyParams}


Definition at line 212 of file M\+O\+M\+\_\+array\+\_\+transform.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{213   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)} :: A\_in(:,:)\textcolor{comment}{  !< Unrotated scalar array pair}}
\DoxyCodeLine{214   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)} :: B\_in(:,:)\textcolor{comment}{  !< Unrotated scalar array pair}}
\DoxyCodeLine{215   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)} :: turns\textcolor{comment}{      !< Number of quarter turns}}
\DoxyCodeLine{216   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)} :: A(:,:)\textcolor{comment}{    !< Rotated scalar array pair}}
\DoxyCodeLine{217   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)} :: B(:,:)\textcolor{comment}{    !< Rotated scalar array pair}}
\DoxyCodeLine{218 }
\DoxyCodeLine{219   \textcolor{keywordflow}{if} (modulo(turns, 2) /= 0) \textcolor{keywordflow}{then}}
\DoxyCodeLine{220     \textcolor{keyword}{call }rotate\_array(b\_in, turns, a)}
\DoxyCodeLine{221     \textcolor{keyword}{call }rotate\_array(a\_in, turns, b)}
\DoxyCodeLine{222   \textcolor{keywordflow}{else}}
\DoxyCodeLine{223     \textcolor{keyword}{call }rotate\_array(a\_in, turns, a)}
\DoxyCodeLine{224     \textcolor{keyword}{call }rotate\_array(b\_in, turns, b)}
\DoxyCodeLine{225 \textcolor{keywordflow}{  endif}}

\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__array__transform_1_1rotate__array__pair_a43e4ac2ba9d832d42029aa6d57573edf}\label{interfacemom__array__transform_1_1rotate__array__pair_a43e4ac2ba9d832d42029aa6d57573edf}} 
\index{mom\_array\_transform::rotate\_array\_pair@{mom\_array\_transform::rotate\_array\_pair}!rotate\_array\_pair\_real\_2d@{rotate\_array\_pair\_real\_2d}}
\index{rotate\_array\_pair\_real\_2d@{rotate\_array\_pair\_real\_2d}!mom\_array\_transform::rotate\_array\_pair@{mom\_array\_transform::rotate\_array\_pair}}
\doxysubsubsection{\texorpdfstring{rotate\_array\_pair\_real\_2d()}{rotate\_array\_pair\_real\_2d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+array\+\_\+transform\+::rotate\+\_\+array\+\_\+pair\+::rotate\+\_\+array\+\_\+pair\+\_\+real\+\_\+2d (\begin{DoxyParamCaption}\item[{real, dimension(\+:,\+:), intent(in)}]{A\+\_\+in,  }\item[{real, dimension(\+:,\+:), intent(in)}]{B\+\_\+in,  }\item[{integer, intent(in)}]{turns,  }\item[{real, dimension(\+:,\+:), intent(out)}]{A,  }\item[{real, dimension(\+:,\+:), intent(out)}]{B }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Rotate the elements of a 2d real array pair along first and second axes. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em a\+\_\+in} & Unrotated scalar array pair \\
\hline
\mbox{\texttt{ in}}  & {\em b\+\_\+in} & Unrotated scalar array pair \\
\hline
\mbox{\texttt{ in}}  & {\em turns} & Number of quarter turns \\
\hline
\mbox{\texttt{ out}}  & {\em a} & Rotated scalar array pair \\
\hline
\mbox{\texttt{ out}}  & {\em b} & Rotated scalar array pair \\
\hline
\end{DoxyParams}


Definition at line 177 of file M\+O\+M\+\_\+array\+\_\+transform.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{178 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{intent(in)} :: A\_in(:,:)\textcolor{comment}{   !< Unrotated scalar array pair}}
\DoxyCodeLine{179 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{intent(in)} :: B\_in(:,:)\textcolor{comment}{   !< Unrotated scalar array pair}}
\DoxyCodeLine{180   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)} :: turns\textcolor{comment}{    !< Number of quarter turns}}
\DoxyCodeLine{181 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{intent(out)} :: A(:,:)\textcolor{comment}{     !< Rotated scalar array pair}}
\DoxyCodeLine{182 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{intent(out)} :: B(:,:)\textcolor{comment}{     !< Rotated scalar array pair}}
\DoxyCodeLine{183 }
\DoxyCodeLine{184   \textcolor{keywordflow}{if} (modulo(turns, 2) /= 0) \textcolor{keywordflow}{then}}
\DoxyCodeLine{185     \textcolor{keyword}{call }rotate\_array(b\_in, turns, a)}
\DoxyCodeLine{186     \textcolor{keyword}{call }rotate\_array(a\_in, turns, b)}
\DoxyCodeLine{187   \textcolor{keywordflow}{else}}
\DoxyCodeLine{188     \textcolor{keyword}{call }rotate\_array(a\_in, turns, a)}
\DoxyCodeLine{189     \textcolor{keyword}{call }rotate\_array(b\_in, turns, b)}
\DoxyCodeLine{190 \textcolor{keywordflow}{  endif}}

\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__array__transform_1_1rotate__array__pair_aa3905ddbbe3ec10f90667a5614ad877c}\label{interfacemom__array__transform_1_1rotate__array__pair_aa3905ddbbe3ec10f90667a5614ad877c}} 
\index{mom\_array\_transform::rotate\_array\_pair@{mom\_array\_transform::rotate\_array\_pair}!rotate\_array\_pair\_real\_3d@{rotate\_array\_pair\_real\_3d}}
\index{rotate\_array\_pair\_real\_3d@{rotate\_array\_pair\_real\_3d}!mom\_array\_transform::rotate\_array\_pair@{mom\_array\_transform::rotate\_array\_pair}}
\doxysubsubsection{\texorpdfstring{rotate\_array\_pair\_real\_3d()}{rotate\_array\_pair\_real\_3d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+array\+\_\+transform\+::rotate\+\_\+array\+\_\+pair\+::rotate\+\_\+array\+\_\+pair\+\_\+real\+\_\+3d (\begin{DoxyParamCaption}\item[{real, dimension(\+:,\+:,\+:), intent(in)}]{A\+\_\+in,  }\item[{real, dimension(\+:,\+:,\+:), intent(in)}]{B\+\_\+in,  }\item[{integer, intent(in)}]{turns,  }\item[{real, dimension(\+:,\+:,\+:), intent(out)}]{A,  }\item[{real, dimension(\+:,\+:,\+:), intent(out)}]{B }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Rotate the elements of a 3d real array pair along first and second axes. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em a\+\_\+in} & Unrotated scalar array pair \\
\hline
\mbox{\texttt{ in}}  & {\em b\+\_\+in} & Unrotated scalar array pair \\
\hline
\mbox{\texttt{ in}}  & {\em turns} & Number of quarter turns \\
\hline
\mbox{\texttt{ out}}  & {\em a} & Rotated scalar array pair \\
\hline
\mbox{\texttt{ out}}  & {\em b} & Rotated scalar array pair \\
\hline
\end{DoxyParams}


Definition at line 195 of file M\+O\+M\+\_\+array\+\_\+transform.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{196 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{intent(in)} :: A\_in(:,:,:)\textcolor{comment}{   !< Unrotated scalar array pair}}
\DoxyCodeLine{197 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{intent(in)} :: B\_in(:,:,:)\textcolor{comment}{   !< Unrotated scalar array pair}}
\DoxyCodeLine{198   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)} :: turns\textcolor{comment}{      !< Number of quarter turns}}
\DoxyCodeLine{199 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{intent(out)} :: A(:,:,:)\textcolor{comment}{     !< Rotated scalar array pair}}
\DoxyCodeLine{200 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{intent(out)} :: B(:,:,:)\textcolor{comment}{     !< Rotated scalar array pair}}
\DoxyCodeLine{201 }
\DoxyCodeLine{202   \textcolor{keywordtype}{integer} :: k}
\DoxyCodeLine{203 }
\DoxyCodeLine{204   \textcolor{keywordflow}{do} k = 1, \textcolor{keyword}{size}(a\_in, 3)}
\DoxyCodeLine{205     \textcolor{keyword}{call }rotate\_array\_pair(a\_in(:,:,k), b\_in(:,:,k), turns, \&}
\DoxyCodeLine{206         a(:,:,k), b(:,:,k))}
\DoxyCodeLine{207 \textcolor{keywordflow}{  enddo}}

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