\hypertarget{namespacesloshing__initialization}{}\section{sloshing\+\_\+initialization Module Reference}
\label{namespacesloshing__initialization}\index{sloshing\+\_\+initialization@{sloshing\+\_\+initialization}}


\subsection{Detailed Description}
Initialization for the \char`\"{}sloshing\char`\"{} internal waves configuration. 

The module configures the model for the non-\/rotating sloshing test case. \subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine, public \mbox{\hyperlink{namespacesloshing__initialization_a0ecf019d4e63415fc16ce5ca4158f7f3}{sloshing\+\_\+initialize\+\_\+topography}} (D, G, param\+\_\+file, max\+\_\+depth)
\begin{DoxyCompactList}\small\item\em Initialization of topography. \end{DoxyCompactList}\item 
subroutine, public \mbox{\hyperlink{namespacesloshing__initialization_a5f999277fd41bc2730d6ef1dffffdb59}{sloshing\+\_\+initialize\+\_\+thickness}} (h, G, GV, US, param\+\_\+file, just\+\_\+read\+\_\+params)
\begin{DoxyCompactList}\small\item\em Initialization of thicknesses This routine is called when T\+H\+I\+C\+K\+N\+E\+S\+S\+\_\+\+C\+O\+N\+F\+IG is set to \textquotesingle{}sloshing\textquotesingle{}. \end{DoxyCompactList}\item 
subroutine, public \mbox{\hyperlink{namespacesloshing__initialization_a7806e9a52f01ac49906e7285e2c2bb3b}{sloshing\+\_\+initialize\+\_\+temperature\+\_\+salinity}} (T, S, h, G, GV, param\+\_\+file, eqn\+\_\+of\+\_\+state, just\+\_\+read\+\_\+params)
\begin{DoxyCompactList}\small\item\em Initialization of temperature and salinity. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{namespacesloshing__initialization_a7806e9a52f01ac49906e7285e2c2bb3b}\label{namespacesloshing__initialization_a7806e9a52f01ac49906e7285e2c2bb3b}} 
\index{sloshing\+\_\+initialization@{sloshing\+\_\+initialization}!sloshing\+\_\+initialize\+\_\+temperature\+\_\+salinity@{sloshing\+\_\+initialize\+\_\+temperature\+\_\+salinity}}
\index{sloshing\+\_\+initialize\+\_\+temperature\+\_\+salinity@{sloshing\+\_\+initialize\+\_\+temperature\+\_\+salinity}!sloshing\+\_\+initialization@{sloshing\+\_\+initialization}}
\subsubsection{\texorpdfstring{sloshing\+\_\+initialize\+\_\+temperature\+\_\+salinity()}{sloshing\_initialize\_temperature\_salinity()}}
{\footnotesize\ttfamily subroutine, public sloshing\+\_\+initialization\+::sloshing\+\_\+initialize\+\_\+temperature\+\_\+salinity (\begin{DoxyParamCaption}\item[{real, dimension( g \%isd\+: g \%ied, g \%jsd\+: g \%jed,  g \%ke), intent(out)}]{T,  }\item[{real, dimension( g \%isd\+: g \%ied, g \%jsd\+: g \%jed,  g \%ke), intent(out)}]{S,  }\item[{real, dimension( g \%isd\+: g \%ied, g \%jsd\+: g \%jed,  g \%ke), intent(in)}]{h,  }\item[{type(ocean\+\_\+grid\+\_\+type), intent(in)}]{G,  }\item[{type(verticalgrid\+\_\+type), intent(in)}]{GV,  }\item[{type(param\+\_\+file\+\_\+type), intent(in)}]{param\+\_\+file,  }\item[{type(eos\+\_\+type), pointer}]{eqn\+\_\+of\+\_\+state,  }\item[{logical, intent(in), optional}]{just\+\_\+read\+\_\+params }\end{DoxyParamCaption})}



Initialization of temperature and salinity. 

