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


\subsection{Detailed Description}
Do a halo update on an array. 

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

\subsection*{Private functions}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{interfacemom__domains_1_1pass__var_ac91dc3915b4999782029df09b18efe17}{pass\+\_\+var\+\_\+3d} (array, M\+O\+M\+\_\+dom, sideflag, complete, position, halo, clock)
\begin{DoxyCompactList}\small\item\em pass\+\_\+var\+\_\+3d does a halo update for a three-\/dimensional array. \end{DoxyCompactList}\item 
subroutine \hyperlink{interfacemom__domains_1_1pass__var_a2314f1186126f7f9a0cdd2d30fdbe81b}{pass\+\_\+var\+\_\+2d} (array, M\+O\+M\+\_\+dom, sideflag, complete, position, halo, inner\+\_\+halo, clock)
\begin{DoxyCompactList}\small\item\em pass\+\_\+var\+\_\+2d does a halo update for a two-\/dimensional array. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Do a halo update on an array. 

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



\subsection{Functions and subroutines}
\mbox{\Hypertarget{interfacemom__domains_1_1pass__var_a2314f1186126f7f9a0cdd2d30fdbe81b}\label{interfacemom__domains_1_1pass__var_a2314f1186126f7f9a0cdd2d30fdbe81b}} 
\index{mom\+\_\+domains\+::pass\+\_\+var@{mom\+\_\+domains\+::pass\+\_\+var}!pass\+\_\+var\+\_\+2d@{pass\+\_\+var\+\_\+2d}}
\index{pass\+\_\+var\+\_\+2d@{pass\+\_\+var\+\_\+2d}!mom\+\_\+domains\+::pass\+\_\+var@{mom\+\_\+domains\+::pass\+\_\+var}}
\subsubsection{\texorpdfstring{pass\+\_\+var\+\_\+2d()}{pass\_var\_2d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+domains\+::pass\+\_\+var\+::pass\+\_\+var\+\_\+2d (\begin{DoxyParamCaption}\item[{real, dimension(\+:,\+:), intent(inout)}]{array,  }\item[{type(\hyperlink{structmom__domains_1_1mom__domain__type}{mom\+\_\+domain\+\_\+type}), intent(inout)}]{M\+O\+M\+\_\+dom,  }\item[{integer, intent(in), optional}]{sideflag,  }\item[{logical, intent(in), optional}]{complete,  }\item[{integer, intent(in), optional}]{position,  }\item[{integer, intent(in), optional}]{halo,  }\item[{integer, intent(in), optional}]{inner\+\_\+halo,  }\item[{integer, intent(in), optional}]{clock }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



pass\+\_\+var\+\_\+2d does a halo update for a two-\/dimensional array. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in,out}  & {\em array} & The array 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 sideflag} & 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. 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 sideflag is omitted.\\
\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 position} & An optional argument indicating the position. This is C\+E\+N\+T\+ER by default and is often C\+O\+R\+N\+ER, but could also be E\+A\+S\+T\+\_\+\+F\+A\+CE or N\+O\+R\+T\+H\+\_\+\+F\+A\+CE.\\
\hline
\mbox{\tt in}  & {\em halo} & The size of the halo to update -\/ the full halo by default.\\
\hline
\mbox{\tt in}  & {\em inner\+\_\+halo} & The size of an inner halo to avoid updating, or 0 to avoid updating symmetric memory computational domain points. Setting this $>$=0 also enforces that complete=.true.\\
\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 190 of file M\+O\+M\+\_\+domains.\+F90.


