14 |
(in directory: {\it verification/tutorial\_tracer\_adjsens/}) |
(in directory: {\it verification/tutorial\_tracer\_adjsens/}) |
15 |
\end{center} |
\end{center} |
16 |
%********************************************************************** |
%********************************************************************** |
|
\label{ask_the_author:tracer_adjsens:doc_ad_examples} |
|
17 |
|
|
18 |
MITgcm has been adapted to enable AD using TAMC or TAF. |
MITgcm has been adapted to enable AD using TAMC or TAF. |
19 |
The present description, therefore, is specific to the |
The present description, therefore, is specific to the |
196 |
%\label{www:tutorials} |
%\label{www:tutorials} |
197 |
|
|
198 |
These files used to contain package-specific CPP-options |
These files used to contain package-specific CPP-options |
199 |
(see Section \ref{ask_the_author:tracer_adjsens:doc_ad_examples}). |
(see Section ref:ask-the-author). |
200 |
For technical reasons those options have been grouped together |
For technical reasons those options have been grouped together |
201 |
in the file {\it ECCO\_OPTIONS.h}. |
in the file {\it ECCO\_OPTIONS.h}. |
202 |
To retain the modularity, the files have been kept and contain |
To retain the modularity, the files have been kept and contain |
207 |
|
|
208 |
This file contains 'wrapper'-specific CPP options. |
This file contains 'wrapper'-specific CPP options. |
209 |
It only needs to be changed if the code is to be run |
It only needs to be changed if the code is to be run |
210 |
in a parallel environment (see Section \ref{ask_the_author:tracer_adjsens:doc_ad_examples}). |
in a parallel environment (see Section ref:ask-the-author). |
211 |
|
|
212 |
\subsubsection{File {\it CPP\_OPTIONS.h}} |
\subsubsection{File {\it CPP\_OPTIONS.h}} |
213 |
%\label{www:tutorials} |
%\label{www:tutorials} |
214 |
|
|
215 |
This file contains model-specific CPP options |
This file contains model-specific CPP options |
216 |
(see Section \ref{ask_the_author:tracer_adjsens:doc_ad_examples}). |
(see Section ref:ask-the-author). |
217 |
Most options are related to the forward model setup. |
Most options are related to the forward model setup. |
218 |
They are identical to the global steady circulation setup of |
They are identical to the global steady circulation setup of |
219 |
{\it verification/global\_ocean.90x40x15/}. |
{\it verification/global\_ocean.90x40x15/}. |
266 |
% |
% |
267 |
\hspace*{4ex} {\tt \#define ALLOW\_TAMC\_CHECKPOINTING} \\ |
\hspace*{4ex} {\tt \#define ALLOW\_TAMC\_CHECKPOINTING} \\ |
268 |
enables the checkpointing feature of TAMC |
enables the checkpointing feature of TAMC |
269 |
(see Section \ref{ask_the_author:tracer_adjsens:doc_ad_examples}). |
(see Section ref:ask-the-author). |
270 |
In the present example a 3-level checkpointing is implemented. |
In the present example a 3-level checkpointing is implemented. |
271 |
The code contains the relevant store directives, common block |
The code contains the relevant store directives, common block |
272 |
and tape initializations, storing key computation, |
and tape initializations, storing key computation, |
279 |
% |
% |
280 |
\hspace*{4ex} {\tt \#define ALLOW\_AUTODIFF\_MONITOOR} \\ |
\hspace*{4ex} {\tt \#define ALLOW\_AUTODIFF\_MONITOOR} \\ |
281 |
enables the monitoring of intermediate adjoint variables |
enables the monitoring of intermediate adjoint variables |
282 |
(see Section \ref{ask_the_author:tracer_adjsens:doc_ad_examples}). \\ |
(see Section ref:ask-the-author). \\ |
283 |
% |
% |
284 |
\hspace*{4ex} {\tt \#define ALLOW\_DIVIDED\_ADJOINT} \\ |
\hspace*{4ex} {\tt \#define ALLOW\_DIVIDED\_ADJOINT} \\ |
285 |
enables adjoint dump and restart |
enables adjoint dump and restart |
286 |
(see Section \ref{ask_the_author:tracer_adjsens:doc_ad_examples}). |
(see Section ref:ask-the-author). |
287 |
% |
% |
288 |
\item Cost function package: {\it pkg/cost/} \\ |
\item Cost function package: {\it pkg/cost/} \\ |
289 |
This package contains all relevant routines for |
This package contains all relevant routines for |
290 |
initializing, accumulating and finalizing the cost function |
initializing, accumulating and finalizing the cost function |
291 |
(see Section \ref{ask_the_author:tracer_adjsens:doc_ad_examples}). \\ |
(see Section ref:ask-the-author). \\ |
292 |
\hspace*{4ex} {\tt \#define ALLOW\_COST} \\ |
\hspace*{4ex} {\tt \#define ALLOW\_COST} \\ |
293 |
enables all general aspects of the cost function handling, |
enables all general aspects of the cost function handling, |
294 |
in particular the hooks in the forward code for |
in particular the hooks in the forward code for |
380 |
% |
% |
381 |
\item {\tt \#ifdef ALLOW\_TAMC\_CHECKPOINTING} \\ |
\item {\tt \#ifdef ALLOW\_TAMC\_CHECKPOINTING} \\ |
382 |
3-level checkpointing is enabled, i.e. the timestepping |
3-level checkpointing is enabled, i.e. the timestepping |
383 |
is divided into three different levels (see Section \ref{ask_the_author:tracer_adjsens:doc_ad_examples}). |
is divided into three different levels (see Section ref:ask-the-author). |
384 |
The model state of the outermost ({\tt nchklev\_3}) and the |
The model state of the outermost ({\tt nchklev\_3}) and the |
385 |
intermediate ({\tt nchklev\_2}) timestepping loop are stored to file |
intermediate ({\tt nchklev\_2}) timestepping loop are stored to file |
386 |
(handled in {\it the\_main\_loop}). |
(handled in {\it the\_main\_loop}). |