1 |
% $Header$ |
% $Header$ |
2 |
% $Name$ |
% $Name$ |
3 |
|
|
4 |
|
%\section{Getting started} |
5 |
|
|
6 |
\begin{center} |
In this section, we describe how to use the model. In the first |
7 |
{\Large \textbf{Using the model}} |
section, we provide enough information to help you get started with |
8 |
|
the model. We believe the best way to familiarize yourself with the |
9 |
|
model is to run the case study examples provided with the base |
10 |
|
version. Information on how to obtain, compile, and run the code is |
11 |
|
found there as well as a brief description of the model structure |
12 |
|
directory and the case study examples. The latter and the code |
13 |
|
structure are described more fully in chapters |
14 |
|
\ref{chap:discretization} and \ref{chap:sarch}, respectively. Here, in |
15 |
|
this section, we provide information on how to customize the code when |
16 |
|
you are ready to try implementing the configuration you have in mind. |
17 |
|
|
18 |
|
\section{Where to find information} |
19 |
|
\label{sect:whereToFindInfo} |
20 |
|
|
21 |
|
A web site is maintained for release 1 (Sealion) of MITgcm: |
22 |
|
\begin{verbatim} |
23 |
|
http://mitgcm.org/sealion |
24 |
|
\end{verbatim} |
25 |
|
Here you will find an on-line version of this document, a |
26 |
|
``browsable'' copy of the code and a searchable database of the model |
27 |
|
and site, as well as links for downloading the model and |
28 |
|
documentation, to data-sources and other related sites. |
29 |
|
|
30 |
\vspace*{4mm} |
There is also a support news group for the model that you can email at |
31 |
|
\texttt{support@mitgcm.org} or browse at: |
|
\vspace*{3mm} {\large July 2001} |
|
|
\end{center} |
|
|
|
|
|
In this part, we describe how to use the model. In the first section, we |
|
|
provide enough information to help you get started with the model. We |
|
|
believe the best way to familiarize yourself with the model is to run the |
|
|
case study examples provided with the base version. Information on how to |
|
|
obtain, compile, and run the code is found there as well as a brief |
|
|
description of the model structure directory and the case study examples. |
|
|
The latter and the code structure are described more fully in sections 2 and |
|
|
3, respectively. In section 4, we provide information on how to customize |
|
|
the code when you are ready to try implementing the configuration you have |
|
|
in mind. |
|
|
|
|
|
\section{Getting started} |
|
|
|
|
|
\subsection{Obtaining the code} |
|
|
|
|
|
The reference web site for the model is: |
|
|
\begin{verbatim} |
|
|
http://mitgcm.org |
|
|
\end{verbatim} |
|
|
|
|
|
On this site, you can download the model as well as find useful information, |
|
|
some of which might overlap with what is written here. There is also a |
|
|
support news group for the model located at (send your message to \texttt{% |
|
|
support@mitgcm.org}): |
|
32 |
\begin{verbatim} |
\begin{verbatim} |
33 |
news://mitgcm.org/mitgcm.support |
news://mitgcm.org/mitgcm.support |
34 |
\end{verbatim} |
\end{verbatim} |
35 |
|
A mail to the email list will reach all the developers and be archived |
36 |
|
on the newsgroup. A users email list will be established at some time |
37 |
|
in the future. |
38 |
|
|
39 |
|
\section{Obtaining the code} |
40 |
|
\label{sect:obtainingCode} |
41 |
|
|
42 |
|
MITgcm can be downloaded from our system by following |
43 |
|
the instructions below. As a courtesy we ask that you send e-mail to us at |
44 |
|
\begin{rawhtml} <A href=mailto:support@mitgcm.org> \end{rawhtml} |
45 |
|
support@mitgcm.org |
46 |
|
\begin{rawhtml} </A> \end{rawhtml} |
47 |
|
to enable us to keep track of who's using the model and in what application. |
48 |
|
You can download the model two ways: |
49 |
|
|
50 |
|
\begin{enumerate} |
51 |
|
\item Using CVS software. CVS is a freely available source code managment |
52 |
|
tool. To use CVS you need to have the software installed. Many systems |
53 |
|
come with CVS pre-installed, otherwise good places to look for |
54 |
|
the software for a particular platform are |
55 |
|
\begin{rawhtml} <A href=http://www.cvshome.org/ target="idontexist"> \end{rawhtml} |
56 |
|
cvshome.org |
57 |
|
\begin{rawhtml} </A> \end{rawhtml} |
58 |
|
and |
59 |
|
\begin{rawhtml} <A href=http://www.wincvs.org/ target="idontexist"> \end{rawhtml} |
60 |
|
wincvs.org |
61 |
|
\begin{rawhtml} </A> \end{rawhtml} |
62 |
|
. |
63 |
|
|
64 |
|
\item Using a tar file. This method is simple and does not |
65 |
|
require any special software. However, this method does not |
66 |
|
provide easy support for maintenance updates. |
67 |
|
|
68 |
|
\end{enumerate} |
69 |
|
|
70 |
If CVS is available on your system, we strongly encourage you to use it. CVS |
If CVS is available on your system, we strongly encourage you to use it. CVS |
71 |
provides an efficient and elegant way of organizing your code and keeping |
provides an efficient and elegant way of organizing your code and keeping |
72 |
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 |
73 |
download a tar file. |
download a tar file. |
74 |
|
|
|
\subsubsection{using CVS} |
|
|
|
|
75 |
Before you can use CVS, the following environment variable has to be set in |
Before you can use CVS, the following environment variable has to be set in |
76 |
your .cshrc or .tcshrc: |
your .cshrc or .tcshrc: |
77 |
\begin{verbatim} |
\begin{verbatim} |
78 |
% setenv CVSROOT :pserver:cvsanon@mitgcm.org:/u/u0/gcmpack |
% setenv CVSROOT :pserver:cvsanon@mitgcm.org:/u/u0/gcmpack |
79 |
|
\end{verbatim} |
80 |
|
|
81 |
|
To start using CVS, register with the MITgcm CVS server using command: |
82 |
|
\begin{verbatim} |
83 |
% cvs login ( CVS password: cvsanon ) |
% cvs login ( CVS password: cvsanon ) |
84 |
\end{verbatim} |
\end{verbatim} |
85 |
|
You only need to do ``cvs login'' once. |
86 |
|
|
87 |
You only need to do ``cvs login'' once. To obtain the latest source: |
To obtain the sources for release1 type: |
88 |
\begin{verbatim} |
\begin{verbatim} |
89 |
% cvs co -d directory models/MITgcmUV |
% cvs co -d directory -P -r release1 MITgcmUV |
90 |
\end{verbatim} |
\end{verbatim} |
91 |
|
|
92 |
This creates a directory called \textit{directory}. If \textit{directory} |
This creates a directory called \textit{directory}. If \textit{directory} |
93 |
exists this command updates your code based on the repository. Each |
exists this command updates your code based on the repository. Each |
94 |
directory in the source tree contains a directory \textit{CVS}. This |
directory in the source tree contains a directory \textit{CVS}. This |
95 |
information is required by CVS to keep track of your file versions with |
information is required by CVS to keep track of your file versions with |
96 |
respect to the repository. Don't edit the files in \textit{CVS}! To obtain a |
respect to the repository. Don't edit the files in \textit{CVS}! |
97 |
specific \textit{version} that is not the latest source: |
You can also use CVS to download code updates. More extensive |
98 |
\begin{verbatim} |
information on using CVS for maintaining MITgcm code can be found |
99 |
% cvs co -d directory -r version models/MITgcmUV |
\begin{rawhtml} <A href=http://mitgcm.org/usingcvstoget.html target="idontexist"> \end{rawhtml} |
100 |
\end{verbatim} |
here |
101 |
|
\begin{rawhtml} </A> \end{rawhtml} |
102 |
|
. |
103 |
|
|
|
\subsubsection{other methods} |
|
104 |
|
|
105 |
You can download the model as a tar file from the reference web site at: |
\paragraph*{Conventional download method} |
106 |
|
\label{sect:conventionalDownload} |
107 |
|
|
108 |
|
If you do not have CVS on your system, you can download the model as a |
109 |
|
tar file from the reference web site at: |
110 |
|
\begin{rawhtml} <A href=http://mitgcm.org/download target="idontexist"> \end{rawhtml} |
111 |
\begin{verbatim} |
\begin{verbatim} |
112 |
http://mitgcm.org/download/ |
http://mitgcm.org/download/ |
113 |
\end{verbatim} |
\end{verbatim} |
114 |
|
\begin{rawhtml} </A> \end{rawhtml} |
115 |
|
The tar file still contains CVS information which we urge you not to |
116 |
|
delete; even if you do not use CVS yourself the information can help |
117 |
|
us if you should need to send us your copy of the code. |
118 |
|
|
119 |
\subsection{Model and directory structure} |
\section{Model and directory structure} |
120 |
|
|
121 |
The ``numerical'' model is contained within a execution environment support |
The ``numerical'' model is contained within a execution environment support |
122 |
wrapper. This wrapper is designed to provide a general framework for |
wrapper. This wrapper is designed to provide a general framework for |
166 |
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. |
167 |
|
|
168 |
\item \textit{utils}: this directory contains various utilities. The |
\item \textit{utils}: this directory contains various utilities. The |
169 |
subdirectory \textit{knudsen2} contains code and a makefile that compute |
subdirectory \textit{knudsen2} contains code and a makefile that |
170 |
coefficients of the polynomial approximation to the knudsen formula for an |
compute coefficients of the polynomial approximation to the knudsen |
171 |
ocean nonlinear equation of state. The \textit{matlab} subdirectory contains |
formula for an ocean nonlinear equation of state. The \textit{matlab} |
172 |
matlab scripts for reading model output directly into matlab. \textit{scripts% |
subdirectory contains matlab scripts for reading model output directly |
173 |
} contains C-shell post-processing scripts for joining processor-based and |
into matlab. \textit{scripts} contains C-shell post-processing |
174 |
tiled-based model output. |
scripts for joining processor-based and tiled-based model output. |
175 |
|
|
176 |
\item \textit{verification}: this directory contains the model examples. See |
\item \textit{verification}: this directory contains the model examples. See |
177 |
below. |
section \ref{sect:modelExamples}. |
178 |
\end{itemize} |
\end{itemize} |
179 |
|
|
180 |
\subsection{Model examples} |
\section{Example experiments} |
181 |
|
\label{sect:modelExamples} |
182 |
|
|
183 |
Now that you have successfully downloaded the model code we recommend that |
Now that you have successfully downloaded the model code we recommend that |
184 |
you first try to run the examples provided with the base version. You will |
you first try to run the examples provided with the base version. You will |
187 |
the directory \textit{verification} and are briefly described below (a full |
the directory \textit{verification} and are briefly described below (a full |
188 |
description is given in section 2): |
description is given in section 2): |
189 |
|
|
190 |
\subsubsection{List of model examples} |
\subsection{List of model examples} |
191 |
|
|
192 |
\begin{itemize} |
\begin{itemize} |
193 |
\item \textit{exp0} - single layer, ocean double gyre (barotropic with |
\item \textit{exp0} - single layer, ocean double gyre (barotropic with |
241 |
\item \textit{adjustment.cs-32x32x1} |
\item \textit{adjustment.cs-32x32x1} |
242 |
\end{itemize} |
\end{itemize} |
243 |
|
|
244 |
\subsubsection{Directory structure of model examples} |
\subsection{Directory structure of model examples} |
245 |
|
|
246 |
Each example directory has the following subdirectories: |
Each example directory has the following subdirectories: |
247 |
|
|
293 |
Once you have chosen the example you want to run, you are ready to compile |
Once you have chosen the example you want to run, you are ready to compile |
294 |
the code. |
the code. |
295 |
|
|
296 |
\subsection{Compiling the code} |
\section{Building the code} |
297 |
|
\label{sect:buildingCode} |
298 |
|
|
299 |
|
To compile the code, we use the {\em make} program. This uses a file |
300 |
|
({\em Makefile}) that allows us to pre-process source files, specify |
301 |
|
compiler and optimization options and also figures out any file |
302 |
|
dependancies. We supply a script ({\em genmake}), described in section |
303 |
|
\ref{sect:genmake}, that automatically creates the {\em Makefile} for |
304 |
|
you. You then need to build the dependancies and compile the code. |
305 |
|
|
306 |
|
As an example, let's assume that you want to build and run experiment |
307 |
|
\textit{verification/exp2}. The are multiple ways and places to actually |
308 |
|
do this but here let's build the code in |
309 |
|
\textit{verification/exp2/input}: |
310 |
|
\begin{verbatim} |
311 |
|
% cd verification/exp2/input |
312 |
|
\end{verbatim} |
313 |
|
First, build the {\em Makefile}: |
314 |
|
\begin{verbatim} |
315 |
|
% ../../../tools/genmake -mods=../code |
316 |
|
\end{verbatim} |
317 |
|
The command line option tells {\em genmake} to override model source |
318 |
|
code with any files in the directory {\em ./code/}. |
319 |
|
|
320 |
|
If there is no \textit{.genmakerc} in the \textit{input} directory, you have |
321 |
|
to use the following options when invoking \textit{genmake}: |
322 |
|
\begin{verbatim} |
323 |
|
% ../../../tools/genmake -mods=../code |
324 |
|
\end{verbatim} |
325 |
|
|
326 |
|
Next, create the dependancies: |
327 |
|
\begin{verbatim} |
328 |
|
% make depend |
329 |
|
\end{verbatim} |
330 |
|
This modifies {\em Makefile} by attaching a [long] list of files on |
331 |
|
which other files depend. The purpose of this is to reduce |
332 |
|
re-compilation if and when you start to modify the code. {\tt make |
333 |
|
depend} also created links from the model source to this directory. |
334 |
|
|
335 |
|
Now compile the code: |
336 |
|
\begin{verbatim} |
337 |
|
% make |
338 |
|
\end{verbatim} |
339 |
|
The {\tt make} command creates an executable called \textit{mitgcmuv}. |
340 |
|
|
341 |
|
Now you are ready to run the model. General instructions for doing so are |
342 |
|
given in section \ref{sect:runModel}. Here, we can run the model with: |
343 |
|
\begin{verbatim} |
344 |
|
./mitgcmuv > output.txt |
345 |
|
\end{verbatim} |
346 |
|
where we are re-directing the stream of text output to the file {\em |
347 |
|
output.txt}. |
348 |
|
|
349 |
|
|
350 |
|
\subsection{Building/compiling the code elsewhere} |
351 |
|
|
352 |
|
In the example above (section \ref{sect:buildingCode}) we built the |
353 |
|
executable in the {\em input} directory of the experiment for |
354 |
|
convenience. You can also configure and compile the code in other |
355 |
|
locations, for example on a scratch disk with out having to copy the |
356 |
|
entire source tree. The only requirement to do so is you have {\tt |
357 |
|
genmake} in your path or you know the absolute path to {\tt genmake}. |
358 |
|
|
359 |
|
The following sections outline some possible methods of organizing you |
360 |
|
source and data. |
361 |
|
|
362 |
|
\subsubsection{Building from the {\em ../code directory}} |
363 |
|
|
364 |
|
This is just as simple as building in the {\em input/} directory: |
365 |
|
\begin{verbatim} |
366 |
|
% cd verification/exp2/code |
367 |
|
% ../../../tools/genmake |
368 |
|
% make depend |
369 |
|
% make |
370 |
|
\end{verbatim} |
371 |
|
However, to run the model the executable ({\em mitgcmuv}) and input |
372 |
|
files must be in the same place. If you only have one calculation to make: |
373 |
|
\begin{verbatim} |
374 |
|
% cd ../input |
375 |
|
% cp ../code/mitgcmuv ./ |
376 |
|
% ./mitgcmuv > output.txt |
377 |
|
\end{verbatim} |
378 |
|
or if you will be making muliple runs with the same executable: |
379 |
|
\begin{verbatim} |
380 |
|
% cd ../ |
381 |
|
% cp -r input run1 |
382 |
|
% cp code/mitgcmuv run1 |
383 |
|
% cd run1 |
384 |
|
% ./mitgcmuv > output.txt |
385 |
|
\end{verbatim} |
386 |
|
|
387 |
|
\subsubsection{Building from a new directory} |
388 |
|
|
389 |
|
Since the {\em input} directory contains input files it is often more |
390 |
|
useful to keep {\em input} prestine and build in a new directory |
391 |
|
within {\em verification/exp2/}: |
392 |
|
\begin{verbatim} |
393 |
|
% cd verification/exp2 |
394 |
|
% mkdir build |
395 |
|
% cd build |
396 |
|
% ../../../tools/genmake -mods=../code |
397 |
|
% make depend |
398 |
|
% make |
399 |
|
\end{verbatim} |
400 |
|
This builds the code exactly as before but this time you need to copy |
401 |
|
either the executable or the input files or both in order to run the |
402 |
|
model. For example, |
403 |
|
\begin{verbatim} |
404 |
|
% cp ../input/* ./ |
405 |
|
% ./mitgcmuv > output.txt |
406 |
|
\end{verbatim} |
407 |
|
or if you tend to make multiple runs with the same executable then |
408 |
|
running in a new directory each time might be more appropriate: |
409 |
|
\begin{verbatim} |
410 |
|
% cd ../ |
411 |
|
% mkdir run1 |
412 |
|
% cp build/mitgcmuv run1/ |
413 |
|
% cp input/* run1/ |
414 |
|
% cd run1 |
415 |
|
% ./mitgcmuv > output.txt |
416 |
|
\end{verbatim} |
417 |
|
|
418 |
|
\subsubsection{Building from on a scratch disk} |
419 |
|
|
420 |
|
Model object files and output data can use up large amounts of disk |
421 |
|
space so it is often the case that you will be operating on a large |
422 |
|
scratch disk. Assuming the model source is in {\em ~/MITgcm} then the |
423 |
|
following commands will build the model in {\em /scratch/exp2-run1}: |
424 |
|
\begin{verbatim} |
425 |
|
% cd /scratch/exp2-run1 |
426 |
|
% ~/MITgcm/tools/genmake -rootdir=~/MITgcm -mods=~/MITgcm/verification/exp2/code |
427 |
|
% make depend |
428 |
|
% make |
429 |
|
\end{verbatim} |
430 |
|
To run the model here, you'll need the input files: |
431 |
|
\begin{verbatim} |
432 |
|
% cp ~/MITgcm/verification/exp2/input/* ./ |
433 |
|
% ./mitgcmuv > output.txt |
434 |
|
\end{verbatim} |
435 |
|
|
436 |
|
As before, you could build in one directory and make multiple runs of |
437 |
|
the one experiment: |
438 |
|
\begin{verbatim} |
439 |
|
% cd /scratch/exp2 |
440 |
|
% mkdir build |
441 |
|
% cd build |
442 |
|
% ~/MITgcm/tools/genmake -rootdir=~/MITgcm -mods=~/MITgcm/verification/exp2/code |
443 |
|
% make depend |
444 |
|
% make |
445 |
|
% cd ../ |
446 |
|
% cp -r ~/MITgcm/verification/exp2/input run2 |
447 |
|
% cd run2 |
448 |
|
% ./mitgcmuv > output.txt |
449 |
|
\end{verbatim} |
450 |
|
|
451 |
\subsubsection{The script \textit{genmake}} |
|
452 |
|
|
453 |
|
\subsection{\textit{genmake}} |
454 |
|
\label{sect:genmake} |
455 |
|
|
456 |
To compile the code, use the script \textit{genmake} located in the \textit{% |
To compile the code, use the script \textit{genmake} located in the \textit{% |
457 |
tools} directory. \textit{genmake} is a script that generates the makefile. |
tools} directory. \textit{genmake} is a script that generates the makefile. |
552 |
that particular example. In this way you don't need to type the options when |
that particular example. In this way you don't need to type the options when |
553 |
invoking \textit{genmake}. |
invoking \textit{genmake}. |
554 |
|
|
|
\subsubsection{Compiling} |
|
555 |
|
|
556 |
Let's assume that you want to run, say, example \textit{exp2} in the \textit{% |
\section{Running the model} |
557 |
input} directory. To compile the code, type the following commands from the |
\label{sect:runModel} |
|
model root tree: |
|
|
\begin{verbatim} |
|
|
% cd verification/exp2/input |
|
|
% ../../../tools/genmake |
|
|
% make depend |
|
|
% make |
|
|
\end{verbatim} |
|
558 |
|
|
559 |
If there is no \textit{.genmakerc} in the \textit{input} directory, you have |
If compilation finished succesfuully (section \ref{sect:buildModel}) |
560 |
to use the following options when invoking \textit{genmake}: |
then an executable called {\em mitgcmuv} will now exist in the local |
561 |
\begin{verbatim} |
directory. |
|
% ../../../tools/genmake -mods=../code |
|
|
\end{verbatim} |
|
562 |
|
|
563 |
In addition, you will probably want to disable some of the packages. Taking |
To run the model as a single process (ie. not in parallel) simply |
564 |
again the case of \textit{exp2}, the full \textit{genmake} command will |
type: |
|
probably look like this: |
|
565 |
\begin{verbatim} |
\begin{verbatim} |
566 |
% ../../../tools/genmake -mods=../code -disable=kpp,gmredi,aim,... |
% ./mitgcmuv |
567 |
\end{verbatim} |
\end{verbatim} |
568 |
|
The ``./'' is a safe-guard to make sure you use the local executable |
569 |
The make command creates an executable called \textit{mitgcmuv}. |
in case you have others that exist in your path (surely odd if you |
570 |
|
do!). The above command will spew out many lines of text output to |
571 |
Note that you can compile and run the code in another directory than \textit{% |
your screen. This output contains details such as parameter values as |
572 |
input}. You just need to make sure that you copy the input data files into |
well as diagnostics such as mean Kinetic energy, largest CFL number, |
573 |
the directory where you want to run the model. For example to compile from |
etc. It is worth keeping this text output with the binary output so we |
574 |
\textit{code}: |
normally re-direct the {\em stdout} stream as follows: |
575 |
\begin{verbatim} |
\begin{verbatim} |
576 |
% cd verification/exp2/code |
% ./mitgcmuv > output.txt |
|
% ../../../tools/genmake |
|
|
% make depend |
|
|
% make |
|
577 |
\end{verbatim} |
\end{verbatim} |
578 |
|
|
579 |
\subsection{Running the model} |
For the example experiments in {\em vericication}, an example of the |
580 |
|
output is kept in {\em results/output.txt} for comparison. You can compare |
581 |
|
your {\em output.txt} with this one to check that the set-up works. |
582 |
|
|
|
The first thing to do is to run the code by typing \textit{mitgcmuv} and see |
|
|
what happens. You can compare what you get with what is in the \textit{% |
|
|
results} directory. Unless noted otherwise, most examples are set up to run |
|
|
for a few time steps only so that you can quickly figure out whether the |
|
|
model is working or not. |
|
583 |
|
|
584 |
\subsubsection{Output files} |
|
585 |
|
\subsection{Output files} |
586 |
|
|
587 |
The model produces various output files. At a minimum, the instantaneous |
The model produces various output files. At a minimum, the instantaneous |
588 |
``state'' of the model is written out, which is made of the following files: |
``state'' of the model is written out, which is made of the following files: |
633 |
used to restart the model but are overwritten every other time they are |
used to restart the model but are overwritten every other time they are |
634 |
output to save disk space during long integrations. |
output to save disk space during long integrations. |
635 |
|
|
636 |
\subsubsection{Looking at the output} |
\subsection{Looking at the output} |
637 |
|
|
638 |
All the model data are written according to a ``meta/data'' file format. |
All the model data are written according to a ``meta/data'' file format. |
639 |
Each variable is associated with two files with suffix names \textit{.data} |
Each variable is associated with two files with suffix names \textit{.data} |
647 |
\textit{utils/matlab} under the root tree. The script \textit{rdmds.m} reads |
\textit{utils/matlab} under the root tree. The script \textit{rdmds.m} reads |
648 |
the data. Look at the comments inside the script to see how to use it. |
the data. Look at the comments inside the script to see how to use it. |
649 |
|
|
650 |
\section{Code structure} |
Some examples of reading and visualizing some output in {\em Matlab}: |
651 |
|
\begin{verbatim} |
652 |
|
% matlab |
653 |
|
>> H=rdmds('Depth'); |
654 |
|
>> contourf(H');colorbar; |
655 |
|
>> title('Depth of fluid as used by model'); |
656 |
|
|
657 |
|
>> eta=rdmds('Eta',10); |
658 |
|
>> imagesc(eta');axis ij;colorbar; |
659 |
|
>> title('Surface height at iter=10'); |
660 |
|
|
661 |
\section{Doing it yourself: customizing the code} |
>> eta=rdmds('Eta',[0:10:100]); |
662 |
|
>> for n=1:11; imagesc(eta(:,:,n)');axis ij;colorbar;pause(.5);end |
663 |
|
\end{verbatim} |
664 |
|
|
665 |
\subsection{\protect\bigskip Configuration and setup} |
\section{Doing it yourself: customizing the code} |
666 |
|
|
667 |
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 |
668 |
easiest thing is to use and adapt the setup of the case studies experiment |
easiest thing is to use and adapt the setup of the case studies experiment |
672 |
the ''execution environment'' part is covered in the parallel implementation |
the ''execution environment'' part is covered in the parallel implementation |
673 |
section) and on the variables and parameters that you are likely to change. |
section) and on the variables and parameters that you are likely to change. |
674 |
|
|
675 |
|
\subsection{Configuration and setup} |
676 |
|
|
677 |
The CPP keys relative to the ''numerical model'' part of the code are all |
The CPP keys relative to the ''numerical model'' part of the code are all |
678 |
defined and set in the file \textit{CPP\_OPTIONS.h }in the directory \textit{% |
defined and set in the file \textit{CPP\_OPTIONS.h }in the directory \textit{% |
679 |
model/inc }or in one of the \textit{code }directories of the case study |
model/inc }or in one of the \textit{code }directories of the case study |
690 |
computational domain, the equations solved in the model, and the simulation |
computational domain, the equations solved in the model, and the simulation |
691 |
controls. |
controls. |
692 |
|
|
693 |
\subsubsection{Computational domain, geometry and time-discretization} |
\subsection{Computational domain, geometry and time-discretization} |
694 |
|
|
695 |
\begin{itemize} |
\begin{itemize} |
696 |
\item dimensions |
\item dimensions |
782 |
stagger baroclinic time stepping can be activated by setting the logical |
stagger baroclinic time stepping can be activated by setting the logical |
783 |
variable \textbf{staggerTimeStep }to '.\texttt{TRUE}.'. |
variable \textbf{staggerTimeStep }to '.\texttt{TRUE}.'. |
784 |
|
|
785 |
\subsubsection{Equation of state} |
\subsection{Equation of state} |
786 |
|
|
787 |
First, because the model equations are written in terms of perturbations, a |
First, because the model equations are written in terms of perturbations, a |
788 |
reference thermodynamic state needs to be specified. This is done through |
reference thermodynamic state needs to be specified. This is done through |
811 |
values of the vertical levels in \textit{knudsen2.f }so that they match |
values of the vertical levels in \textit{knudsen2.f }so that they match |
812 |
those of your configuration). \textit{\ } |
those of your configuration). \textit{\ } |
813 |
|
|
814 |
\subsubsection{Momentum equations} |
\subsection{Momentum equations} |
815 |
|
|
816 |
In this section, we only focus for now on the parameters that you are likely |
In this section, we only focus for now on the parameters that you are likely |
817 |
to change, i.e. the ones relative to forcing and dissipation for example. |
to change, i.e. the ones relative to forcing and dissipation for example. |
915 |
\texttt{TRUE}.' and the other to '.\texttt{FALSE}.' depending on how you |
\texttt{TRUE}.' and the other to '.\texttt{FALSE}.' depending on how you |
916 |
want to deal with the ocean upper or atmosphere lower boundary). |
want to deal with the ocean upper or atmosphere lower boundary). |
917 |
|
|
918 |
\subsubsection{Tracer equations} |
\subsection{Tracer equations} |
919 |
|
|
920 |
This section covers the tracer equations i.e. the potential temperature |
This section covers the tracer equations i.e. the potential temperature |
921 |
equation and the salinity (for the ocean) or specific humidity (for the |
equation and the salinity (for the ocean) or specific humidity (for the |
1006 |
vertically due to static instabilities. Note that \textbf{cadjFreq }and |
vertically due to static instabilities. Note that \textbf{cadjFreq }and |
1007 |
\textbf{ivdc\_kappa }can not both have non-zero value. |
\textbf{ivdc\_kappa }can not both have non-zero value. |
1008 |
|
|
1009 |
\subsubsection{Simulation controls} |
\subsection{Simulation controls} |
1010 |
|
|
1011 |
The model ''clock'' is defined by the variable \textbf{deltaTClock }(in s) |
The model ''clock'' is defined by the variable \textbf{deltaTClock }(in s) |
1012 |
which determines the IO frequencies and is used in tagging output. |
which determines the IO frequencies and is used in tagging output. |