This subroutine initializes linear profiles for T and S according to reference surface layer salinity and temperature and a specified range. Note that the linear distribution is set up with respect to the layer number, not the physical position).


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em g} & Ocean grid structure.\\
\hline
\mbox{\tt in}  & {\em gv} & The ocean\textquotesingle{}s vertical grid structure.\\
\hline
\mbox{\tt out}  & {\em t} & Potential temperature \mbox{[}degC\mbox{]}.\\
\hline
\mbox{\tt out}  & {\em s} & Salinity \mbox{[}ppt\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em h} & Layer thickness \mbox{[}H $\sim$$>$ m or kg m-\/2\mbox{]}.\\
\hline
\mbox{\tt in}  & {\em param\+\_\+file} & A structure indicating the open file to parse for model parameter values.\\
\hline
 & {\em eqn\+\_\+of\+\_\+state} & Equation of state structure.\\
\hline
\mbox{\tt in}  & {\em just\+\_\+read\+\_\+params} & If present and true, this call will only read parameters without changing h. \\
\hline
\end{DoxyParams}


Definition at line 181 of file sloshing\+\_\+initialization.\+F90.


\begin{DoxyCode}
181   \textcolor{keywordtype}{type}(ocean\_grid\_type),                     \textcolor{keywordtype}{intent(in)}  :: G\textcolor{comment}{ !< Ocean grid structure.}
182   \textcolor{keywordtype}{type}(verticalGrid\_type),                   \textcolor{keywordtype}{intent(in)}  :: GV\textcolor{comment}{ !< The ocean's vertical grid structure.}
183   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(SZI\_(G),SZJ\_(G), SZK\_(G))}, \textcolor{keywordtype}{intent(out)} :: T\textcolor{comment}{ !< Potential temperature [degC].}
184   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(SZI\_(G),SZJ\_(G), SZK\_(G))}, \textcolor{keywordtype}{intent(out)} :: S\textcolor{comment}{ !< Salinity [ppt].}
185   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(SZI\_(G),SZJ\_(G), SZK\_(G))}, \textcolor{keywordtype}{intent(in)}  :: h\textcolor{comment}{ !< Layer thickness [H ~> m or kg m-2].}
186   \textcolor{keywordtype}{type}(param\_file\_type),                     \textcolor{keywordtype}{intent(in)}  :: param\_file\textcolor{comment}{ !< A structure indicating the}
187 \textcolor{comment}{                                                            !! open file to parse for model}
188 \textcolor{comment}{                                                            !! parameter values.}
189   \textcolor{keywordtype}{type}(EOS\_type),                            \textcolor{keywordtype}{pointer}     :: eqn\_of\_state\textcolor{comment}{ !< Equation of state structure.}
190   \textcolor{keywordtype}{logical},       \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: just\_read\_params\textcolor{comment}{ !< If present and true, this call will}
191 \textcolor{comment}{                                                      !! only read parameters without changing h.}
192 
193   \textcolor{keywordtype}{integer} :: i, j, k, is, ie, js, je, nz
194   \textcolor{keywordtype}{real}    :: delta\_S, delta\_T
195   \textcolor{keywordtype}{real}    :: S\_ref, T\_ref;      \textcolor{comment}{! Reference salinity and temerature within}
196                                 \textcolor{comment}{! surface layer}
197   \textcolor{keywordtype}{real}    :: S\_range, T\_range;  \textcolor{comment}{! Range of salinities and temperatures over the}
198                                 \textcolor{comment}{! vertical}
199   \textcolor{keywordtype}{integer} :: kdelta
200   \textcolor{keywordtype}{real}    :: deltah
201   \textcolor{keywordtype}{real}    :: xi0, xi1
202   \textcolor{keywordtype}{logical} :: just\_read    \textcolor{comment}{! If true, just read parameters but set nothing.}
203   \textcolor{keywordtype}{character(len=40)}  :: mdl = \textcolor{stringliteral}{"initialize\_temp\_salt\_linear"} \textcolor{comment}{! This subroutine's}
204                                                             \textcolor{comment}{! name.}
205 
206   is = g%isc ; ie = g%iec ; js = g%jsc ; je = g%jec ; nz = g%ke
207 
208   just\_read = .false. ; \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(just\_read\_params)) just\_read = just\_read\_params
209 
210   \textcolor{keyword}{call }get\_param(param\_file, mdl, \textcolor{stringliteral}{"S\_REF"}, s\_ref, \textcolor{stringliteral}{'Reference value for salinity'}, &
211                  default=35.0, units=\textcolor{stringliteral}{'1e-3'}, do\_not\_log=just\_read)
212   \textcolor{keyword}{call }get\_param(param\_file, mdl, \textcolor{stringliteral}{"T\_REF"}, t\_ref, \textcolor{stringliteral}{'Reference value for temperature'}, &
213                  units=\textcolor{stringliteral}{'degC'}, fail\_if\_missing=.not.just\_read, do\_not\_log=just\_read)
214 
215   \textcolor{comment}{! The default is to assume an increase by 2 ppt for the salinity and a uniform temperature.}
216   \textcolor{keyword}{call }get\_param(param\_file, mdl,\textcolor{stringliteral}{"S\_RANGE"},s\_range,\textcolor{stringliteral}{'Initial salinity range.'}, &
217                  units=\textcolor{stringliteral}{'1e-3'}, default=2.0, do\_not\_log=just\_read)
218   \textcolor{keyword}{call }get\_param(param\_file, mdl,\textcolor{stringliteral}{"T\_RANGE"},t\_range,\textcolor{stringliteral}{'Initial temperature range'}, &
219                  units=\textcolor{stringliteral}{'degC'}, default=0.0, do\_not\_log=just\_read)
220 
221   \textcolor{keywordflow}{if} (just\_read) \textcolor{keywordflow}{return} \textcolor{comment}{! All run-time parameters have been read, so return.}
222 
223   \textcolor{comment}{! Prescribe salinity}
224   \textcolor{comment}{!delta\_S = S\_range / ( G%ke - 1.0 )}
225 
226   \textcolor{comment}{!S(:,:,1) = S\_ref}
227   \textcolor{comment}{!do k = 2,G%ke}
228   \textcolor{comment}{!  S(:,:,k) = S(:,:,k-1) + delta\_S}
229   \textcolor{comment}{!enddo}
230 
231   deltah = g%max\_depth / nz
232   \textcolor{keywordflow}{do} j=js,je ; \textcolor{keywordflow}{do} i=is,ie
233     xi0 = 0.0
234     \textcolor{keywordflow}{do} k = 1,nz
235       xi1 = xi0 + deltah / g%max\_depth \textcolor{comment}{! =  xi0 + 1.0 / real(nz)}
236       s(i,j,k) = 34.0 + 0.5 * s\_range * (xi0 + xi1)
237       xi0 = xi1
238 \textcolor{keywordflow}{    enddo}
239 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ enddo}
240 
241   \textcolor{comment}{! Prescribe temperature}
242   delta\_t = t\_range / ( g%ke - 1.0 )
243 
244   t(:,:,1) = t\_ref
245   \textcolor{keywordflow}{do} k = 2,g%ke
246     t(:,:,k) = t(:,:,k-1) + delta\_t
247 \textcolor{keywordflow}{  enddo}
248   kdelta = 2
249   t(:,:,g%ke/2 - (kdelta-1):g%ke/2 + kdelta) = 1.0
250 
\end{DoxyCode}
\mbox{\Hypertarget{namespacesloshing__initialization_a5f999277fd41bc2730d6ef1dffffdb59}\label{namespacesloshing__initialization_a5f999277fd41bc2730d6ef1dffffdb59}} 
\index{sloshing\+\_\+initialization@{sloshing\+\_\+initialization}!sloshing\+\_\+initialize\+\_\+thickness@{sloshing\+\_\+initialize\+\_\+thickness}}
\index{sloshing\+\_\+initialize\+\_\+thickness@{sloshing\+\_\+initialize\+\_\+thickness}!sloshing\+\_\+initialization@{sloshing\+\_\+initialization}}
\subsubsection{\texorpdfstring{sloshing\+\_\+initialize\+\_\+thickness()}{sloshing\_initialize\_thickness()}}
{\footnotesize\ttfamily subroutine, public sloshing\+\_\+initialization\+::sloshing\+\_\+initialize\+\_\+thickness (\begin{DoxyParamCaption}\item[{real, dimension( g \%isd\+: g \%ied, g \%jsd\+: g \%jed, gv \%ke), 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,  }\item[{type(param\+\_\+file\+\_\+type), intent(in)}]{param\+\_\+file,  }\item[{logical, intent(in), optional}]{just\+\_\+read\+\_\+params }\end{DoxyParamCaption})}



Initialization of thicknesses This routine is called when T\+H\+I\+C\+K\+N\+E\+S\+S\+\_\+\+C\+O\+N\+F\+IG is set to \textquotesingle{}sloshing\textquotesingle{}. 

This routine initializes layer positions to set off a sloshing motion in the zonal direction in a rectangular basin. All layers have initially the same thickness but all interfaces (except bottom and sea surface) are displaced according to a half-\/period cosine, with maximum value on the left and minimum value on the right. This sets off a regular sloshing motion.


\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
\mbox{\tt in}  & {\em param\+\_\+file} & A structure indicating the open file to parse for model parameter values.\\
\hline
\mbox{\tt in}  & {\em just\+\_\+read\+\_\+params} & If present and true, this call will only read parameters without changing h. \\
\hline
\end{DoxyParams}


Definition at line 57 of file sloshing\+\_\+initialization.\+F90.


\begin{DoxyCode}
57   \textcolor{keywordtype}{type}(ocean\_grid\_type),   \textcolor{keywordtype}{intent(in)}  :: G\textcolor{comment}{           !< The ocean's grid structure.}
58   \textcolor{keywordtype}{type}(verticalGrid\_type), \textcolor{keywordtype}{intent(in)}  :: GV\textcolor{comment}{          !< The ocean's vertical grid structure.}
59   \textcolor{keywordtype}{type}(unit\_scale\_type),   \textcolor{keywordtype}{intent(in)}  :: US\textcolor{comment}{          !< A dimensional unit scaling type}
60   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(SZI\_(G),SZJ\_(G),SZK\_(GV))}, &
61                            \textcolor{keywordtype}{intent(out)} :: h\textcolor{comment}{           !< The thickness that is being initialized [H ~> m or
       kg m-2].}
62   \textcolor{keywordtype}{type}(param\_file\_type),   \textcolor{keywordtype}{intent(in)}  :: param\_file\textcolor{comment}{  !< A structure indicating the open file}
63 \textcolor{comment}{                                                      !! to parse for model parameter values.}
64   \textcolor{keywordtype}{logical},       \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}  :: just\_read\_params\textcolor{comment}{ !< If present and true, this call will}
65 \textcolor{comment}{                                                      !! only read parameters without changing h.}
66 
67   \textcolor{keywordtype}{real}    :: displ(SZK\_(G)+1)   \textcolor{comment}{! The interface displacement in depth units.}
68   \textcolor{keywordtype}{real}    :: z\_unif(SZK\_(G)+1)  \textcolor{comment}{! Fractional uniform interface heights [nondim].}
69   \textcolor{keywordtype}{real}    :: z\_inter(SZK\_(G)+1) \textcolor{comment}{! Interface heights, in depth units.}
70   \textcolor{keywordtype}{real}    :: a0                 \textcolor{comment}{! The displacement amplitude in depth units.}
71   \textcolor{keywordtype}{real}    :: weight\_z           \textcolor{comment}{! A (misused?) depth-space weighting, in inconsistent units.}
72   \textcolor{keywordtype}{real}    :: x1, y1, x2, y2     \textcolor{comment}{! Dimensonless parameters.}
73   \textcolor{keywordtype}{real}    :: x, t               \textcolor{comment}{! Dimensionless depth coordinates?}
74   \textcolor{keywordtype}{logical} :: use\_IC\_bug         \textcolor{comment}{! If true, set the initial conditions retaining an old bug.}
75   \textcolor{keywordtype}{logical} :: just\_read          \textcolor{comment}{! If true, just read parameters but set nothing.}
76   \textcolor{comment}{! This include declares and sets the variable "version".}
77 \textcolor{preprocessor}{# include "version\_variable.h"}
78 \textcolor{preprocessor}{}  \textcolor{keywordtype}{character(len=40)}  :: mdl = \textcolor{stringliteral}{"sloshing\_initialization"}\textcolor{comment}{ !< This module's name.}
79 
80   \textcolor{keywordtype}{integer} :: i, j, k, is, ie, js, je, nx, nz
81 
82   is = g%isc ; ie = g%iec ; js = g%jsc ; je = g%jec ; nz = g%ke
83 
84   just\_read = .false. ; \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(just\_read\_params)) just\_read = just\_read\_params
85   \textcolor{keywordflow}{if} (.not.just\_read) \textcolor{keyword}{call }log\_version(param\_file, mdl, version, \textcolor{stringliteral}{""})
86   \textcolor{keyword}{call }get\_param(param\_file, mdl, \textcolor{stringliteral}{"SLOSHING\_IC\_AMPLITUDE"}, a0, &
87                  \textcolor{stringliteral}{"Initial amplitude of sloshing internal interface height "}//&
88                  \textcolor{stringliteral}{"displacements it the sloshing test case."}, &
89                  units=\textcolor{stringliteral}{'m'}, default=75.0, scale=us%m\_to\_Z, do\_not\_log=just\_read)
90   \textcolor{keyword}{call }get\_param(param\_file, mdl, \textcolor{stringliteral}{"SLOSHING\_IC\_BUG"}, use\_ic\_bug, &
91                  \textcolor{stringliteral}{"If true, use code with a bug to set the sloshing initial conditions."}, &
92                  default=.false., do\_not\_log=just\_read)
93 
94   \textcolor{keywordflow}{if} (just\_read) \textcolor{keywordflow}{return} \textcolor{comment}{! All run-time parameters have been read, so return.}
95 
96   \textcolor{comment}{! Define thicknesses}
97   \textcolor{keywordflow}{do} j=g%jsc,g%jec ; \textcolor{keywordflow}{do} i=g%isc,g%iec
98 
99     \textcolor{comment}{! Define uniform interfaces}
100     \textcolor{keywordflow}{do} k = 0,nz
101       z\_unif(k+1) = -\textcolor{keywordtype}{real}(k)/\textcolor{keywordtype}{real}(nz)
102 \textcolor{keywordflow}{    enddo}
103 
104     \textcolor{comment}{! 1. Define stratification}
105     \textcolor{keywordflow}{do} k = 1,nz+1
106 
107       \textcolor{comment}{! Thin pycnocline in the middle}
108       \textcolor{comment}{!z\_inter(k) = (2.0**(n-1)) * (z\_unif(k) + 0.5)**n - 0.5}
109 
110       \textcolor{comment}{! Thin pycnocline in the middle (piecewise linear profile)}
111       x1 = 0.30; y1 = 0.48; x2 = 0.70; y2 = 0.52
112 
113       x = -z\_unif(k)
114 
115       \textcolor{keywordflow}{if} ( x <= x1 ) \textcolor{keywordflow}{then}
116         t = y1*x/x1
117       \textcolor{keywordflow}{elseif} ( (x > x1 ) .and. ( x < x2 )) \textcolor{keywordflow}{then}
118         t = y1 + (y2-y1) * (x-x1) / (x2-x1)
119       \textcolor{keywordflow}{else}
120         t = y2 + (1.0-y2) * (x-x2) / (1.0-x2)
121 \textcolor{keywordflow}{      endif}
122 
123       t = - z\_unif(k)
124 
125       z\_inter(k) = -t * g%max\_depth
126 
127 \textcolor{keywordflow}{    enddo}
128 
129     \textcolor{comment}{! 2. Define displacement}
130     \textcolor{comment}{! a0 is set via get\_param; by default a0 is a 75m Displacement amplitude in depth units.}
131     \textcolor{keywordflow}{do} k = 1,nz+1
132 
133       weight\_z = - 4.0 * ( z\_unif(k) + 0.5 )**2 + 1.0
134 
135       x = g%geoLonT(i,j) / g%len\_lon
136       \textcolor{keywordflow}{if} (use\_ic\_bug) \textcolor{keywordflow}{then}
137         displ(k) = a0 * cos(acos(-1.0)*x) + weight\_z * us%m\_to\_Z
138       \textcolor{keywordflow}{else}
139         displ(k) = a0 * cos(acos(-1.0)*x) * weight\_z
140 \textcolor{keywordflow}{      endif}
141 
142       \textcolor{keywordflow}{if} ( k == 1 ) \textcolor{keywordflow}{then}
143         displ(k) = 0.0
144 \textcolor{keywordflow}{      endif}
145 
146       \textcolor{keywordflow}{if} ( k == nz+1 ) \textcolor{keywordflow}{then}
147         displ(k) = 0.0
148 \textcolor{keywordflow}{      endif}
149 
150       z\_inter(k) = z\_inter(k) + displ(k)
151 
152 \textcolor{keywordflow}{    enddo}
153 
154     \textcolor{comment}{! 3. The last interface must coincide with the seabed}
155     z\_inter(nz+1) = -g%bathyT(i,j)
156     \textcolor{comment}{! Modify interface heights to make sure all thicknesses are strictly positive}
157     \textcolor{keywordflow}{do} k = nz,1,-1
158       \textcolor{keywordflow}{if} ( z\_inter(k) < (z\_inter(k+1) + gv%Angstrom\_Z) ) \textcolor{keywordflow}{then}
159         z\_inter(k) = z\_inter(k+1) + gv%Angstrom\_Z
160 \textcolor{keywordflow}{      endif}
161 \textcolor{keywordflow}{    enddo}
162 
163     \textcolor{comment}{! 4. Define layers}
164     \textcolor{keywordflow}{do} k = 1,nz
165       h(i,j,k) = gv%Z\_to\_H * (z\_inter(k) - z\_inter(k+1))
166 \textcolor{keywordflow}{    enddo}
167 
168 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ enddo}
169 
\end{DoxyCode}
\mbox{\Hypertarget{namespacesloshing__initialization_a0ecf019d4e63415fc16ce5ca4158f7f3}\label{namespacesloshing__initialization_a0ecf019d4e63415fc16ce5ca4158f7f3}} 
\index{sloshing\+\_\+initialization@{sloshing\+\_\+initialization}!sloshing\+\_\+initialize\+\_\+topography@{sloshing\+\_\+initialize\+\_\+topography}}
\index{sloshing\+\_\+initialize\+\_\+topography@{sloshing\+\_\+initialize\+\_\+topography}!sloshing\+\_\+initialization@{sloshing\+\_\+initialization}}
\subsubsection{\texorpdfstring{sloshing\+\_\+initialize\+\_\+topography()}{sloshing\_initialize\_topography()}}
{\footnotesize\ttfamily subroutine, public sloshing\+\_\+initialization\+::sloshing\+\_\+initialize\+\_\+topography (\begin{DoxyParamCaption}\item[{real, dimension(g\%isd\+:g\%ied,g\%jsd\+:g\%jed), intent(out)}]{D,  }\item[{type(dyn\+\_\+horgrid\+\_\+type), intent(in)}]{G,  }\item[{type(param\+\_\+file\+\_\+type), intent(in)}]{param\+\_\+file,  }\item[{real, intent(in)}]{max\+\_\+depth }\end{DoxyParamCaption})}



Initialization of topography. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em g} & The dynamic horizontal grid type\\
\hline
\mbox{\tt out}  & {\em d} & Ocean bottom depth in the units of depth\+\_\+max\\
\hline
\mbox{\tt in}  & {\em param\+\_\+file} & Parameter file structure\\
\hline
\mbox{\tt in}  & {\em max\+\_\+depth} & Maximum ocean depth in arbitrary units \\
\hline
\end{DoxyParams}


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


\begin{DoxyCode}
32   \textcolor{keywordtype}{type}(dyn\_horgrid\_type),  \textcolor{keywordtype}{intent(in)}  :: G\textcolor{comment}{ !< The dynamic horizontal grid type}
33   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(G%isd:G%ied,G%jsd:G%jed)}, &
34                            \textcolor{keywordtype}{intent(out)} :: D\textcolor{comment}{ !< Ocean bottom depth in the units of depth\_max}
35   \textcolor{keywordtype}{type}(param\_file\_type),   \textcolor{keywordtype}{intent(in)}  :: param\_file\textcolor{comment}{ !< Parameter file structure}
36   \textcolor{keywordtype}{real},                    \textcolor{keywordtype}{intent(in)}  :: max\_depth\textcolor{comment}{ !< Maximum ocean depth in arbitrary units}
37 
38   \textcolor{comment}{! Local variables}
39   \textcolor{keywordtype}{integer}   :: i, j
40 
41   \textcolor{keywordflow}{do} i=g%isc,g%iec ; \textcolor{keywordflow}{do} j=g%jsc,g%jec
42     d(i,j) = max\_depth
43 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ enddo}
44 
\end{DoxyCode}