\begin{DoxyCode}
190   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:,:)},  \textcolor{keywordtype}{intent(inout)} :: array\textcolor{comment}{    !< The array which is having its halos points}
191 \textcolor{comment}{                                                   !! exchanged.}
192   \textcolor{keywordtype}{type}(mom\_domain\_type), \textcolor{keywordtype}{intent(inout)} :: mom\_dom\textcolor{comment}{  !< The MOM\_domain\_type containing the mpp\_domain}
193 \textcolor{comment}{                                                   !! needed to determine where data should be sent.}
194   \textcolor{keywordtype}{integer},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: sideflag\textcolor{comment}{ !< An optional integer indicating which}
195 \textcolor{comment}{      !! directions the data should be sent. It is TO\_ALL or the sum of any of TO\_EAST, TO\_WEST,}
196 \textcolor{comment}{      !! TO\_NORTH, and TO\_SOUTH.  For example, TO\_EAST sends the data to the processor to the east,}
197 \textcolor{comment}{      !! so the halos on the western side are filled.  TO\_ALL is the default if sideflag is omitted.}
198   \textcolor{keywordtype}{logical},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: complete\textcolor{comment}{ !< An optional argument indicating whether the}
199 \textcolor{comment}{                                                   !! halo updates should be completed before}
200 \textcolor{comment}{                                                   !! progress resumes.  Omitting complete is the}
201 \textcolor{comment}{                                                   !! same as setting complete to .true.}
202   \textcolor{keywordtype}{integer},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: position\textcolor{comment}{ !< An optional argument indicating the position.}
203 \textcolor{comment}{                                                   !! This is CENTER by default and is often CORNER,}
204 \textcolor{comment}{                                                   !! but could also be EAST\_FACE or NORTH\_FACE.}
205   \textcolor{keywordtype}{integer},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: halo\textcolor{comment}{     !< The size of the halo to update - the full halo}
206 \textcolor{comment}{                                                   !! by default.}
207   \textcolor{keywordtype}{integer},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: inner\_halo\textcolor{comment}{ !< The size of an inner halo to avoid updating,}
208 \textcolor{comment}{                                                   !! or 0 to avoid updating symmetric memory}
209 \textcolor{comment}{                                                   !! computational domain points.  Setting this >=0}
210 \textcolor{comment}{                                                   !! also enforces that complete=.true.}
211   \textcolor{keywordtype}{integer},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: clock\textcolor{comment}{    !< The handle for a cpu time clock that should be}
212 \textcolor{comment}{                                                   !! started then stopped to time this routine.}
213 
214   \textcolor{comment}{! Local variables}
215   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{allocatable}, \textcolor{keywordtype}{dimension(:,:)} :: tmp
216   \textcolor{keywordtype}{integer} :: pos, i\_halo, j\_halo
217   \textcolor{keywordtype}{integer} :: isc, iec, jsc, jec, isd, ied, jsd, jed, iscb, iecb, jscb, jecb
218   \textcolor{keywordtype}{integer} :: inner, i, j, isfw, iefw, isfe, iefe, jsfs, jefs, jsfn, jefn
219   \textcolor{keywordtype}{integer} :: dirflag
220   \textcolor{keywordtype}{logical} :: block\_til\_complete
221 
222   \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}
223 
224   dirflag = to\_all \textcolor{comment}{! 60}
225   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(sideflag)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (sideflag > 0) dirflag = sideflag ;\textcolor{keywordflow}{ endif}
226   block\_til\_complete = .true. ; \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(complete)) block\_til\_complete = complete
227   pos = center ; \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(position)) pos = position
228 
229   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(inner\_halo)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (inner\_halo >= 0) \textcolor{keywordflow}{then}
230     \textcolor{comment}{! Store the original values.}
231     \textcolor{keyword}{allocate}(tmp(\textcolor{keyword}{size}(array,1), \textcolor{keyword}{size}(array,2)))
232     tmp(:,:) = array(:,:)
233     block\_til\_complete = .true.
234 \textcolor{keywordflow}{  endif} ;\textcolor{keywordflow}{ endif}
235 
236   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(halo) .and. mom\_dom%thin\_halo\_updates) \textcolor{keywordflow}{then}
237     \textcolor{keyword}{call }mpp\_update\_domains(array, mom\_dom%mpp\_domain, flags=dirflag, &
238                         complete=block\_til\_complete, position=position, &
239                         whalo=halo, ehalo=halo, shalo=halo, nhalo=halo)
240   \textcolor{keywordflow}{else}
241     \textcolor{keyword}{call }mpp\_update\_domains(array, mom\_dom%mpp\_domain, flags=dirflag, &
242                         complete=block\_til\_complete, position=position)
243 \textcolor{keywordflow}{  endif}
244 
245   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(inner\_halo)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (inner\_halo >= 0) \textcolor{keywordflow}{then}
246     \textcolor{keyword}{call }mpp\_get\_compute\_domain(mom\_dom%mpp\_domain, isc, iec, jsc, jec)
247     \textcolor{keyword}{call }mpp\_get\_data\_domain(mom\_dom%mpp\_domain, isd, ied, jsd, jed)
248     \textcolor{comment}{! Convert to local indices for arrays starting at 1.}
249     isc = isc - (isd-1) ; iec = iec - (isd-1) ; ied = ied - (isd-1) ; isd = 1
250     jsc = jsc - (jsd-1) ; jec = jec - (jsd-1) ; jed = jed - (jsd-1) ; jsd = 1
251     i\_halo = min(inner\_halo, isc-1) ; j\_halo = min(inner\_halo, jsc-1)
252 
253     \textcolor{comment}{! Figure out the array index extents of the eastern, western, northern and southern regions to copy.}
254     \textcolor{keywordflow}{if} (pos == center) \textcolor{keywordflow}{then}
255       \textcolor{keywordflow}{if} (\textcolor{keyword}{size}(array,1) == ied) \textcolor{keywordflow}{then}
256         isfw = isc - i\_halo ; iefw = isc ; isfe = iec ; iefe = iec + i\_halo
257       \textcolor{keywordflow}{else} ; \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"pass\_var\_2d: wrong i-size for CENTER array."}) ;\textcolor{keywordflow}{ endif}
258       \textcolor{keywordflow}{if} (\textcolor{keyword}{size}(array,2) == jed) \textcolor{keywordflow}{then}
259         isfw = isc - i\_halo ; iefw = isc ; isfe = iec ; iefe = iec + i\_halo
260       \textcolor{keywordflow}{else} ; \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"pass\_var\_2d: wrong j-size for CENTER array."}) ;\textcolor{keywordflow}{ endif}
261     \textcolor{keywordflow}{elseif} (pos == corner) \textcolor{keywordflow}{then}
262       \textcolor{keywordflow}{if} (\textcolor{keyword}{size}(array,1) == ied) \textcolor{keywordflow}{then}
263         isfw = max(isc - (i\_halo+1), 1) ; iefw = isc ; isfe = iec ; iefe = iec + i\_halo
264       \textcolor{keywordflow}{elseif} (\textcolor{keyword}{size}(array,1) == ied+1) \textcolor{keywordflow}{then}
265         isfw = isc - i\_halo ; iefw = isc+1 ; isfe = iec+1 ; iefe = min(iec + 1 + i\_halo, ied+1)
266       \textcolor{keywordflow}{else} ; \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"pass\_var\_2d: wrong i-size for CORNER array."}) ;\textcolor{keywordflow}{ endif}
267       \textcolor{keywordflow}{if} (\textcolor{keyword}{size}(array,2) == jed) \textcolor{keywordflow}{then}
268         jsfs = max(jsc - (j\_halo+1), 1) ; jefs = jsc ; jsfn = jec ; jefn = jec + j\_halo
269       \textcolor{keywordflow}{elseif} (\textcolor{keyword}{size}(array,2) == jed+1) \textcolor{keywordflow}{then}
270         jsfs = jsc - j\_halo ; jefs = jsc+1 ; jsfn = jec+1 ; jefn = min(jec + 1 + j\_halo, jed+1)
271       \textcolor{keywordflow}{else} ; \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"pass\_var\_2d: wrong j-size for CORNER array."}) ;\textcolor{keywordflow}{ endif}
272     \textcolor{keywordflow}{elseif} (pos == north\_face) \textcolor{keywordflow}{then}
273       \textcolor{keywordflow}{if} (\textcolor{keyword}{size}(array,1) == ied) \textcolor{keywordflow}{then}
274         isfw = isc - i\_halo ; iefw = isc ; isfe = iec ; iefe = iec + i\_halo
275       \textcolor{keywordflow}{else} ; \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"pass\_var\_2d: wrong i-size for NORTH\_FACE array."}) ;\textcolor{keywordflow}{ endif}
276       \textcolor{keywordflow}{if} (\textcolor{keyword}{size}(array,2) == jed) \textcolor{keywordflow}{then}
277         jsfs = max(jsc - (j\_halo+1), 1) ; jefs = jsc ; jsfn = jec ; jefn = jec + j\_halo
278       \textcolor{keywordflow}{elseif} (\textcolor{keyword}{size}(array,2) == jed+1) \textcolor{keywordflow}{then}
279         jsfs = jsc - j\_halo ; jefs = jsc+1 ; jsfn = jec+1 ; jefn = min(jec + 1 + j\_halo, jed+1)
280       \textcolor{keywordflow}{else} ; \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"pass\_var\_2d: wrong j-size for NORTH\_FACE array."}) ;\textcolor{keywordflow}{ endif}
281     \textcolor{keywordflow}{elseif} (pos == east\_face) \textcolor{keywordflow}{then}
282       \textcolor{keywordflow}{if} (\textcolor{keyword}{size}(array,1) == ied) \textcolor{keywordflow}{then}
283         isfw = max(isc - (i\_halo+1), 1) ; iefw = isc ; isfe = iec ; iefe = iec + i\_halo
284       \textcolor{keywordflow}{elseif} (\textcolor{keyword}{size}(array,1) == ied+1) \textcolor{keywordflow}{then}
285         isfw = isc - i\_halo ; iefw = isc+1 ; isfe = iec+1 ; iefe = min(iec + 1 + i\_halo, ied+1)
286       \textcolor{keywordflow}{else} ; \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"pass\_var\_2d: wrong i-size for EAST\_FACE array."}) ;\textcolor{keywordflow}{ endif}
287       \textcolor{keywordflow}{if} (\textcolor{keyword}{size}(array,2) == jed) \textcolor{keywordflow}{then}
288         isfw = isc - i\_halo ; iefw = isc ; isfe = iec ; iefe = iec + i\_halo
289       \textcolor{keywordflow}{else} ; \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"pass\_var\_2d: wrong j-size for EAST\_FACE array."}) ;\textcolor{keywordflow}{ endif}
290     \textcolor{keywordflow}{else}
291       \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"pass\_var\_2d: Unrecognized position"})
292 \textcolor{keywordflow}{    endif}
293 
294     \textcolor{comment}{! Copy back the stored inner halo points}
295     \textcolor{keywordflow}{do} j=jsfs,jefn ; \textcolor{keywordflow}{do} i=isfw,iefw ; array(i,j) = tmp(i,j) ;\textcolor{keywordflow}{ enddo} ;\textcolor{keywordflow}{ enddo}
296     \textcolor{keywordflow}{do} j=jsfs,jefn ; \textcolor{keywordflow}{do} i=isfe,iefe ; array(i,j) = tmp(i,j) ;\textcolor{keywordflow}{ enddo} ;\textcolor{keywordflow}{ enddo}
297     \textcolor{keywordflow}{do} j=jsfs,jefs ; \textcolor{keywordflow}{do} i=isfw,iefe ; array(i,j) = tmp(i,j) ;\textcolor{keywordflow}{ enddo} ;\textcolor{keywordflow}{ enddo}
298     \textcolor{keywordflow}{do} j=jsfn,jefn ; \textcolor{keywordflow}{do} i=isfw,iefe ; array(i,j) = tmp(i,j) ;\textcolor{keywordflow}{ enddo} ;\textcolor{keywordflow}{ enddo}
299 
300     \textcolor{keyword}{deallocate}(tmp)
301 \textcolor{keywordflow}{  endif} ;\textcolor{keywordflow}{ endif}
302 
303   \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}
304 
\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__domains_1_1pass__var_ac91dc3915b4999782029df09b18efe17}\label{interfacemom__domains_1_1pass__var_ac91dc3915b4999782029df09b18efe17}} 
\index{mom\+\_\+domains\+::pass\+\_\+var@{mom\+\_\+domains\+::pass\+\_\+var}!pass\+\_\+var\+\_\+3d@{pass\+\_\+var\+\_\+3d}}
\index{pass\+\_\+var\+\_\+3d@{pass\+\_\+var\+\_\+3d}!mom\+\_\+domains\+::pass\+\_\+var@{mom\+\_\+domains\+::pass\+\_\+var}}
\subsubsection{\texorpdfstring{pass\+\_\+var\+\_\+3d()}{pass\_var\_3d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+domains\+::pass\+\_\+var\+::pass\+\_\+var\+\_\+3d (\begin{DoxyParamCaption}\item[{real, dimension(\+:,\+:,\+:), intent(inout)}]{array,  }\item[{type(\hyperlink{structmom__domains_1_1mom__domain__type}{mom\+\_\+domain\+\_\+type}), intent(inout)}]{M\+O\+M\+\_\+dom,  }\item[{integer, intent(in), optional}]{sideflag,  }\item[{logical, intent(in), optional}]{complete,  }\item[{integer, intent(in), optional}]{position,  }\item[{integer, intent(in), optional}]{halo,  }\item[{integer, intent(in), optional}]{clock }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



pass\+\_\+var\+\_\+3d does a halo update for a three-\/dimensional array. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in,out}  & {\em array} & The array 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 sideflag} & 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. For example, T\+O\+\_\+\+E\+A\+ST sends the data to the processor to the east, sothe halos on the western side are filled. T\+O\+\_\+\+A\+LL is the default if sideflag is omitted.\\
\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 position} & An optional argument indicating the position. This is C\+E\+N\+T\+ER by default and is often C\+O\+R\+N\+ER, but could also be E\+A\+S\+T\+\_\+\+F\+A\+CE or N\+O\+R\+T\+H\+\_\+\+F\+A\+CE.\\
\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 144 of file M\+O\+M\+\_\+domains.\+F90.


