\hypertarget{interfacemom__debugging_1_1check__redundant__c}{}\doxysection{mom\+\_\+debugging\+::check\+\_\+redundant\+\_\+c Interface Reference}
\label{interfacemom__debugging_1_1check__redundant__c}\index{mom\_debugging::check\_redundant\_c@{mom\_debugging::check\_redundant\_c}}


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

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

\doxysubsection*{Private functions}
\begin{DoxyCompactItemize}
\item 
subroutine \mbox{\hyperlink{interfacemom__debugging_1_1check__redundant__c_a31a27b9ddab82c656d1b54fc2da8aa41}{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__c_ab390daccce46d59b59d8d64b115656e7}{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}


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

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



\doxysubsection{Functions and subroutines}
\mbox{\Hypertarget{interfacemom__debugging_1_1check__redundant__c_ab390daccce46d59b59d8d64b115656e7}\label{interfacemom__debugging_1_1check__redundant__c_ab390daccce46d59b59d8d64b115656e7}} 
\index{mom\_debugging::check\_redundant\_c@{mom\_debugging::check\_redundant\_c}!check\_redundant\_vc2d@{check\_redundant\_vc2d}}
\index{check\_redundant\_vc2d@{check\_redundant\_vc2d}!mom\_debugging::check\_redundant\_c@{mom\_debugging::check\_redundant\_c}}
\doxysubsubsection{\texorpdfstring{check\_redundant\_vc2d()}{check\_redundant\_vc2d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+debugging\+::check\+\_\+redundant\+\_\+c\+::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(\mbox{\hyperlink{structmom__grid_1_1ocean__grid__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{\texttt{ in}}  & {\em mesg} & An identifying message \\
\hline
\mbox{\texttt{ in,out}}  & {\em g} & The ocean\textquotesingle{}s grid structure \\
\hline
\mbox{\texttt{ in}}  & {\em u\+\_\+comp} & The u-\/component of the vector to be checked for consistency \\
\hline
\mbox{\texttt{ in}}  & {\em v\+\_\+comp} & The u-\/component of the vector to be checked for consistency \\
\hline
\mbox{\texttt{ in}}  & {\em is} & The starting i-\/index to check \\
\hline
\mbox{\texttt{ in}}  & {\em ie} & The ending i-\/index to check \\
\hline
\mbox{\texttt{ in}}  & {\em js} & The starting j-\/index to check \\
\hline
\mbox{\texttt{ in}}  & {\em je} & The ending j-\/index to check \\
\hline
\mbox{\texttt{ in}}  & {\em direction} & the direction flag to be passed to pass\+\_\+vector \\
\hline
\end{DoxyParams}


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


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

\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__debugging_1_1check__redundant__c_a31a27b9ddab82c656d1b54fc2da8aa41}\label{interfacemom__debugging_1_1check__redundant__c_a31a27b9ddab82c656d1b54fc2da8aa41}} 
\index{mom\_debugging::check\_redundant\_c@{mom\_debugging::check\_redundant\_c}!check\_redundant\_vc3d@{check\_redundant\_vc3d}}
\index{check\_redundant\_vc3d@{check\_redundant\_vc3d}!mom\_debugging::check\_redundant\_c@{mom\_debugging::check\_redundant\_c}}
\doxysubsubsection{\texorpdfstring{check\_redundant\_vc3d()}{check\_redundant\_vc3d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+debugging\+::check\+\_\+redundant\+\_\+c\+::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(\mbox{\hyperlink{structmom__grid_1_1ocean__grid__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{\texttt{ in}}  & {\em mesg} & An identifying message \\
\hline
\mbox{\texttt{ in,out}}  & {\em g} & The ocean\textquotesingle{}s grid structure \\
\hline
\mbox{\texttt{ in}}  & {\em u\+\_\+comp} & The u-\/component of the vector to be checked for consistency \\
\hline
\mbox{\texttt{ in}}  & {\em v\+\_\+comp} & The u-\/component of the vector to be checked for consistency \\
\hline
\mbox{\texttt{ in}}  & {\em is} & The starting i-\/index to check \\
\hline
\mbox{\texttt{ in}}  & {\em ie} & The ending i-\/index to check \\
\hline
\mbox{\texttt{ in}}  & {\em js} & The starting j-\/index to check \\
\hline
\mbox{\texttt{ in}}  & {\em je} & The ending j-\/index to check \\
\hline
\mbox{\texttt{ in}}  & {\em direction} & the direction flag to be passed to pass\+\_\+vector \\
\hline
\end{DoxyParams}


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


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