This functions uses the FUN to perform the analysis. EnKF function is developed inside the PEcAn.assim.sequential package which can be sent to this function to perform the Ensemble Kalman Filter. The other option is GEF function inside the same package allowing to perform Generalized Ensemble kalman Filter.

If you're using an arbitrary function you can use the ... to send any other variables to your desired analysis function.

Analysis.sda(settings, FUN, Forecast = list(Pf = NULL, mu.f = NULL, Q =
  NULL, X = NULL), Observed = list(R = NULL, Y = NULL), H, extraArg, ...)

Arguments

settings

pecan standard settings list.

FUN

A Function for performing the analysis step. Two available options are: 1-EnKF and 2-GEF.

Forecast

A list containing the forecasts variables including Q (process variance) and X (a dataframe of forecasts state variables for different ensemble)

Observed

A list containing the observed variables including R (cov of observed state variables) and Y (vector of estimated mean of observed state variables)

H

is a mtrix of 1's and 0's specifying which observations go with which variables.

extraArg

This argument is a list containing aqq, bqq and t. The aqq and bqq are shape parameters estimated over time for the proccess covariance and t gives the time in terms of index of obs.list. See Details.

...

Extra argument sent to the analysis function. In case you're using the `GEF` function, this function requires nt, obs.mean, obs.cov, which are the total number of steps, list of observed means and list of observed cov respectively.

Value

Returns whatever the FUN is returning. In case of EnKF and GEF, this function returns a list with estimated mean and cov matrix of forecast state variables as well as mean and cov estimated as a result of assimilation/analysis .