\begin{DoxyCode}
144   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:,:,:)}, \textcolor{keywordtype}{intent(inout)} :: array\textcolor{comment}{    !< The array which is having its halos points}
145 \textcolor{comment}{                                                    !! exchanged.}
146   \textcolor{keywordtype}{type}(mom\_domain\_type),  \textcolor{keywordtype}{intent(inout)} :: mom\_dom\textcolor{comment}{  !< The MOM\_domain\_type containing the mpp\_domain}
147 \textcolor{comment}{                                                    !! needed to determine where data should be}
148 \textcolor{comment}{                                                    !! sent.}
149   \textcolor{keywordtype}{integer},      \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: sideflag\textcolor{comment}{ !< An optional integer indicating which}
150 \textcolor{comment}{      !! directions the data should be sent.  It is TO\_ALL or the sum of any of TO\_EAST, TO\_WEST,}
151 \textcolor{comment}{      !! TO\_NORTH, and TO\_SOUTH.  For example, TO\_EAST sends the data to the processor to the east,}
152 \textcolor{comment}{      !! sothe halos on the western side are filled.  TO\_ALL is the default if sideflag is omitted.}
153   \textcolor{keywordtype}{logical},      \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: complete\textcolor{comment}{ !< An optional argument indicating whether the}
154 \textcolor{comment}{                                                    !! halo updates should be completed before}
155 \textcolor{comment}{                                                    !! progress resumes. Omitting complete is the}
156 \textcolor{comment}{                                                    !! same as setting complete to .true.}
157   \textcolor{keywordtype}{integer},      \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: position\textcolor{comment}{ !< An optional argument indicating the position.}
158 \textcolor{comment}{                                                    !! This is CENTER by default and is often CORNER,}
159 \textcolor{comment}{                                                    !! but could also be EAST\_FACE or NORTH\_FACE.}
160   \textcolor{keywordtype}{integer},      \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: halo\textcolor{comment}{     !< The size of the halo to update - the full}
161 \textcolor{comment}{                                                    !! halo by default.}
162   \textcolor{keywordtype}{integer},      \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: clock\textcolor{comment}{    !< The handle for a cpu time clock that should be}
163 \textcolor{comment}{                                                    !! started then stopped to time this routine.}
164 
165   \textcolor{keywordtype}{integer} :: dirflag
166   \textcolor{keywordtype}{logical} :: block\_til\_complete
167 
168   \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}
169 
170   dirflag = to\_all \textcolor{comment}{! 60}
171   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(sideflag)) \textcolor{keywordflow}{then} ; \textcolor{keywordflow}{if} (sideflag > 0) dirflag = sideflag ;\textcolor{keywordflow}{ endif}
172   block\_til\_complete = .true.
173   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(complete)) block\_til\_complete = complete
174 
175   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(halo) .and. mom\_dom%thin\_halo\_updates) \textcolor{keywordflow}{then}
176     \textcolor{keyword}{call }mpp\_update\_domains(array, mom\_dom%mpp\_domain, flags=dirflag, &
177                         complete=block\_til\_complete, position=position, &
178                         whalo=halo, ehalo=halo, shalo=halo, nhalo=halo)
179   \textcolor{keywordflow}{else}
180     \textcolor{keyword}{call }mpp\_update\_domains(array, mom\_dom%mpp\_domain, flags=dirflag, &
181                           complete=block\_til\_complete, position=position)
182 \textcolor{keywordflow}{  endif}
183 
184   \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}
185 
\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}
