## 2 Materials and Methods
In this study, the initial distribution is defined to be a discretized stationary selection-Gaussian random field with parametrization,  
\[\mathbf{\mu}_{r} = \mu_{r}\mathbf{i}_{n}\] \[\mathbf{\mu}_{\
u} = \mu_{\
u}\mathbf{i}_{n}\] \[\mathbf{\Sigma}_{\mathbf{\tilde{r}}} = \sigma_{\mathbf{\tilde{r}}}^{2}\mathbf{\Sigma}_{\mathbf{\tilde{r}}}^{\rho}\] (4) \[\mathbf{\Sigma}_{\mathbf{\tilde{r}}} = \gamma^{2}\mathbf{\Sigma}_{\mathbf{\tilde{r}}}^{\rho}+(1-\gamma^{2})\mathbf{I} _{n}\] \[\mathbf{\Gamma}_{v|\mathbf{_Likelihood model:_ The likelihood model for \([\mathbf{d}|\mathbf{r}]\) is defined as conditional independent with single-site response,  
\[f(\mathbf{d}|\mathbf{r})=\prod_{t=0}^{T}f(\mathbf{d}_{t}|\mathbf{r}_{t}), \tag{7}\]  
with  
\[[\mathbf{d}_{t}|\mathbf{r}_{t}]= \psi_{t}(\mathbf{r}_{t},\mathbf{e}_{t}^{d})\sim f(\mathbf{d}_{t}|\mathbf{r}_{t}), \tag{8}\]  
where \(\psi_{t}(\cdot,\cdot)\in\mathbb{R}^{m}\) is the likelihood function with random \(m\)-vector \(\mathbf{e}_{t}^{d}\), iid for each \(t\). Note that \(f(\mathbf{d}_{t}|\mathbf{r}_{t})\) cannot generally be written in closed form. _Posterior model:_ The posterior model for the HM model in Figure 1 is given by  
\[ \begin{split}[\mathbf{r}|\mathbf{d}]\sim f(\mathbf{r}|\mathbf{d})& =\ const\times f(\mathbf{d}|\mathbf{r})f(\mathbf{r})\\ &=\ const\times f(\mathbf{d}_{0}|\mathbf{r}_{0})f(\mathbf{r}_{0})\prod_{t=1}^ {T}f(\mathbf{d}_{t}|\mathbf{r}_{t})f(\mathbf{r}_{t}|\mathbf{r}_{t-1})f(\mathbf{r}_{T+1}|\mathbf{r}_{ T})\\ &=\ f(\mathbf{r}_{0}|\mathbf{d})\prod_{t=1}^{T}f(\mathbf{r}_{t}|\mathbf{r}_{t-1},\mathbf{d}_{t:T})f(\mathbf{r}_{T+1}|\mathbf{r}_{T}),\end{split}  \tag{9}\]  
and is also a Markov chain, see [23; 24]. This model is denoted the selection ensemble Kalman model. If the forward and likelihood models are Gauss-linear, the posterior model is also selection-Gaussian and analytically tractable, see [22]. When the forward and/or likelihood models are nonlinear, however, approximate or sampling based assessment of the posterior model must be made. For this purpose, we introduce the selection ensemble Kalman filter (SEnKF) and smoother (SEnKS) in the spirit of the traditional ensemble Kalman model [3]. The traditional EnKF algorithm aims at assessing the forecast pdf \(f(\mathbf{r}_{T+1}|\mathbf{d}_{0:T})\), and it is justified by general HM model recursions, see [23]. The algorithm is initiated by  
\[[\mathbf{r}_{1}|\mathbf{d}_{0}]\sim f(\mathbf{r}_{1}|\mathbf{d}_{0})=\int f(\mathbf{r}_{1}|\mathbf{r} _{0})[f(\mathbf{d}_{0})]^{-1}f(\mathbf{d}_{0}|\mathbf{r}_{0})f(\mathbf{r}_{0})\mathrm{d}\mathbf{ r}_{0}, \tag{10}\]  
and utilizes the recursion for \(t=1,\ldots,T\),  
\[[\mathbf{r}_{t+1}|\mathbf{d}_{0:t}]\sim f(\mathbf{r}_{t+1}|\mathbf{d}_{0:t})=\int f(\mathbf{r}_{t +1}|\mathbf{r}_{t})[f(\mathbf{d}_{t}|\mathbf{d}_{0:t-1})]^{-1}f(\mathbf{d}_{t}|\mathbf{r}_{t})f( \mathbf{r}_{t}|\mathbf{d}_{0:t-1})\mathrm{d}\mathbf{r}_{t}. \tag{11}\]  
The expressions are represented by an ensemble of realizations, which in each recursion is conditioned using a linearized approximation with Kalman weights estimated from the ensemble. Thereafter, the ensemble is forwarded to the next time step. The SEnKF introduced in this study relies on the same relations as above, but it operates on the augmented \((n+n)\)-vector \([\mathbf{\tilde{r}}_{\cdot},\mathbf{\
u}]\), see Equation (2). Hence, the forward model is defined as  
\[ \begin{bmatrix}\mathbf{\tilde{r}}_{t+1}&\mathbf{\tilde{r}}_{t}\\ \mathbf{v}_{t+1}&\mathbf{v}_{t}\end{bmatrix} = \begin{bmatrix}\omega_{t}(\mathbf{\tilde{r}} _{t},\mathbf{e}_{t}^{r})\\ \mathbf{v}_{t}\end{bmatrix} . \tag{12}\]  
Figure 1: Graph of the hidden Markov model. where the auxiliary \(n\)-vector \(\mathbf{v}_{t}\) is temporally constant. The likelihood model is defined as  
\[\left[\mathbf{d}_{t}\middle| \begin{matrix}\bar{\mathbf{r}}_{t}\\ \mathbf{v}_{t}\end{matrix} \right]=\psi_{t}(\bar{\mathbf{r}}_{t},\mathbf{\epsilon}_{t}^{d}). \tag{13}\]  
The SEnKF algorithm provides an ensemble representation of  
\[\left[