\hypertarget{namespacesoliton__initialization}{}\section{soliton\+\_\+initialization Module Reference}
\label{namespacesoliton__initialization}\index{soliton\+\_\+initialization@{soliton\+\_\+initialization}}


\subsection{Detailed Description}
Initial conditions for the Equatorial Rossby soliton test (Boyd). 

\hypertarget{namespacesoliton__initialization_section_soliton}{}\subsection{Description of the equatorial Rossby soliton initial}\label{namespacesoliton__initialization_section_soliton}
conditions \subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine, public \mbox{\hyperlink{namespacesoliton__initialization_aafb0cddd1b46af87cc7dcb5e08c58fa3}{soliton\+\_\+initialize\+\_\+thickness}} (h, G, GV, US)
\begin{DoxyCompactList}\small\item\em Initialization of thicknesses in Equatorial Rossby soliton test. \end{DoxyCompactList}\item 
subroutine, public \mbox{\hyperlink{namespacesoliton__initialization_a0baf019ffa8cbb6754cd197af8a377b8}{soliton\+\_\+initialize\+\_\+velocity}} (u, v, h, G, US)
\begin{DoxyCompactList}\small\item\em Initialization of u and v in the equatorial Rossby soliton test. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{namespacesoliton__initialization_abd5846899bb175c4e2c84986c6e4168b}\label{namespacesoliton__initialization_abd5846899bb175c4e2c84986c6e4168b}} 
character(len=40) \mbox{\hyperlink{namespacesoliton__initialization_abd5846899bb175c4e2c84986c6e4168b}{mdl}} = \char`\"{}soliton\+\_\+initialization\char`\"{}
\begin{DoxyCompactList}\small\item\em This module\textquotesingle{}s name. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{namespacesoliton__initialization_aafb0cddd1b46af87cc7dcb5e08c58fa3}\label{namespacesoliton__initialization_aafb0cddd1b46af87cc7dcb5e08c58fa3}} 
\index{soliton\+\_\+initialization@{soliton\+\_\+initialization}!soliton\+\_\+initialize\+\_\+thickness@{soliton\+\_\+initialize\+\_\+thickness}}
\index{soliton\+\_\+initialize\+\_\+thickness@{soliton\+\_\+initialize\+\_\+thickness}!soliton\+\_\+initialization@{soliton\+\_\+initialization}}
\subsubsection{\texorpdfstring{soliton\+\_\+initialize\+\_\+thickness()}{soliton\_initialize\_thickness()}}
{\footnotesize\ttfamily subroutine, public soliton\+\_\+initialization\+::soliton\+\_\+initialize\+\_\+thickness (\begin{DoxyParamCaption}\item[{real, dimension(szi\+\_\+(g),szj\+\_\+(g),szk\+\_\+(gv)), intent(out)}]{h,  }\item[{type(ocean\+\_\+grid\+\_\+type), intent(in)}]{G,  }\item[{type(verticalgrid\+\_\+type), intent(in)}]{GV,  }\item[{type(unit\+\_\+scale\+\_\+type), intent(in)}]{US }\end{DoxyParamCaption})}



Initialization of thicknesses in Equatorial Rossby soliton test. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em g} & The ocean\textquotesingle{}s grid structure.\\
\hline
\mbox{\tt in}  & {\em gv} & The ocean\textquotesingle{}s vertical grid structure.\\
\hline
\mbox{\tt in}  & {\em us} & A dimensional unit scaling type\\
\hline
\mbox{\tt out}  & {\em h} & The thickness that is being initialized \mbox{[}H $\sim$$>$ m or kg m-\/2\mbox{]}. \\
\hline
\end{DoxyParams}


Definition at line 32 of file soliton\+\_\+initialization.\+F90.


