congrad/std congrad/std#
Description#
CONGRAD minimizer: conjugate-gradient / Lanczos algorithm for variational DA.
CONGRAD implements a Lanczos-based conjugate-gradient algorithm tailored for variational data assimilation. It minimises the quadratic approximation of the cost function \(J(\boldsymbol{\chi})\) by building a Krylov subspace basis via the Lanczos iteration and solving the reduced tridiagonal system exactly. The algorithm also estimates the leading eigenvectors of the Hessian, from which a low-rank approximation of the posterior error covariance matrix is reconstructed: \(\mathbf{P}_a \approx \mathbf{B} - \sum_k e_k e_k^\top\).
Original algorithm: Mike Fisher (ECMWF), April 2002.
Python adaptation: Frédéric Chevallier (LSCE), April 2004.
YAML arguments#
The following arguments are used to configure the plugin. pyCIF will return an exception at the initialization if mandatory arguments are not specified, or if any argument does not fit accepted values or type:
Optional arguments#
- save_uncertainties : bool, optional, default False
Save the estimated leading eigenvectors of the Hessian, scaled so that they allow the reconstruction of the uncertainty reduction matrix
- force_linearize : bool, optional, default False
Force linearizing the cost function by using the TL instead of the forward
- maxiter : int, optional, default 1
maximum number of iterations
- check_every : int, optional, default 0
Every N iterations, dump the control vector at the current estimate of the minimum to
$workdir/congrad_checks/. 0 disables the dumps. Independently of this option, the cost function and gradient at the current estimate of the minimum are deduced at each iteration from the quadratic model of the cost function, at no cost, and written to$workdir/simulator/congrad_checks_cost.csvandcongrad_checks_gradcost.csv
- check_mode : “predicted” or “evaluated”, optional, default “predicted”
predicted: only use the values deduced from the quadratic model, which are exact for a linear observation operator or withforce_linearize.evaluated: everycheck_everyiterations, also evaluate the actual cost function and gradient with an independent job submitted through the platform, while the minimization goes on; each check costs one forward and one adjoint run. Only useful for non-linear problems
Requirements#
The current plugin requires the present plugins to run properly:
YAML template#
Please find below a template for a YAML configuration:
1minimizer:
2 plugin:
3 name: congrad
4 version: std
5 type: minimizer
6
7 # Optional arguments
8 save_uncertainties: XXXXX # bool
9 force_linearize: XXXXX # bool
10 maxiter: XXXXX # int
11 check_every: XXXXX # int
12 check_mode: XXXXX # predicted|evaluated
See also