EMPIRE DA  v1.9.1
Data assimilation codes using EMPIRE communication
 All Classes Files Functions Variables Pages
threedvar_fcn.f90 File Reference

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...
 

Function/Subroutine Documentation

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.

Todo:
update 3dvar to work with EMPIRE VERSION 3!
Parameters
[in]nthe dimension of the state
[in]xcurrent guess
[out]ggradient of objective function
[out]fthe objective function

Definition at line 54 of file threedvar_fcn.f90.

Here is the call graph for this function:

Here is the caller graph for this function: