\hypertarget{namespacesupercritical__initialization}{}\section{supercritical\+\_\+initialization Module Reference}
\label{namespacesupercritical__initialization}\index{supercritical\_initialization@{supercritical\_initialization}}


\subsection{Detailed Description}
The \char`\"{}super critical\char`\"{} configuration. 

The module configures the model for the \char`\"{}supercritical\char`\"{} experiment. \href{https://marine.rutgers.edu/po/index.php?model=test-problems&title=supercritical}{\texttt{ https\+://marine.\+rutgers.\+edu/po/index.\+php?model=test-\/problems\&title=supercritical}}. \subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine, public \mbox{\hyperlink{namespacesupercritical__initialization_a7c17fa62db2775d3958b2c9661731c2c}{supercritical\+\_\+set\+\_\+obc\+\_\+data}} (O\+BC, G, param\+\_\+file)
\begin{DoxyCompactList}\small\item\em This subroutine sets the properties of flow at open boundary conditions. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{namespacesupercritical__initialization_a7c17fa62db2775d3958b2c9661731c2c}\label{namespacesupercritical__initialization_a7c17fa62db2775d3958b2c9661731c2c}} 
\index{supercritical\_initialization@{supercritical\_initialization}!supercritical\_set\_obc\_data@{supercritical\_set\_obc\_data}}
\index{supercritical\_set\_obc\_data@{supercritical\_set\_obc\_data}!supercritical\_initialization@{supercritical\_initialization}}
\subsubsection{\texorpdfstring{supercritical\_set\_obc\_data()}{supercritical\_set\_obc\_data()}}
{\footnotesize\ttfamily subroutine, public supercritical\+\_\+initialization\+::supercritical\+\_\+set\+\_\+obc\+\_\+data (\begin{DoxyParamCaption}\item[{type(ocean\+\_\+obc\+\_\+type), pointer}]{O\+BC,  }\item[{type(ocean\+\_\+grid\+\_\+type), intent(in)}]{G,  }\item[{type(param\+\_\+file\+\_\+type), intent(in)}]{param\+\_\+file }\end{DoxyParamCaption})}



This subroutine sets the properties of flow 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 param\+\_\+file} & Parameter file structure \\
\hline
\end{DoxyParams}


