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


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

\hypertarget{namespacesoliton__initialization_section_soliton}{}\doxysubsection{Description of the equatorial Rossby soliton initial}\label{namespacesoliton__initialization_section_soliton}
conditions \doxysubsection*{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}
\doxysubsection*{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}


\doxysubsection{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}}
\doxysubsubsection{\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{\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 us} & A dimensional unit scaling type \\
\hline
\mbox{\texttt{ out}}  & {\em h} & The thickness that is being initialized \mbox{[}H $\sim$$>$ m or kg m-\/2\mbox{]}. \\
\hline
\end{DoxyParams}


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


\begin{DoxyCode}{0}
\DoxyCodeLine{32   \textcolor{keywordtype}{type}(ocean\_grid\_type),   \textcolor{keywordtype}{intent(in)}  :: G\textcolor{comment}{    !< The ocean's grid structure.}}
\DoxyCodeLine{33   \textcolor{keywordtype}{type}(verticalGrid\_type), \textcolor{keywordtype}{intent(in)}  :: GV\textcolor{comment}{   !< The ocean's vertical grid structure.}}
\DoxyCodeLine{34   \textcolor{keywordtype}{type}(unit\_scale\_type),   \textcolor{keywordtype}{intent(in)}  :: US\textcolor{comment}{   !< A dimensional unit scaling type}}
\DoxyCodeLine{35 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(SZI\_(G),SZJ\_(G),SZK\_(GV))}, \&}
\DoxyCodeLine{36                            \textcolor{keywordtype}{intent(out)} :: h\textcolor{comment}{    !< The thickness that is being initialized [H \string~> m or kg m-\/2].}}
\DoxyCodeLine{37 }
\DoxyCodeLine{38   \textcolor{keywordtype}{integer} :: i, j, k, is, ie, js, je, nz}
\DoxyCodeLine{39 \textcolor{keywordtype}{  real}    :: x, y, x0, y0}
\DoxyCodeLine{40 \textcolor{keywordtype}{  real}    :: val1, val2, val3, val4}
\DoxyCodeLine{41   \textcolor{keywordtype}{character(len=40)} :: verticalCoordinate}
\DoxyCodeLine{42 }
\DoxyCodeLine{43   is = g\%isc ; ie = g\%iec ; js = g\%jsc ; je = g\%jec ; nz = g\%ke}
\DoxyCodeLine{44 }
\DoxyCodeLine{45   \textcolor{keyword}{call }mom\_mesg(\textcolor{stringliteral}{"soliton\_initialization.F90, soliton\_initialize\_thickness: setting thickness"})}
\DoxyCodeLine{46 }
\DoxyCodeLine{47   x0 = 2.0*g\%len\_lon/3.0}
\DoxyCodeLine{48   y0 = 0.0}
\DoxyCodeLine{49   val1 = 0.395}
\DoxyCodeLine{50   val2 = us\%m\_to\_Z * 0.771*(val1*val1)}
\DoxyCodeLine{51 }
\DoxyCodeLine{52   \textcolor{keywordflow}{do} j = g\%jsc,g\%jec ; \textcolor{keywordflow}{do} i = g\%isc,g\%iec}
\DoxyCodeLine{53     \textcolor{keywordflow}{do} k = 1, nz}
\DoxyCodeLine{54       x = g\%geoLonT(i,j)-\/x0}
\DoxyCodeLine{55       y = g\%geoLatT(i,j)-\/y0}
\DoxyCodeLine{56       val3 = exp(-\/val1*x)}
\DoxyCodeLine{57       val4 = val2 * ( 2.0*val3 / (1.0 + (val3*val3)) )**2}
\DoxyCodeLine{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))}
\DoxyCodeLine{59 \textcolor{keywordflow}{    enddo}}
\DoxyCodeLine{60 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ enddo}}
\DoxyCodeLine{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}}
\doxysubsubsection{\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{\texttt{ in}}  & {\em g} & Grid structure \\
\hline
\mbox{\texttt{ out}}  & {\em u} & i-\/component of velocity \mbox{[}L T-\/1 $\sim$$>$ m s-\/1\mbox{]} \\
\hline
\mbox{\texttt{ out}}  & {\em v} & j-\/component of velocity \mbox{[}L T-\/1 $\sim$$>$ m s-\/1\mbox{]} \\
\hline
\mbox{\texttt{ in}}  & {\em h} & Thickness \mbox{[}H $\sim$$>$ m or kg m-\/2\mbox{]} \\
\hline
\mbox{\texttt{ in}}  & {\em us} & A dimensional unit scaling type \\
\hline
\end{DoxyParams}


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


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

\end{DoxyCode}
