\hypertarget{namespacedyed__channel__initialization}{}\doxysection{dyed\+\_\+channel\+\_\+initialization Module Reference}
\label{namespacedyed__channel__initialization}\index{dyed\_channel\_initialization@{dyed\_channel\_initialization}}


\doxysubsection{Detailed Description}
Initialization for the dyed\+\_\+channel configuration. 

Setting dyes, one for painting the inflow on each side. \doxysubsection*{Data Types}
\begin{DoxyCompactItemize}
\item 
type \mbox{\hyperlink{structdyed__channel__initialization_1_1dyed__channel__obc__cs}{dyed\+\_\+channel\+\_\+obc\+\_\+cs}}
\begin{DoxyCompactList}\small\item\em Control structure for dyed-\/channel open boundaries. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
logical function, public \mbox{\hyperlink{namespacedyed__channel__initialization_a3b2f27c5213cbae5174f1e841d5f0d97}{register\+\_\+dyed\+\_\+channel\+\_\+obc}} (param\+\_\+file, CS, O\+B\+C\+\_\+\+Reg)
\begin{DoxyCompactList}\small\item\em Add dyed channel to O\+BC registry. \end{DoxyCompactList}\item 
subroutine, public \mbox{\hyperlink{namespacedyed__channel__initialization_a11908b8cf33f19e69a11a46107d9b2d6}{dyed\+\_\+channel\+\_\+obc\+\_\+end}} (CS)
\begin{DoxyCompactList}\small\item\em Clean up the dyed\+\_\+channel O\+BC from registry. \end{DoxyCompactList}\item 
subroutine, public \mbox{\hyperlink{namespacedyed__channel__initialization_a61f1363b7fcad22750a7cea035aada98}{dyed\+\_\+channel\+\_\+set\+\_\+obc\+\_\+tracer\+\_\+data}} (O\+BC, G, GV, param\+\_\+file, tr\+\_\+\+Reg)
\begin{DoxyCompactList}\small\item\em This subroutine sets the dye and flow properties at open boundary conditions. \end{DoxyCompactList}\item 
subroutine, public \mbox{\hyperlink{namespacedyed__channel__initialization_a5e9457402221f33d9e8dd4495246e051}{dyed\+\_\+channel\+\_\+update\+\_\+flow}} (O\+BC, CS, G, Time)
\begin{DoxyCompactList}\small\item\em This subroutine updates the long-\/channel flow. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
integer \mbox{\hyperlink{namespacedyed__channel__initialization_a3e5386324e634b73ca2c9e53a1f85775}{ntr}} = 0
\begin{DoxyCompactList}\small\item\em Number of dye tracers. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{namespacedyed__channel__initialization_a11908b8cf33f19e69a11a46107d9b2d6}\label{namespacedyed__channel__initialization_a11908b8cf33f19e69a11a46107d9b2d6}} 
\index{dyed\_channel\_initialization@{dyed\_channel\_initialization}!dyed\_channel\_obc\_end@{dyed\_channel\_obc\_end}}
\index{dyed\_channel\_obc\_end@{dyed\_channel\_obc\_end}!dyed\_channel\_initialization@{dyed\_channel\_initialization}}
\doxysubsubsection{\texorpdfstring{dyed\_channel\_obc\_end()}{dyed\_channel\_obc\_end()}}
{\footnotesize\ttfamily subroutine, public dyed\+\_\+channel\+\_\+initialization\+::dyed\+\_\+channel\+\_\+obc\+\_\+end (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structdyed__channel__initialization_1_1dyed__channel__obc__cs}{dyed\+\_\+channel\+\_\+obc\+\_\+cs}}), pointer}]{CS }\end{DoxyParamCaption})}



Clean up the dyed\+\_\+channel O\+BC from registry. 


\begin{DoxyParams}{Parameters}
{\em cs} & Dyed channel control structure. \\
\hline
\end{DoxyParams}


