Shortening an inversion¶
This case is typical of M1QN3.
When a very small
epsg has been asked for, the optimization may exit in mode 4 i.e. the convergence is not reached but the maximal number of simulations is reached.
Examining the gradient norm ratio (in the logfile), a satisfying value can be found in the available iterations.
It is then required to relaunch the job to stop on this value and generate the normal (netcdf) outputs of the CIF.
In order to achieve this:
In case the directory
fwd_-002(which contains the final results) has already been created, remove it.
Modify the yaml to re-read the available computations:
autorestartmust be True
reload_from_previousmust be True. If
simulatoris not specified in the yaml (because it is not necessary when the default cost is used, as is generally the case), specify it as shown in the following example.
mode: minimizer: df1: 0.5 epsg: 0.1 maxiter: 10 nsim: 25 plugin: name: M1QN3 version: std simulator: plugin: name: gausscost version: std reload_from_previous: true plugin: name: 4dvar version: std save_out_netcdf: true obsoperator: plugin: name: standard version: std type: obsoperator autorestart: True
Change the convergence criteria i.e.
epsgfor m1qn3, to stop on the targeted iteration. The chosen value must be larger than the targeted gradient norm ratio but smaller than all the previous ones.
If relevant, change the name of the logfile so that the details of all the available simulations are not overwritten by the logfile of the shortened inversion.
Launch the job.