\hypertarget{interfacemom__debugging_1_1check__redundant}{}\section{mom\+\_\+debugging\+:\+:check\+\_\+redundant Interface Reference}
\label{interfacemom__debugging_1_1check__redundant}\index{mom\+\_\+debugging\+::check\+\_\+redundant@{mom\+\_\+debugging\+::check\+\_\+redundant}}


\subsection{Detailed Description}
Check for consistency between the duplicated points of a C-\/grid vector. 

Definition at line 33 of file M\+O\+M\+\_\+debugging.\+F90.

\subsection*{Private functions}
\begin{DoxyCompactItemize}
\item 
subroutine \mbox{\hyperlink{interfacemom__debugging_1_1check__redundant_a0d21018b63e2ebd49b8219b248d1e20e}{check\+\_\+redundant\+\_\+vc3d}} (mesg, u\+\_\+comp, v\+\_\+comp, G, is, ie, js, je, direction)
\begin{DoxyCompactList}\small\item\em Check for consistency between the duplicated points of a 3-\/D C-\/grid vector. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{interfacemom__debugging_1_1check__redundant_ade773b8868c8871023767ca88e244a64}{check\+\_\+redundant\+\_\+vc2d}} (mesg, u\+\_\+comp, v\+\_\+comp, G, is, ie, js, je, direction)
\begin{DoxyCompactList}\small\item\em Check for consistency between the duplicated points of a 2-\/D C-\/grid vector. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Check for consistency between the duplicated points of a C-\/grid vector. 

Definition at line 33 of file M\+O\+M\+\_\+debugging.\+F90.