\begin{DoxyCode}
32   \textcolor{keywordtype}{type}(ocean\_grid\_type),   \textcolor{keywordtype}{intent(in)}  :: G\textcolor{comment}{    !< The ocean's grid structure.}
33   \textcolor{keywordtype}{type}(verticalGrid\_type), \textcolor{keywordtype}{intent(in)}  :: GV\textcolor{comment}{   !< The ocean's vertical grid structure.}
34   \textcolor{keywordtype}{type}(unit\_scale\_type),   \textcolor{keywordtype}{intent(in)}  :: US\textcolor{comment}{   !< A dimensional unit scaling type}
35   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(SZI\_(G),SZJ\_(G),SZK\_(GV))}, &
36                            \textcolor{keywordtype}{intent(out)} :: h\textcolor{comment}{    !< The thickness that is being initialized [H ~> m or kg
       m-2].}
37 
38   \textcolor{keywordtype}{integer} :: i, j, k, is, ie, js, je, nz
39   \textcolor{keywordtype}{real}    :: x, y, x0, y0
40   \textcolor{keywordtype}{real}    :: val1, val2, val3, val4
41   \textcolor{keywordtype}{character(len=40)} :: verticalCoordinate
42 
43   is = g%isc ; ie = g%iec ; js = g%jsc ; je = g%jec ; nz = g%ke
44 
45   \textcolor{keyword}{call }mom\_mesg(\textcolor{stringliteral}{"soliton\_initialization.F90, soliton\_initialize\_thickness: setting thickness"})
46 
47   x0 = 2.0*g%len\_lon/3.0
48   y0 = 0.0
49   val1 = 0.395
50   val2 = us%m\_to\_Z * 0.771*(val1*val1)
51 
52   \textcolor{keywordflow}{do} j = g%jsc,g%jec ; \textcolor{keywordflow}{do} i = g%isc,g%iec
53     \textcolor{keywordflow}{do} k = 1, nz
54       x = g%geoLonT(i,j)-x0
55       y = g%geoLatT(i,j)-y0
56       val3 = exp(-val1*x)
57       val4 = val2 * ( 2.0*val3 / (1.0 + (val3*val3)) )**2
58       h(i,j,k) = gv%Z\_to\_H * (0.25*val4*(6.0*y*y + 3.0) * exp(-0.5*y*y) + g%bathyT(i,j))
59 \textcolor{keywordflow}{    enddo}
60 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ enddo}
61 
\end{DoxyCode}
\mbox{\Hypertarget{namespacesoliton__initialization_a0baf019ffa8cbb6754cd197af8a377b8}\label{namespacesoliton__initialization_a0baf019ffa8cbb6754cd197af8a377b8}} 
\index{soliton\+\_\+initialization@{soliton\+\_\+initialization}!soliton\+\_\+initialize\+\_\+velocity@{soliton\+\_\+initialize\+\_\+velocity}}
\index{soliton\+\_\+initialize\+\_\+velocity@{soliton\+\_\+initialize\+\_\+velocity}!soliton\+\_\+initialization@{soliton\+\_\+initialization}}
\subsubsection{\texorpdfstring{soliton\+\_\+initialize\+\_\+velocity()}{soliton\_initialize\_velocity()}}
{\footnotesize\ttfamily subroutine, public soliton\+\_\+initialization\+::soliton\+\_\+initialize\+\_\+velocity (\begin{DoxyParamCaption}\item[{real, dimension(szib\+\_\+(g),szj\+\_\+(g),szk\+\_\+(g)), intent(out)}]{u,  }\item[{real, dimension(szi\+\_\+(g),szjb\+\_\+(g),szk\+\_\+(g)), intent(out)}]{v,  }\item[{real, dimension(szi\+\_\+(g),szj\+\_\+(g), szk\+\_\+(g)), intent(in)}]{h,  }\item[{type(ocean\+\_\+grid\+\_\+type), intent(in)}]{G,  }\item[{type(unit\+\_\+scale\+\_\+type), intent(in)}]{US }\end{DoxyParamCaption})}



Initialization of u and v in the equatorial Rossby soliton test. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em g} & Grid structure\\
\hline
\mbox{\tt out}  & {\em u} & i-\/component of velocity \mbox{[}L T-\/1 $\sim$$>$ m s-\/1\mbox{]}\\
\hline
\mbox{\tt out}  & {\em v} & j-\/component of velocity \mbox{[}L T-\/1 $\sim$$>$ m s-\/1\mbox{]}\\
\hline
\mbox{\tt in}  & {\em h} & Thickness \mbox{[}H $\sim$$>$ m or kg m-\/2\mbox{]}\\
\hline
\mbox{\tt in}  & {\em us} & A dimensional unit scaling type \\
\hline
\end{DoxyParams}


