## Appendix A  
The algorithms detailed in Algorithms A1 and A2 follow the formalism in [4]. **Algorithm A1 description:** The SEnKF is a two-step algorithm. The first step is a traditional EnKF that evaluates \(\left[\bar{\mathbf{r}}_{T+1},\mathbf{\
u}|\mathbf{d}_{0:T}\right]\). The second step consists of a sampling step where the target quantity \([\mathbf{r}_{T+1}|\mathbf{d}_{0},...,\mathbf{d}_{T}]\) is evaluated using \(\left[\bar{\mathbf{r}}_{T+1},\mathbf{\
u}|\mathbf{d}_{0:T}\right]\) from the first step. ```
A time series of ensembles is defined as \(\mathbf{e}_{t}=\{(\mathbf{\tilde{r}}_{t}^{u(i)},\mathbf{v}_{t}^{u(i)},\mathbf{d}_{t}^{i}),i=1,...,n _{e}\},\forall t=0,\cdots,T\) and the \((2n+m)\)-vector \([\mathbf{\tilde{r}}_{t},\mathbf{v}_{t},\mathbf{d}_{t}]\) has the following covariance matrix:

\[\mathbf{\Sigma}_{tvd}= \begin{bmatrix}\mathbf{\Sigma}_{t\
u}&\mathbf{\Gamma}_{t\
u,d}\\ \mathbf{\Gamma}_{d,t\
u}&\mathbf{\Sigma}_{d}\end{bmatrix} \]

1. **Initiate:**
2. \(n_{e}=\text{No. of ensemble members}\)
3. Generate \( \begin{bmatrix}\mathbf{\tilde{r}}_{0}^{u(i)}\\ \mathbf{v}_{0}^{u(i)}\end{bmatrix} \sim f(\mathbf{\tilde{r}}_{0},\mathbf{v}),i=1,...,n_{e}\)
4. Generate \(\mathbf{e}_{0}^{d(i)}\sim\mathcal{U}_{m}[0,1]\), \(i=1,...,n_{e}\)
5. \(\mathbf{d}_{0}^{i}=\psi_{0}(\mathbf{\tilde{r}}_{0}^{u(i)},\mathbf{e}_{0}^{d(i)}))\), \(i=1,...,n_{e}\)
6. \(\mathbf{e}_{0}=\{(\mathbf{\tilde{r}}_{0}^{u(i)},\mathbf{v}_{0}^{u(i)},\mathbf{d}_{0}^{i}),i=1,...,n_{e}\}\)
7. **Iterate**\(t=0,...,T\):
8. Conditioning:
9. Estimate \(\mathbf{\Sigma}_{tvd}\) from \(\mathbf{e}_{t}\longrightarrow\mathbf{\hat{\Sigma}}_{tvd}\)
10. \( \begin{bmatrix}\mathbf{\tilde{r}}_{t}^{c(i)}\\ \mathbf{v}_{t}^{c(i)}\end{bmatrix} = \begin{bmatrix}\mathbf{\tilde{r}}_{t}^{u(i)}\\ \mathbf{v}_{t}^{u(i)}\end{bmatrix} +\mathbf{\hat{\Gamma}}_{t\
u,d}\mathbf{\hat{\Sigma}}_{d }^{-1}(\mathbf{d}_{t}-\mathbf{d}_{t}^{i})\), \(i=1,...,n_{e}\)
11. Forwarding:
12. Generate \(\mathbf{e}_{t}^{\bar{r}(i)}\sim\mathcal{U}_{n}[0,1]\), \(i=1,...,n_{e}\)
13. \( \begin{bmatrix}\mathbf{\tilde{r}}_{t+1}^{u(i)}\\ \mathbf{v}_{t+1}^{u(i)}\end{bmatrix} = \begin{bmatrix}\omega_{t}(\mathbf{\tilde{r}}_{t}^ {c(i)},\mathbf{e}_{t}^{\bar{r}(i)})\\ \mathbf{v}_{t}^{c(i)}\end{bmatrix} ,i=1,...,n_{e}\)
14. If \(t<T\)
15. Generate \(\mathbf{e}_{t+1}^{d(i)}\sim\mathcal{U}_{n}[0,1]\), \(i=1,...,n_{e}\)
16. \(\mathbf{d}_{t+1}^{(i)}=\psi_{t+1}(\mathbf{\tilde{r}}_{t+1}^{u(i)},\mathbf{e}_{t+1}^{d(i)})\), \(i=1,...,n_{e}\)
17. \(\mathbf{e}_{t+1}=\{(\mathbf{\tilde{r}}_{t+1}^{u(i)},\mathbf{v}_{t+1}^{u(i)},\mathbf{d}_{t+1}^{ i}),i=1,...,n_{e}\}\)
18. Else
19. \(\mathbf{e}_{t+1}=\{(\mathbf{\tilde{r}}_{t+1}^{u(i)},\mathbf{v}_{t+1}^{u(i)}),i=1,...,n_{e}\}\)
20. **End iterate**
21. Estimate \(\mathbf{\mu}_{t\
u},\mathbf{\Sigma}_{t\
u}\) from \(\mathbf{e}_{T+1}\rightarrow\mathbf{\hat{\mu}}_{t\
u},\mathbf{\hat{\Sigma}}_{t\
u}\)
22. Assess
23. End Algorithm
```  
**Algorithm 1** Selection Ensemble Kalman Filter (SEnKS)  
The ensemble \(\mathbf{e}_{T+1}\) represents \([\mathbf{\tilde{r}}_{T+1},\mathbf{\
u}|\mathbf{d}_{0:T}]\). To assess \(f(\mathbf{r}_{T+1}|\mathbf{d}_{0:T})=f(\mathbf{\tilde{r}}_{T+1}|\mathbf{d}_{0:T},\mathbf{v}\in A)\), the sampling algorithm specified in [21] requires \(\mathbf{E}[\mathbf{\tilde{r}}_{T+1},\mathbf{\
u}|\mathbf{d}_{0:T}]=\mathbf{\mu}_{t\
u}\) and \(\mathbf{Cov}[\mathbf{\tilde{r}}_{T+1},\mathbf{\
u}|\mathbf{d}_{0:T}]=\mathbf{\Sigma}_{t\
u}\) which are estimated using the ensemble \(\mathbf{e}_{T+1}\). **Algorithm 2** description: The SEnKS is a two-step algorithm. The first step is a traditional EnKS that evaluates \([\mathbf{\tilde{r}}_{t},\mathbf{\
u}|\mathbf{d}_{0:T}]\). The second step consists of a sampling step where the target quantity \([\mathbf{r}_{t}|\mathbf{d}_{0},...,\mathbf{d}_{T}]\) is evaluated using \([\mathbf{\tilde{r}}_{t},\mathbf{\
u}|\mathbf{d}_{0:T}]\) from the first step. Two time series of ensemble sets are defined as  
\[\left.