EMPIRE DA
v1.9.1
Data assimilation codes using EMPIRE communication
|
Go to the source code of this file.
Functions/Subroutines | |
subroutine | threedvar_fcn (n, x, f, g) |
subroutine to provide the objective function and gradient for 3dvar More... | |
subroutine threedvar_fcn | ( | integer, intent(in) | n, |
real(kind=rk), dimension(n), intent(in) | x, | ||
real(kind=rk), intent(out) | f, | ||
real(kind=rk), dimension(n), intent(out) | g | ||
) |
subroutine to provide the objective function and gradient for 3dvar
Let \(x\) be the state we wish to find using Var.
The objective function considered is
\(J(x) = \frac{1}{2}(x-x_b)^TB^{-1}(x-x_b) + \frac{1}{2}(y-H(x))^T R^{-1} (y - H(x)) )\)
where \(x_b\) is a background guess, \(B\) the background error covariance matrix,
\(y\) are the observations, and \(H\) the corresponding observation operator with associated observation error covariance matrix \(R\).
The gradient of the objective function can then be written
\(g = \nabla J(x) \approx B^{-1}(x-x_b) - H^TR^{-1}(y-H(x))\)
which is exact if \(H\) is linear
NOTE: this will only currently work for EMPIRE VERSION 1 of 2.
[in] | n | the dimension of the state |
[in] | x | current guess |
[out] | g | gradient of objective function |
[out] | f | the objective function |
Definition at line 54 of file threedvar_fcn.f90.