| 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{MITgcm-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} | 
| 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_beta1 MITgcm | % 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 | This creates a directory called \textit{directory}. If \textit{directory} |  | 
| 124 | exists this command updates your code based on the repository. Each | The checkout process creates a directory called \textit{MITgcm}. If | 
| 125 | directory in the source tree contains a directory \textit{CVS}. This | the directory \textit{MITgcm} exists this command updates your code | 
| 126 | information is required by CVS to keep track of your file versions with | based on the repository. Each directory in the source tree contains a | 
| 127 | respect to the repository. Don't edit the files in \textit{CVS}! | directory \textit{CVS}. This information is required by CVS to keep | 
| 128 | You can also use CVS to download code updates.  More extensive | track of your file versions with respect to the repository. Don't edit | 
| 129 | information on using CVS for maintaining MITgcm code can be found | the files in \textit{CVS}!  You can also use CVS to download code | 
| 130 |  | 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} | \paragraph*{Upgrading from an earlier version} | 
| 155 |  |  | 
| 159 | \begin{verbatim} | \begin{verbatim} | 
| 160 | % cd MITgcm | % cd MITgcm | 
| 161 | \end{verbatim} | \end{verbatim} | 
| 162 | and then issue the cvs update command: | and then issue the cvs update command such as: | 
| 163 | \begin{verbatim} | \begin{verbatim} | 
| 164 | % cvs -q update -r release1_beta1 -d -P | % cvs -q update -r release1_beta1 -d -P | 
| 165 | \end{verbatim} | \end{verbatim} | 
| 175 | \end{verbatim} | \end{verbatim} | 
| 176 | If the list of conflicts scrolled off the screen, you can re-issue the | 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 | cvs update command and it will report the conflicts. Conflicts are | 
| 178 | indicated in the code by the delimites ``<<<<<<<'', ``======='' and | indicated in the code by the delimites ``$<<<<<<<$'', ``======='' and | 
| 179 | ``>>>>>>>''. For example, | ``$>>>>>>>$''. For example, | 
| 180 | \begin{verbatim} | \begin{verbatim} | 
| 181 | <<<<<<< ini_parms.F | <<<<<<< ini_parms.F | 
| 182 | & bottomDragLinear,myOwnBottomDragCoefficient, | & bottomDragLinear,myOwnBottomDragCoefficient, | 
| 191 | \begin{verbatim} | \begin{verbatim} | 
| 192 | & bottomDragLinear,bottomDragQuadratic,myOwnBottomDragCoefficient, | & bottomDragLinear,bottomDragQuadratic,myOwnBottomDragCoefficient, | 
| 193 | \end{verbatim} | \end{verbatim} | 
| 194 | and the lines with the delimiters (<<<<<<,======,>>>>>>) be deleted. | and the lines with the delimiters ($<<<<<<$,======,$>>>>>>$) be deleted. | 
| 195 | Unless you are making modifications which exactly parallel | Unless you are making modifications which exactly parallel | 
| 196 | developments we make, these types of conflicts should be rare. | developments we make, these types of conflicts should be rare. | 
| 197 |  |  | 
| 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{sect:eg-baro} - \ref{sect: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{sect:eg-baro}. | \ref{sect:eg-baro}. | 
|  |  |  | 
|  | \item \textit{exp1} - Four layer, ocean double gyre. This experiment is described in detail in section |  | 
|  | \ref{sect: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{sect: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{sect: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{global\_ocean\_pressure} Global circulation in pressure | \item \textit{global\_ocean\_pressure} Global circulation in pressure | 
| 372 | coordinate (non-Boussinesq ocean model). Described in detail in | coordinate (non-Boussinesq ocean model). Described in detail in | 
| 373 | section \ref{sect:eg-globalpressure}. | section \ref{sect:eg-globalpressure}. | 
| 374 |  |  | 
| 375 | \item \textit{solid-body.cs-32x32x1} Solid body rotation test for cube sphere | \item \textit{solid-body.cs-32x32x1} Solid body rotation test for cube | 
| 376 | grid. | 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 minimum, 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 |  |  | 
| 409 | \begin{itemize} | \begin{itemize} | 
| 410 | \item \textit{input/data}: this file, written as a namelist, specifies the | \item \textit{input/data}: this file, written as a namelist, specifies | 
| 411 | main parameters for the experiment. | the main parameters for the experiment. | 
| 412 |  |  | 
| 413 | \item \textit{input/data.pkg}: contains parameters relative to the packages | \item \textit{input/data.pkg}: contains parameters relative to the | 
| 414 | used in the experiment. | packages used in the experiment. | 
| 415 |  |  | 
| 416 | \item \textit{input/eedata}: this file contains ``execution environment'' | \item \textit{input/eedata}: this file contains ``execution | 
| 417 | data. At present, this consists of a specification of the number of threads | environment'' data. At present, this consists of a specification of | 
| 418 | to use in $X$ and $Y$ under multithreaded execution. | 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 |