\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}{\tt 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{\tt in}  & {\em g} & The ocean\textquotesingle{}s grid structure.\\
\hline
\mbox{\tt in}  & {\em param\+\_\+file} & Parameter file structure \\
\hline
\end{DoxyParams}


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


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