|
|
|
Next: 3.19 Sensitivity of Air-Sea
Up: 3.18 Global Ocean State
Previous: 3.18.4 Compiling
Contents
Copy the mitgcmuv_ad executable to input_ad/ and optim.x to the
subdirectory input_ad/OPTIM/. Move into input_ad/. The first iteration is
somewhat particular and is best done "by hand" while the following iterations
can be run automatically (see below). Check that the iteration number is set
to 0 in data.optim and run the MITgcm:
% ./mitgcmuv_ad
The output files adxx_hfluxm.0000000000.* and xx_hfluxm.0000000000.* contain
the sensitivity of the cost function to
and the adjustment
to
(zero at the first iteration), respectively. Two other
files called costhflux_tut_MITgcm.opt0000 and ctrlhflux_tut_MITgcm.opt0000
are also generated. They essentially contain the same information as the
adxx_.hfluxm* and xx_hfluxm* files, but in a compressed format. These two files
are the only ones involved in the communication between the adjoint model
mitgcmuv_ad and the line-search algorithm optim.x. Only at the first
iteration, are they both generated by mitgcmuv_ad. Subsenquently,
costhflux_tut_MITgcm.opt
is an output of the adjoint model at
iteration
and an input of the line-search. The latter returns an updated
adjustment in ctrlhflux_tut_MITgcm.opt
to be used as an input of the
adjoint model at iteration n+1.
At the first iteration, move costhflux_tut_MITgcm.opt0000 and
ctrlhflux_tut_MITgcm.opt0000 to OPTIM/, move into this directory and link data.optim
and data.ctrl locally:
% cd OPTIM/
% ln -s ../data.optim .
% ln -s ../data.ctrl .
The target cost function fmin needs to be specified too: as a rule of thumb,
it should be about 0.95-0.90 times the value of the cost function at
the first iteration. This value is only used at the first iteration and does
not need to be updated afterward. However, it implicitly specifies the
``pace'' at which the cost function is going down (if you are lucky and it does
indeed diminish!). More in the ECCO section maybe ?
Once this is done, run the line-search algorithm:
% ./optim.x
which computes the updated adjustment for iteration 1, ctrlhflux_tut_MITgcm.opt0001.
The following iterations can be executed automatically using the shell
script cycsh found in input_ad/. This script will take care of changing
the iteration numbers in the data.optim, launch the adjoint model, clean and
store the outputs, move the costhflux* and ctrlhflux* files, and run the
line-search algorithm. Edit cycsh to specify the prefix of the
directories used to store the outputs and the maximum number of iteration.
Next: 3.19 Sensitivity of Air-Sea
Up: 3.18 Global Ocean State
Previous: 3.18.4 Compiling
Contents
mitgcm-support@mitgcm.org
Copyright © 2006
Massachusetts Institute of Technology |
Last update 2018-01-23 |
|
|