Definition at line 67 of file soliton\+\_\+initialization.\+F90.


\begin{DoxyCode}
67   \textcolor{keywordtype}{type}(ocean\_grid\_type),                     \textcolor{keywordtype}{intent(in)}  :: G\textcolor{comment}{  !< Grid structure}
68   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(SZIB\_(G),SZJ\_(G),SZK\_(G))}, \textcolor{keywordtype}{intent(out)} :: u\textcolor{comment}{  !< i-component of velocity [L T-1 ~> m s-1]}
69   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(SZI\_(G),SZJB\_(G),SZK\_(G))}, \textcolor{keywordtype}{intent(out)} :: v\textcolor{comment}{  !< j-component of velocity [L T-1 ~> m s-1]}
70   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(SZI\_(G),SZJ\_(G), SZK\_(G))}, \textcolor{keywordtype}{intent(in)}  :: h\textcolor{comment}{  !< Thickness [H ~> m or kg m-2]}
71   \textcolor{keywordtype}{type}(unit\_scale\_type),                     \textcolor{keywordtype}{intent(in)}  :: US\textcolor{comment}{ !< A dimensional unit scaling type}
72 
73   \textcolor{comment}{! Local variables}
74   \textcolor{keywordtype}{real}    :: x, x0 \textcolor{comment}{! Positions in the same units as geoLonT.}
75   \textcolor{keywordtype}{real}    :: y, y0 \textcolor{comment}{! Positions in the same units as geoLatT.}
76   \textcolor{keywordtype}{real}    :: val1  \textcolor{comment}{! A zonal decay scale in the inverse of the units of geoLonT.}
77   \textcolor{keywordtype}{real}    :: val2  \textcolor{comment}{! An overall velocity amplitude [L T-1 ~> m s-1]}
78   \textcolor{keywordtype}{real}    :: val3  \textcolor{comment}{! A decay factor [nondim]}
79   \textcolor{keywordtype}{real}    :: val4  \textcolor{comment}{! The local velocity amplitude [L T-1 ~> m s-1]}
80   \textcolor{keywordtype}{integer} :: i, j, k, is, ie, js, je, nz
81 
82   is = g%isc ; ie = g%iec ; js = g%jsc ; je = g%jec ; nz = g%ke
83 
84   x0 = 2.0*g%len\_lon/3.0
85   y0 = 0.0
86   val1 = 0.395
87   val2 = us%m\_s\_to\_L\_T * 0.771*(val1*val1)
88 
89   v(:,:,:) = 0.0
90   u(:,:,:) = 0.0
91 
92   \textcolor{keywordflow}{do} j = g%jsc,g%jec ; \textcolor{keywordflow}{do} i = g%isc-1,g%iec+1
93     \textcolor{keywordflow}{do} k = 1, nz
94       x = 0.5*(g%geoLonT(i+1,j)+g%geoLonT(i,j))-x0
95       y = 0.5*(g%geoLatT(i+1,j)+g%geoLatT(i,j))-y0
96       val3 = exp(-val1*x)
97       val4 = val2*((2.0*val3/(1.0+(val3*val3)))**2)
98       u(i,j,k) = 0.25*val4*(6.0*y*y-9.0) * exp(-0.5*y*y)
99 \textcolor{keywordflow}{    enddo}
100 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ enddo}
101   \textcolor{keywordflow}{do} j = g%jsc-1,g%jec+1 ; \textcolor{keywordflow}{do} i = g%isc,g%iec
102     \textcolor{keywordflow}{do} k = 1, nz
103       x = 0.5*(g%geoLonT(i,j+1)+g%geoLonT(i,j))-x0
104       y = 0.5*(g%geoLatT(i,j+1)+g%geoLatT(i,j))-y0
105       val3 = exp(-val1*x)
106       val4 = val2*((2.0*val3/(1.0+(val3*val3)))**2)
107       v(i,j,k) = 2.0*val4*y*(-2.0*val1*tanh(val1*x)) * exp(-0.5*y*y)
108 \textcolor{keywordflow}{    enddo}
109 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ enddo}
110 
\end{DoxyCode}
