1 |
\section[Customizing MITgcm]{Doing it yourself: customizing the code} |
\section[Customizing MITgcm]{Doing it yourself: customizing the model configuration} |
2 |
|
\label{sect:customize} |
3 |
|
\begin{rawhtml} |
4 |
|
<!-- CMIREDIR:customizing_mitgcm: --> |
5 |
|
\end{rawhtml} |
6 |
|
|
7 |
When you are ready to run the model in the configuration you want, the |
When you are ready to run the model in the configuration you want, the |
8 |
easiest thing is to use and adapt the setup of the case studies |
easiest thing is to use and adapt the setup of the case studies |
13 |
part is covered in the parallel implementation section) and on the |
part is covered in the parallel implementation section) and on the |
14 |
variables and parameters that you are likely to change. |
variables and parameters that you are likely to change. |
15 |
|
|
|
\subsection{Configuration and setup} |
|
|
|
|
16 |
The CPP keys relative to the ``numerical model'' part of the code are |
The CPP keys relative to the ``numerical model'' part of the code are |
17 |
all defined and set in the file \textit{CPP\_OPTIONS.h }in the |
all defined and set in the file \textit{CPP\_OPTIONS.h }in the |
18 |
directory \textit{ model/inc }or in one of the \textit{code |
directory \textit{ model/inc }or in one of the \textit{code |
24 |
to be located in the directory where you will run the model. The |
to be located in the directory where you will run the model. The |
25 |
parameters are initialized in the routine |
parameters are initialized in the routine |
26 |
\textit{model/src/ini\_parms.F}. Look at this routine to see in what |
\textit{model/src/ini\_parms.F}. Look at this routine to see in what |
27 |
part of the namelist the parameters are located. |
part of the namelist the parameters are located. Here is a complete list |
28 |
|
of the model parameters related to the main model (namelist parameters |
29 |
|
for the packages are located in the package descriptions), their meaning, |
30 |
|
and their default values: |
31 |
|
|
32 |
|
\input{./part3/main-parms.tex} |
33 |
|
|
34 |
In what follows the parameters are grouped into categories related to |
In what follows the parameters are grouped into categories related to |
35 |
the computational domain, the equations solved in the model, and the |
the computational domain, the equations solved in the model, and the |
36 |
simulation controls. |
simulation controls. |
37 |
|
|
38 |
\subsection{Computational domain, geometry and time-discretization} |
\subsection{Parameters: Computational domain, geometry and time-discretization} |
39 |
|
|
40 |
\begin{description} |
\begin{description} |
41 |
\item[dimensions] \ |
\item[dimensions] \ |
54 |
through the logical variables \textbf{usingCartesianGrid}, |
through the logical variables \textbf{usingCartesianGrid}, |
55 |
\textbf{usingSphericalPolarGrid}, and \textbf{usingCurvilinearGrid}. |
\textbf{usingSphericalPolarGrid}, and \textbf{usingCurvilinearGrid}. |
56 |
In the case of spherical and curvilinear grids, the southern |
In the case of spherical and curvilinear grids, the southern |
57 |
boundary is defined through the variable \textbf{phiMin} which |
boundary is defined through the variable \textbf{ygOrigin} which |
58 |
corresponds to the latitude of the southern most cell face (in |
corresponds to the latitude of the southern most cell face (in |
59 |
degrees). The resolution along the x and y directions is controlled |
degrees). The resolution along the x and y directions is controlled |
60 |
by the 1D arrays \textbf{delx} and \textbf{dely} (in meters in the |
by the 1D arrays \textbf{delx} and \textbf{dely} (in meters in the |
128 |
\end{description} |
\end{description} |
129 |
|
|
130 |
|
|
131 |
\subsection{Equation of state} |
\subsection{Parameters: Equation of state} |
132 |
|
|
133 |
First, because the model equations are written in terms of |
First, because the model equations are written in terms of |
134 |
perturbations, a reference thermodynamic state needs to be specified. |
perturbations, a reference thermodynamic state needs to be specified. |
183 |
For none of these options an reference profile of temperature or |
For none of these options an reference profile of temperature or |
184 |
salinity is required. |
salinity is required. |
185 |
|
|
186 |
\subsection{Momentum equations} |
\subsection{Parameters: Momentum equations} |
187 |
|
|
188 |
In this section, we only focus for now on the parameters that you are |
In this section, we only focus for now on the parameters that you are |
189 |
likely to change, i.e. the ones relative to forcing and dissipation |
likely to change, i.e. the ones relative to forcing and dissipation |
202 |
\begin{description} |
\begin{description} |
203 |
\item[initialization] \ |
\item[initialization] \ |
204 |
|
|
205 |
The velocity components are initialized to 0 unless the simulation |
The initial horizontal velocity components can be specified from |
206 |
is starting from a pickup file (see section on simulation control |
binary files \textbf{uVelInitFile} and \textbf{vVelInitFile}. |
207 |
parameters). |
These files should contain 3D data ordered in an (x,y,r) fashion with |
208 |
|
k=1 as the first vertical level (surface level). |
209 |
|
If no file names are provided, the velocity is initialised to zero. |
210 |
|
The initial vertical velocity is always derived from the horizontal velocity |
211 |
|
using the continuity equation, even in the case of non-hydrostatic simulation |
212 |
|
(see, e.g.: {\it tutorial\_deep\_convection/input/data}). |
213 |
|
|
214 |
|
In the case of a restart (from the end of a previous simulation), |
215 |
|
the velocity field is read from a pickup file |
216 |
|
(see section on simulation control parameters) |
217 |
|
and the initial velocity files are ignored. |
218 |
|
|
219 |
\item[forcing] \ |
\item[forcing] \ |
220 |
|
|
263 |
set to \texttt{'.FALSE.'}, free-slip boundary conditions are |
set to \texttt{'.FALSE.'}, free-slip boundary conditions are |
264 |
applied. If no-slip boundary conditions are applied at the bottom, a |
applied. If no-slip boundary conditions are applied at the bottom, a |
265 |
bottom drag can be applied as well. Two forms are available: linear |
bottom drag can be applied as well. Two forms are available: linear |
266 |
(set the variable \textbf{bottomDragLinear} in s$ ^{-1}$) and |
(set the variable \textbf{bottomDragLinear} in m/s) and |
267 |
quadratic (set the variable \textbf{bottomDragQuadratic} in |
quadratic (set the variable \textbf{bottomDragQuadratic}, dimensionless). |
|
m$^{-1}$). |
|
268 |
|
|
269 |
The Fourier and Shapiro filters are described elsewhere. |
The Fourier and Shapiro filters are described elsewhere. |
270 |
|
|
298 |
|
|
299 |
\end{description} |
\end{description} |
300 |
|
|
301 |
\subsection{Tracer equations} |
\subsection{Parameters: Tracer equations} |
302 |
|
|
303 |
This section covers the tracer equations i.e. the potential |
This section covers the tracer equations i.e. the potential |
304 |
temperature equation and the salinity (for the ocean) or specific |
temperature equation and the salinity (for the ocean) or specific |
390 |
|
|
391 |
\end{description} |
\end{description} |
392 |
|
|
393 |
\subsection{Simulation controls} |
\subsection{Parameters: Simulation controls} |
394 |
|
|
395 |
The model ''clock'' is defined by the variable \textbf{deltaTClock} |
The model ''clock'' is defined by the variable \textbf{deltaTClock} |
396 |
(in s) which determines the IO frequencies and is used in tagging |
(in s) which determines the IO frequencies and is used in tagging |