kalmanFilter.setCovariance
Directly set the covariance for the Kalman filter
Syntax
Description
Directly sets the covariance used by the Kalman Filter. If directly setting the covariance, the Kalman filter will not calculate the covariances between the ensemble and observation estimates. Instead, it will use the directly specified values. This approach can be useful when the default covariance matrices include many NaN elements (for example, as may happen for deep-time assimilations with changing continental configurations. You cannot implement inflation, localization, or blending when directly setting the covariance.
The first input provides the covariance between the state vector elements and the observation sites. It should be a3D array with one row per state vector element, and one column per observation site. The second input provides the covariance between the observation sites and one another. It should be a 3D array with one row and one column per observation site. Each element along the third dimension of Ycov must be a symmetric matrix.
The two inputs must have the same number of elements along the third dimension. If the third dimension has one element (i.e. both inputs are matrices), then the same covariance is used for each assimilation time step. Otherwise, the third dimension must have one element per time step (although see the next syntax for relaxing this requirement). C may contain NaN elements, although the filter will return a NaN update at any state vector rows with a NaN covariance. Ycov cannot include NaN elements.
Indicates which set of covariances to use as the covariance in each assimilated time step. This syntax allows the number of specified covariances to differ from the number of time steps.
Returns the current set of directly specified covariances for the filter.
obj = obj.setCovariance(‘reset’)
Deletes any directly specified covariances from the current filter.