\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{\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 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 scalar} & An optional argument indicating whether.\\
\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 548 of file M\+O\+M\+\_\+domains.\+F90.


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