\hypertarget{interfacemom__domains_1_1fill__symmetric__edges}{}\section{mom\+\_\+domains\+::fill\+\_\+symmetric\+\_\+edges Interface Reference}
\label{interfacemom__domains_1_1fill__symmetric__edges}\index{mom\_domains::fill\_symmetric\_edges@{mom\_domains::fill\_symmetric\_edges}}


\subsection{Detailed Description}
Do a set of halo updates that fill in the values at the duplicated edges of a staggered symmetric memory domain. 

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

\subsection*{Private functions}
\begin{DoxyCompactItemize}
\item 
subroutine \mbox{\hyperlink{interfacemom__domains_1_1fill__symmetric__edges_ab320455c6a6fe9ec184df297be4d1aff}{fill\+\_\+vector\+\_\+symmetric\+\_\+edges\+\_\+2d}} (u\+\_\+cmpt, v\+\_\+cmpt, M\+O\+M\+\_\+dom, stagger, scalar, clock)
\begin{DoxyCompactList}\small\item\em fill\+\_\+vector\+\_\+symmetric\+\_\+edges\+\_\+2d does an usual set of halo updates that only fill in the values at the edge of a pair of symmetric memory two-\/dimensional arrays representing the compontents of a two-\/dimensional horizontal vector. If symmetric memory is not being used, this subroutine does nothing except to possibly turn optional cpu clocks on or off. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Do a set of halo updates that fill in the values at the duplicated edges of a staggered symmetric memory domain. 

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



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



