\hypertarget{interfacemom__domains_1_1clone__mom__domain}{}\doxysection{mom\+\_\+domains\+::clone\+\_\+mom\+\_\+domain Interface Reference}
\label{interfacemom__domains_1_1clone__mom__domain}\index{mom\_domains::clone\_mom\_domain@{mom\_domains::clone\_mom\_domain}}


\doxysubsection{Detailed Description}
Copy one M\+O\+M\+\_\+domain\+\_\+type into another. 

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

\doxysubsection*{Private functions}
\begin{DoxyCompactItemize}
\item 
subroutine \mbox{\hyperlink{interfacemom__domains_1_1clone__mom__domain_a9f286af6f32524491ecbd17bf35aedab}{clone\+\_\+md\+\_\+to\+\_\+md}} (M\+D\+\_\+in, M\+O\+M\+\_\+dom, min\+\_\+halo, halo\+\_\+size, symmetric, domain\+\_\+name, turns)
\begin{DoxyCompactList}\small\item\em clone\+\_\+\+M\+D\+\_\+to\+\_\+\+MD copies one M\+O\+M\+\_\+domain\+\_\+type into another, while allowing some properties of the new type to differ from the original one. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{interfacemom__domains_1_1clone__mom__domain_a4bb6b013ea5dc28d1423d9117826f775}{clone\+\_\+md\+\_\+to\+\_\+d2d}} (M\+D\+\_\+in, mpp\+\_\+domain, min\+\_\+halo, halo\+\_\+size, symmetric, domain\+\_\+name, turns)
\begin{DoxyCompactList}\small\item\em clone\+\_\+\+M\+D\+\_\+to\+\_\+d2D uses information from a M\+O\+M\+\_\+domain\+\_\+type to create a new domain2d type, while allowing some properties of the new type to differ from the original one. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Copy one M\+O\+M\+\_\+domain\+\_\+type into another. 

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



\doxysubsection{Functions and subroutines}
\mbox{\Hypertarget{interfacemom__domains_1_1clone__mom__domain_a4bb6b013ea5dc28d1423d9117826f775}\label{interfacemom__domains_1_1clone__mom__domain_a4bb6b013ea5dc28d1423d9117826f775}} 
\index{mom\_domains::clone\_mom\_domain@{mom\_domains::clone\_mom\_domain}!clone\_md\_to\_d2d@{clone\_md\_to\_d2d}}
\index{clone\_md\_to\_d2d@{clone\_md\_to\_d2d}!mom\_domains::clone\_mom\_domain@{mom\_domains::clone\_mom\_domain}}
\doxysubsubsection{\texorpdfstring{clone\_md\_to\_d2d()}{clone\_md\_to\_d2d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+domains\+::clone\+\_\+mom\+\_\+domain\+::clone\+\_\+md\+\_\+to\+\_\+d2d (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__domains_1_1mom__domain__type}{mom\+\_\+domain\+\_\+type}}), intent(in)}]{M\+D\+\_\+in,  }\item[{type(domain2d), intent(inout)}]{mpp\+\_\+domain,  }\item[{integer, dimension(2), intent(inout), optional}]{min\+\_\+halo,  }\item[{integer, intent(in), optional}]{halo\+\_\+size,  }\item[{logical, intent(in), optional}]{symmetric,  }\item[{character(len=$\ast$), intent(in), optional}]{domain\+\_\+name,  }\item[{integer, intent(in), optional}]{turns }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