Definition at line 73 of file dyed\+\_\+channel\+\_\+initialization.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{74   \textcolor{keywordtype}{type}(dyed\_channel\_OBC\_CS), \textcolor{keywordtype}{pointer} :: CS\textcolor{comment}{    !< Dyed channel control structure.}}
\DoxyCodeLine{75 }
\DoxyCodeLine{76   \textcolor{keywordflow}{if} (\textcolor{keyword}{associated}(cs)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{77     \textcolor{keyword}{deallocate}(cs)}
\DoxyCodeLine{78 \textcolor{keywordflow}{  endif}}

\end{DoxyCode}
\mbox{\Hypertarget{namespacedyed__channel__initialization_a61f1363b7fcad22750a7cea035aada98}\label{namespacedyed__channel__initialization_a61f1363b7fcad22750a7cea035aada98}} 
\index{dyed\_channel\_initialization@{dyed\_channel\_initialization}!dyed\_channel\_set\_obc\_tracer\_data@{dyed\_channel\_set\_obc\_tracer\_data}}
\index{dyed\_channel\_set\_obc\_tracer\_data@{dyed\_channel\_set\_obc\_tracer\_data}!dyed\_channel\_initialization@{dyed\_channel\_initialization}}
\doxysubsubsection{\texorpdfstring{dyed\_channel\_set\_obc\_tracer\_data()}{dyed\_channel\_set\_obc\_tracer\_data()}}
{\footnotesize\ttfamily subroutine, public dyed\+\_\+channel\+\_\+initialization\+::dyed\+\_\+channel\+\_\+set\+\_\+obc\+\_\+tracer\+\_\+data (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__open__boundary_1_1ocean__obc__type}{ocean\+\_\+obc\+\_\+type}}), pointer}]{O\+BC,  }\item[{type(\mbox{\hyperlink{structmom__grid_1_1ocean__grid__type}{ocean\+\_\+grid\+\_\+type}}), intent(in)}]{G,  }\item[{type(\mbox{\hyperlink{structmom__verticalgrid_1_1verticalgrid__type}{verticalgrid\+\_\+type}}), intent(in)}]{GV,  }\item[{type(\mbox{\hyperlink{structmom__file__parser_1_1param__file__type}{param\+\_\+file\+\_\+type}}), intent(in)}]{param\+\_\+file,  }\item[{type(\mbox{\hyperlink{structmom__tracer__registry_1_1tracer__registry__type}{tracer\+\_\+registry\+\_\+type}}), pointer}]{tr\+\_\+\+Reg }\end{DoxyParamCaption})}



This subroutine sets the dye and flow properties at open boundary conditions. 


\begin{DoxyParams}[1]{Parameters}
 & {\em obc} & This open boundary condition type specifies whether, where, and what open boundary conditions are used. \\
\hline
\mbox{\texttt{ in}}  & {\em g} & The ocean\textquotesingle{}s grid structure. \\
\hline
\mbox{\texttt{ in}}  & {\em gv} & The ocean\textquotesingle{}s vertical grid structure. \\
\hline
\mbox{\texttt{ in}}  & {\em param\+\_\+file} & A structure indicating the open file to parse for model parameter values. \\
\hline
 & {\em tr\+\_\+reg} & Tracer registry. \\
\hline
\end{DoxyParams}