Definition at line 27 of file supercritical\+\_\+initialization.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{27   \textcolor{keywordtype}{type}(ocean\_OBC\_type),   \textcolor{keywordtype}{pointer}    :: OBC\textcolor{comment}{  !< This open boundary condition type specifies}}
\DoxyCodeLine{28 \textcolor{comment}{                                             !! whether, where, and what open boundary}}
\DoxyCodeLine{29 \textcolor{comment}{                                             !! conditions are used.}}
\DoxyCodeLine{30   \textcolor{keywordtype}{type}(ocean\_grid\_type),  \textcolor{keywordtype}{intent(in)} :: G\textcolor{comment}{    !< The ocean's grid structure.}}
\DoxyCodeLine{31   \textcolor{keywordtype}{type}(param\_file\_type),  \textcolor{keywordtype}{intent(in)} :: param\_file\textcolor{comment}{ !< Parameter file structure}}
\DoxyCodeLine{32   \textcolor{comment}{! Local variables}}
\DoxyCodeLine{33   \textcolor{keywordtype}{character(len=40)}  :: mdl = \textcolor{stringliteral}{"supercritical\_set\_OBC\_data"} \textcolor{comment}{! This subroutine's name.}}
\DoxyCodeLine{34 \textcolor{keywordtype}{  real} :: zonal\_flow \textcolor{comment}{! Inflow speed [L T-1 ~> m s-1]}}
\DoxyCodeLine{35   \textcolor{keywordtype}{integer} :: i, j, k, l}
\DoxyCodeLine{36   \textcolor{keywordtype}{integer} :: isd, ied, jsd, jed, IsdB, IedB, JsdB, JedB}
\DoxyCodeLine{37   \textcolor{keywordtype}{type}(OBC\_segment\_type), \textcolor{keywordtype}{pointer} :: segment => null() \textcolor{comment}{! pointer to segment type list}}
\DoxyCodeLine{38 }
\DoxyCodeLine{39   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(obc)) \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{'supercritical\_initialization.F90: '}// \&}
\DoxyCodeLine{40         \textcolor{stringliteral}{'supercritical\_set\_OBC\_data() was called but OBC type was not initialized!'})}
\DoxyCodeLine{41 }
\DoxyCodeLine{42   \textcolor{keyword}{call }get\_param(param\_file, mdl, \textcolor{stringliteral}{"SUPERCRITICAL\_ZONAL\_FLOW"}, zonal\_flow, \&}
\DoxyCodeLine{43                  \textcolor{stringliteral}{"Constant zonal flow imposed at upstream open boundary."}, \&}
\DoxyCodeLine{44                  units=\textcolor{stringliteral}{"m/s"}, default=8.57, scale=g\%US\%m\_s\_to\_L\_T)}
\DoxyCodeLine{45 }
\DoxyCodeLine{46   \textcolor{keywordflow}{do} l=1, obc\%number\_of\_segments}
\DoxyCodeLine{47     segment => obc\%segment(l)}
\DoxyCodeLine{48     \textcolor{keywordflow}{if} (.not. segment\%on\_pe) cycle}
\DoxyCodeLine{49     \textcolor{keywordflow}{if} (segment\%gradient) cycle}
\DoxyCodeLine{50     \textcolor{keywordflow}{if} (segment\%oblique .and. .not. segment\%nudged .and. .not. segment\%Flather) cycle}
\DoxyCodeLine{51 }
\DoxyCodeLine{52     \textcolor{keywordflow}{if} (segment\%is\_E\_or\_W) \textcolor{keywordflow}{then}}
\DoxyCodeLine{53       jsd = segment\%HI\%jsd ; jed = segment\%HI\%jed}
\DoxyCodeLine{54       isdb = segment\%HI\%IsdB ; iedb = segment\%HI\%IedB}
\DoxyCodeLine{55       \textcolor{keywordflow}{do} k=1,g\%ke}
\DoxyCodeLine{56         \textcolor{keywordflow}{do} j=jsd,jed ; \textcolor{keywordflow}{do} i=isdb,iedb}
\DoxyCodeLine{57           \textcolor{keywordflow}{if} (segment\%specified .or. segment\%nudged) \textcolor{keywordflow}{then}}
\DoxyCodeLine{58             segment\%normal\_vel(i,j,k) = zonal\_flow}
\DoxyCodeLine{59 \textcolor{keywordflow}{          endif}}
\DoxyCodeLine{60           \textcolor{keywordflow}{if} (segment\%specified) \textcolor{keywordflow}{then}}
\DoxyCodeLine{61             segment\%normal\_trans(i,j,k) = zonal\_flow * g\%dyCu(i,j)}
\DoxyCodeLine{62 \textcolor{keywordflow}{          endif}}
\DoxyCodeLine{63 \textcolor{keywordflow}{        enddo} ;\textcolor{keywordflow}{ enddo}}
\DoxyCodeLine{64 \textcolor{keywordflow}{      enddo}}
\DoxyCodeLine{65       \textcolor{keywordflow}{do} j=jsd,jed ; \textcolor{keywordflow}{do} i=isdb,iedb}
\DoxyCodeLine{66         segment\%normal\_vel\_bt(i,j) = zonal\_flow}
\DoxyCodeLine{67 \textcolor{keywordflow}{      enddo} ;\textcolor{keywordflow}{ enddo}}
\DoxyCodeLine{68     \textcolor{keywordflow}{else}}
\DoxyCodeLine{69       isd = segment\%HI\%isd ; ied = segment\%HI\%ied}
\DoxyCodeLine{70       jsdb = segment\%HI\%JsdB ; jedb = segment\%HI\%JedB}
\DoxyCodeLine{71       \textcolor{keywordflow}{do} j=jsdb,jedb ; \textcolor{keywordflow}{do} i=isd,ied}
\DoxyCodeLine{72         segment\%normal\_vel\_bt(i,j) = 0.0}
\DoxyCodeLine{73 \textcolor{keywordflow}{      enddo} ;\textcolor{keywordflow}{ enddo}}
\DoxyCodeLine{74 \textcolor{keywordflow}{    endif}}
\DoxyCodeLine{75 \textcolor{keywordflow}{  enddo}}
\DoxyCodeLine{76 }

\end{DoxyCode}