\subsection{Functions and subroutines}
\mbox{\Hypertarget{interfacemom__debugging_1_1check__redundant_ade773b8868c8871023767ca88e244a64}\label{interfacemom__debugging_1_1check__redundant_ade773b8868c8871023767ca88e244a64}} 
\index{mom\+\_\+debugging\+::check\+\_\+redundant@{mom\+\_\+debugging\+::check\+\_\+redundant}!check\+\_\+redundant\+\_\+vc2d@{check\+\_\+redundant\+\_\+vc2d}}
\index{check\+\_\+redundant\+\_\+vc2d@{check\+\_\+redundant\+\_\+vc2d}!mom\+\_\+debugging\+::check\+\_\+redundant@{mom\+\_\+debugging\+::check\+\_\+redundant}}
\subsubsection{\texorpdfstring{check\+\_\+redundant\+\_\+vc2d()}{check\_redundant\_vc2d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+debugging\+::check\+\_\+redundant\+::check\+\_\+redundant\+\_\+vc2d (\begin{DoxyParamCaption}\item[{character(len=$\ast$), intent(in)}]{mesg,  }\item[{real, dimension(g\%isdb\+:,g\%jsd\+:), intent(in)}]{u\+\_\+comp,  }\item[{real, dimension(g\%isd\+:,g\%jsdb\+:), intent(in)}]{v\+\_\+comp,  }\item[{type(ocean\+\_\+grid\+\_\+type), intent(inout)}]{G,  }\item[{integer, intent(in), optional}]{is,  }\item[{integer, intent(in), optional}]{ie,  }\item[{integer, intent(in), optional}]{js,  }\item[{integer, intent(in), optional}]{je,  }\item[{integer, intent(in), optional}]{direction }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Check for consistency between the duplicated points of a 2-\/D C-\/grid vector. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em mesg} & An identifying message\\
\hline
\mbox{\tt in,out}  & {\em g} & The ocean\textquotesingle{}s grid structure\\
\hline
\mbox{\tt in}  & {\em u\+\_\+comp} & The u-\/component of the vector to be checked for consistency\\
\hline
\mbox{\tt in}  & {\em v\+\_\+comp} & The u-\/component of the vector to be checked for consistency\\
\hline
\mbox{\tt in}  & {\em is} & The starting i-\/index to check\\
\hline
\mbox{\tt in}  & {\em ie} & The ending i-\/index to check\\
\hline
\mbox{\tt in}  & {\em js} & The starting j-\/index to check\\
\hline
\mbox{\tt in}  & {\em je} & The ending j-\/index to check\\
\hline
\mbox{\tt in}  & {\em direction} & the direction flag to be passed to pass\+\_\+vector \\
\hline
\end{DoxyParams}


Definition at line 136 of file M\+O\+M\+\_\+debugging.\+F90.


\begin{DoxyCode}
136   \textcolor{keywordtype}{character(len=*)},                \textcolor{keywordtype}{intent(in)}    :: mesg\textcolor{comment}{   !< An identifying message}
137   \textcolor{keywordtype}{type}(ocean\_grid\_type),           \textcolor{keywordtype}{intent(inout)} :: G\textcolor{comment}{      !< The ocean's grid structure}
138   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(G%IsdB:,G%jsd:)}, \textcolor{keywordtype}{intent(in)}    :: u\_comp\textcolor{comment}{ !< The u-component of the vector}
139 \textcolor{comment}{                                                           !! to be checked for consistency}
140   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(G%isd:,G%JsdB:)}, \textcolor{keywordtype}{intent(in)}    :: v\_comp\textcolor{comment}{ !< The u-component of the vector}
141 \textcolor{comment}{                                                           !! to be checked for consistency}
142   \textcolor{keywordtype}{integer},               \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: is\textcolor{comment}{     !< The starting i-index to check}
143   \textcolor{keywordtype}{integer},               \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: ie\textcolor{comment}{     !< The ending i-index to check}
144   \textcolor{keywordtype}{integer},               \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: js\textcolor{comment}{     !< The starting j-index to check}
145   \textcolor{keywordtype}{integer},               \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: je\textcolor{comment}{     !< The ending j-index to check}
146   \textcolor{keywordtype}{integer},               \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: direction\textcolor{comment}{ !< the direction flag to be}
147 \textcolor{comment}{                                                           !! passed to pass\_vector}
148   \textcolor{comment}{! Local variables}
149   \textcolor{keywordtype}{real} :: u\_nonsym(G%isd:G%ied,G%jsd:G%jed)
150   \textcolor{keywordtype}{real} :: v\_nonsym(G%isd:G%ied,G%jsd:G%jed)
151   \textcolor{keywordtype}{real} :: u\_resym(G%IsdB:G%IedB,G%jsd:G%jed)
152   \textcolor{keywordtype}{real} :: v\_resym(G%isd:G%ied,G%JsdB:G%JedB)
153   \textcolor{keywordtype}{character(len=128)} :: mesg2
154   \textcolor{keywordtype}{integer} :: i, j, is\_ch, ie\_ch, js\_ch, je\_ch
155   \textcolor{keywordtype}{integer} :: Isq, Ieq, Jsq, Jeq, isd, ied, jsd, jed, IsdB, IedB, JsdB, JedB
156 
157   isq = g%IscB ; ieq = g%IecB ; jsq = g%JscB ; jeq = g%JecB
158   isd = g%isd ; ied = g%ied ; jsd = g%jsd ; jed = g%jed
159   isdb = g%IsdB ; iedb = g%IedB ; jsdb = g%JsdB ; jedb = g%JedB
160 
161   \textcolor{keywordflow}{if} (.not.(\textcolor{keyword}{present}(is) .or. \textcolor{keyword}{present}(ie) .or. \textcolor{keyword}{present}(js) .or. \textcolor{keyword}{present}(je))) \textcolor{keywordflow}{then}
162     \textcolor{comment}{! This only works with symmetric memory, so otherwise return.}
163     \textcolor{keywordflow}{if} ((isd == isdb) .and. (jsd == jsdb)) \textcolor{keywordflow}{return}
164 \textcolor{keywordflow}{  endif}
165 
166   \textcolor{keywordflow}{do} i=isd,ied ; \textcolor{keywordflow}{do} j=jsd,jed
167     u\_nonsym(i,j) = u\_comp(i,j) ; v\_nonsym(i,j) = v\_comp(i,j)
168 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ enddo}
169 
170   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(g%Domain\_aux)) \textcolor{keyword}{call }mom\_error(fatal,\textcolor{stringliteral}{" check\_redundant"}//&
171     \textcolor{stringliteral}{" called with a non-associated auxiliary domain the grid type."})
172   \textcolor{keyword}{call }pass\_vector(u\_nonsym, v\_nonsym, g%Domain\_aux, direction)
173 
174   \textcolor{keywordflow}{do} i=isdb,iedb ; \textcolor{keywordflow}{do} j=jsd,jed ; u\_resym(i,j) = u\_comp(i,j) ;\textcolor{keywordflow}{ enddo} ;\textcolor{keywordflow}{ enddo}
175   \textcolor{keywordflow}{do} i=isd,ied ; \textcolor{keywordflow}{do} j=jsdb,jedb ; v\_resym(i,j) = v\_comp(i,j) ;\textcolor{keywordflow}{ enddo} ;\textcolor{keywordflow}{ enddo}
176   \textcolor{keywordflow}{do} i=isd,ied ; \textcolor{keywordflow}{do} j=jsd,jed
177     u\_resym(i,j) = u\_nonsym(i,j) ; v\_resym(i,j) = v\_nonsym(i,j)
178 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ enddo}
179   \textcolor{keyword}{call }pass\_vector(u\_resym, v\_resym, g%Domain, direction)
180 
181   is\_ch = isq ; ie\_ch = ieq ; js\_ch = jsq ; je\_ch = jeq
182   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(is)) is\_ch = is ; \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(ie)) ie\_ch = ie
183   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(js)) js\_ch = js ; \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(js)) je\_ch = je
184 
185   \textcolor{keywordflow}{do} i=is\_ch,ie\_ch ; \textcolor{keywordflow}{do} j=js\_ch+1,je\_ch
186     \textcolor{keywordflow}{if} (u\_resym(i,j) /= u\_comp(i,j) .and. &
187         redundant\_prints(3) < max\_redundant\_prints) \textcolor{keywordflow}{then}
188       \textcolor{keyword}{write}(mesg2,\textcolor{stringliteral}{'(" redundant u-components",2(1pe12.4)," differ by ", &}
189 \textcolor{stringliteral}{}\textcolor{stringliteral}{                    & 1pe12.4," at i,j = ",2i4," on pe ",i4)'}) &
190            u\_comp(i,j), u\_resym(i,j),u\_comp(i,j)-u\_resym(i,j),i,j,pe\_here()
191       \textcolor{keyword}{write}(0,\textcolor{stringliteral}{'(A130)'}) trim(mesg)//trim(mesg2)
192       redundant\_prints(3) = redundant\_prints(3) + 1
193 \textcolor{keywordflow}{    endif}
194 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ enddo}
195   \textcolor{keywordflow}{do} i=is\_ch+1,ie\_ch ; \textcolor{keywordflow}{do} j=js\_ch,je\_ch
196     \textcolor{keywordflow}{if} (v\_resym(i,j) /= v\_comp(i,j) .and. &
197         redundant\_prints(3) < max\_redundant\_prints) \textcolor{keywordflow}{then}
198       \textcolor{keyword}{write}(mesg2,\textcolor{stringliteral}{'(" redundant v-comps",2(1pe12.4)," differ by ", &}
199 \textcolor{stringliteral}{}\textcolor{stringliteral}{                    & 1pe12.4," at i,j = ",2i4," x,y = ",2(1pe12.4)" on pe ",i4)'}) &
200            v\_comp(i,j), v\_resym(i,j),v\_comp(i,j)-v\_resym(i,j),i,j, &
201            g%geoLonBu(i,j), g%geoLatBu(i,j), pe\_here()
202       \textcolor{keyword}{write}(0,\textcolor{stringliteral}{'(A155)'}) trim(mesg)//trim(mesg2)
203       redundant\_prints(3) = redundant\_prints(3) + 1
204 \textcolor{keywordflow}{    endif}
205 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ enddo}
206 
\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__debugging_1_1check__redundant_a0d21018b63e2ebd49b8219b248d1e20e}\label{interfacemom__debugging_1_1check__redundant_a0d21018b63e2ebd49b8219b248d1e20e}} 
\index{mom\+\_\+debugging\+::check\+\_\+redundant@{mom\+\_\+debugging\+::check\+\_\+redundant}!check\+\_\+redundant\+\_\+vc3d@{check\+\_\+redundant\+\_\+vc3d}}
\index{check\+\_\+redundant\+\_\+vc3d@{check\+\_\+redundant\+\_\+vc3d}!mom\+\_\+debugging\+::check\+\_\+redundant@{mom\+\_\+debugging\+::check\+\_\+redundant}}
\subsubsection{\texorpdfstring{check\+\_\+redundant\+\_\+vc3d()}{check\_redundant\_vc3d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+debugging\+::check\+\_\+redundant\+::check\+\_\+redundant\+\_\+vc3d (\begin{DoxyParamCaption}\item[{character(len=$\ast$), intent(in)}]{mesg,  }\item[{real, dimension(g\%isdb\+:,g\%jsd\+:,\+:), intent(in)}]{u\+\_\+comp,  }\item[{real, dimension(g\%isd\+:,g\%jsdb\+:,\+:), intent(in)}]{v\+\_\+comp,  }\item[{type(ocean\+\_\+grid\+\_\+type), intent(inout)}]{G,  }\item[{integer, intent(in), optional}]{is,  }\item[{integer, intent(in), optional}]{ie,  }\item[{integer, intent(in), optional}]{js,  }\item[{integer, intent(in), optional}]{je,  }\item[{integer, intent(in), optional}]{direction }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Check for consistency between the duplicated points of a 3-\/D C-\/grid vector. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em mesg} & An identifying message\\
\hline
\mbox{\tt in,out}  & {\em g} & The ocean\textquotesingle{}s grid structure\\
\hline
\mbox{\tt in}  & {\em u\+\_\+comp} & The u-\/component of the vector to be checked for consistency\\
\hline
\mbox{\tt in}  & {\em v\+\_\+comp} & The u-\/component of the vector to be checked for consistency\\
\hline
\mbox{\tt in}  & {\em is} & The starting i-\/index to check\\
\hline
\mbox{\tt in}  & {\em ie} & The ending i-\/index to check\\
\hline
\mbox{\tt in}  & {\em js} & The starting j-\/index to check\\
\hline
\mbox{\tt in}  & {\em je} & The ending j-\/index to check\\
\hline
\mbox{\tt in}  & {\em direction} & the direction flag to be passed to pass\+\_\+vector \\
\hline
\end{DoxyParams}


Definition at line 106 of file M\+O\+M\+\_\+debugging.\+F90.


\begin{DoxyCode}
106   \textcolor{keywordtype}{character(len=*)},                    \textcolor{keywordtype}{intent(in)}    :: mesg\textcolor{comment}{   !< An identifying message}
107   \textcolor{keywordtype}{type}(ocean\_grid\_type),               \textcolor{keywordtype}{intent(inout)} :: G\textcolor{comment}{      !< The ocean's grid structure}
108   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(G%IsdB:,G%jsd:,:)},   \textcolor{keywordtype}{intent(in)}    :: u\_comp\textcolor{comment}{ !< The u-component of the vector}
109 \textcolor{comment}{                                                               !! to be checked for consistency}
110   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(G%isd:,G%JsdB:,:)},   \textcolor{keywordtype}{intent(in)}    :: v\_comp\textcolor{comment}{ !< The u-component of the vector}
111 \textcolor{comment}{                                                               !! to be checked for consistency}
112   \textcolor{keywordtype}{integer},                   \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: is\textcolor{comment}{     !< The starting i-index to check}
113   \textcolor{keywordtype}{integer},                   \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: ie\textcolor{comment}{     !< The ending i-index to check}
114   \textcolor{keywordtype}{integer},                   \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: js\textcolor{comment}{     !< The starting j-index to check}
115   \textcolor{keywordtype}{integer},                   \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: je\textcolor{comment}{     !< The ending j-index to check}
116   \textcolor{keywordtype}{integer},                   \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: direction\textcolor{comment}{ !< the direction flag to be}
117 \textcolor{comment}{                                                               !! passed to pass\_vector}
118   \textcolor{comment}{! Local variables}
119   \textcolor{keywordtype}{character(len=24)} :: mesg\_k
120   \textcolor{keywordtype}{integer} :: k
121 
122   \textcolor{keywordflow}{do} k=1,\textcolor{keyword}{size}(u\_comp,3)
123     \textcolor{keywordflow}{if} (k < 10) \textcolor{keywordflow}{then} ; \textcolor{keyword}{write}(mesg\_k,\textcolor{stringliteral}{'(" Layer",i2," ")'}) k
124     \textcolor{keywordflow}{elseif} (k < 100) \textcolor{keywordflow}{then} ; \textcolor{keyword}{write}(mesg\_k,\textcolor{stringliteral}{'(" Layer",i3," ")'}) k
125     \textcolor{keywordflow}{elseif} (k < 1000) \textcolor{keywordflow}{then} ; \textcolor{keyword}{write}(mesg\_k,\textcolor{stringliteral}{'(" Layer",i4," ")'}) k
126     \textcolor{keywordflow}{else} ; \textcolor{keyword}{write}(mesg\_k,\textcolor{stringliteral}{'(" Layer",i9," ")'}) k ;\textcolor{keywordflow}{ endif}
127 
128     \textcolor{keyword}{call }check\_redundant\_vc2d(trim(mesg)//trim(mesg\_k), u\_comp(:,:,k), &
129              v\_comp(:,:,k), g, is, ie, js, je, direction)
130 \textcolor{keywordflow}{  enddo}
\end{DoxyCode}


The documentation for this interface was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
/home/cermak/src/\+M\+O\+M6.\+devrob/src/diagnostics/M\+O\+M\+\_\+debugging.\+F90\end{DoxyCompactItemize}