Definition at line 82 of file dyed\+\_\+channel\+\_\+initialization.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{83   \textcolor{keywordtype}{type}(ocean\_OBC\_type),       \textcolor{keywordtype}{pointer}    :: OBC\textcolor{comment}{ !< This open boundary condition type specifies}}
\DoxyCodeLine{84 \textcolor{comment}{                                                !! whether, where, and what open boundary}}
\DoxyCodeLine{85 \textcolor{comment}{                                                !! conditions are used.}}
\DoxyCodeLine{86   \textcolor{keywordtype}{type}(ocean\_grid\_type),      \textcolor{keywordtype}{intent(in)} :: G\textcolor{comment}{   !< The ocean's grid structure.}}
\DoxyCodeLine{87   \textcolor{keywordtype}{type}(verticalGrid\_type),    \textcolor{keywordtype}{intent(in)} :: GV\textcolor{comment}{  !< The ocean's vertical grid structure.}}
\DoxyCodeLine{88   \textcolor{keywordtype}{type}(param\_file\_type),      \textcolor{keywordtype}{intent(in)} :: param\_file\textcolor{comment}{ !< A structure indicating the open file}}
\DoxyCodeLine{89 \textcolor{comment}{                                                !! to parse for model parameter values.}}
\DoxyCodeLine{90   \textcolor{keywordtype}{type}(tracer\_registry\_type), \textcolor{keywordtype}{pointer}    :: tr\_Reg\textcolor{comment}{ !< Tracer registry.}}
\DoxyCodeLine{91   \textcolor{comment}{! Local variables}}
\DoxyCodeLine{92   \textcolor{keywordtype}{character(len=40)}  :: mdl = \textcolor{stringliteral}{"{}dyed\_channel\_set\_OBC\_tracer\_data"{}} \textcolor{comment}{! This subroutine's name.}}
\DoxyCodeLine{93   \textcolor{keywordtype}{character(len=80)}  :: name, longname}
\DoxyCodeLine{94   \textcolor{keywordtype}{integer} :: i, j, k, l, itt, isd, ied, jsd, jed, m, n}
\DoxyCodeLine{95   \textcolor{keywordtype}{integer} :: IsdB, IedB, JsdB, JedB}
\DoxyCodeLine{96 \textcolor{keywordtype}{  real} :: dye}
\DoxyCodeLine{97   \textcolor{keywordtype}{type}(OBC\_segment\_type), \textcolor{keywordtype}{pointer} :: segment => null()}
\DoxyCodeLine{98   \textcolor{keywordtype}{type}(tracer\_type), \textcolor{keywordtype}{pointer}      :: tr\_ptr => null()}
\DoxyCodeLine{99 }
\DoxyCodeLine{100   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(obc)) \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{'dyed\_channel\_initialization.F90: '}// \&}
\DoxyCodeLine{101         \textcolor{stringliteral}{'dyed\_channel\_set\_OBC\_data() was called but OBC type was not initialized!'})}
\DoxyCodeLine{102 }
\DoxyCodeLine{103   \textcolor{keyword}{call }get\_param(param\_file, mdl, \textcolor{stringliteral}{"{}NUM\_DYE\_TRACERS"{}}, ntr, \&}
\DoxyCodeLine{104                  \textcolor{stringliteral}{"{}The number of dye tracers in this run. Each tracer "{}}//\&}
\DoxyCodeLine{105                  \textcolor{stringliteral}{"{}should have a separate boundary segment."{}}, default=0,   \&}
\DoxyCodeLine{106                  do\_not\_log=.true.)}
\DoxyCodeLine{107 }
\DoxyCodeLine{108   \textcolor{keywordflow}{if} (obc\%number\_of\_segments < ntr) \textcolor{keywordflow}{then}}
\DoxyCodeLine{109     \textcolor{keyword}{call }mom\_error(warning, \textcolor{stringliteral}{"{}Error in dyed\_obc segment setup"{}})}
\DoxyCodeLine{110     \textcolor{keywordflow}{return}   \textcolor{comment}{!!! Need a better error message here}}
\DoxyCodeLine{111 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{112 }
\DoxyCodeLine{113 \textcolor{comment}{! ! Set the inflow values of the dyes, one per segment.}}
\DoxyCodeLine{114 \textcolor{comment}{! ! We know the order: north, south, east, west}}
\DoxyCodeLine{115   \textcolor{keywordflow}{do} m=1,ntr}
\DoxyCodeLine{116     \textcolor{keyword}{write}(name,\textcolor{stringliteral}{'("{}dye\_"{},I2.2)'}) m}
\DoxyCodeLine{117     \textcolor{keyword}{write}(longname,\textcolor{stringliteral}{'("{}Concentration of dyed\_obc Tracer "{},I2.2, "{} on segment "{},I2.2)'}) m, m}
\DoxyCodeLine{118     \textcolor{keyword}{call }tracer\_name\_lookup(tr\_reg, tr\_ptr, name)}
\DoxyCodeLine{119 }
\DoxyCodeLine{120     \textcolor{keywordflow}{do} n=1,obc\%number\_of\_segments}
\DoxyCodeLine{121       \textcolor{keywordflow}{if} (n == m) \textcolor{keywordflow}{then}}
\DoxyCodeLine{122         dye = 1.0}
\DoxyCodeLine{123       \textcolor{keywordflow}{else}}
\DoxyCodeLine{124         dye = 0.0}
\DoxyCodeLine{125 \textcolor{keywordflow}{      endif}}
\DoxyCodeLine{126       \textcolor{keyword}{call }register\_segment\_tracer(tr\_ptr, param\_file, gv, \&}
\DoxyCodeLine{127                                    obc\%segment(n), obc\_scalar=dye)}
\DoxyCodeLine{128 \textcolor{keywordflow}{    enddo}}
\DoxyCodeLine{129 \textcolor{keywordflow}{  enddo}}
\DoxyCodeLine{130 }

\end{DoxyCode}
\mbox{\Hypertarget{namespacedyed__channel__initialization_a5e9457402221f33d9e8dd4495246e051}\label{namespacedyed__channel__initialization_a5e9457402221f33d9e8dd4495246e051}} 
\index{dyed\_channel\_initialization@{dyed\_channel\_initialization}!dyed\_channel\_update\_flow@{dyed\_channel\_update\_flow}}
\index{dyed\_channel\_update\_flow@{dyed\_channel\_update\_flow}!dyed\_channel\_initialization@{dyed\_channel\_initialization}}
\doxysubsubsection{\texorpdfstring{dyed\_channel\_update\_flow()}{dyed\_channel\_update\_flow()}}
{\footnotesize\ttfamily subroutine, public dyed\+\_\+channel\+\_\+initialization\+::dyed\+\_\+channel\+\_\+update\+\_\+flow (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__open__boundary_1_1ocean__obc__type}{ocean\+\_\+obc\+\_\+type}}), pointer}]{O\+BC,  }\item[{type(\mbox{\hyperlink{structdyed__channel__initialization_1_1dyed__channel__obc__cs}{dyed\+\_\+channel\+\_\+obc\+\_\+cs}}), pointer}]{CS,  }\item[{type(\mbox{\hyperlink{structmom__grid_1_1ocean__grid__type}{ocean\+\_\+grid\+\_\+type}}), intent(in)}]{G,  }\item[{type(time\+\_\+type), intent(in)}]{Time }\end{DoxyParamCaption})}



This subroutine updates the long-\/channel flow. 


\begin{DoxyParams}[1]{Parameters}
 & {\em obc} & This open boundary condition type specifies whether, where, and what open boundary conditions are used. \\
\hline
 & {\em cs} & Dyed channel control structure. \\
\hline
\mbox{\texttt{ in}}  & {\em g} & The ocean\textquotesingle{}s grid structure. \\
\hline
\mbox{\texttt{ in}}  & {\em time} & model time. \\
\hline
\end{DoxyParams}


Definition at line 134 of file dyed\+\_\+channel\+\_\+initialization.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{135   \textcolor{keywordtype}{type}(ocean\_OBC\_type),       \textcolor{keywordtype}{pointer}    :: OBC\textcolor{comment}{ !< This open boundary condition type specifies}}
\DoxyCodeLine{136 \textcolor{comment}{                                                !! whether, where, and what open boundary}}
\DoxyCodeLine{137 \textcolor{comment}{                                                !! conditions are used.}}
\DoxyCodeLine{138   \textcolor{keywordtype}{type}(dyed\_channel\_OBC\_CS),  \textcolor{keywordtype}{pointer}    :: CS\textcolor{comment}{  !< Dyed channel control structure.}}
\DoxyCodeLine{139   \textcolor{keywordtype}{type}(ocean\_grid\_type),      \textcolor{keywordtype}{intent(in)} :: G\textcolor{comment}{   !< The ocean's grid structure.}}
\DoxyCodeLine{140   \textcolor{keywordtype}{type}(time\_type),            \textcolor{keywordtype}{intent(in)} :: Time\textcolor{comment}{ !< model time.}}
\DoxyCodeLine{141   \textcolor{comment}{! Local variables}}
\DoxyCodeLine{142   \textcolor{keywordtype}{character(len=40)}  :: mdl = \textcolor{stringliteral}{"{}dyed\_channel\_update\_flow"{}} \textcolor{comment}{! This subroutine's name.}}
\DoxyCodeLine{143   \textcolor{keywordtype}{character(len=80)}  :: name}
\DoxyCodeLine{144 \textcolor{keywordtype}{  real} :: flow, time\_sec, PI}
\DoxyCodeLine{145   \textcolor{keywordtype}{integer} :: i, j, k, l, itt, isd, ied, jsd, jed, m, n}
\DoxyCodeLine{146   \textcolor{keywordtype}{integer} :: IsdB, IedB, JsdB, JedB}
\DoxyCodeLine{147   \textcolor{keywordtype}{type}(OBC\_segment\_type), \textcolor{keywordtype}{pointer} :: segment => null()}
\DoxyCodeLine{148 }
\DoxyCodeLine{149   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(obc)) \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{'dyed\_channel\_initialization.F90: '}// \&}
\DoxyCodeLine{150         \textcolor{stringliteral}{'dyed\_channel\_update\_flow() was called but OBC type was not initialized!'})}
\DoxyCodeLine{151 }
\DoxyCodeLine{152   time\_sec = time\_type\_to\_real(time)}
\DoxyCodeLine{153   pi = 4.0*atan(1.0)}
\DoxyCodeLine{154 }
\DoxyCodeLine{155   \textcolor{keywordflow}{do} l=1, obc\%number\_of\_segments}
\DoxyCodeLine{156     segment => obc\%segment(l)}
\DoxyCodeLine{157     \textcolor{keywordflow}{if} (.not. segment\%on\_pe) cycle}
\DoxyCodeLine{158     \textcolor{keywordflow}{if} (segment\%gradient) cycle}
\DoxyCodeLine{159     \textcolor{keywordflow}{if} (segment\%oblique .and. .not. segment\%nudged .and. .not. segment\%Flather) cycle}
\DoxyCodeLine{160 }
\DoxyCodeLine{161     \textcolor{keywordflow}{if} (segment\%is\_E\_or\_W) \textcolor{keywordflow}{then}}
\DoxyCodeLine{162       jsd = segment\%HI\%jsd ; jed = segment\%HI\%jed}
\DoxyCodeLine{163       isdb = segment\%HI\%IsdB ; iedb = segment\%HI\%IedB}
\DoxyCodeLine{164       \textcolor{keywordflow}{if} (cs\%frequency == 0.0) \textcolor{keywordflow}{then}}
\DoxyCodeLine{165         flow = g\%US\%m\_s\_to\_L\_T*cs\%zonal\_flow}
\DoxyCodeLine{166       \textcolor{keywordflow}{else}}
\DoxyCodeLine{167         flow = g\%US\%m\_s\_to\_L\_T*cs\%zonal\_flow + cs\%tidal\_amp * cos(2 * pi * cs\%frequency * time\_sec)}
\DoxyCodeLine{168 \textcolor{keywordflow}{      endif}}
\DoxyCodeLine{169       \textcolor{keywordflow}{do} k=1,g\%ke}
\DoxyCodeLine{170         \textcolor{keywordflow}{do} j=jsd,jed ; \textcolor{keywordflow}{do} i=isdb,iedb}
\DoxyCodeLine{171           \textcolor{keywordflow}{if} (segment\%specified .or. segment\%nudged) \textcolor{keywordflow}{then}}
\DoxyCodeLine{172             segment\%normal\_vel(i,j,k) = flow}
\DoxyCodeLine{173 \textcolor{keywordflow}{          endif}}
\DoxyCodeLine{174           \textcolor{keywordflow}{if} (segment\%specified) \textcolor{keywordflow}{then}}
\DoxyCodeLine{175             segment\%normal\_trans(i,j,k) = flow * g\%dyCu(i,j)}
\DoxyCodeLine{176 \textcolor{keywordflow}{          endif}}
\DoxyCodeLine{177 \textcolor{keywordflow}{        enddo} ;\textcolor{keywordflow}{ enddo}}
\DoxyCodeLine{178 \textcolor{keywordflow}{      enddo}}
\DoxyCodeLine{179       \textcolor{keywordflow}{do} j=jsd,jed ; \textcolor{keywordflow}{do} i=isdb,iedb}
\DoxyCodeLine{180         segment\%normal\_vel\_bt(i,j) = flow}
\DoxyCodeLine{181 \textcolor{keywordflow}{      enddo} ;\textcolor{keywordflow}{ enddo}}
\DoxyCodeLine{182     \textcolor{keywordflow}{else}}
\DoxyCodeLine{183       isd = segment\%HI\%isd ; ied = segment\%HI\%ied}
\DoxyCodeLine{184       jsdb = segment\%HI\%JsdB ; jedb = segment\%HI\%JedB}
\DoxyCodeLine{185       \textcolor{keywordflow}{do} j=jsdb,jedb ; \textcolor{keywordflow}{do} i=isd,ied}
\DoxyCodeLine{186         segment\%normal\_vel\_bt(i,j) = 0.0}
\DoxyCodeLine{187 \textcolor{keywordflow}{      enddo} ;\textcolor{keywordflow}{ enddo}}
\DoxyCodeLine{188 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{189 \textcolor{keywordflow}{  enddo}}
\DoxyCodeLine{190 }

\end{DoxyCode}
\mbox{\Hypertarget{namespacedyed__channel__initialization_a3b2f27c5213cbae5174f1e841d5f0d97}\label{namespacedyed__channel__initialization_a3b2f27c5213cbae5174f1e841d5f0d97}} 
\index{dyed\_channel\_initialization@{dyed\_channel\_initialization}!register\_dyed\_channel\_obc@{register\_dyed\_channel\_obc}}
\index{register\_dyed\_channel\_obc@{register\_dyed\_channel\_obc}!dyed\_channel\_initialization@{dyed\_channel\_initialization}}
\doxysubsubsection{\texorpdfstring{register\_dyed\_channel\_obc()}{register\_dyed\_channel\_obc()}}
{\footnotesize\ttfamily logical function, public dyed\+\_\+channel\+\_\+initialization\+::register\+\_\+dyed\+\_\+channel\+\_\+obc (\begin{DoxyParamCaption}\item[{type(\mbox{\hyperlink{structmom__file__parser_1_1param__file__type}{param\+\_\+file\+\_\+type}}), intent(in)}]{param\+\_\+file,  }\item[{type(\mbox{\hyperlink{structdyed__channel__initialization_1_1dyed__channel__obc__cs}{dyed\+\_\+channel\+\_\+obc\+\_\+cs}}), pointer}]{CS,  }\item[{type(\mbox{\hyperlink{structmom__open__boundary_1_1obc__registry__type}{obc\+\_\+registry\+\_\+type}}), pointer}]{O\+B\+C\+\_\+\+Reg }\end{DoxyParamCaption})}



Add dyed channel to O\+BC registry. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em param\+\_\+file} & parameter file. \\
\hline
 & {\em cs} & Dyed channel control structure. \\
\hline
 & {\em obc\+\_\+reg} & O\+BC registry. \\
\hline
\end{DoxyParams}


Definition at line 40 of file dyed\+\_\+channel\+\_\+initialization.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{41   \textcolor{keywordtype}{type}(param\_file\_type),     \textcolor{keywordtype}{intent(in)} :: param\_file\textcolor{comment}{ !< parameter file.}}
\DoxyCodeLine{42   \textcolor{keywordtype}{type}(dyed\_channel\_OBC\_CS), \textcolor{keywordtype}{pointer}    :: CS\textcolor{comment}{         !< Dyed channel control structure.}}
\DoxyCodeLine{43   \textcolor{keywordtype}{type}(OBC\_registry\_type),   \textcolor{keywordtype}{pointer}    :: OBC\_Reg\textcolor{comment}{    !< OBC registry.}}
\DoxyCodeLine{44   \textcolor{comment}{! Local variables}}
\DoxyCodeLine{45   \textcolor{keywordtype}{logical}                               :: register\_dyed\_channel\_OBC}
\DoxyCodeLine{46   \textcolor{keywordtype}{character(len=32)}  :: casename = \textcolor{stringliteral}{"{}dyed channel"{}}     \textcolor{comment}{! This case's name.}}
\DoxyCodeLine{47   \textcolor{keywordtype}{character(len=40)}  :: mdl = \textcolor{stringliteral}{"{}register\_dyed\_channel\_OBC"{}} \textcolor{comment}{! This subroutine's name.}}
\DoxyCodeLine{48 }
\DoxyCodeLine{49   \textcolor{keywordflow}{if} (\textcolor{keyword}{associated}(cs)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{50     \textcolor{keyword}{call }mom\_error(warning, \textcolor{stringliteral}{"{}register\_dyed\_channel\_OBC called with an "{}}// \&}
\DoxyCodeLine{51                             \textcolor{stringliteral}{"{}associated control structure."{}})}
\DoxyCodeLine{52     \textcolor{keywordflow}{return}}
\DoxyCodeLine{53 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{54   \textcolor{keyword}{allocate}(cs)}
\DoxyCodeLine{55 }
\DoxyCodeLine{56   \textcolor{keyword}{call }get\_param(param\_file, mdl, \textcolor{stringliteral}{"{}CHANNEL\_MEAN\_FLOW"{}}, cs\%zonal\_flow, \&}
\DoxyCodeLine{57                  \textcolor{stringliteral}{"{}Mean zonal flow imposed at upstream open boundary."{}}, \&}
\DoxyCodeLine{58                  units=\textcolor{stringliteral}{"{}m/s"{}}, default=8.57)}
\DoxyCodeLine{59   \textcolor{keyword}{call }get\_param(param\_file, mdl, \textcolor{stringliteral}{"{}CHANNEL\_TIDAL\_AMP"{}}, cs\%tidal\_amp, \&}
\DoxyCodeLine{60                  \textcolor{stringliteral}{"{}Sloshing amplitude imposed at upstream open boundary."{}}, \&}
\DoxyCodeLine{61                  units=\textcolor{stringliteral}{"{}m/s"{}}, default=0.0)}
\DoxyCodeLine{62   \textcolor{keyword}{call }get\_param(param\_file, mdl, \textcolor{stringliteral}{"{}CHANNEL\_FLOW\_FREQUENCY"{}}, cs\%frequency, \&}
\DoxyCodeLine{63                  \textcolor{stringliteral}{"{}Frequency of oscillating zonal flow."{}}, \&}
\DoxyCodeLine{64                  units=\textcolor{stringliteral}{"{}s-\/1"{}}, default=0.0)}
\DoxyCodeLine{65 }
\DoxyCodeLine{66   \textcolor{comment}{! Register the open boundaries.}}
\DoxyCodeLine{67   \textcolor{keyword}{call }register\_obc(casename, param\_file, obc\_reg)}
\DoxyCodeLine{68   register\_dyed\_channel\_obc = .true.}
\DoxyCodeLine{69 }

\end{DoxyCode}


\doxysubsection{Variable Documentation}
\mbox{\Hypertarget{namespacedyed__channel__initialization_a3e5386324e634b73ca2c9e53a1f85775}\label{namespacedyed__channel__initialization_a3e5386324e634b73ca2c9e53a1f85775}} 
\index{dyed\_channel\_initialization@{dyed\_channel\_initialization}!ntr@{ntr}}
\index{ntr@{ntr}!dyed\_channel\_initialization@{dyed\_channel\_initialization}}
\doxysubsubsection{\texorpdfstring{ntr}{ntr}}
{\footnotesize\ttfamily integer dyed\+\_\+channel\+\_\+initialization\+::ntr = 0}



Number of dye tracers. 

\begin{DoxyRefDesc}{Todo}
\item[\mbox{\hyperlink{todo__todo000010}{Todo}}]This is a module variable. Move this variable into the control structure. \end{DoxyRefDesc}


Definition at line 34 of file dyed\+\_\+channel\+\_\+initialization.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{34 \textcolor{keywordtype}{integer} :: ntr = 0\textcolor{comment}{ !< Number of dye tracers}}

\end{DoxyCode}
