| 18 |
\section{Where to find information} |
\section{Where to find information} |
| 19 |
\label{sect:whereToFindInfo} |
\label{sect:whereToFindInfo} |
| 20 |
|
|
| 21 |
A web site is maintained for release 1 (Sealion) of MITgcm: |
A web site is maintained for release 2 (``Pelican'') of MITgcm: |
| 22 |
|
\begin{rawhtml} <A href=http://mitgcm.org/pelican/ target="idontexist"> \end{rawhtml} |
| 23 |
\begin{verbatim} |
\begin{verbatim} |
| 24 |
http://mitgcm.org/sealion |
http://mitgcm.org/pelican |
| 25 |
\end{verbatim} |
\end{verbatim} |
| 26 |
|
\begin{rawhtml} </A> \end{rawhtml} |
| 27 |
Here you will find an on-line version of this document, a |
Here you will find an on-line version of this document, a |
| 28 |
``browsable'' copy of the code and a searchable database of the model |
``browsable'' copy of the code and a searchable database of the model |
| 29 |
and site, as well as links for downloading the model and |
and site, as well as links for downloading the model and |
| 30 |
documentation, to data-sources and other related sites. |
documentation, to data-sources, and other related sites. |
| 31 |
|
|
| 32 |
There is also a support news group for the model that you can email at |
There is also a web-archived support mailing list for the model that |
| 33 |
\texttt{support@mitgcm.org} or browse at: |
you can email at \texttt{MITgcm-support@mitgcm.org} or browse at: |
| 34 |
|
\begin{rawhtml} <A href=http://mitgcm.org/mailman/listinfo/mitgcm-support/ target="idontexist"> \end{rawhtml} |
| 35 |
|
\begin{verbatim} |
| 36 |
|
http://mitgcm.org/mailman/listinfo/mitgcm-support/ |
| 37 |
|
http://mitgcm.org/pipermail/mitgcm-support/ |
| 38 |
|
\end{verbatim} |
| 39 |
|
\begin{rawhtml} </A> \end{rawhtml} |
| 40 |
|
Essentially all of the MITgcm web pages can be searched using a |
| 41 |
|
popular web crawler such as Google or through our own search facility: |
| 42 |
\begin{verbatim} |
\begin{verbatim} |
| 43 |
news://mitgcm.org/mitgcm.support |
http://mitgcm.org/htdig/ |
| 44 |
\end{verbatim} |
\end{verbatim} |
| 45 |
A mail to the email list will reach all the developers and be archived |
\begin{rawhtml} </A> \end{rawhtml} |
| 46 |
on the newsgroup. A users email list will be established at some time |
%%% http://www.google.com/search?q=hydrostatic+site%3Amitgcm.org |
| 47 |
in the future. |
|
| 48 |
|
|
| 49 |
|
|
| 50 |
\section{Obtaining the code} |
\section{Obtaining the code} |
| 51 |
\label{sect:obtainingCode} |
\label{sect:obtainingCode} |
| 52 |
|
|
| 53 |
MITgcm can be downloaded from our system by following |
MITgcm can be downloaded from our system by following |
| 54 |
the instructions below. As a courtesy we ask that you send e-mail to us at |
the instructions below. As a courtesy we ask that you send e-mail to us at |
| 55 |
\begin{rawhtml} <A href=mailto:support@mitgcm.org> \end{rawhtml} |
\begin{rawhtml} <A href=mailto:MITgcm-support@mitgcm.org> \end{rawhtml} |
| 56 |
support@mitgcm.org |
MITgcm-support@mitgcm.org |
| 57 |
\begin{rawhtml} </A> \end{rawhtml} |
\begin{rawhtml} </A> \end{rawhtml} |
| 58 |
to enable us to keep track of who's using the model and in what application. |
to enable us to keep track of who's using the model and in what application. |
| 59 |
You can download the model two ways: |
You can download the model two ways: |
| 60 |
|
|
| 61 |
\begin{enumerate} |
\begin{enumerate} |
| 62 |
\item Using CVS software. CVS is a freely available source code managment |
\item Using CVS software. CVS is a freely available source code management |
| 63 |
tool. To use CVS you need to have the software installed. Many systems |
tool. To use CVS you need to have the software installed. Many systems |
| 64 |
come with CVS pre-installed, otherwise good places to look for |
come with CVS pre-installed, otherwise good places to look for |
| 65 |
the software for a particular platform are |
the software for a particular platform are |
| 83 |
track of your changes. If CVS is not available on your machine, you can also |
track of your changes. If CVS is not available on your machine, you can also |
| 84 |
download a tar file. |
download a tar file. |
| 85 |
|
|
| 86 |
Before you can use CVS, the following environment variable has to be set in |
Before you can use CVS, the following environment variable(s) should |
| 87 |
your .cshrc or .tcshrc: |
be set within your shell. For a csh or tcsh shell, put the following |
| 88 |
|
\begin{verbatim} |
| 89 |
|
% setenv CVSROOT :pserver:cvsanon@mitgcm.org:/u/gcmpack |
| 90 |
|
\end{verbatim} |
| 91 |
|
in your .cshrc or .tcshrc file. For bash or sh shells, put: |
| 92 |
\begin{verbatim} |
\begin{verbatim} |
| 93 |
% setenv CVSROOT :pserver:cvsanon@mitgcm.org:/u/u0/gcmpack |
% export CVSROOT=':pserver:cvsanon@mitgcm.org:/u/gcmpack' |
| 94 |
\end{verbatim} |
\end{verbatim} |
| 95 |
|
in your .profile or .bashrc file. |
| 96 |
|
|
| 97 |
To start using CVS, register with the MITgcm CVS server using command: |
|
| 98 |
|
To get MITgcm through CVS, first register with the MITgcm CVS server |
| 99 |
|
using command: |
| 100 |
\begin{verbatim} |
\begin{verbatim} |
| 101 |
% cvs login ( CVS password: cvsanon ) |
% cvs login ( CVS password: cvsanon ) |
| 102 |
\end{verbatim} |
\end{verbatim} |
| 103 |
You only need to do ``cvs login'' once. |
You only need to do a ``cvs login'' once. |
| 104 |
|
|
| 105 |
To obtain the sources for release1 type: |
To obtain the latest sources type: |
| 106 |
|
\begin{verbatim} |
| 107 |
|
% cvs co MITgcm |
| 108 |
|
\end{verbatim} |
| 109 |
|
or to get a specific release type: |
| 110 |
\begin{verbatim} |
\begin{verbatim} |
| 111 |
% cvs co -d directory -P -r release1 MITgcmUV |
% cvs co -d directory -P -r release1_beta1 MITgcm |
| 112 |
\end{verbatim} |
\end{verbatim} |
| 113 |
|
The MITgcm web site contains further directions concerning the source |
| 114 |
|
code and CVS. It also contains a web interface to our CVS archive so |
| 115 |
|
that one may easily view the state of files, revisions, and other |
| 116 |
|
development milestones: |
| 117 |
|
\begin{rawhtml} <A href=http://mitgcm.org/download target="idontexist"> \end{rawhtml} |
| 118 |
|
\begin{verbatim} |
| 119 |
|
http://mitgcm.org/source_code.html |
| 120 |
|
\end{verbatim} |
| 121 |
|
\begin{rawhtml} </A> \end{rawhtml} |
| 122 |
|
|
| 123 |
|
|
| 124 |
This creates a directory called \textit{directory}. If \textit{directory} |
The checkout process creates a directory called \textit{MITgcm}. If |
| 125 |
exists this command updates your code based on the repository. Each |
the directory \textit{MITgcm} exists this command updates your code |
| 126 |
directory in the source tree contains a directory \textit{CVS}. This |
based on the repository. Each directory in the source tree contains a |
| 127 |
information is required by CVS to keep track of your file versions with |
directory \textit{CVS}. This information is required by CVS to keep |
| 128 |
respect to the repository. Don't edit the files in \textit{CVS}! |
track of your file versions with respect to the repository. Don't edit |
| 129 |
You can also use CVS to download code updates. More extensive |
the files in \textit{CVS}! You can also use CVS to download code |
| 130 |
information on using CVS for maintaining MITgcm code can be found |
updates. More extensive information on using CVS for maintaining |
| 131 |
|
MITgcm code can be found |
| 132 |
\begin{rawhtml} <A href=http://mitgcm.org/usingcvstoget.html target="idontexist"> \end{rawhtml} |
\begin{rawhtml} <A href=http://mitgcm.org/usingcvstoget.html target="idontexist"> \end{rawhtml} |
| 133 |
here |
here |
| 134 |
\begin{rawhtml} </A> \end{rawhtml} |
\begin{rawhtml} </A> \end{rawhtml} |
| 139 |
\label{sect:conventionalDownload} |
\label{sect:conventionalDownload} |
| 140 |
|
|
| 141 |
If you do not have CVS on your system, you can download the model as a |
If you do not have CVS on your system, you can download the model as a |
| 142 |
tar file from the reference web site at: |
tar file from the web site at: |
| 143 |
\begin{rawhtml} <A href=http://mitgcm.org/download target="idontexist"> \end{rawhtml} |
\begin{rawhtml} <A href=http://mitgcm.org/download target="idontexist"> \end{rawhtml} |
| 144 |
\begin{verbatim} |
\begin{verbatim} |
| 145 |
http://mitgcm.org/download/ |
http://mitgcm.org/download/ |
| 147 |
\begin{rawhtml} </A> \end{rawhtml} |
\begin{rawhtml} </A> \end{rawhtml} |
| 148 |
The tar file still contains CVS information which we urge you not to |
The tar file still contains CVS information which we urge you not to |
| 149 |
delete; even if you do not use CVS yourself the information can help |
delete; even if you do not use CVS yourself the information can help |
| 150 |
us if you should need to send us your copy of the code. |
us if you should need to send us your copy of the code. If a recent |
| 151 |
|
tar file does not exist, then please contact the developers through |
| 152 |
|
the MITgcm-support list. |
| 153 |
|
|
| 154 |
|
\paragraph*{Upgrading from an earlier version} |
| 155 |
|
|
| 156 |
|
If you already have an earlier version of the code you can ``upgrade'' |
| 157 |
|
your copy instead of downloading the entire repository again. First, |
| 158 |
|
``cd'' (change directory) to the top of your working copy: |
| 159 |
|
\begin{verbatim} |
| 160 |
|
% cd MITgcm |
| 161 |
|
\end{verbatim} |
| 162 |
|
and then issue the cvs update command such as: |
| 163 |
|
\begin{verbatim} |
| 164 |
|
% cvs -q update -r release1_beta1 -d -P |
| 165 |
|
\end{verbatim} |
| 166 |
|
This will update the ``tag'' to ``release1\_beta1'', add any new |
| 167 |
|
directories (-d) and remove any empty directories (-P). The -q option |
| 168 |
|
means be quiet which will reduce the number of messages you'll see in |
| 169 |
|
the terminal. If you have modified the code prior to upgrading, CVS |
| 170 |
|
will try to merge your changes with the upgrades. If there is a |
| 171 |
|
conflict between your modifications and the upgrade, it will report |
| 172 |
|
that file with a ``C'' in front, e.g.: |
| 173 |
|
\begin{verbatim} |
| 174 |
|
C model/src/ini_parms.F |
| 175 |
|
\end{verbatim} |
| 176 |
|
If the list of conflicts scrolled off the screen, you can re-issue the |
| 177 |
|
cvs update command and it will report the conflicts. Conflicts are |
| 178 |
|
indicated in the code by the delimites ``$<<<<<<<$'', ``======='' and |
| 179 |
|
``$>>>>>>>$''. For example, |
| 180 |
|
\begin{verbatim} |
| 181 |
|
<<<<<<< ini_parms.F |
| 182 |
|
& bottomDragLinear,myOwnBottomDragCoefficient, |
| 183 |
|
======= |
| 184 |
|
& bottomDragLinear,bottomDragQuadratic, |
| 185 |
|
>>>>>>> 1.18 |
| 186 |
|
\end{verbatim} |
| 187 |
|
means that you added ``myOwnBottomDragCoefficient'' to a namelist at |
| 188 |
|
the same time and place that we added ``bottomDragQuadratic''. You |
| 189 |
|
need to resolve this conflict and in this case the line should be |
| 190 |
|
changed to: |
| 191 |
|
\begin{verbatim} |
| 192 |
|
& bottomDragLinear,bottomDragQuadratic,myOwnBottomDragCoefficient, |
| 193 |
|
\end{verbatim} |
| 194 |
|
and the lines with the delimiters ($<<<<<<$,======,$>>>>>>$) be deleted. |
| 195 |
|
Unless you are making modifications which exactly parallel |
| 196 |
|
developments we make, these types of conflicts should be rare. |
| 197 |
|
|
| 198 |
|
\paragraph*{Upgrading to the current pre-release version} |
| 199 |
|
|
| 200 |
|
We don't make a ``release'' for every little patch and bug fix in |
| 201 |
|
order to keep the frequency of upgrades to a minimum. However, if you |
| 202 |
|
have run into a problem for which ``we have already fixed in the |
| 203 |
|
latest code'' and we haven't made a ``tag'' or ``release'' since that |
| 204 |
|
patch then you'll need to get the latest code: |
| 205 |
|
\begin{verbatim} |
| 206 |
|
% cvs -q update -A -d -P |
| 207 |
|
\end{verbatim} |
| 208 |
|
Unlike, the ``check-out'' and ``update'' procedures above, there is no |
| 209 |
|
``tag'' or release name. The -A tells CVS to upgrade to the |
| 210 |
|
very latest version. As a rule, we don't recommend this since you |
| 211 |
|
might upgrade while we are in the processes of checking in the code so |
| 212 |
|
that you may only have part of a patch. Using this method of updating |
| 213 |
|
also means we can't tell what version of the code you are working |
| 214 |
|
with. So please be sure you understand what you're doing. |
| 215 |
|
|
| 216 |
\section{Model and directory structure} |
\section{Model and directory structure} |
| 217 |
|
|
| 218 |
The ``numerical'' model is contained within a execution environment support |
The ``numerical'' model is contained within a execution environment |
| 219 |
wrapper. This wrapper is designed to provide a general framework for |
support wrapper. This wrapper is designed to provide a general |
| 220 |
grid-point models. MITgcmUV is a specific numerical model that uses the |
framework for grid-point models. MITgcmUV is a specific numerical |
| 221 |
framework. Under this structure the model is split into execution |
model that uses the framework. Under this structure the model is split |
| 222 |
environment support code and conventional numerical model code. The |
into execution environment support code and conventional numerical |
| 223 |
execution environment support code is held under the \textit{eesupp} |
model code. The execution environment support code is held under the |
| 224 |
directory. The grid point model code is held under the \textit{model} |
\textit{eesupp} directory. The grid point model code is held under the |
| 225 |
directory. Code execution actually starts in the \textit{eesupp} routines |
\textit{model} directory. Code execution actually starts in the |
| 226 |
and not in the \textit{model} routines. For this reason the top-level |
\textit{eesupp} routines and not in the \textit{model} routines. For |
| 227 |
|
this reason the top-level |
| 228 |
\textit{MAIN.F} is in the \textit{eesupp/src} directory. In general, |
\textit{MAIN.F} is in the \textit{eesupp/src} directory. In general, |
| 229 |
end-users should not need to worry about this level. The top-level routine |
end-users should not need to worry about this level. The top-level routine |
| 230 |
for the numerical part of the code is in \textit{model/src/THE\_MODEL\_MAIN.F% |
for the numerical part of the code is in \textit{model/src/THE\_MODEL\_MAIN.F% |
| 237 |
|
|
| 238 |
\item \textit{diags}: contains the code relative to time-averaged |
\item \textit{diags}: contains the code relative to time-averaged |
| 239 |
diagnostics. It is subdivided into two subdirectories \textit{inc} and |
diagnostics. It is subdivided into two subdirectories \textit{inc} and |
| 240 |
\textit{src} that contain include files (*.\textit{h} files) and fortran |
\textit{src} that contain include files (*.\textit{h} files) and Fortran |
| 241 |
subroutines (*.\textit{F} files), respectively. |
subroutines (*.\textit{F} files), respectively. |
| 242 |
|
|
| 243 |
\item \textit{doc}: contains brief documentation notes. |
\item \textit{doc}: contains brief documentation notes. |
| 258 |
in detail in section 3. |
in detail in section 3. |
| 259 |
|
|
| 260 |
\item \textit{tools}: this directory contains various useful tools. For |
\item \textit{tools}: this directory contains various useful tools. For |
| 261 |
example, \textit{genmake} is a script written in csh (C-shell) that should |
example, \textit{genmake2} is a script written in csh (C-shell) that should |
| 262 |
be used to generate your makefile. The directory \textit{adjoint} contains |
be used to generate your makefile. The directory \textit{adjoint} contains |
| 263 |
the makefile specific to the Tangent linear and Adjoint Compiler (TAMC) that |
the makefile specific to the Tangent linear and Adjoint Compiler (TAMC) that |
| 264 |
generates the adjoint code. The latter is described in details in part V. |
generates the adjoint code. The latter is described in details in part V. |
| 278 |
\section{Example experiments} |
\section{Example experiments} |
| 279 |
\label{sect:modelExamples} |
\label{sect:modelExamples} |
| 280 |
|
|
| 281 |
The MITgcm distribution comes with a set of twenty-four pre-configured |
%% a set of twenty-four pre-configured numerical experiments |
| 282 |
numerical experiments. Some of these examples experiments are tests of |
|
| 283 |
individual parts of the model code, but many are fully fledged numerical |
The MITgcm distribution comes with more than a dozen pre-configured |
| 284 |
simulations. A few of the examples are used for tutorial documentation |
numerical experiments. Some of these example experiments are tests of |
| 285 |
in sections \ref{sec:eg-baro} - \ref{sec:eg-global}. The other examples |
individual parts of the model code, but many are fully fledged |
| 286 |
follow the same general structure as the tutorial examples. However, |
numerical simulations. A few of the examples are used for tutorial |
| 287 |
they only include brief instructions in a text file called {\it README}. |
documentation in sections \ref{sect:eg-baro} - \ref{sect:eg-global}. |
| 288 |
The examples are located in subdirectories under |
The other examples follow the same general structure as the tutorial |
| 289 |
the directory \textit{verification}. Each |
examples. However, they only include brief instructions in a text file |
| 290 |
example is briefly described below. |
called {\it README}. The examples are located in subdirectories under |
| 291 |
|
the directory \textit{verification}. Each example is briefly described |
| 292 |
|
below. |
| 293 |
|
|
| 294 |
\subsection{Full list of model examples} |
\subsection{Full list of model examples} |
| 295 |
|
|
| 296 |
\begin{enumerate} |
\begin{enumerate} |
| 297 |
\item \textit{exp0} - single layer, ocean double gyre (barotropic with |
\item \textit{exp0} - single layer, ocean double gyre (barotropic with |
| 298 |
free-surface). This experiment is described in detail in section |
free-surface). This experiment is described in detail in section |
| 299 |
\ref{sec:eg-baro}. |
\ref{sect:eg-baro}. |
|
|
|
|
\item \textit{exp1} - Four layer, ocean double gyre. This experiment is described in detail in section |
|
|
\ref{sec:eg-baroc}. |
|
| 300 |
|
|
| 301 |
|
\item \textit{exp1} - Four layer, ocean double gyre. This experiment |
| 302 |
|
is described in detail in section \ref{sect:eg-baroc}. |
| 303 |
|
|
| 304 |
\item \textit{exp2} - 4x4 degree global ocean simulation with steady |
\item \textit{exp2} - 4x4 degree global ocean simulation with steady |
| 305 |
climatological forcing. This experiment is described in detail in section |
climatological forcing. This experiment is described in detail in |
| 306 |
\ref{sec:eg-global}. |
section \ref{sect:eg-global}. |
| 307 |
|
|
| 308 |
\item \textit{exp4} - Flow over a Gaussian bump in open-water or channel |
\item \textit{exp4} - Flow over a Gaussian bump in open-water or |
| 309 |
with open boundaries. |
channel with open boundaries. |
| 310 |
|
|
| 311 |
\item \textit{exp5} - Inhomogenously forced ocean convection in a doubly |
\item \textit{exp5} - Inhomogenously forced ocean convection in a |
| 312 |
periodic box. |
doubly periodic box. |
| 313 |
|
|
| 314 |
\item \textit{front\_relax} - Relaxation of an ocean thermal front (test for |
\item \textit{front\_relax} - Relaxation of an ocean thermal front (test for |
| 315 |
Gent/McWilliams scheme). 2D (Y-Z). |
Gent/McWilliams scheme). 2D (Y-Z). |
| 316 |
|
|
| 317 |
\item \textit{internal wave} - Ocean internal wave forced by open boundary |
\item \textit{internal wave} - Ocean internal wave forced by open |
| 318 |
conditions. |
boundary conditions. |
| 319 |
|
|
| 320 |
\item \textit{natl\_box} - Eastern subtropical North Atlantic with KPP |
\item \textit{natl\_box} - Eastern subtropical North Atlantic with KPP |
| 321 |
scheme; 1 month integration |
scheme; 1 month integration |
| 322 |
|
|
| 323 |
\item \textit{hs94.1x64x5} - Zonal averaged atmosphere using Held and Suarez |
\item \textit{hs94.1x64x5} - Zonal averaged atmosphere using Held and |
| 324 |
'94 forcing. |
Suarez '94 forcing. |
| 325 |
|
|
| 326 |
\item \textit{hs94.128x64x5} - 3D atmosphere dynamics using Held and Suarez |
\item \textit{hs94.128x64x5} - 3D atmosphere dynamics using Held and |
| 327 |
'94 forcing. |
Suarez '94 forcing. |
| 328 |
|
|
| 329 |
\item \textit{hs94.cs-32x32x5} - 3D atmosphere dynamics using Held and |
\item \textit{hs94.cs-32x32x5} - 3D atmosphere dynamics using Held and |
| 330 |
Suarez '94 forcing on the cubed sphere. |
Suarez '94 forcing on the cubed sphere. |
| 331 |
|
|
| 332 |
\item \textit{aim.5l\_zon-ave} - Intermediate Atmospheric physics. Global |
\item \textit{aim.5l\_zon-ave} - Intermediate Atmospheric physics. |
| 333 |
Zonal Mean configuration, 1x64x5 resolution. |
Global Zonal Mean configuration, 1x64x5 resolution. |
| 334 |
|
|
| 335 |
\item \textit{aim.5l\_XZ\_Equatorial\_Slice} - Intermediate Atmospheric |
\item \textit{aim.5l\_XZ\_Equatorial\_Slice} - Intermediate |
| 336 |
physics, equatorial Slice configuration. |
Atmospheric physics, equatorial Slice configuration. 2D (X-Z). |
| 337 |
2D (X-Z). |
|
|
|
|
| 338 |
\item \textit{aim.5l\_Equatorial\_Channel} - Intermediate Atmospheric |
\item \textit{aim.5l\_Equatorial\_Channel} - Intermediate Atmospheric |
| 339 |
physics. 3D Equatorial Channel configuration. |
physics. 3D Equatorial Channel configuration. |
| 340 |
|
|
| 341 |
\item \textit{aim.5l\_LatLon} - Intermediate Atmospheric physics. |
\item \textit{aim.5l\_LatLon} - Intermediate Atmospheric physics. |
| 342 |
Global configuration, on latitude longitude grid with 128x64x5 grid points |
Global configuration, on latitude longitude grid with 128x64x5 grid |
| 343 |
($2.8^\circ{\rm degree}$ resolution). |
points ($2.8^\circ{\rm degree}$ resolution). |
| 344 |
|
|
| 345 |
\item \textit{adjustment.128x64x1} Barotropic adjustment |
\item \textit{adjustment.128x64x1} Barotropic adjustment problem on |
| 346 |
problem on latitude longitude grid with 128x64 grid points ($2.8^\circ{\rm degree}$ resolution). |
latitude longitude grid with 128x64 grid points ($2.8^\circ{\rm |
| 347 |
|
degree}$ resolution). |
| 348 |
\item \textit{adjustment.cs-32x32x1} |
|
| 349 |
Barotropic adjustment |
\item \textit{adjustment.cs-32x32x1} Barotropic adjustment problem on |
| 350 |
problem on cube sphere grid with 32x32 points per face ( roughly |
cube sphere grid with 32x32 points per face ( roughly $2.8^\circ{\rm |
| 351 |
$2.8^\circ{\rm degree}$ resolution). |
degree}$ resolution). |
| 352 |
|
|
| 353 |
\item \textit{advect\_cs} Two-dimensional passive advection test on |
\item \textit{advect\_cs} Two-dimensional passive advection test on |
| 354 |
cube sphere grid. |
cube sphere grid. |
| 355 |
|
|
| 356 |
\item \textit{advect\_xy} Two-dimensional (horizontal plane) passive advection |
\item \textit{advect\_xy} Two-dimensional (horizontal plane) passive |
| 357 |
test on cartesian grid. |
advection test on Cartesian grid. |
| 358 |
|
|
| 359 |
\item \textit{advect\_yz} Two-dimensional (vertical plane) passive advection test on cartesian grid. |
\item \textit{advect\_yz} Two-dimensional (vertical plane) passive |
| 360 |
|
advection test on Cartesian grid. |
| 361 |
\item \textit{carbon} Simple passive tracer experiment. Includes derivative |
|
| 362 |
calculation. Described in detail in section \ref{sec:eg-carbon-ad}. |
\item \textit{carbon} Simple passive tracer experiment. Includes |
| 363 |
|
derivative calculation. Described in detail in section |
| 364 |
|
\ref{sect:eg-carbon-ad}. |
| 365 |
|
|
| 366 |
\item \textit{flt\_example} Example of using float package. |
\item \textit{flt\_example} Example of using float package. |
| 367 |
|
|
| 368 |
\item \textit{global\_ocean.90x40x15} Global circulation with |
\item \textit{global\_ocean.90x40x15} Global circulation with GM, flux |
| 369 |
GM, flux boundary conditions and poles. |
boundary conditions and poles. |
| 370 |
|
|
| 371 |
\item \textit{solid-body.cs-32x32x1} Solid body rotation test for cube sphere |
\item \textit{global\_ocean\_pressure} Global circulation in pressure |
| 372 |
grid. |
coordinate (non-Boussinesq ocean model). Described in detail in |
| 373 |
|
section \ref{sect:eg-globalpressure}. |
| 374 |
|
|
| 375 |
|
\item \textit{solid-body.cs-32x32x1} Solid body rotation test for cube |
| 376 |
|
sphere grid. |
| 377 |
|
|
| 378 |
\end{enumerate} |
\end{enumerate} |
| 379 |
|
|
| 386 |
minimum, this directory includes the following files: |
minimum, this directory includes the following files: |
| 387 |
|
|
| 388 |
\begin{itemize} |
\begin{itemize} |
| 389 |
\item \textit{code/CPP\_EEOPTIONS.h}: declares CPP keys relative to the |
\item \textit{code/CPP\_EEOPTIONS.h}: declares CPP keys relative to |
| 390 |
``execution environment'' part of the code. The default version is located |
the ``execution environment'' part of the code. The default version |
| 391 |
in \textit{eesupp/inc}. |
is located in \textit{eesupp/inc}. |
| 392 |
|
|
| 393 |
\item \textit{code/CPP\_OPTIONS.h}: declares CPP keys relative to the |
\item \textit{code/CPP\_OPTIONS.h}: declares CPP keys relative to the |
| 394 |
``numerical model'' part of the code. The default version is located in |
``numerical model'' part of the code. The default version is located |
| 395 |
\textit{model/inc}. |
in \textit{model/inc}. |
| 396 |
|
|
| 397 |
\item \textit{code/SIZE.h}: declares size of underlying computational grid. |
\item \textit{code/SIZE.h}: declares size of underlying computational |
| 398 |
The default version is located in \textit{model/inc}. |
grid. The default version is located in \textit{model/inc}. |
| 399 |
\end{itemize} |
\end{itemize} |
| 400 |
|
|
| 401 |
In addition, other include files and subroutines might be present in \textit{% |
In addition, other include files and subroutines might be present in |
| 402 |
code} depending on the particular experiment. See section 2 for more details. |
\textit{code} depending on the particular experiment. See Section 2 |
| 403 |
|
for more details. |
| 404 |
\item \textit{input}: contains the input data files required to run the |
|
| 405 |
example. At a mimimum, the \textit{input} directory contains the following |
\item \textit{input}: contains the input data files required to run |
| 406 |
files: |
the example. At a minimum, the \textit{input} directory contains the |
| 407 |
|
following files: |
| 408 |
\begin{itemize} |
|
| 409 |
\item \textit{input/data}: this file, written as a namelist, specifies the |
\begin{itemize} |
| 410 |
main parameters for the experiment. |
\item \textit{input/data}: this file, written as a namelist, specifies |
| 411 |
|
the main parameters for the experiment. |
| 412 |
\item \textit{input/data.pkg}: contains parameters relative to the packages |
|
| 413 |
used in the experiment. |
\item \textit{input/data.pkg}: contains parameters relative to the |
| 414 |
|
packages used in the experiment. |
| 415 |
\item \textit{input/eedata}: this file contains ``execution environment'' |
|
| 416 |
data. At present, this consists of a specification of the number of threads |
\item \textit{input/eedata}: this file contains ``execution |
| 417 |
to use in $X$ and $Y$ under multithreaded execution. |
environment'' data. At present, this consists of a specification of |
| 418 |
|
the number of threads to use in $X$ and $Y$ under multithreaded |
| 419 |
|
execution. |
| 420 |
\end{itemize} |
\end{itemize} |
| 421 |
|
|
| 422 |
In addition, you will also find in this directory the forcing and topography |
In addition, you will also find in this directory the forcing and topography |
| 437 |
To compile the code, we use the {\em make} program. This uses a file |
To compile the code, we use the {\em make} program. This uses a file |
| 438 |
({\em Makefile}) that allows us to pre-process source files, specify |
({\em Makefile}) that allows us to pre-process source files, specify |
| 439 |
compiler and optimization options and also figures out any file |
compiler and optimization options and also figures out any file |
| 440 |
dependancies. We supply a script ({\em genmake}), described in section |
dependencies. We supply a script ({\em genmake}), described in section |
| 441 |
\ref{sect:genmake}, that automatically creates the {\em Makefile} for |
\ref{sect:genmake}, that automatically creates the {\em Makefile} for |
| 442 |
you. You then need to build the dependancies and compile the code. |
you. You then need to build the dependencies and compile the code. |
| 443 |
|
|
| 444 |
As an example, let's assume that you want to build and run experiment |
As an example, let's assume that you want to build and run experiment |
| 445 |
\textit{verification/exp2}. The are multiple ways and places to actually |
\textit{verification/exp2}. The are multiple ways and places to actually |
| 461 |
% ../../../tools/genmake -mods=../code |
% ../../../tools/genmake -mods=../code |
| 462 |
\end{verbatim} |
\end{verbatim} |
| 463 |
|
|
| 464 |
Next, create the dependancies: |
Next, create the dependencies: |
| 465 |
\begin{verbatim} |
\begin{verbatim} |
| 466 |
% make depend |
% make depend |
| 467 |
\end{verbatim} |
\end{verbatim} |
| 513 |
% cp ../code/mitgcmuv ./ |
% cp ../code/mitgcmuv ./ |
| 514 |
% ./mitgcmuv > output.txt |
% ./mitgcmuv > output.txt |
| 515 |
\end{verbatim} |
\end{verbatim} |
| 516 |
or if you will be making muliple runs with the same executable: |
or if you will be making multiple runs with the same executable: |
| 517 |
\begin{verbatim} |
\begin{verbatim} |
| 518 |
% cd ../ |
% cd ../ |
| 519 |
% cp -r input run1 |
% cp -r input run1 |
| 525 |
\subsubsection{Building from a new directory} |
\subsubsection{Building from a new directory} |
| 526 |
|
|
| 527 |
Since the {\em input} directory contains input files it is often more |
Since the {\em input} directory contains input files it is often more |
| 528 |
useful to keep {\em input} prestine and build in a new directory |
useful to keep {\em input} pristine and build in a new directory |
| 529 |
within {\em verification/exp2/}: |
within {\em verification/exp2/}: |
| 530 |
\begin{verbatim} |
\begin{verbatim} |
| 531 |
% cd verification/exp2 |
% cd verification/exp2 |
| 911 |
\item time-discretization |
\item time-discretization |
| 912 |
\end{itemize} |
\end{itemize} |
| 913 |
|
|
| 914 |
The time steps are set through the real variables \textbf{deltaTMom }and |
The time steps are set through the real variables \textbf{deltaTMom} |
| 915 |
\textbf{deltaTtracer }(in s) which represent the time step for the momentum |
and \textbf{deltaTtracer} (in s) which represent the time step for the |
| 916 |
and tracer equations, respectively. For synchronous integrations, simply set |
momentum and tracer equations, respectively. For synchronous |
| 917 |
the two variables to the same value (or you can prescribe one time step only |
integrations, simply set the two variables to the same value (or you |
| 918 |
through the variable \textbf{deltaT}). The Adams-Bashforth stabilizing |
can prescribe one time step only through the variable |
| 919 |
parameter is set through the variable \textbf{abEps }(dimensionless). The |
\textbf{deltaT}). The Adams-Bashforth stabilizing parameter is set |
| 920 |
stagger baroclinic time stepping can be activated by setting the logical |
through the variable \textbf{abEps} (dimensionless). The stagger |
| 921 |
variable \textbf{staggerTimeStep }to '.\texttt{TRUE}.'. |
baroclinic time stepping can be activated by setting the logical |
| 922 |
|
variable \textbf{staggerTimeStep} to '.\texttt{TRUE}.'. |
| 923 |
|
|
| 924 |
\subsection{Equation of state} |
\subsection{Equation of state} |
| 925 |
|
|
| 926 |
First, because the model equations are written in terms of perturbations, a |
First, because the model equations are written in terms of |
| 927 |
reference thermodynamic state needs to be specified. This is done through |
perturbations, a reference thermodynamic state needs to be specified. |
| 928 |
the 1D arrays \textbf{tRef}\textit{\ }and \textbf{sRef}. \textbf{tRef }% |
This is done through the 1D arrays \textbf{tRef} and \textbf{sRef}. |
| 929 |
specifies the reference potential temperature profile (in $^{o}$C for |
\textbf{tRef} specifies the reference potential temperature profile |
| 930 |
the ocean and $^{o}$K for the atmosphere) starting from the level |
(in $^{o}$C for the ocean and $^{o}$K for the atmosphere) starting |
| 931 |
k=1. Similarly, \textbf{sRef}\textit{\ }specifies the reference salinity |
from the level k=1. Similarly, \textbf{sRef} specifies the reference |
| 932 |
profile (in ppt) for the ocean or the reference specific humidity profile |
salinity profile (in ppt) for the ocean or the reference specific |
| 933 |
(in g/kg) for the atmosphere. |
humidity profile (in g/kg) for the atmosphere. |
| 934 |
|
|
| 935 |
The form of the equation of state is controlled by the character variables |
The form of the equation of state is controlled by the character |
| 936 |
\textbf{buoyancyRelation}\textit{\ }and \textbf{eosType}\textit{. }\textbf{% |
variables \textbf{buoyancyRelation} and \textbf{eosType}. |
| 937 |
buoyancyRelation}\textit{\ }is set to '\texttt{OCEANIC}' by default and |
\textbf{buoyancyRelation} is set to '\texttt{OCEANIC}' by default and |
| 938 |
needs to be set to '\texttt{ATMOSPHERIC}' for atmosphere simulations. In |
needs to be set to '\texttt{ATMOSPHERIC}' for atmosphere simulations. |
| 939 |
this case, \textbf{eosType}\textit{\ }must be set to '\texttt{IDEALGAS}'. |
In this case, \textbf{eosType} must be set to '\texttt{IDEALGAS}'. |
| 940 |
For the ocean, two forms of the equation of state are available: linear (set |
For the ocean, two forms of the equation of state are available: |
| 941 |
\textbf{eosType}\textit{\ }to '\texttt{LINEAR}') and a polynomial |
linear (set \textbf{eosType} to '\texttt{LINEAR}') and a polynomial |
| 942 |
approximation to the full nonlinear equation ( set \textbf{eosType}\textit{\ |
approximation to the full nonlinear equation ( set |
| 943 |
}to '\texttt{POLYNOMIAL}'). In the linear case, you need to specify the |
\textbf{eosType}\textit{\ }to '\texttt{POLYNOMIAL}'). In the linear |
| 944 |
thermal and haline expansion coefficients represented by the variables |
case, you need to specify the thermal and haline expansion |
| 945 |
\textbf{tAlpha}\textit{\ }(in K$^{-1}$) and \textbf{sBeta}\textit{\ }(in ppt$% |
coefficients represented by the variables \textbf{tAlpha}\textit{\ |
| 946 |
^{-1}$). For the nonlinear case, you need to generate a file of polynomial |
}(in K$^{-1}$) and \textbf{sBeta} (in ppt$^{-1}$). For the nonlinear |
| 947 |
coefficients called \textit{POLY3.COEFFS. }To do this, use the program |
case, you need to generate a file of polynomial coefficients called |
| 948 |
\textit{utils/knudsen2/knudsen2.f }under the model tree (a Makefile is |
\textit{POLY3.COEFFS}. To do this, use the program |
| 949 |
available in the same directory and you will need to edit the number and the |
\textit{utils/knudsen2/knudsen2.f} under the model tree (a Makefile is |
| 950 |
values of the vertical levels in \textit{knudsen2.f }so that they match |
available in the same directory and you will need to edit the number |
| 951 |
those of your configuration). \textit{\ } |
and the values of the vertical levels in \textit{knudsen2.f} so that |
| 952 |
|
they match those of your configuration). |
| 953 |
|
|
| 954 |
|
There there are also higher polynomials for the equation of state: |
| 955 |
|
\begin{description} |
| 956 |
|
\item['\texttt{UNESCO}':] The UNESCO equation of state formula of |
| 957 |
|
Fofonoff and Millard \cite{fofonoff83}. This equation of state |
| 958 |
|
assumes in-situ temperature, which is not a model variable; \emph{its use |
| 959 |
|
is therefore discouraged, and it is only listed for completeness}. |
| 960 |
|
\item['\texttt{JMD95Z}':] A modified UNESCO formula by Jackett and |
| 961 |
|
McDougall \cite{jackett95}, which uses the model variable potential |
| 962 |
|
temperature as input. The '\texttt{Z}' indicates that this equation |
| 963 |
|
of state uses a horizontally and temporally constant pressure |
| 964 |
|
$p_{0}=-g\rho_{0}z$. |
| 965 |
|
\item['\texttt{JMD95P}':] A modified UNESCO formula by Jackett and |
| 966 |
|
McDougall \cite{jackett95}, which uses the model variable potential |
| 967 |
|
temperature as input. The '\texttt{P}' indicates that this equation |
| 968 |
|
of state uses the actual hydrostatic pressure of the last time |
| 969 |
|
step. Lagging the pressure in this way requires an additional pickup |
| 970 |
|
file for restarts. |
| 971 |
|
\item['\texttt{MDJWF}':] The new, more accurate and less expensive |
| 972 |
|
equation of state by McDougall et~al. \cite{mcdougall03}. It also |
| 973 |
|
requires lagging the pressure and therefore an additional pickup |
| 974 |
|
file for restarts. |
| 975 |
|
\end{description} |
| 976 |
|
For none of these options an reference profile of temperature or |
| 977 |
|
salinity is required. |
| 978 |
|
|
| 979 |
\subsection{Momentum equations} |
\subsection{Momentum equations} |
| 980 |
|
|
| 1207 |
The precision with which to write the binary data is controlled by the |
The precision with which to write the binary data is controlled by the |
| 1208 |
integer variable w\textbf{riteBinaryPrec }(set it to \texttt{32} or \texttt{% |
integer variable w\textbf{riteBinaryPrec }(set it to \texttt{32} or \texttt{% |
| 1209 |
64}). |
64}). |
| 1210 |
|
|
| 1211 |
|
%%% Local Variables: |
| 1212 |
|
%%% mode: latex |
| 1213 |
|
%%% TeX-master: t |
| 1214 |
|
%%% End: |