clone\+\_\+\+M\+D\+\_\+to\+\_\+d2D uses information from a M\+O\+M\+\_\+domain\+\_\+type to create a new domain2d type, while allowing some properties of the new type to differ from the original one. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em md\+\_\+in} & An existing M\+O\+M\+\_\+domain to be cloned \\
\hline
\mbox{\texttt{ in,out}}  & {\em mpp\+\_\+domain} & The new mpp\+\_\+domain to be set up \\
\hline
\mbox{\texttt{ in,out}}  & {\em min\+\_\+halo} & If present, this sets the \\
\hline
\mbox{\texttt{ in}}  & {\em halo\+\_\+size} & If present, this sets the halo size for the domain in the i-\/ and j-\/directions. min\+\_\+halo and halo\+\_\+size can not both be present. \\
\hline
\mbox{\texttt{ in}}  & {\em symmetric} & If present, this specifies whether the new domain is symmetric, regardless of whether the macro S\+Y\+M\+M\+E\+T\+R\+I\+C\+\_\+\+M\+E\+M\+O\+R\+Y\+\_\+ is defined. \\
\hline
\mbox{\texttt{ in}}  & {\em domain\+\_\+name} & A name for the new domain, \char`\"{}\+M\+O\+M\char`\"{} \\
\hline
\mbox{\texttt{ in}}  & {\em turns} & If true, swap X and Y axes \\
\hline
\end{DoxyParams}


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