fill\+\_\+vector\+\_\+symmetric\+\_\+edges\+\_\+2d does an usual set of halo updates that only fill in the values at the edge of a pair of symmetric memory two-\/dimensional arrays representing the compontents of a two-\/dimensional horizontal vector. If symmetric memory is not being used, this subroutine does nothing except to possibly turn optional cpu clocks on or off. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em u\+\_\+cmpt} & The nominal zonal (u) component of the vector pair which is having its halos points exchanged. \\
\hline
\mbox{\texttt{ in,out}}  & {\em v\+\_\+cmpt} & The nominal meridional (v) component of the vector pair which is having its halos points exchanged. \\
\hline
\mbox{\texttt{ 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{\texttt{ 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{\texttt{ in}}  & {\em scalar} & An optional argument indicating whether. \\
\hline
\mbox{\texttt{ 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 548 of file M\+O\+M\+\_\+domains.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{548 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:,:)},  \textcolor{keywordtype}{intent(inout)} :: u\_cmpt\textcolor{comment}{  !< The nominal zonal (u) component of the vector}}
\DoxyCodeLine{549 \textcolor{comment}{                                                  !! pair which is having its halos points}}
\DoxyCodeLine{550 \textcolor{comment}{                                                  !! exchanged.}}
\DoxyCodeLine{551 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:,:)},  \textcolor{keywordtype}{intent(inout)} :: v\_cmpt\textcolor{comment}{  !< The nominal meridional (v) component of the}}
\DoxyCodeLine{552 \textcolor{comment}{                                                  !! vector pair which is having its halos points}}
\DoxyCodeLine{553 \textcolor{comment}{                                                  !! exchanged.}}
\DoxyCodeLine{554   \textcolor{keywordtype}{type}(MOM\_domain\_type), \textcolor{keywordtype}{intent(inout)} :: MOM\_dom\textcolor{comment}{ !< The MOM\_domain\_type containing the mpp\_domain}}
\DoxyCodeLine{555 \textcolor{comment}{                                                  !! needed to determine where data should be}}
\DoxyCodeLine{556 \textcolor{comment}{                                                  !! sent.}}
\DoxyCodeLine{557   \textcolor{keywordtype}{integer},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: stagger\textcolor{comment}{ !< An optional flag, which may be one of A\_GRID,}}
\DoxyCodeLine{558 \textcolor{comment}{                     !! BGRID\_NE, or CGRID\_NE, indicating where the two components of the vector are}}
\DoxyCodeLine{559 \textcolor{comment}{                     !! discretized. Omitting stagger is the same as setting it to CGRID\_NE.}}
\DoxyCodeLine{560   \textcolor{keywordtype}{logical},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: scalar\textcolor{comment}{  !< An optional argument indicating whether.}}
\DoxyCodeLine{561   \textcolor{keywordtype}{integer},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: clock\textcolor{comment}{    !< The handle for a cpu time clock that should be}}
\DoxyCodeLine{562 \textcolor{comment}{                                                   !! started then stopped to time this routine.}}
\DoxyCodeLine{563 }
\DoxyCodeLine{564   \textcolor{comment}{! Local variables}}
\DoxyCodeLine{565   \textcolor{keywordtype}{integer} :: stagger\_local}
\DoxyCodeLine{566   \textcolor{keywordtype}{integer} :: dirflag}
\DoxyCodeLine{567   \textcolor{keywordtype}{integer} :: i, j, isc, iec, jsc, jec, isd, ied, jsd, jed, IscB, IecB, JscB, JecB}
\DoxyCodeLine{568 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{allocatable}, \textcolor{keywordtype}{dimension(:)} :: sbuff\_x, sbuff\_y, wbuff\_x, wbuff\_y}
\DoxyCodeLine{569   \textcolor{keywordtype}{logical} :: block\_til\_complete}
\DoxyCodeLine{570 }
\DoxyCodeLine{571   \textcolor{keywordflow}{if} (.not. mom\_dom\%symmetric) \textcolor{keywordflow}{then}}
\DoxyCodeLine{572       \textcolor{keywordflow}{return}}
\DoxyCodeLine{573 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{574 }
\DoxyCodeLine{575   \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}}
\DoxyCodeLine{576 }
\DoxyCodeLine{577   stagger\_local = cgrid\_ne \textcolor{comment}{! Default value for type of grid}}
\DoxyCodeLine{578   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(stagger)) stagger\_local = stagger}
\DoxyCodeLine{579 }
\DoxyCodeLine{580   \textcolor{keywordflow}{if} (.not.(stagger\_local == cgrid\_ne .or. stagger\_local == bgrid\_ne)) \textcolor{keywordflow}{return}}
\DoxyCodeLine{581 }
\DoxyCodeLine{582   \textcolor{keyword}{call }mpp\_get\_compute\_domain(mom\_dom\%mpp\_domain, isc, iec, jsc, jec)}
\DoxyCodeLine{583   \textcolor{keyword}{call }mpp\_get\_data\_domain(mom\_dom\%mpp\_domain, isd, ied, jsd, jed)}
\DoxyCodeLine{584 }
\DoxyCodeLine{585   \textcolor{comment}{! Adjust isc, etc., to account for the fact that the input arrays indices all}}
\DoxyCodeLine{586   \textcolor{comment}{! start at 1 (and are effectively on a SW grid!).}}
\DoxyCodeLine{587   isc = isc - (isd-1) ; iec = iec - (isd-1)}
\DoxyCodeLine{588   jsc = jsc - (jsd-1) ; jec = jec - (jsd-1)}
\DoxyCodeLine{589   iscb = isc ; iecb = iec+1 ; jscb = jsc ; jecb = jec+1}
\DoxyCodeLine{590 }
\DoxyCodeLine{591   dirflag = to\_all \textcolor{comment}{! 60}}
\DoxyCodeLine{592   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(scalar)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (scalar) dirflag = to\_all+scalar\_pair ;\textcolor{keywordflow}{ endif}}
\DoxyCodeLine{593 }
\DoxyCodeLine{594   \textcolor{keywordflow}{if} (stagger\_local == cgrid\_ne) \textcolor{keywordflow}{then}}
\DoxyCodeLine{595     \textcolor{keyword}{allocate}(wbuff\_x(jsc:jec)) ; \textcolor{keyword}{allocate}(sbuff\_y(isc:iec))}
\DoxyCodeLine{596     wbuff\_x(:) = 0.0 ; sbuff\_y(:) = 0.0}
\DoxyCodeLine{597     \textcolor{keyword}{call }mpp\_get\_boundary(u\_cmpt, v\_cmpt, mom\_dom\%mpp\_domain, flags=dirflag, \&}
\DoxyCodeLine{598                           wbufferx=wbuff\_x, sbuffery=sbuff\_y, \&}
\DoxyCodeLine{599                           gridtype=cgrid\_ne)}
\DoxyCodeLine{600     \textcolor{keywordflow}{do} i=isc,iec}
\DoxyCodeLine{601       v\_cmpt(i,jscb) = sbuff\_y(i)}
\DoxyCodeLine{602 \textcolor{keywordflow}{    enddo}}
\DoxyCodeLine{603     \textcolor{keywordflow}{do} j=jsc,jec}
\DoxyCodeLine{604       u\_cmpt(iscb,j) = wbuff\_x(j)}
\DoxyCodeLine{605 \textcolor{keywordflow}{    enddo}}
\DoxyCodeLine{606     \textcolor{keyword}{deallocate}(wbuff\_x) ; \textcolor{keyword}{deallocate}(sbuff\_y)}
\DoxyCodeLine{607   \textcolor{keywordflow}{elseif}  (stagger\_local == bgrid\_ne) \textcolor{keywordflow}{then}}
\DoxyCodeLine{608     \textcolor{keyword}{allocate}(wbuff\_x(jscb:jecb)) ; \textcolor{keyword}{allocate}(sbuff\_x(iscb:iecb))}
\DoxyCodeLine{609     \textcolor{keyword}{allocate}(wbuff\_y(jscb:jecb)) ; \textcolor{keyword}{allocate}(sbuff\_y(iscb:iecb))}
\DoxyCodeLine{610     wbuff\_x(:) = 0.0 ; wbuff\_y(:) = 0.0 ; sbuff\_x(:) = 0.0 ; sbuff\_y(:) = 0.0}
\DoxyCodeLine{611     \textcolor{keyword}{call }mpp\_get\_boundary(u\_cmpt, v\_cmpt, mom\_dom\%mpp\_domain, flags=dirflag, \&}
\DoxyCodeLine{612                           wbufferx=wbuff\_x, sbufferx=sbuff\_x, \&}
\DoxyCodeLine{613                           wbuffery=wbuff\_y, sbuffery=sbuff\_y, \&}
\DoxyCodeLine{614                           gridtype=bgrid\_ne)}
\DoxyCodeLine{615     \textcolor{keywordflow}{do} i=iscb,iecb}
\DoxyCodeLine{616       u\_cmpt(i,jscb) = sbuff\_x(i) ; v\_cmpt(i,jscb) = sbuff\_y(i)}
\DoxyCodeLine{617 \textcolor{keywordflow}{    enddo}}
\DoxyCodeLine{618     \textcolor{keywordflow}{do} j=jscb,jecb}
\DoxyCodeLine{619       u\_cmpt(iscb,j) = wbuff\_x(j) ; v\_cmpt(iscb,j) = wbuff\_y(j)}
\DoxyCodeLine{620 \textcolor{keywordflow}{    enddo}}
\DoxyCodeLine{621     \textcolor{keyword}{deallocate}(wbuff\_x) ; \textcolor{keyword}{deallocate}(sbuff\_x)}
\DoxyCodeLine{622     \textcolor{keyword}{deallocate}(wbuff\_y) ; \textcolor{keyword}{deallocate}(sbuff\_y)}
\DoxyCodeLine{623 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{624 }
\DoxyCodeLine{625   \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}}
\DoxyCodeLine{626 }

\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}
