\hypertarget{interfacemom__domains_1_1pass__vector}{}\section{mom\+\_\+domains\+:\+:pass\+\_\+vector Interface Reference}
\label{interfacemom__domains_1_1pass__vector}\index{mom\+\_\+domains\+::pass\+\_\+vector@{mom\+\_\+domains\+::pass\+\_\+vector}}


\subsection{Detailed Description}
Do a halo update on a pair of arrays representing the two components of a vector. 

Definition at line 59 of file M\+O\+M\+\_\+domains.\+F90.

\subsection*{Private functions}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{interfacemom__domains_1_1pass__vector_abcb2d6a8af4bfdcf9357b736186f3813}{pass\+\_\+vector\+\_\+3d} (u\+\_\+cmpt, v\+\_\+cmpt, M\+O\+M\+\_\+dom, direction, stagger, complete, halo, clock)
\begin{DoxyCompactList}\small\item\em pass\+\_\+vector\+\_\+3d does a halo update for a pair of three-\/dimensional arrays representing the compontents of a three-\/dimensional horizontal vector. \end{DoxyCompactList}\item 
subroutine \hyperlink{interfacemom__domains_1_1pass__vector_a593d37c57003ef0a6a593383151afacf}{pass\+\_\+vector\+\_\+2d} (u\+\_\+cmpt, v\+\_\+cmpt, M\+O\+M\+\_\+dom, direction, stagger, complete, halo, clock)
\begin{DoxyCompactList}\small\item\em pass\+\_\+vector\+\_\+2d does a halo update for a pair of two-\/dimensional arrays representing the compontents of a two-\/dimensional horizontal vector. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Do a halo update on a pair of arrays representing the two components of a vector. 

Definition at line 59 of file M\+O\+M\+\_\+domains.\+F90.



