kalmanFilter.localize

Implement covariance localization for a Kalman Filter


Syntax



Description

obj = obj.localize(wloc, yloc)

Implements covariance localization for a Kalman Filter. Covariance localization reduces the covariance of observation sites with state vector elements. Often, the localization is implemented so that covariance becomes zero outside of some localization radius. This prevents observation sites from updating distant state vector elements outside of the radius. Covariance localization is implemented after inflation, but before blending.

The first input provides the localization weights between the state vector rows and observation sites. It should be a 3D array with one row per state vector element, and one column per observation site. The second input is the localization weights between the observation sites and each other. It should be a 3D array with one row and one column per observation site. Each element along the third dimension of yloc 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 uses the same localization weights in all time steps. Otherwise, the third dimension must have one element per time step (although see the next syntax for relaxing this requirement). The localization weights cannot include NaN values or negative values.

obj = obj.localize(wloc, yloc, whichLoc)

Indicates which set of localization weights to use in each assimilation time step. This syntax allows the number of sets of localization weights to differ from the number of time steps.

[wloc, yloc, whichLoc] = obj.localize

Returns the current localization weights for the Kalman filter.

obj = obj.localize(‘reset’)

Deletes any current localization weights from the Kalman Filter.


Input Arguments

wloc

numeric 3*D* array [nState x nSite x 1|*nTime*|*nLoc*]
The localization weights between the state vector elements and observation sites. Cannot include NaN or negative values. If using a single set of localization weights, should have a single element along the third dimension. If the number of elements along the third dimension matches the number of time steps, uses the indicated set of localization weights in each time step. If the number of elements is neither 1 nor the number of time steps, use the whichLoc input to indicate which set of localization weights to use in each time step.

yloc

numeric 3*D* array [nSite x nSite x 1|*nTime*|*nLoc*]
The localization weights between the observation sites and one another. Cannot include NaN or negative values. The number of elements along the third dimension must match the number of elements for the wloc input. Each element along the third dimension must be a symmetric matrix.

whichLoc

vector, linear indices [nTime]
Indicates which set of localization weights to use in each time step. Must have one element per assimilation time step. Each element is the index of one of the sets of localization weights.

Output Arguments

obj

scalar kalmanFilter object
The kalmanFilter object with updated localization weights

wloc

numeric 3*D* array [nState x nSite x 1|*nTime*|*nLoc*] | []
The current localization weights between the state vector elements and observation sites. If there are no localization weights, returns an empty array.

yloc

numeric 3*D* array [nSite x nSite x 1|*nTime*|*nLoc*] | []
The current localization weights between the observation sites and one another. If there are no localization weights, returns an empty array.

whichLoc

vector, linear indices [nTime]
Indicates which set of localization weights to use in each time step. If there is a single set of localization weights, returns an empty array.