/[MITgcm]/manual/s_examples/global_oce_optim/global_oce_estimation.tex
ViewVC logotype

Diff of /manual/s_examples/global_oce_optim/global_oce_estimation.tex

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.5 by dfer, Tue Aug 2 21:49:07 2005 UTC revision 1.6 by edhill, Wed Aug 3 15:48:06 2005 UTC
# Line 144  these files associated with this experim Line 144  these files associated with this experim
144    
145  The optimization experiment requires two executables: 1) the  The optimization experiment requires two executables: 1) the
146  MITgcm and its adjoints (it{mitgcmuv\_ad}) and 2) the line-search  MITgcm and its adjoints (it{mitgcmuv\_ad}) and 2) the line-search
147  algorithm (\it{optim.x})  algorithm ({\it optim.x})
148    
149  \subsubsection{Compilation of MITgcm and its adjoint: \it{mitcgmuv\_ad}}  \subsubsection{Compilation of MITgcm and its adjoint: {\it mitcgmuv\_ad}}
150    
151  Before compiling, first note that, in the directory code\_ad/, two files  Before compiling, first note that, in the directory code\_ad/, two files
152  must be updated:  must be updated:
# Line 167  Then, in the directory build\_ad/, type: Line 167  Then, in the directory build\_ad/, type:
167  \end{verbatim}  \end{verbatim}
168  to generate the MITgcm executable mitgcmuv\_ad  to generate the MITgcm executable mitgcmuv\_ad
169    
170  \subsubsection{Compilation of the line-search algorithm: \it{optim.x}}  \subsubsection{Compilation of the line-search algorithm: {\it optim.x}}
171    
172  This is done from the directories lsopt/ and optim/ (under MITgcm/)  This is done from the directories lsopt/ and optim/ (under MITgcm/)
173    
# Line 178  library in the Makefile. Compile with: Line 178  library in the Makefile. Compile with:
178  \end{verbatim}  \end{verbatim}
179  (more details in lsopt\_doc.txt)  (more details in lsopt\_doc.txt)
180    
181  In optim/,  the path of the directory where \it{mitgcm\_ad} was compliled must be specified  In optim/,  the path of the directory where {\it mitgcm\_ad} was compliled must be specified
182  in the Makefile in the variable INCLUDEDIRS. The file name of the controle variable  in the Makefile in the variable INCLUDEDIRS. The file name of the controle variable
183  (xx\_hfluxm\_file here) must be added to the namelist read by optim\_num.F  (xx\_hfluxm\_file here) must be added to the namelist read by optim\_num.F
184    
# Line 190  and Line 190  and
190  \begin{verbatim}  \begin{verbatim}
191  % make  % make
192  \end{verbatim}  \end{verbatim}
193  to generate the line-search executable \it{optim.x}.  to generate the line-search executable {\it optim.x}.
194    
195  \subsection{Running the estimation}  \subsection{Running the estimation}
196    
197  Copy the \it{mitgcmuv\_ad} executable to input\_ad and \it{optim.x}  Copy the {\it mitgcmuv\_ad} executable to input\_ad and {\it optim.x}
198  to the subdirectory input\_ad/OPTIM. Move into input\_ad/.  to the subdirectory input\_ad/OPTIM. Move into input\_ad/.
199    
200  The first iteration has be done "by hand". Check that the iteration number is set  The first iteration has be done "by hand". Check that the iteration number is set
# Line 209  to $Q_\mathrm{netm}$ (zero at the first Line 209  to $Q_\mathrm{netm}$ (zero at the first
209  called ecco\_cost.. and ecco\_ctrl are also generated. They essentially contains  called ecco\_cost.. and ecco\_ctrl are also generated. They essentially contains
210  the same information as the adxx\_* and xx\_* files, but in a compressed format.  the same information as the adxx\_* and xx\_* files, but in a compressed format.
211  These two file are the only ones involved in the communication between the adjoint  These two file are the only ones involved in the communication between the adjoint
212  model \it{mitgcmuv\_ad} and the line-search algorithm \it{optim.x}. The ecco\_cost*n  model {\it mitgcmuv\_ad} and the line-search algorithm {\it optim.x}. The ecco\_cost*n
213  is an ouput of the adjoint model at iteration $n$ and an input of the line-search. The  is an ouput of the adjoint model at iteration $n$ and an input of the line-search. The
214  latter returns an updated perturbation in ecco\_ctrl*n+1 to be used as an input of  latter returns an updated perturbation in ecco\_ctrl*n+1 to be used as an input of
215  the adjoint model at iteration n+1.  the adjoint model at iteration n+1.
216    
217  At the first iteration, move these two files ecco\_cost and ecco\_ctrl  At the first iteration, move these two files ecco\_cost and ecco\_ctrl
218  to OPTIM/, open data.optim and check the iteration number is set to 0.  to OPTIM/, open data.optim and check the iteration number is set to 0.
219  The target cost function \it{fmin} needs to be specified: a rule of thumb  The target cost function {\it fmin} needs to be specified: a rule of thumb
220  suggest it should be set to about 0.95-0.90 times the value of the cost  suggest it should be set to about 0.95-0.90 times the value of the cost
221  function at the first iteration. This value is only used at the first  function at the first iteration. This value is only used at the first
222  iteration and does not need to be updated afterwards.  iteration and does not need to be updated afterwards.
# Line 229  Once this is done, run the line-search a Line 229  Once this is done, run the line-search a
229  \end{verbatim}  \end{verbatim}
230  which computes the updated perturbations for iteration 1 ecco\_ctrl\_1.  which computes the updated perturbations for iteration 1 ecco\_ctrl\_1.
231    
232  The following iterations can be executed automatically using the shell script \it{cycsh}  The following iterations can be executed automatically using the shell
233    script {\it cycsh}
234  found in input\_ad/. This script will take care of changing the iteration numbers in the  found in input\_ad/. This script will take care of changing the iteration numbers in the
235  data.optim, launch the adjoint model, clean and store the ouputs, move the  data.optim, launch the adjoint model, clean and store the ouputs, move the
236  ecco\_cost* and ecco\_ctrl* files, and run the line-search algotrithm.  ecco\_cost* and ecco\_ctrl* files, and run the line-search algotrithm.
237  Edit \it{cycsh} to specify the prefix of the directories used to store the ouputs and  Edit {\it cycsh} to specify the prefix of the directories used to store the ouputs and
238  the maximum number of iteration.  the maximum number of iteration.
239    

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.22