| 1 |
jmc |
1.2 |
\begin{figure}[!ht] |
| 2 |
heimbach |
1.1 |
|
| 3 |
|
|
{\scriptsize |
| 4 |
|
|
\begin{verbatim} |
| 5 |
|
|
|
| 6 |
|
|
the_model_main |
| 7 |
|
|
| |
| 8 |
|
|
|-- ctrl_unpack |
| 9 |
|
|
|-- adthe_main_loop - unperturbed cost function and |
| 10 |
|
|
|-- ctrl_pack adjoint gradient are computed here |
| 11 |
|
|
| |
| 12 |
|
|
|-- grdchk_main |
| 13 |
|
|
| |
| 14 |
|
|
|-- grdchk_init |
| 15 |
|
|
|-- do icomp=... - loop over control vector elements |
| 16 |
|
|
| |
| 17 |
|
|
|-- grdchk_loc - determine location of icomp on grid |
| 18 |
|
|
| |
| 19 |
|
|
|-- grdchk_getxx - get control vector component from file |
| 20 |
|
|
| perturb it and write back to file |
| 21 |
|
|
|-- grdchk_getadxx - get gradient component calculated |
| 22 |
|
|
| via adjoint |
| 23 |
|
|
|-- the_main_loop - forward run and cost evaluation |
| 24 |
|
|
| with perturbed control vector element |
| 25 |
|
|
|-- calculate ratio of adj. vs. finite difference gradient |
| 26 |
|
|
| |
| 27 |
|
|
|-- grdchk_setxx - Reset control vector element |
| 28 |
|
|
| |
| 29 |
|
|
|-- grdchk_print - print results |
| 30 |
|
|
|
| 31 |
|
|
\end{verbatim} |
| 32 |
|
|
} |
| 33 |
|
|
|
| 34 |
|
|
\caption{~} |
| 35 |
|
|
\label{fig:grdchkflow} |
| 36 |
|
|
\end{figure} |