| 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 |
| 253 |
set to \texttt{'.FALSE.'}, free-slip boundary conditions are |
set to \texttt{'.FALSE.'}, free-slip boundary conditions are |
| 254 |
applied. If no-slip boundary conditions are applied at the bottom, a |
applied. If no-slip boundary conditions are applied at the bottom, a |
| 255 |
bottom drag can be applied as well. Two forms are available: linear |
bottom drag can be applied as well. Two forms are available: linear |
| 256 |
(set the variable \textbf{bottomDragLinear} in s$ ^{-1}$) and |
(set the variable \textbf{bottomDragLinear} in m/s) and |
| 257 |
quadratic (set the variable \textbf{bottomDragQuadratic} in |
quadratic (set the variable \textbf{bottomDragQuadratic}, dimensionless). |
|
m$^{-1}$). |
|
| 258 |
|
|
| 259 |
The Fourier and Shapiro filters are described elsewhere. |
The Fourier and Shapiro filters are described elsewhere. |
| 260 |
|
|
| 288 |
|
|
| 289 |
\end{description} |
\end{description} |
| 290 |
|
|
| 291 |
\subsection{Tracer equations} |
\subsection{Parameters: Tracer equations} |
| 292 |
|
|
| 293 |
This section covers the tracer equations i.e. the potential |
This section covers the tracer equations i.e. the potential |
| 294 |
temperature equation and the salinity (for the ocean) or specific |
temperature equation and the salinity (for the ocean) or specific |
| 380 |
|
|
| 381 |
\end{description} |
\end{description} |
| 382 |
|
|
| 383 |
\subsection{Simulation controls} |
\subsection{Parameters: Simulation controls} |
| 384 |
|
|
| 385 |
The model ''clock'' is defined by the variable \textbf{deltaTClock} |
The model ''clock'' is defined by the variable \textbf{deltaTClock} |
| 386 |
(in s) which determines the IO frequencies and is used in tagging |
(in s) which determines the IO frequencies and is used in tagging |