Changes between Initial Version and Version 1 of U_likelihood

Dec 2, 2016, 11:19:49 AM (5 years ago)



  • U_likelihood

    v1 v1  
     1= U_likelihood =
     3The page document the user-supplied call-back routine `U_likelihood`.
     5The routine `U_likelihood` is a call-back routine that has to be provided by the user. In the simplified interface the predefined name of the routine is `likelihood_pdaf`, but in the full interface, the user can choose the name of the routine.
     6The routine is used with the nonlinear filter NETF and called during the analysis step. The purpose of the routine is to compute the likelihood of the observation for a given ensemble member. The likelihood depends on the assumed observation error distribution. For a Gaussian observation error, the likelihood is '''exp(-0.5*(y-Hx)^T^*R^-1^*(y-Hx))'''. The vector '''y-HX =''' `resid` is proved as an input argument. The likelihood has to be returned in the variable `likely`.
     8The interface is the following:
     10SUBROUTINE U_likelihood(step, dim_obs_p, observation_p, resid, likely)
     13 * `step` : `integer, intent(in)`[[BR]] Current time step
     14 * `dim_obs_p` : `integer, intent(in)`[[BR]] Number of observations at current time step (i.e. the size of the observation vector)
     15 * `obs_p` : `real, intent(in), dimension(dim_obs_p)`[[BR]] Vector of observations
     16 * `resid` : `real, intent(in), dimension(dim_obs_p)`[[BR]] Input vector holding the residual
     17 * `likely` : `real, intent(out)`[[BR]] Output value of the likelihood
     21 * In case of a parallelization with domain decomposition, `resid` contains the part of the matrix that resides on the model sub-domain of the calling process. The likelihood has to be computed for the global vector.
     24 * The routine is very similar to the routine [wiki:U_prodRinvA]. The main addition is the computation of the likelihood after computing '''R^-1^*(y-Hx)''', which corresponds to '''R^-1^*A_p''' in [wiki:U_prodRinvA].
     25 * The information about the inverse observation error covariance matrix has to be provided by the user. Possibilities are to read this information from a file, or to use a Fortran module that holds this information, which one could already prepare in init_pdaf.
     26 * The routine does not require that the product is implemented as a real matrix-vector product. Rather, the product can be implemented in its most efficient form. For example, if the observation error covariance matrix is diagonal, only the multiplication of the inverse diagonal with the vector `resid` has to be implemented.
     27 * The observation vector `obs_p` is provided through the interface for cases where the observation error variance is relative to the actual value of the observations.