Calling Data Assimilation Methods Independently
Ensemble Square Root Filter
- DAPyr.DA.EnSRF_update(xf: ndarray, hx: ndarray, y: ndarray, HC: ndarray, HCH: ndarray, var_y: float, inf_flag: int, e_flag: int, qc: ndarray, **kwargs)
Performs an Ensemble Square Root Filter update based on Whitaker and Hamill (2002).
- Parameters:
xf (np.ndarray) – Array of size Nx x Ne containing the ensemble members
hx (np.ndarray) – Array of size Ny x Ne containing the ensemble members projected into obs-space
y (np.ndarray) – Array of size Ny x 1 containing the observations at time T
HC (np.ndarray) – Localization matrix of size Ny x Nx in state-space
HCH (np.ndarray) – Localization matrix of size Ny x Ny in obs-space
var_y (float) – Observation variance
inf_flag (int) – Flag to choose what inflation scheme to choose
e_flag (int) – Error flag
qc (np.ndarray) – Array of length Ny repesenting quality control of observations
**kwargs – Extra arguments to EnSRF_update to pass to inflation parameters. See documentation for EnSRF_update for a list of all possible arguments.
- Returns:
xa (np.ndarray) – Array of size Nx x Ne representing analysis ensemble states
e_flag (int) – Error flag after data assimilation step
**kwargs Parameters
Property |
Description |
|---|---|
gamma |
Inflation parameter for RTPP and RTPS inflation methods |
infs |
Array of size (Nx) containing initial estimates of inflation means. |
infs_y |
Array of size (Ny) containing initial estimates of inflation means in obs space. |
var_infs |
Array of size (Nx) containing initial estimates of inflation variances. |
var_infs_y |
Array of size (Nx) containing initial estimates of inflation variances in obs space. |
Local Particle Filter
- DAPyr.DA.lpf_update(x: ndarray, hx: ndarray, Y: ndarray, H: ndarray, C_pf: ndarray, N_eff: float, gamma: float, min_res: int, maxiter: int, kddm_flag: int, e_flag: int, qcpass: ndarray, L: partial)
Performs a Local Particle Filter update based on Poterjoy et al. (2022).
- Parameters:
xf (np.ndarray) – Array of size Nx x Ne containing the ensemble members
hx (np.ndarray) – Array of size Ny x Ne containing the ensemble members projected into obs-space
Y (np.ndarray) – Array of size Ny x 1 containing the observations at time T
var_y (float) – Observation variance
H (np.ndarray) – Array of size Ny x Nx representing the measurement operator
C_pf (np.ndarray) – Localization matrix of size Ny x Nx in state-space
N_eff (float) – Effective Ensemble Size
gamma (float) – Mixing coefficient parameter
min_res (float) – Minimum residual for computing betas
maxiter (int) – Maximum number of iterations of incremental LPF updates to perform
kddm_flag (int) – Flag to turn on kernal density estimation. 0 for off, 1 for on.
e_flag (int) – Error flag
qcpass (np.ndarray) – Array of length Ny repesenting quality control of observations
L (functools.partial) – Callable likelihood function L(y, hx). The first argument is a vector of scalar observations, and the second argument is the model state projected into observation space.
- Returns:
xa (np.ndarray) – Array of size Nx x Ne representing analysis ensemble states
e_flag (int) – Error flag after data assimilation step