\subsection{Functions and subroutines}
\mbox{\Hypertarget{interfacemom__domains_1_1pass__vector_a593d37c57003ef0a6a593383151afacf}\label{interfacemom__domains_1_1pass__vector_a593d37c57003ef0a6a593383151afacf}} 
\index{mom\+\_\+domains\+::pass\+\_\+vector@{mom\+\_\+domains\+::pass\+\_\+vector}!pass\+\_\+vector\+\_\+2d@{pass\+\_\+vector\+\_\+2d}}
\index{pass\+\_\+vector\+\_\+2d@{pass\+\_\+vector\+\_\+2d}!mom\+\_\+domains\+::pass\+\_\+vector@{mom\+\_\+domains\+::pass\+\_\+vector}}
\subsubsection{\texorpdfstring{pass\+\_\+vector\+\_\+2d()}{pass\_vector\_2d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+domains\+::pass\+\_\+vector\+::pass\+\_\+vector\+\_\+2d (\begin{DoxyParamCaption}\item[{real, dimension(\+:,\+:), intent(inout)}]{u\+\_\+cmpt,  }\item[{real, dimension(\+:,\+:), intent(inout)}]{v\+\_\+cmpt,  }\item[{type(\hyperlink{structmom__domains_1_1mom__domain__type}{mom\+\_\+domain\+\_\+type}), intent(inout)}]{M\+O\+M\+\_\+dom,  }\item[{integer, intent(in), optional}]{direction,  }\item[{integer, intent(in), optional}]{stagger,  }\item[{logical, intent(in), optional}]{complete,  }\item[{integer, intent(in), optional}]{halo,  }\item[{integer, intent(in), optional}]{clock }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



pass\+\_\+vector\+\_\+2d does a halo update for a pair of two-\/dimensional arrays representing the compontents of a two-\/dimensional horizontal vector. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in,out}  & {\em u\+\_\+cmpt} & The nominal zonal (u) component of the vector pair which is having its halos points exchanged.\\
\hline
\mbox{\tt in,out}  & {\em v\+\_\+cmpt} & The nominal meridional (v) component of the vector pair which is having its halos points exchanged.\\
\hline
\mbox{\tt in,out}  & {\em mom\+\_\+dom} & The M\+O\+M\+\_\+domain\+\_\+type containing the mpp\+\_\+domain needed to determine where data should be sent.\\
\hline
\mbox{\tt in}  & {\em direction} & An optional integer indicating which directions the data should be sent. It is T\+O\+\_\+\+A\+LL or the sum of any of T\+O\+\_\+\+E\+A\+ST, T\+O\+\_\+\+W\+E\+ST, T\+O\+\_\+\+N\+O\+R\+TH, and T\+O\+\_\+\+S\+O\+U\+TH, possibly plus S\+C\+A\+L\+A\+R\+\_\+\+P\+A\+IR if these are paired non-\/directional scalars discretized at the typical vector component locations. For example, T\+O\+\_\+\+E\+A\+ST sends the data to the processor to the east, so the halos on the western side are filled. T\+O\+\_\+\+A\+LL is the default if omitted.\\
\hline
\mbox{\tt in}  & {\em stagger} & An optional flag, which may be one of A\+\_\+\+G\+R\+ID, B\+G\+R\+I\+D\+\_\+\+NE, or C\+G\+R\+I\+D\+\_\+\+NE, indicating where the two components of the vector are discretized. Omitting stagger is the same as setting it to C\+G\+R\+I\+D\+\_\+\+NE.\\
\hline
\mbox{\tt in}  & {\em complete} & An optional argument indicating whether the halo updates should be completed before progress resumes. Omitting complete is the same as setting complete to .true.\\
\hline
\mbox{\tt in}  & {\em halo} & The size of the halo to update -\/ the full halo by default.\\
\hline
\mbox{\tt in}  & {\em clock} & The handle for a cpu time clock that should be started then stopped to time this routine. \\
\hline
\end{DoxyParams}


Definition at line 487 of file M\+O\+M\+\_\+domains.\+F90.


\begin{DoxyCode}
487   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:,:)},  \textcolor{keywordtype}{intent(inout)} :: u\_cmpt\textcolor{comment}{    !< The nominal zonal (u) component of the vector}
488 \textcolor{comment}{                                                    !! pair which is having its halos points}
489 \textcolor{comment}{                                                    !! exchanged.}
490   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:,:)},  \textcolor{keywordtype}{intent(inout)} :: v\_cmpt\textcolor{comment}{    !< The nominal meridional (v) component of the}
491 \textcolor{comment}{                                                    !! vector pair which is having its halos points}
492 \textcolor{comment}{                                                    !! exchanged.}
493   \textcolor{keywordtype}{type}(mom\_domain\_type), \textcolor{keywordtype}{intent(inout)} :: mom\_dom\textcolor{comment}{   !< The MOM\_domain\_type containing the mpp\_domain}
494 \textcolor{comment}{                                                    !! needed to determine where data should be}
495 \textcolor{comment}{                                                    !! sent.}
496   \textcolor{keywordtype}{integer},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: direction\textcolor{comment}{ !< An optional integer indicating which}
497 \textcolor{comment}{      !! directions the data should be sent.  It is TO\_ALL or the sum of any of TO\_EAST, TO\_WEST,}
498 \textcolor{comment}{      !! TO\_NORTH, and TO\_SOUTH, possibly plus SCALAR\_PAIR if these are paired non-directional}
499 \textcolor{comment}{      !! scalars discretized at the typical vector component locations.  For example, TO\_EAST sends}
500 \textcolor{comment}{      !! the data to the processor to the east, so the halos on the western side are filled. TO\_ALL}
501 \textcolor{comment}{      !! is the default if omitted.}
502   \textcolor{keywordtype}{integer},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: stagger\textcolor{comment}{   !< An optional flag, which may be one of A\_GRID,}
503 \textcolor{comment}{                     !! BGRID\_NE, or CGRID\_NE, indicating where the two components of the vector are}
504 \textcolor{comment}{                     !! discretized. Omitting stagger is the same as setting it to CGRID\_NE.}
505   \textcolor{keywordtype}{logical},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: complete\textcolor{comment}{  !< An optional argument indicating whether the}
506 \textcolor{comment}{                                     !! halo updates should be completed before progress resumes.}
507 \textcolor{comment}{                                     !! Omitting complete is the same as setting complete to .true.}
508   \textcolor{keywordtype}{integer},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: halo\textcolor{comment}{      !< The size of the halo to update - the full}
509 \textcolor{comment}{                                                    !! halo by default.}
510   \textcolor{keywordtype}{integer},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: clock\textcolor{comment}{     !< The handle for a cpu time clock that should be}
511 \textcolor{comment}{                                                    !! started then stopped to time this routine.}
512 
513   \textcolor{comment}{! Local variables}
514   \textcolor{keywordtype}{integer} :: stagger\_local
515   \textcolor{keywordtype}{integer} :: dirflag
516   \textcolor{keywordtype}{logical} :: block\_til\_complete
517 
518   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(clock)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (clock>0) \textcolor{keyword}{call }cpu\_clock\_begin(clock) ;\textcolor{keywordflow}{ endif}
519 
520   stagger\_local = cgrid\_ne \textcolor{comment}{! Default value for type of grid}
521   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(stagger)) stagger\_local = stagger
522 
523   dirflag = to\_all \textcolor{comment}{! 60}
524   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(direction)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (direction > 0) dirflag = direction ;\textcolor{keywordflow}{ endif}
525   block\_til\_complete = .true.
526   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(complete)) block\_til\_complete = complete
527 
528   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(halo) .and. mom\_dom%thin\_halo\_updates) \textcolor{keywordflow}{then}
529     \textcolor{keyword}{call }mpp\_update\_domains(u\_cmpt, v\_cmpt, mom\_dom%mpp\_domain, flags=dirflag, &
530                    gridtype=stagger\_local, complete = block\_til\_complete, &
531                    whalo=halo, ehalo=halo, shalo=halo, nhalo=halo)
532   \textcolor{keywordflow}{else}
533     \textcolor{keyword}{call }mpp\_update\_domains(u\_cmpt, v\_cmpt, mom\_dom%mpp\_domain, flags=dirflag, &
534                    gridtype=stagger\_local, complete = block\_til\_complete)
535 \textcolor{keywordflow}{  endif}
536 
537   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(clock)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (clock>0) \textcolor{keyword}{call }cpu\_clock\_end(clock) ;\textcolor{keywordflow}{ endif}
538 
\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__domains_1_1pass__vector_abcb2d6a8af4bfdcf9357b736186f3813}\label{interfacemom__domains_1_1pass__vector_abcb2d6a8af4bfdcf9357b736186f3813}} 
\index{mom\+\_\+domains\+::pass\+\_\+vector@{mom\+\_\+domains\+::pass\+\_\+vector}!pass\+\_\+vector\+\_\+3d@{pass\+\_\+vector\+\_\+3d}}
\index{pass\+\_\+vector\+\_\+3d@{pass\+\_\+vector\+\_\+3d}!mom\+\_\+domains\+::pass\+\_\+vector@{mom\+\_\+domains\+::pass\+\_\+vector}}
\subsubsection{\texorpdfstring{pass\+\_\+vector\+\_\+3d()}{pass\_vector\_3d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+domains\+::pass\+\_\+vector\+::pass\+\_\+vector\+\_\+3d (\begin{DoxyParamCaption}\item[{real, dimension(\+:,\+:,\+:), intent(inout)}]{u\+\_\+cmpt,  }\item[{real, dimension(\+:,\+:,\+:), intent(inout)}]{v\+\_\+cmpt,  }\item[{type(\hyperlink{structmom__domains_1_1mom__domain__type}{mom\+\_\+domain\+\_\+type}), intent(inout)}]{M\+O\+M\+\_\+dom,  }\item[{integer, intent(in), optional}]{direction,  }\item[{integer, intent(in), optional}]{stagger,  }\item[{logical, intent(in), optional}]{complete,  }\item[{integer, intent(in), optional}]{halo,  }\item[{integer, intent(in), optional}]{clock }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



pass\+\_\+vector\+\_\+3d does a halo update for a pair of three-\/dimensional arrays representing the compontents of a three-\/dimensional horizontal vector. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in,out}  & {\em u\+\_\+cmpt} & The nominal zonal (u) component of the vector pair which is having its halos points exchanged.\\
\hline
\mbox{\tt in,out}  & {\em v\+\_\+cmpt} & The nominal meridional (v) component of the vector pair which is having its halos points exchanged.\\
\hline
\mbox{\tt in,out}  & {\em mom\+\_\+dom} & The M\+O\+M\+\_\+domain\+\_\+type containing the mpp\+\_\+domain needed to determine where data should be sent.\\
\hline
\mbox{\tt in}  & {\em direction} & An optional integer indicating which directions the data should be sent. It is T\+O\+\_\+\+A\+LL or the sum of any of T\+O\+\_\+\+E\+A\+ST, T\+O\+\_\+\+W\+E\+ST, T\+O\+\_\+\+N\+O\+R\+TH, and T\+O\+\_\+\+S\+O\+U\+TH, possibly plus S\+C\+A\+L\+A\+R\+\_\+\+P\+A\+IR if these are paired non-\/directional scalars discretized at the typical vector component locations. For example, T\+O\+\_\+\+E\+A\+ST sends the data to the processor to the east, so the halos on the western side are filled. T\+O\+\_\+\+A\+LL is the default if omitted.\\
\hline
\mbox{\tt in}  & {\em stagger} & An optional flag, which may be one of A\+\_\+\+G\+R\+ID, B\+G\+R\+I\+D\+\_\+\+NE, or C\+G\+R\+I\+D\+\_\+\+NE, indicating where the two components of the vector are discretized. Omitting stagger is the same as setting it to C\+G\+R\+I\+D\+\_\+\+NE.\\
\hline
\mbox{\tt in}  & {\em complete} & An optional argument indicating whether the halo updates should be completed before progress resumes. Omitting complete is the same as setting complete to .true.\\
\hline
\mbox{\tt in}  & {\em halo} & The size of the halo to update -\/ the full halo by default.\\
\hline
\mbox{\tt in}  & {\em clock} & The handle for a cpu time clock that should be started then stopped to time this routine. \\
\hline
\end{DoxyParams}


Definition at line 633 of file M\+O\+M\+\_\+domains.\+F90.


\begin{DoxyCode}
633   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:,:,:)}, \textcolor{keywordtype}{intent(inout)} :: u\_cmpt\textcolor{comment}{   !< The nominal zonal (u) component of the vector}
634 \textcolor{comment}{                                                    !! pair which is having its halos points}
635 \textcolor{comment}{                                                    !! exchanged.}
636   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:,:,:)}, \textcolor{keywordtype}{intent(inout)} :: v\_cmpt\textcolor{comment}{   !< The nominal meridional (v) component of the}
637 \textcolor{comment}{                                                    !! vector pair which is having its halos points}
638 \textcolor{comment}{                                                    !! exchanged.}
639   \textcolor{keywordtype}{type}(mom\_domain\_type),  \textcolor{keywordtype}{intent(inout)} :: mom\_dom\textcolor{comment}{  !< The MOM\_domain\_type containing the mpp\_domain}
640 \textcolor{comment}{                                                    !! needed to determine where data should be}
641 \textcolor{comment}{                                                    !! sent.}
642   \textcolor{keywordtype}{integer},      \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: direction\textcolor{comment}{ !< An optional integer indicating which}
643 \textcolor{comment}{      !! directions the data should be sent.  It is TO\_ALL or the sum of any of TO\_EAST, TO\_WEST,}
644 \textcolor{comment}{      !! TO\_NORTH, and TO\_SOUTH, possibly plus SCALAR\_PAIR if these are paired non-directional}
645 \textcolor{comment}{      !! scalars discretized at the typical vector component locations.  For example, TO\_EAST sends}
646 \textcolor{comment}{      !! the data to the processor to the east, so the halos on the western side are filled. TO\_ALL}
647 \textcolor{comment}{      !! is the default if omitted.}
648   \textcolor{keywordtype}{integer},      \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: stagger\textcolor{comment}{  !< An optional flag, which may be one of A\_GRID,}
649 \textcolor{comment}{                     !! BGRID\_NE, or CGRID\_NE, indicating where the two components of the vector are}
650 \textcolor{comment}{                     !! discretized. Omitting stagger is the same as setting it to CGRID\_NE.}
651   \textcolor{keywordtype}{logical},      \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: complete\textcolor{comment}{ !< An optional argument indicating whether the}
652 \textcolor{comment}{                                     !! halo updates should be completed before progress resumes.}
653 \textcolor{comment}{                                     !! Omitting complete is the same as setting complete to .true.}
654   \textcolor{keywordtype}{integer},      \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: halo\textcolor{comment}{     !< The size of the halo to update - the full}
655 \textcolor{comment}{                                                    !! halo by default.}
656   \textcolor{keywordtype}{integer},      \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: clock\textcolor{comment}{    !< The handle for a cpu time clock that should be}
657 \textcolor{comment}{                                                    !! started then stopped to time this routine.}
658 
659   \textcolor{comment}{! Local variables}
660   \textcolor{keywordtype}{integer} :: stagger\_local
661   \textcolor{keywordtype}{integer} :: dirflag
662   \textcolor{keywordtype}{logical} :: block\_til\_complete
663 
664   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(clock)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (clock>0) \textcolor{keyword}{call }cpu\_clock\_begin(clock) ;\textcolor{keywordflow}{ endif}
665 
666   stagger\_local = cgrid\_ne \textcolor{comment}{! Default value for type of grid}
667   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(stagger)) stagger\_local = stagger
668 
669   dirflag = to\_all \textcolor{comment}{! 60}
670   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(direction)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (direction > 0) dirflag = direction ;\textcolor{keywordflow}{ endif}
671   block\_til\_complete = .true.
672   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(complete)) block\_til\_complete = complete
673 
674   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(halo) .and. mom\_dom%thin\_halo\_updates) \textcolor{keywordflow}{then}
675     \textcolor{keyword}{call }mpp\_update\_domains(u\_cmpt, v\_cmpt, mom\_dom%mpp\_domain, flags=dirflag, &
676                    gridtype=stagger\_local, complete = block\_til\_complete, &
677                    whalo=halo, ehalo=halo, shalo=halo, nhalo=halo)
678   \textcolor{keywordflow}{else}
679     \textcolor{keyword}{call }mpp\_update\_domains(u\_cmpt, v\_cmpt, mom\_dom%mpp\_domain, flags=dirflag, &
680                    gridtype=stagger\_local, complete = block\_til\_complete)
681 \textcolor{keywordflow}{  endif}
682 
683   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(clock)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (clock>0) \textcolor{keyword}{call }cpu\_clock\_end(clock) ;\textcolor{keywordflow}{ endif}
684 
\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\+\_\+domains.\+F90\end{DoxyCompactItemize}