\begin{DoxyCode}{0}
\DoxyCodeLine{1737   \textcolor{keywordtype}{type}(MOM\_domain\_type), \textcolor{keywordtype}{intent(in)}    :: MD\_in\textcolor{comment}{ !< An existing MOM\_domain to be cloned}}
\DoxyCodeLine{1738   \textcolor{keywordtype}{type}(domain2d),        \textcolor{keywordtype}{intent(inout)} :: mpp\_domain\textcolor{comment}{ !< The new mpp\_domain to be set up}}
\DoxyCodeLine{1739   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{dimension(2)}, \&}
\DoxyCodeLine{1740                \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(inout)} :: min\_halo\textcolor{comment}{ !< If present, this sets the}}
\DoxyCodeLine{1741 \textcolor{comment}{                                  !! minimum halo size for this domain in the i-\/ and j-\/}}
\DoxyCodeLine{1742 \textcolor{comment}{                                  !! directions, and returns the actual halo size used.}}
\DoxyCodeLine{1743   \textcolor{keywordtype}{integer},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: halo\_size\textcolor{comment}{ !< If present, this sets the halo}}
\DoxyCodeLine{1744 \textcolor{comment}{                                  !! size for the domain in the i-\/ and j-\/directions.}}
\DoxyCodeLine{1745 \textcolor{comment}{                                  !! min\_halo and halo\_size can not both be present.}}
\DoxyCodeLine{1746   \textcolor{keywordtype}{logical},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: symmetric\textcolor{comment}{ !< If present, this specifies}}
\DoxyCodeLine{1747 \textcolor{comment}{                                  !! whether the new domain is symmetric, regardless of}}
\DoxyCodeLine{1748 \textcolor{comment}{                                  !! whether the macro SYMMETRIC\_MEMORY\_ is defined.}}
\DoxyCodeLine{1749   \textcolor{keywordtype}{character(len=*)}, \&}
\DoxyCodeLine{1750                \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: domain\_name\textcolor{comment}{ !< A name for the new domain, "{}MOM"{}}}
\DoxyCodeLine{1751 \textcolor{comment}{                                  !! if missing.}}
\DoxyCodeLine{1752   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: turns\textcolor{comment}{   !< If true, swap X and Y axes}}
\DoxyCodeLine{1753 }
\DoxyCodeLine{1754   \textcolor{keywordtype}{integer} :: global\_indices(4), layout(2), io\_layout(2)}
\DoxyCodeLine{1755   \textcolor{keywordtype}{integer} :: X\_FLAGS, Y\_FLAGS, niglobal, njglobal, nihalo, njhalo}
\DoxyCodeLine{1756   \textcolor{keywordtype}{logical} :: symmetric\_dom}
\DoxyCodeLine{1757   \textcolor{keywordtype}{character(len=64)} :: dom\_name}
\DoxyCodeLine{1758 }
\DoxyCodeLine{1759   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(turns)) \&}
\DoxyCodeLine{1760     \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"{}Rotation not supported for MOM\_domain to domain2d"{}})}
\DoxyCodeLine{1761 }
\DoxyCodeLine{1762 \textcolor{comment}{! Save the extra data for creating other domains of different resolution that overlay this domain}}
\DoxyCodeLine{1763   niglobal = md\_in\%niglobal ; njglobal = md\_in\%njglobal}
\DoxyCodeLine{1764   nihalo = md\_in\%nihalo ; njhalo = md\_in\%njhalo}
\DoxyCodeLine{1765 }
\DoxyCodeLine{1766   symmetric\_dom = md\_in\%symmetric}
\DoxyCodeLine{1767 }
\DoxyCodeLine{1768   x\_flags = md\_in\%X\_FLAGS ; y\_flags = md\_in\%Y\_FLAGS}
\DoxyCodeLine{1769   layout(:) = md\_in\%layout(:) ; io\_layout(:) = md\_in\%io\_layout(:)}
\DoxyCodeLine{1770 }
\DoxyCodeLine{1771   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(halo\_size) .and. \textcolor{keyword}{present}(min\_halo)) \textcolor{keyword}{call }mom\_error(fatal, \&}
\DoxyCodeLine{1772       \textcolor{stringliteral}{"{}clone\_MOM\_domain can not have both halo\_size and min\_halo present."{}})}
\DoxyCodeLine{1773 }
\DoxyCodeLine{1774   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(min\_halo)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{1775     nihalo = max(nihalo, min\_halo(1))}
\DoxyCodeLine{1776     njhalo = max(njhalo, min\_halo(2))}
\DoxyCodeLine{1777     min\_halo(1) = nihalo ; min\_halo(2) = njhalo}
\DoxyCodeLine{1778 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{1779 }
\DoxyCodeLine{1780   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(halo\_size)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{1781     nihalo = halo\_size ; njhalo = halo\_size}
\DoxyCodeLine{1782 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{1783 }
\DoxyCodeLine{1784   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(symmetric)) \textcolor{keywordflow}{then} ; symmetric\_dom = symmetric ;\textcolor{keywordflow}{ endif}}
\DoxyCodeLine{1785 }
\DoxyCodeLine{1786   dom\_name = \textcolor{stringliteral}{"{}MOM"{}}}
\DoxyCodeLine{1787   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(domain\_name)) dom\_name = trim(domain\_name)}
\DoxyCodeLine{1788 }
\DoxyCodeLine{1789   global\_indices(1) = 1 ; global\_indices(2) = niglobal}
\DoxyCodeLine{1790   global\_indices(3) = 1 ; global\_indices(4) = njglobal}
\DoxyCodeLine{1791   \textcolor{keywordflow}{if} (\textcolor{keyword}{associated}(md\_in\%maskmap)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{1792     \textcolor{keyword}{call }mom\_define\_domain( global\_indices, layout, mpp\_domain, \&}
\DoxyCodeLine{1793                 xflags=x\_flags, yflags=y\_flags, \&}
\DoxyCodeLine{1794                 xhalo=nihalo, yhalo=njhalo, \&}
\DoxyCodeLine{1795                 symmetry = symmetric, name=dom\_name, \&}
\DoxyCodeLine{1796                 maskmap=md\_in\%maskmap )}
\DoxyCodeLine{1797   \textcolor{keywordflow}{else}}
\DoxyCodeLine{1798     \textcolor{keyword}{call }mom\_define\_domain( global\_indices, layout, mpp\_domain, \&}
\DoxyCodeLine{1799                 xflags=x\_flags, yflags=y\_flags, \&}
\DoxyCodeLine{1800                 xhalo=nihalo, yhalo=njhalo, \&}
\DoxyCodeLine{1801                 symmetry = symmetric, name=dom\_name)}
\DoxyCodeLine{1802 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{1803 }
\DoxyCodeLine{1804   \textcolor{keywordflow}{if} ((io\_layout(1) + io\_layout(2) > 0) .and. \&}
\DoxyCodeLine{1805       (layout(1)*layout(2) > 1)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{1806     \textcolor{keyword}{call }mom\_define\_io\_domain(mpp\_domain, io\_layout)}
\DoxyCodeLine{1807 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{1808 }

\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__domains_1_1clone__mom__domain_a9f286af6f32524491ecbd17bf35aedab}\label{interfacemom__domains_1_1clone__mom__domain_a9f286af6f32524491ecbd17bf35aedab}} 
\index{mom\_domains::clone\_mom\_domain@{mom\_domains::clone\_mom\_domain}!clone\_md\_to\_md@{clone\_md\_to\_md}}
\index{clone\_md\_to\_md@{clone\_md\_to\_md}!mom\_domains::clone\_mom\_domain@{mom\_domains::clone\_mom\_domain}}
\doxysubsubsection{\texorpdfstring{clone\_md\_to\_md()}{clone\_md\_to\_md()}}
{\footnotesize\ttfamily subroutine mom\+\_\+domains\+::clone\+\_\+mom\+\_\+domain\+::clone\+\_\+md\+\_\+to\+\_\+md (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__domains_1_1mom__domain__type}{mom\+\_\+domain\+\_\+type}}), intent(in)}]{M\+D\+\_\+in,  }\item[{type(\mbox{\hyperlink{structmom__domains_1_1mom__domain__type}{mom\+\_\+domain\+\_\+type}}), pointer}]{M\+O\+M\+\_\+dom,  }\item[{integer, dimension(2), intent(inout), optional}]{min\+\_\+halo,  }\item[{integer, intent(in), optional}]{halo\+\_\+size,  }\item[{logical, intent(in), optional}]{symmetric,  }\item[{character(len=$\ast$), intent(in), optional}]{domain\+\_\+name,  }\item[{integer, intent(in), optional}]{turns }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



clone\+\_\+\+M\+D\+\_\+to\+\_\+\+MD copies one M\+O\+M\+\_\+domain\+\_\+type into another, while allowing some properties of the new type to differ from the original one. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em md\+\_\+in} & An existing M\+O\+M\+\_\+domain \\
\hline
 & {\em mom\+\_\+dom} & A pointer to a M\+O\+M\+\_\+domain that will be allocated if it is unassociated, and will have data copied from M\+D\+\_\+in \\
\hline
\mbox{\texttt{ in,out}}  & {\em min\+\_\+halo} & If present, this sets the \\
\hline
\mbox{\texttt{ in}}  & {\em halo\+\_\+size} & If present, this sets the halo size for the domain in the i-\/ and j-\/directions. min\+\_\+halo and halo\+\_\+size can not both be present. \\
\hline
\mbox{\texttt{ in}}  & {\em symmetric} & If present, this specifies whether the new domain is symmetric, regardless of whether the macro S\+Y\+M\+M\+E\+T\+R\+I\+C\+\_\+\+M\+E\+M\+O\+R\+Y\+\_\+ is defined. \\
\hline
\mbox{\texttt{ in}}  & {\em domain\+\_\+name} & A name for the new domain, \char`\"{}\+M\+O\+M\char`\"{} \\
\hline
\mbox{\texttt{ in}}  & {\em turns} & Number of quarter turns \\
\hline
\end{DoxyParams}


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


\begin{DoxyCode}{0}
\DoxyCodeLine{1607   \textcolor{keywordtype}{type}(MOM\_domain\_type), \textcolor{keywordtype}{intent(in)}    :: MD\_in\textcolor{comment}{  !< An existing MOM\_domain}}
\DoxyCodeLine{1608   \textcolor{keywordtype}{type}(MOM\_domain\_type), \textcolor{keywordtype}{pointer}       :: MOM\_dom\textcolor{comment}{ !< A pointer to a MOM\_domain that will be}}
\DoxyCodeLine{1609 \textcolor{comment}{                                  !! allocated if it is unassociated, and will have data}}
\DoxyCodeLine{1610 \textcolor{comment}{                                  !! copied from MD\_in}}
\DoxyCodeLine{1611   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{dimension(2)}, \&}
\DoxyCodeLine{1612                \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(inout)} :: min\_halo\textcolor{comment}{ !< If present, this sets the}}
\DoxyCodeLine{1613 \textcolor{comment}{                                  !! minimum halo size for this domain in the i-\/ and j-\/}}
\DoxyCodeLine{1614 \textcolor{comment}{                                  !! directions, and returns the actual halo size used.}}
\DoxyCodeLine{1615   \textcolor{keywordtype}{integer},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: halo\_size\textcolor{comment}{ !< If present, this sets the halo}}
\DoxyCodeLine{1616 \textcolor{comment}{                                  !! size for the domain in the i-\/ and j-\/directions.}}
\DoxyCodeLine{1617 \textcolor{comment}{                                  !! min\_halo and halo\_size can not both be present.}}
\DoxyCodeLine{1618   \textcolor{keywordtype}{logical},     \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: symmetric\textcolor{comment}{ !< If present, this specifies}}
\DoxyCodeLine{1619 \textcolor{comment}{                                  !! whether the new domain is symmetric, regardless of}}
\DoxyCodeLine{1620 \textcolor{comment}{                                  !! whether the macro SYMMETRIC\_MEMORY\_ is defined.}}
\DoxyCodeLine{1621   \textcolor{keywordtype}{character(len=*)}, \&}
\DoxyCodeLine{1622                \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: domain\_name\textcolor{comment}{ !< A name for the new domain, "{}MOM"{}}}
\DoxyCodeLine{1623 \textcolor{comment}{                                  !! if missing.}}
\DoxyCodeLine{1624   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)} :: turns\textcolor{comment}{   !< Number of quarter turns}}
\DoxyCodeLine{1625 }
\DoxyCodeLine{1626   \textcolor{keywordtype}{integer} :: global\_indices(4)}
\DoxyCodeLine{1627   \textcolor{keywordtype}{logical} :: mask\_table\_exists}
\DoxyCodeLine{1628   \textcolor{keywordtype}{character(len=64)} :: dom\_name}
\DoxyCodeLine{1629   \textcolor{keywordtype}{integer} :: qturns}
\DoxyCodeLine{1630 }
\DoxyCodeLine{1631   qturns = 0}
\DoxyCodeLine{1632   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(turns)) qturns = turns}
\DoxyCodeLine{1633 }
\DoxyCodeLine{1634   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(mom\_dom)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{1635     \textcolor{keyword}{allocate}(mom\_dom)}
\DoxyCodeLine{1636     \textcolor{keyword}{allocate}(mom\_dom\%mpp\_domain)}
\DoxyCodeLine{1637     \textcolor{keyword}{allocate}(mom\_dom\%mpp\_domain\_d2)}
\DoxyCodeLine{1638 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{1639 }
\DoxyCodeLine{1640 \textcolor{comment}{! Save the extra data for creating other domains of different resolution that overlay this domain}}
\DoxyCodeLine{1641   mom\_dom\%symmetric = md\_in\%symmetric}
\DoxyCodeLine{1642   mom\_dom\%nonblocking\_updates = md\_in\%nonblocking\_updates}
\DoxyCodeLine{1643   mom\_dom\%thin\_halo\_updates = md\_in\%thin\_halo\_updates}
\DoxyCodeLine{1644 }
\DoxyCodeLine{1645   \textcolor{keywordflow}{if} (modulo(qturns, 2) /= 0) \textcolor{keywordflow}{then}}
\DoxyCodeLine{1646     mom\_dom\%niglobal = md\_in\%njglobal ; mom\_dom\%njglobal = md\_in\%niglobal}
\DoxyCodeLine{1647     mom\_dom\%nihalo = md\_in\%njhalo ; mom\_dom\%njhalo = md\_in\%nihalo}
\DoxyCodeLine{1648 }
\DoxyCodeLine{1649     mom\_dom\%X\_FLAGS = md\_in\%Y\_FLAGS ; mom\_dom\%Y\_FLAGS = md\_in\%X\_FLAGS}
\DoxyCodeLine{1650     mom\_dom\%layout(:) = md\_in\%layout(2:1:-\/1)}
\DoxyCodeLine{1651     mom\_dom\%io\_layout(:) = md\_in\%io\_layout(2:1:-\/1)}
\DoxyCodeLine{1652   \textcolor{keywordflow}{else}}
\DoxyCodeLine{1653     mom\_dom\%niglobal = md\_in\%niglobal ; mom\_dom\%njglobal = md\_in\%njglobal}
\DoxyCodeLine{1654     mom\_dom\%nihalo = md\_in\%nihalo ; mom\_dom\%njhalo = md\_in\%njhalo}
\DoxyCodeLine{1655 }
\DoxyCodeLine{1656     mom\_dom\%X\_FLAGS = md\_in\%X\_FLAGS ; mom\_dom\%Y\_FLAGS = md\_in\%Y\_FLAGS}
\DoxyCodeLine{1657     mom\_dom\%layout(:) = md\_in\%layout(:)}
\DoxyCodeLine{1658     mom\_dom\%io\_layout(:) = md\_in\%io\_layout(:)}
\DoxyCodeLine{1659 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{1660 }
\DoxyCodeLine{1661   global\_indices(1) = 1 ; global\_indices(2) = mom\_dom\%niglobal}
\DoxyCodeLine{1662   global\_indices(3) = 1 ; global\_indices(4) = mom\_dom\%njglobal}
\DoxyCodeLine{1663 }
\DoxyCodeLine{1664   \textcolor{keywordflow}{if} (\textcolor{keyword}{associated}(md\_in\%maskmap)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{1665     mask\_table\_exists = .true.}
\DoxyCodeLine{1666     \textcolor{keyword}{allocate}(mom\_dom\%maskmap(mom\_dom\%layout(1), mom\_dom\%layout(2)))}
\DoxyCodeLine{1667     \textcolor{keywordflow}{if} (qturns /= 0) \textcolor{keywordflow}{then}}
\DoxyCodeLine{1668       \textcolor{keyword}{call }rotate\_array(md\_in\%maskmap(:,:), qturns, mom\_dom\%maskmap(:,:))}
\DoxyCodeLine{1669     \textcolor{keywordflow}{else}}
\DoxyCodeLine{1670       mom\_dom\%maskmap(:,:) = md\_in\%maskmap(:,:)}
\DoxyCodeLine{1671 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{1672   \textcolor{keywordflow}{else}}
\DoxyCodeLine{1673     mask\_table\_exists = .false.}
\DoxyCodeLine{1674 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{1675 }
\DoxyCodeLine{1676   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(halo\_size) .and. \textcolor{keyword}{present}(min\_halo)) \textcolor{keyword}{call }mom\_error(fatal, \&}
\DoxyCodeLine{1677       \textcolor{stringliteral}{"{}clone\_MOM\_domain can not have both halo\_size and min\_halo present."{}})}
\DoxyCodeLine{1678 }
\DoxyCodeLine{1679   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(min\_halo)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{1680     mom\_dom\%nihalo = max(mom\_dom\%nihalo, min\_halo(1))}
\DoxyCodeLine{1681     min\_halo(1) = mom\_dom\%nihalo}
\DoxyCodeLine{1682     mom\_dom\%njhalo = max(mom\_dom\%njhalo, min\_halo(2))}
\DoxyCodeLine{1683     min\_halo(2) = mom\_dom\%njhalo}
\DoxyCodeLine{1684 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{1685 }
\DoxyCodeLine{1686   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(halo\_size)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{1687     mom\_dom\%nihalo = halo\_size ; mom\_dom\%njhalo = halo\_size}
\DoxyCodeLine{1688 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{1689 }
\DoxyCodeLine{1690   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(symmetric)) \textcolor{keywordflow}{then} ; mom\_dom\%symmetric = symmetric ;\textcolor{keywordflow}{ endif}}
\DoxyCodeLine{1691 }
\DoxyCodeLine{1692   dom\_name = \textcolor{stringliteral}{"{}MOM"{}}}
\DoxyCodeLine{1693   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(domain\_name)) dom\_name = trim(domain\_name)}
\DoxyCodeLine{1694 }
\DoxyCodeLine{1695   \textcolor{keywordflow}{if} (mask\_table\_exists) \textcolor{keywordflow}{then}}
\DoxyCodeLine{1696     \textcolor{keyword}{call }mom\_define\_domain(global\_indices, mom\_dom\%layout, mom\_dom\%mpp\_domain, \&}
\DoxyCodeLine{1697                 xflags=mom\_dom\%X\_FLAGS, yflags=mom\_dom\%Y\_FLAGS, \&}
\DoxyCodeLine{1698                 xhalo=mom\_dom\%nihalo, yhalo=mom\_dom\%njhalo, \&}
\DoxyCodeLine{1699                 symmetry=mom\_dom\%symmetric, name=dom\_name, \&}
\DoxyCodeLine{1700                 maskmap=mom\_dom\%maskmap)}
\DoxyCodeLine{1701 }
\DoxyCodeLine{1702     global\_indices(2) = global\_indices(2) / 2}
\DoxyCodeLine{1703     global\_indices(4) = global\_indices(4) / 2}
\DoxyCodeLine{1704     \textcolor{keyword}{call }mom\_define\_domain(global\_indices, mom\_dom\%layout, \&}
\DoxyCodeLine{1705                 mom\_dom\%mpp\_domain\_d2, \&}
\DoxyCodeLine{1706                 xflags=mom\_dom\%X\_FLAGS, yflags=mom\_dom\%Y\_FLAGS, \&}
\DoxyCodeLine{1707                 xhalo=(mom\_dom\%nihalo/2), yhalo=(mom\_dom\%njhalo/2), \&}
\DoxyCodeLine{1708                 symmetry=mom\_dom\%symmetric, name=dom\_name, \&}
\DoxyCodeLine{1709                 maskmap=mom\_dom\%maskmap)}
\DoxyCodeLine{1710   \textcolor{keywordflow}{else}}
\DoxyCodeLine{1711     \textcolor{keyword}{call }mom\_define\_domain(global\_indices, mom\_dom\%layout, mom\_dom\%mpp\_domain, \&}
\DoxyCodeLine{1712                 xflags=mom\_dom\%X\_FLAGS, yflags=mom\_dom\%Y\_FLAGS, \&}
\DoxyCodeLine{1713                 xhalo=mom\_dom\%nihalo, yhalo=mom\_dom\%njhalo, \&}
\DoxyCodeLine{1714                 symmetry=mom\_dom\%symmetric, name=dom\_name)}
\DoxyCodeLine{1715 }
\DoxyCodeLine{1716     global\_indices(2) = global\_indices(2) / 2}
\DoxyCodeLine{1717     global\_indices(4) = global\_indices(4) / 2}
\DoxyCodeLine{1718     \textcolor{keyword}{call }mom\_define\_domain(global\_indices, mom\_dom\%layout, \&}
\DoxyCodeLine{1719                 mom\_dom\%mpp\_domain\_d2, \&}
\DoxyCodeLine{1720                 xflags=mom\_dom\%X\_FLAGS, yflags=mom\_dom\%Y\_FLAGS, \&}
\DoxyCodeLine{1721                 xhalo=(mom\_dom\%nihalo/2), yhalo=(mom\_dom\%njhalo/2), \&}
\DoxyCodeLine{1722                 symmetry=mom\_dom\%symmetric, name=dom\_name)}
\DoxyCodeLine{1723 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{1724 }
\DoxyCodeLine{1725   \textcolor{keywordflow}{if} ((mom\_dom\%io\_layout(1) + mom\_dom\%io\_layout(2) > 0) .and. \&}
\DoxyCodeLine{1726       (mom\_dom\%layout(1)*mom\_dom\%layout(2) > 1)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{1727     \textcolor{keyword}{call }mom\_define\_io\_domain(mom\_dom\%mpp\_domain, mom\_dom\%io\_layout)}
\DoxyCodeLine{1728 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{1729 }

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