text:
\section*{Abstract}
\label{Sec:Abstract}

Reservoir engineers use large-scale numerical models to predict the production performance in oil and gas fields. However, these models are constructed based on scarce and often inaccurate data, making their predictions highly uncertain. On the other hand, measurements of pressure and flow rates are constantly collected during the operation of the field. The assimilation of these data into the reservoir models (history matching) helps to mitigate uncertainty and improve their predictive capacity. History matching is a nonlinear inverse problem, which is typically handled using optimization and Monte Carlo methods. In practice, however, generating a set of properly history-matched models that preserve the geological realism is very challenging, especially in cases with complicated prior description, such as models with fractures and complex facies distributions. Recently, a new data-space inversion (DSI) approach was introduced in the literature as an alternative to the model-space inversion used in history matching. The essential idea is to update directly the predictions from a prior ensemble of models to account for the observed production history without updating the corresponding models. The present paper introduces a DSI implementation based on the use of an iterative ensemble smoother and demonstrates with examples that the new implementation is computationally faster and more robust than the earlier method based on principal component analysis. The new DSI is also applied to estimate the production forecast in a real field with long production history and a large number of wells. For this field problem, the new DSI obtained forecasts comparable with a more traditional ensemble-based history matching.

\noindent \textbf{Keywords:} Data-space inversion; uncertainty quantification; ensemble smoother; history matching.

\section{Introduction}
\label{Sec:Intro}

Reservoir characterization from static and dynamic data allows to create numerical models that can be used to simulate the performance of petroleum reservoirs under different operating conditions. These models are essential for efficient exploitation and management of oil and gas fields. The incorporation of static data is typically done using geostatistics while the incorporation of dynamic data is done using history-matching methods.

History matching is usually a very difficult task, which involves the integration of interdisciplinary teams and an intensive use of computational resources. A complete study may require months of work and the results are not always satisfactory. The task is even harder if one needs to provide uncertainty estimates, in which case several alternative history-matched models must be generated. In the last few decades, the advances in assisted (or semi-automatic) history-matching techniques were notorious. Yet, history matching remains one of the most time-consuming steps of a field study because the size and complexity of the models have also increased significantly in the same period. \citet{oliver:11b} present a review of the main history-matching methods proposed in the literature. Among these methods, the ones based on the ensemble Kalman filter (EnKF) \citep{evensen:94,evensen:07bk} have become quite popular, especially because of their ease of implementation and integration with commercial reservoir simulators and the ability to generate multiple models with large number of uncertainty parameters at an affordable computational cost. Despite the relative success in a number of recent field cases reported in the literature; see, for example, \citep{emerick:13c,chen:14a,emerick:16a,maucec:16a,abadpour:18a,evensen:18a,lorentzen:19a}, generating a set of models properly conditioned to all historical data and still preserving the geological realism is very challenging, especially in cases with complicated prior description, such as models with fractures and complex facies distributions.

A new approach known as data-space inversion (DSI) \citep{sun:17b} has drawn attention in the literature as an alternative to the model-space inversion approach used in history matching. The basic idea behind DSI is to update directly the predictions from a prior ensemble of models to account for the observed production history without updating the corresponding models. The upside of this approach is to be able to provide an ensemble of forecasts without going through the time-consuming history-matching step. Because there are no model inversions, there are no concerns about losing the geological realism. The downside is that DSI provides only the forecast estimates for a fixed production strategy. In practice, however, reservoir engineers may also be interested in having the corresponding models to study different drainage strategies. For this reason, data- and model-space inversions should be considered complementary rather than alternative (or even competing) approaches.

The DSI method introduced by \citet{sun:17b} uses principal component analysis (PCA) to reparameterize the predicted data from the prior ensemble into a lower dimensional space and the randomized maximum likelihood (RML) method \citep{oliver:08bk} to generate samples of the posterior distribution of predicted data given the observations. The authors used a data transformation before PCA to improve linearity. \citet{sun:17c} extended the original DSI method introducing a more general data transformation procedure. They tested the method in a model of a complex fractured reservoir and obtained reasonable uncertainty estimates of the production forecast. \citet{jiang:18a} modified the DSI approach to allow changes in the well controls during the forecast period so that the method could be used for life-cycle optimization. They noted that the method required a larger prior ensemble to better represent a wider range of possibilities. They showed that the proposed method combined to a direct search optimization algorithm \citep{audet:06a} was able to improve the expected net-present value of a reservoir model.

Similar ideas of DSI have appeared before in the literature. For example, \citet{krishnamurti:00a} and \citet{pagowski:05a} applied linear regression to combine the ozone forecast of ensembles of models. In the atmospheric literature these methods are referred to as aggregation methods or ensemble forecast \citep{mallet:09a}. \citet{emerick:14a} also used a DSI-type of approach to invert 4D seismic impedance data directly to pressure and water saturation. \citet{scheidt:15a} proposed a method named prediction-focused analysis (PFA) based on projecting the prior predictions into a low-dimensional space and using kernel smoothing to estimate the joint distribution of historical and forecasted data. Using the joint distribution, they could predict the uncertainty estimates in a tracer transport problem. However, PFA method seems applicable only to problems with few data points because it requires the projection to very few dimensions (two or three dimension in the examples presented in the paper). \citet{satija:15a} modified the PFA method using canonical functional component analysis to improve the linearity in the projected data. \citet{satija:17a} used the same approach in a reservoir problem and concluded that the method provided uncertainty estimates of production forecast in reasonable agreement with rejection sampling. More recently, \citet{he:18b} used similar ideas from DSI to estimate the uncertainty reduction in a study to compute the value of information of data-acquisition plans. \citet{jeong:18a} applied machine learning techniques (neural networks and support vector regression) to DSI. They concluded that the method can be a more efficient alternative to the computationally demanding history-matching methods, however the method fails to provide satisfactory forecast if the predictions from the prior ensemble (training set) are too far from the expected true response.

In the present paper, we introduce a new DSI implementation based on the use of an iterative ensemble smoother and demonstrate with examples that the new DSI is computationally faster and more robust than the procedure proposed in \citep{sun:17b,sun:17c}. Moreover, we apply the new DSI to a real field case with long production history and large number of wells and show that the method provides forecasts comparable with a more traditional ensemble-based history-matching process. The rest of the paper is organized as follows: Section~\ref{Sec:Methodology} reviews the DSI method proposed in \citep{sun:17b,sun:17c} and the new DSI method. Section~\ref{Sec:TestCases} presents three reservoir test problems. The first problem is a small synthetic case used to demonstrate that the proposed method provides results similar to the original DSI with a lower computational cost. The second problem is a benchmark history-matching case \citep{avansi:15a,unisim-i-h:13} constructed with data from real reservoir in Campos Basis. This problem is used to compare the methods is a more realistic situation with a large number of data points. The last problem corresponds to a real brown-field case where the proposed method is compared against an ensemble-based history matching. Section~\ref{Sec:Conclusions} summarizes the conclusions of the paper.

\section{Methodology}
\label{Sec:Methodology}

\subsection{Preliminaries}
\label{Sec:Preliminaries}

Let $\mathbf{m} \in \mathds{R}^{N_m}$ denote the vector of uncertain parameters of a reservoir model with a historical production period $t_{\textrm{h}}$. Our goal is to predict the production performance for a period $t_{\textrm{f}}$ after $t_{\textrm{h}}$. Let $\mathbf{d} \in \mathds{R}^{N_d}$ denote the vector of predicted production data, which is a nonlinear function of $\mathbf{m}$, that is, $\mathbf{d} = \mathbf{d} (\mathbf{m})$. In the applications of interest of this paper, $\mathbf{d}$ is the result of a reservoir simulation. This vector contains predicted data from both, history, $\mathbf{d}_{\textrm{h}}$, and forecast periods, $\mathbf{d}_{\textrm{f}}$, that is,

\begin{equation}
  \mathbf{d} = \left[ \begin{array}{c}
                   \mathbf{d}_{\textrm{h}} \\
                   \mathbf{d}_{\textrm{f}}
                 \end{array}\right].
\end{equation}

Let $\mathbf{d}_{\textrm{obs}} \in \mathds{R}^{N_{d,\textrm{h}}}$ denote the vector of field observations, which is corrupted with an additive random noise, $\mathbf{e}_{\textrm{d}}$, due to measurement errors such that

\begin{equation}
  \mathbf{d}_{\textrm{obs}} = \mathbf{d}_{\textrm{true}} + \mathbf{e}_{\textrm{d}},
\end{equation}
where $\mathbf{d}_{\textrm{true}}$ is the true (noiseless) data. Moreover, assume that model errors are also additive and

\begin{equation}\label{Eq:dtrue}
   \mathbf{d}_{\textrm{true}} = \mathbf{d}_{\textrm{h}} \left(\mathbf{m}_{\textrm{true}} \right) + \mathbf{e}_{\textrm{m}},
\end{equation}
where $\mathbf{m}_{\textrm{true}}$ is the vector containing the ``true'' values for the model parameters and $\mathbf{e}_{\textrm{m}}$ is a vector of model errors. Under these conditions, it is straightforward to show \citep{tarantola:05} that the likelihood of $\mathbf{m}$ is

\begin{equation}
  \mathcal{L} (\mathbf{m} | \mathbf{d}_{\textrm{obs}}) = \textrm{const} \times \exp \left( - \frac{1}{2}\left( \mathbf{d}_{\textrm{obs}} - \mathbf{d}_{\textrm{h}}(\mathbf{m})\right)^{\scriptsize \top} \mathbf{C}_{\mathbf{e}}^{\scriptsize -1}  \left( \mathbf{d}_{\textrm{obs}} - \mathbf{d}_{\textrm{h}}(\mathbf{m})\right) \right),
\end{equation}
where
\begin{equation}\label{Eq:Ce}
  \mathbf{C}_{\mathbf{e}} = \textrm{cov} \left[ \mathbf{e}_{\textrm{d}} \right] + \textrm{cov} \left[\mathbf{e}_{\textrm{m}}\right]
\end{equation}
is the total data-error covariance matrix. Note that we use the term ``model error'' to refer to any imperfection in the model used to represent the real reservoir. Examples of sources of model errors include numerical and discretization errors, simplifications of the physics and insufficient parameterization. The assumption in Eq.~\ref{Eq:dtrue} is that all sources of model errors can be aggregated into a random vector with $\textrm{E}\left[\mathbf{e}_{\textrm{m}}\right] = \mathbf{0}$ and known covariance. Even though these are strong assumptions which are unlike to hold in reality, it is important to note that including $\textrm{cov} \left[\mathbf{e}_{\textrm{m}}\right]$ in the matrix $\mathbf{C}_{\mathbf{e}}$ reduces the weights attributed to data helping to partially compensate for deficiencies in the models; see, for example, \citep{sun:17a,oliver:18b}.

If the prior model follows a multivariate Gaussian distribution, $\mathbf{m} \sim \mathcal{N} (\mathbf{m}_{\textrm{pr}}, \mathbf{C}_{\mathbf{m}})$, then the posterior probability density function (PDF) of $\mathbf{m}$ given $\mathbf{d}_{\textrm{obs}}$ has the form

\begin{eqnarray}
  \nonumber p(\mathbf{m} | \mathbf{d}_{\textrm{obs}}) & = &  \textrm{const} \times \mathcal{L} (\mathbf{m} | \mathbf{d}_{\textrm{obs}}) p(\mathbf{m}) \\
  & = &  \textrm{const} \times \exp \left( - \mathcal{O}(\mathbf{m}) \right),
\end{eqnarray}
where

\begin{equation}\label{Eq:O}
  \mathcal{O}(\mathbf{m}) = \frac{1}{2}\left( \mathbf{d}_{\textrm{obs}} - \mathbf{d}_{\textrm{h}}(\mathbf{m})\right)^{\scriptsize \top} \mathbf{C}_{\mathbf{e}}^{\scriptsize -1}  \left( \mathbf{d}_{\textrm{obs}} - \mathbf{d}_{\textrm{h}}(\mathbf{m})\right) + \frac{1}{2}\left( \mathbf{m} - \mathbf{m}_{\textrm{pr}} \right)^{\scriptsize \top} \mathbf{C}_{\mathbf{m}}^{\scriptsize -1}  \left( \mathbf{m} - \mathbf{m}_{\textrm{pr}} \right).
\end{equation}

The model $\mathbf{m}$ that minimizes $\mathcal{O}(\mathbf{m})$ corresponds to the maximum a posteriori \citep{tarantola:05}. In practice, however, we are interested in sampling the posterior PDF to quantify uncertainty. In this case, one alternative is the RML method \citep{oliver:08bk}, which provides an approximate sampling of $p(\mathbf{m} | \mathbf{d}_{\textrm{obs}})$. Each RML sample is obtained by minimizing a modified version of Eq.~\ref{Eq:O} given by

\begin{equation}\label{Eq:Orml}
  \mathcal{O}_{\textrm{rml}}(\mathbf{m}) = \frac{1}{2}\left( \mathbf{d}_{\textrm{obs}}^\ast - \mathbf{d}_{\textrm{h}}(\mathbf{m})\right)^{\scriptsize \top} \mathbf{C}_{\mathbf{e}}^{\scriptsize -1}  \left( \mathbf{d}_{\textrm{obs}}^\ast - \mathbf{d}_{\textrm{h}}(\mathbf{m})\right) + \frac{1}{2}\left( \mathbf{m} - \mathbf{m}^\ast \right)^{\scriptsize \top} \mathbf{C}_{\mathbf{m}}^{\scriptsize -1}  \left( \mathbf{m} - \mathbf{m}^\ast \right),
\end{equation}
where $\mathbf{d}_{\textrm{obs}}^\ast \sim \mathcal{N}(\mathbf{d}_{\textrm{obs}}, \mathbf{C}_{\mathbf{e}})$ and $\mathbf{m}^\ast \sim \mathcal{N}(\mathbf{m}_{\textrm{pr}}, \mathbf{C}_{\mathbf{m}})$.

\subsection{Data-Space Inversion}
\label{Sec:DSI}

In this section, we review the data-space inversion (DSI) procedure as proposed in \citep{sun:17b} and later improved in \citep{sun:17c}. The main idea behind the method is to use PCA to write the vector of predicted data as

\begin{equation}\label{Eq:PCA}
  \mathbf{d}_{\textrm{pca}} = \overline{\mathbf{d}} + \mathbf{C}_{\mathbf{d}}^{\scriptsize \textrm{1/2}} \mathbf{x},
\end{equation}
where $\overline{\mathbf{d}}$ and $\mathbf{C}_{\mathbf{d}}$ are the mean and covariance of $\mathbf{d}$, respectively. Both are computed using a prior ensemble, that is,

\begin{equation}
  \overline{\mathbf{d}} = \frac{1}{N_e}\sum_{j=1}^{N_e} \mathbf{d}_j
\end{equation}
and
\begin{eqnarray}
  \nonumber \mathbf{C}_{\mathbf{d}} & = & \frac{1}{N_e - 1}\sum_{j=1}^{N_e} \left(\mathbf{d}_j -  \overline{\mathbf{d}}\right)\left(\mathbf{d}_j -  \overline{\mathbf{d}}\right)^{\scriptsize \top} \\
  & = & \Delta \mathbf{D} \Delta \mathbf{D}^{\scriptsize \top},
\end{eqnarray}
where
\begin{equation}\label{Eq:DD}
  \Delta \mathbf{D} = \frac{1}{\sqrt{N_e - 1}}\left[\mathbf{d}_1 -  \overline{\mathbf{d}}, \ldots, \mathbf{d}_{N_e} -  \overline{\mathbf{d}} \right].
\end{equation}
The square root of $\mathbf{C}_{\mathbf{d}}$ in Eq.~\ref{Eq:PCA} is computed using the singular value decomposition (SVD) of $\Delta \mathbf{D}$

\begin{equation}\label{Eq:SVD}
  \Delta \mathbf{D} = \mathbf{U} \bm{\Sigma} \mathbf{V}^{\scriptsize \top},
\end{equation}
where $\mathbf{U}$ is a $N_d \times N_d$ orthogonal matrix containing the left singular values of $\Delta \mathbf{D}$, which are equivalent to the left eigenvectors of $\mathbf{C}_{\mathbf{d}}$; $\bm{\Sigma}$ is a $N_d \times N_e$ matrix containing as non-zero elements the singular values of $\Delta \mathbf{D}$, or, equivalently, the square root of the eigenvalues of $\mathbf{C}_{\mathbf{d}}$. The matrix $\mathbf{V}$ contains the right singular values of $\Delta \mathbf{D}$. The square-root of $\mathbf{C}_{\mathbf{d}}$ becomes

\begin{equation}
  \mathbf{C}_{\mathbf{d}}^{\scriptsize \textrm{1/2}} =  \mathbf{U}\bm{\Sigma}.
\end{equation}

The vector $\mathbf{x}$ in Eq.~\ref{Eq:PCA} is a sample from a standard normal distribution, that is, $\mathbf{x} \sim \mathcal{N}(\mathbf{0}, \mathbf{I})$. In practice, we truncate small singular values using an energy criterium, which means that we consider only the $N_r \leq \max\{N_d, N_e -1\}$ largest singular values such that

\begin{equation}\label{Eq:SVDEnergy}
   \frac{\sum_{i=1}^{N_r} \sigma_i}{\sum_{i=1}^{\min\{N_d, N_e - 1\}} \sigma_i} \geq \xi
\end{equation}
where $\xi \leq 1$ is the energy threshold, typically selected between 0.9 and 0.99 and $\sigma_i$ is the $i$th singular value of $\Delta \mathbf{D}$. Truncating small singular values has two positive side effects: it reduces the dimension of $\mathbf{x}$ and introduces regularization in the inversion. Both are important because the DSI method uses RML for sampling, which requires solving several minimization problems.

\citet{sun:17b} noted that the direct application of Eq.~\ref{Eq:PCA} may result in nonphysical values for the predicted data, for example negative production or pressure. According to the authors, this problem occurs mainly before water breakthrough time. Therefore, they proposed to apply a data transformation to the prior realizations of $\mathbf{d}$ before PCA. The transformation is based on shifting and compressing/stretching the time series. They claim and illustrate in a example that the transformed vectors, $\widehat{\mathbf{d}}$, have a more Gaussian prior distribution. However, this procedure is difficult to apply in cases with frequent changes in well controls. In \citep{sun:17c}, the authors proposed to use an inverse Gaussian anamorphosis procedure using the empirical cumulative density function (CDF) computed using the $N_e$ prior realizations of $\mathbf{d}$. Figure~\ref{Fig:CDFTrans} illustrates the process, where each component of the transformed vector $\widehat{\mathbf{d}}$ is computed as

\begin{equation}\label{Eq:CDFTrans}
  \widehat{d}_i = \textrm{cdf}_1^{\scriptsize -1} \left( \textrm{cdf}_2 \left(d_{\textrm{pca},i} \right) \right),
\end{equation}
where $\textrm{cdf}_1(\cdot)$ and $\textrm{cdf}_2(\cdot)$ are the CDF's of $\mathbf{d}$ and $\mathbf{d}_{\textrm{pca}}$, respectively.

\begin{figure}
\centering
	\includegraphics[width=0.4\linewidth]{cdf_transform.pdf}
\caption{Histogram transformation used in DSI.}
\label{Fig:CDFTrans}
\end{figure}

The final step of DSI is to use RML to generate a posterior ensemble of predicted data. The RML objective function can be written in terms of the vector of PCA coefficients as

\begin{equation}\label{Eq:Oxrml}
  \mathcal{O}_{\textrm{rml}}(\mathbf{x}) = \frac{1}{2}\left( \mathbf{d}_{\textrm{obs}}^\ast - \widehat{\mathbf{d}}_{\textrm{h}}(\mathbf{x})\right)^{\scriptsize \top} \mathbf{C}_{\mathbf{e}}^{\scriptsize -1}  \left( \mathbf{d}_{\textrm{obs}}^\ast - \widehat{\mathbf{d}}_{\textrm{h}}(\mathbf{x}) \right) + \frac{1}{2}\left( \mathbf{x} - \mathbf{x}^\ast \right)^{\scriptsize \top} \left( \mathbf{x} - \mathbf{x}^\ast \right),
\end{equation}
where $\mathbf{x}^\ast \sim \mathcal{N}(\mathbf{0}, \mathbf{I})$. The minimization of Eq.~\ref{Eq:Oxrml} can be done with any optimization method. \citet{sun:17b} used the Broyden–Fletcher–Goldfarb–Shanno (BFGS) method \citep{nocedal:06}, in which case it is necessary to compute the gradient of $\mathcal{O}_{\textrm{rml}}(\mathbf{x})$ with respect to $\mathbf{x}$. However, $\widehat{\mathbf{d}}_{\textrm{h}}(\mathbf{x})$ is a nonlinear function of $\mathbf{x}$ with no general analytical form because of the transformation of Eq.~\ref{Eq:CDFTrans}. One alternative, is to compute numerical gradients, which may be computationally expensive if we have a large number of data points. \citet{jiang:18a} proposed to ignore the transformation of Eq.~\ref{Eq:CDFTrans} and use the analytical gradients computed with $\mathbf{d}_{\textrm{pca}}$ instead of $\widehat{\mathbf{d}}$. Our limited set of tests indicated that this procedure in fact improved the computational performance of our DSI implementation, which uses the limited-memory BFGS \citep{nocedal:06} implementation available in the C\# library Accord.NET \citep{souza:17a}.

\subsection{Data-Space Inversion with Ensemble Smoother}
\label{Sec:DSI-ESMDA}

The ensemble smoother (ES) was introduced by \citet{vanleeuwen:96} as an alternative to the sequential data assimilation scheme of EnKF. The first application of ES for history matching was presented by \citet{skjervheim:11a}, which concluded that the method is faster than EnKF with similar results. Despite the good results presented in \citep{skjervheim:11a}, some authors \citep{chen:12a,chen:13a,emerick:13b,emerick:13a} observed that ES tends to result in unreasonable data matches when applied to more complex history-matching problems. The reason for the poor performance is because ES is similar to applying a single Gauss-Newton iteration to minimize a RML-type of objective function with a sensitivity matrix estimated based on the prior ensemble \citep{reynolds:06}. This fact lead to the development of several iterative forms of ES; see, for example, \citep{chen:12a,chen:13a,emerick:13b,stordal:14b,stordal:15a,luo:15b}. Among the iterative forms of ES, the ensemble smoother with multiple data assimilation (ES-MDA) \citep{emerick:13b} is a popular choice. The popularity of ES-MDA can be attributed mainly to its good performance in history-matching problems \citep{emerick:13c,emerick:16a,maucec:16a,evensen:18a} and its simplicity of implementation. In fact, ES-MDA is essentially equivalent to repeat ES a few times with the data-error covariance matrix, $\mathbf{C}_{\mathbf{e}}$, multiplied by coefficients $\alpha_k$'s to avoid overweighing the measurements. The choice of the coefficients and the number of repetitions of ES, $N_a$, must obey the condition $\sum_{k=1}^{N_a} \alpha_k^{\scriptsize -1} = 1$ to ensure that ES-MDA samples the correct posterior PDF in the linear-Gaussian case \citep{emerick:13b}. For nonlinear problems, the choice of the $\alpha_k$'s and $N_a$ has a major impact in the performance of the method. There are recent works proposing methods to select $\alpha_k$'s and $N_a$ \citep{duc:16a,emerick:16a,rafiee:17a,ma:17a,emerick:18b}. However, here we use simplest choice, which consists of selecting $N_a$ in advance and setting $\alpha_k = N_a$, for $k=1, \ldots, N_a$.

The application of ES-MDA to DSI, that is, to generate samples of the predicted data vector, $\mathbf{d} = [\mathbf{d}_{\textrm{h}}^{\scriptsize \top}, \mathbf{d}_{\textrm{f}}^{\scriptsize \top}]^{\scriptsize \top}$, given the vector of observations, $\mathbf{d}_{\textrm{obs}}$, is straightforward. We can write the resulting DSI-ESMDA update equation as

\begin{equation}\label{Eq:DSI-ESMDA}
  \mathbf{d}_j^{k+1} = \mathbf{d}_j^{k} + \mathbf{R} \circ \mathbf{K}^k \left( \mathbf{d}_{\textrm{obs}} + \sqrt{\alpha_k}\mathbf{e}_j^k - \mathbf{d}_{\textrm{h}}^k  \right),
\end{equation}
for $k = 1, \ldots, N_a$ and $j = 1, \ldots, N_e$, where $\mathbf{K}$ is a modified version of the Kalman gain given by

\begin{equation}\label{Eq:DSI-ESMDA-Kgain}
  \mathbf{K}^k = \Delta \mathbf{D}^k \left(\Delta \mathbf{D}^k_{\textrm{h}}\right)^{\scriptsize \top} \left( \Delta \mathbf{D}_{\textrm{h}}^k \left(\Delta \mathbf{D}^k_{\textrm{h}}\right)^{\scriptsize \top} +  \alpha_k \mathbf{C}_{\mathbf{e}} \right)^{\scriptsize -1}.
\end{equation}
In the above equations, $\Delta \mathbf{D}$ was defined before (Eq.~\ref{Eq:DD}) and $\Delta \mathbf{D}_{\textrm{h}}$ includes only the predicted data corresponding to the historical period, that is,
\begin{equation}
  \Delta \mathbf{D}_{\textrm{h}} = \frac{1}{\sqrt{N_e - 1}}\left[\mathbf{d}_{\textrm{h},1} -  \overline{\mathbf{d}_{\textrm{h}}}, \ldots, \mathbf{d}_{\textrm{h},N_e} -  \overline{\mathbf{d}_{\textrm{h}}} \right].
\end{equation}
The vector $\mathbf{e}$ is a sample from $\mathcal{N}(\mathbf{0},\mathbf{C}_{\mathbf{e}})$ and $\mathbf{R}$ is the localization matrix with ``$\circ$'' denoting the Schur (element-wise) product. The matrix inversion required in Eq.~\ref{Eq:DSI-ESMDA-Kgain} is done using the subspace inversion method \citep{evensen:04} as described in the Appendix section of \citep{emerick:12a}. This procedure involves the truncated SVD of a rescaled matrix $\mathbf{C}_{\mathbf{e}}^{\scriptsize -\textrm{1/2}} \Delta \mathbf{D}_{\textrm{h}}$ to avoid loss of relevant information when removing small singular values. The number of singular values retained is computed using the same energy criterium of Eq.~\ref{Eq:SVDEnergy}.

The reason for introducing the Schur product between the localization matrix and the Kalman gain in Eq.~\ref{Eq:DSI-ESMDA} is twofold: it regularizes the estimates of the Kalman gain removing long-distance spurious correlations and increases the degrees of freedom to assimilate data \citep{houtekamer:01}. In fact, localization proved to improve substantially the results of ensemble methods applied to history matching; see, for example, \citep{chen:10b,emerick:11e,emerick:11c}.

The regularization introduced by the Schur product is obtained by constructing the localization matrix using a correlation function with compact support. A common choice is the fifth-order compact correlation function from \citep{gaspari:99}, in which case each entry of the matrix $\mathbf{R}$ is computed using

\begin{equation}\label{Eq:GaspariCohn}
r\left( \frac{h}{L} \right) =\left\{ \begin{array}{ll}
-\frac{1}{4}\left(\frac{h}{L}\right)^{5}+\frac{1}{2}\left(\frac{h}{L}\right)^{4}+\frac{5}{8}\left(\frac{h}{L}\right)^{3}-\frac{5}{3}\left(\frac{h}{L}\right)^{2}+1, & \text{if}~0 \leq \frac{h}{L} \leq 1\\
\frac{1}{12}\left(\frac{h}{L}\right)^{5}-\frac{1}{2}\left(\frac{h}{L}\right)^{4}+\frac{5}{8}\left(\frac{h}{L}\right)^{3}+\frac{5}{3}\left(\frac{h}{L}\right)^{2}-5\left(\frac{h}{L}\right)+4-\frac{2}{3}\left(\frac{h}{L}\right)^{-1}, & \text{if}~1 \leq \frac{h}{L} \leq 2\\
0 & \text{if}~\frac{h}{L} > 2
\end{array}\right.,
\end{equation}
where $h$ is a ``distance'' and $L$ is a parameter known as ``critical length,'' which corresponds to the distance where the correlation function decays to approximately 0.21. Note that the matrix $\mathbf{R}$ has the same shape of the Kalman gain and that each row of the Kalman gain corresponds to the correction term applied to each variable updated with Eq.~\ref{Eq:DSI-ESMDA}, that is, entries of the vector $\mathbf{d}$. Each column of the Kalman gain corresponds to an observation used in the conditioning process. Therefore, $h$ in Eq.~\ref{Eq:GaspariCohn} corresponds to the distance between entries of $\mathbf{d}$ and $\mathbf{d}_{\textrm{obs}}$. In the applications of interest of this paper, both $\mathbf{d}$ and $\mathbf{d}_{\textrm{obs}}$ contain data from wells in the field. Therefore, the ratio $h/L$ is computed based on the spatial distance between wells. Besides the spatial distance, we also introduced the time difference between data points in the calculation of $h/L$ to account for the fact that early data have lower correlations with the predictions than the late data. The final expression for computing $h/L$ is given by

\begin{equation} \label{Eq:hL}
  \frac{h}{L} = \sqrt{\left(\frac{\Delta x^\prime}{L_{x^\prime}}\right)^{2}+\left(\frac{\Delta y^\prime}{L_{x^\prime}}\right)^{2} + \left(\frac{\Delta t}{T}\right)^{2}},
\end{equation}
where

\begin{equation}\label{Eq:Aniso}
  \left[\begin{array}{c}
\Delta x^\prime \\
\Delta y^\prime
\end{array}\right] = \left[\begin{array}{cc}
\cos \theta & -\sin \theta\\
\sin\theta & \cos \theta
\end{array}\right]\left[\begin{array}{c}
\Delta x \\
\Delta y
\end{array}\right].
\end{equation}
In the above equations, $\Delta x$ and $\Delta y$ correspond to the spatial distance between the wells in the orthogonal directions $x$ and $y$, while $\Delta x^\prime$ and $\Delta y^\prime$ are the corresponding distances rotated by an angle $\theta$. This allows to consider anisotropy in the localization function as discussed in \citep{emerick:11e}. $\Delta t$ is the time difference between data points. $L_{x^\prime}$, $L_{y^\prime}$ and $T$ are the critical lengths in the ``directions'' $x^\prime$, $y^\prime$ and $t$, respectively.

Besides removing long-distance spurious correlations, localization also increases the degrees of freedom to assimilate data. To show that, first consider the case without localization. Using Eq.~\ref{Eq:DSI-ESMDA-Kgain} in (\ref{Eq:DSI-ESMDA}), we can define the vector $\mathbf{w}_{j}^k$ as

\begin{equation}
  \mathbf{w}_{j}^k \equiv \left( \Delta \mathbf{D}_{\textrm{h}}^k \left(\Delta \mathbf{D}^k_{\textrm{h}}\right)^{\scriptsize \top} + \alpha_k \mathbf{C}_{\mathbf{e}} \right)^{\scriptsize -1} \left( \mathbf{d}_{\textrm{obs}} + \sqrt{\alpha_k}\mathbf{e}_j^k - \mathbf{d}_{\textrm{h}}^k  \right).
\end{equation}
Hence

\begin{eqnarray}\label{Eq:DSI-ESMDA-nolocal}
  \nonumber \mathbf{d}_j^{k+1} & = & \mathbf{d}_j^{k} + \Delta \mathbf{D}^k \left(\Delta \mathbf{D}^k_{\textrm{h}}\right)^{\scriptsize \top} \mathbf{w}_{j}^k \\
  & = & \mathbf{d}_j^{k} + \frac{1}{N_e - 1} \sum_{i=1}^{N_e} \left(\mathbf{d}_i^k - \overline{\mathbf{d}^k} \right) \left(\mathbf{d}_{\textrm{h},i}^k - \overline{\mathbf{d}_{\textrm{h}}^k} \right)^{\scriptsize \top} \mathbf{w}_{j}^k \\
  \nonumber & = & \mathbf{d}_j^{k} + \frac{1}{N_e - 1}\sum_{i=1}^{N_e} \beta_{i,j}^k \left(\mathbf{d}_i^k - \overline{\mathbf{d}^k} \right),
\end{eqnarray}
where $\beta_{i,j}^k \equiv \left(\mathbf{d}_{\textrm{h},i}^k - \overline{\mathbf{d}_{\textrm{h}}^k} \right)^{\scriptsize \top} \mathbf{w}_{j}^k$ is a scalar. The vector $\overline{\mathbf{d}^k}$ is a linear combination of the vectors $\mathbf{d}_i^k$'s. Hence, it is possible to write $\mathbf{d}_j^{k+1}$ as

\begin{equation}\label{Eq:LinearComb}
  \mathbf{d}_j^{k+1} = \sum_{i=1}^{N_e} \gamma_{i,j}^k \mathbf{d}_i^{k},
\end{equation}
where $\gamma_{i,j}^k$'s are scalars. Eq.~\ref{Eq:LinearComb} means that $\mathbf{d}_j^{k+1}$ is a linear combination of the vectors $\mathbf{d}_i^k$'s. Applying this result recursively to all MDA iterations, we conclude that the final predictions from DSI-ESMDA without localization are simply linear combinations of the prior ones. This effectively means that we have at most $N_e$ coefficients (degrees of freedom) available to assimilate data. Note that the number of degrees of freedom of the standard DSI is also limited by the number of PCA coefficients which is $N_r \leq \min \{ N_d, N_e - 1\}$.

Considering now the case with localization, we can write

\begin{eqnarray}\label{Eq:DSI-ESMDA-local1}
  \nonumber \mathbf{d}_j^{k+1} & = & \mathbf{d}_j^{k} + \left( \mathbf{R} \circ \mathbf{K}^k  \right) \delta\mathbf{d}_j^k \\
  & = & \mathbf{d}_j^{k} + \sum_{i=1}^{N_{d,\textrm{h}}} \left(\mathbf{r}_i \circ \bm{\kappa}^k_i \right) \delta d_{i,j}^k,
\end{eqnarray}
where $\delta\mathbf{d}_j^k \equiv  \mathbf{d}_{\textrm{obs}} + \sqrt{\alpha_k}\mathbf{e}_j^k - \mathbf{d}_{\textrm{h}}^k$ and $\delta d_{i,j}^k$ is its $i$th entry. $\mathbf{r}_i$ and $\bm{\kappa}^k_i$ correspond to the $i$th columns of the localization and Kalman gain matrices, respectively. Writing the update equation for the $n$th entry of the vector $\mathbf{d}_j^{k}$, we have

\begin{eqnarray}\label{Eq:DSI-ESMDA-local2}
  \nonumber d_{n,j}^{k+1} & = & d_{n,j}^k + \sum_{i=1}^{N_{d,\textrm{h}}} \kappa^k_{n,i}  r_{n,i} \delta d_{i,j}^k \\
  & = & d_{n,j}^k + \sum_{i=1}^{N_{d,\textrm{h}}} \kappa^k_{n,i} \eta_{n,i,j}.
\end{eqnarray}
For each $n$, we have a different coefficient $\eta_{n,i,j}$. Therefore, Eq.~\ref{Eq:DSI-ESMDA-local2} means that each component of $\mathbf{d}_j^{k+1}$ may be computed with a different linear combination of the $N_{d,\textrm{h}}$ columns of $\mathbf{K}^k$. Thus, localization expands the degrees of freedom to assimilate data.

The application of DSI-ESMDA is similar to the standard DSI, both methods require to run reservoir simulations only for the prior ensemble of models to generate the prior ensemble of predicted data. After that, DSI-ESMDA applies Eq.~\ref{Eq:DSI-ESMDA} $N_a$ times to generate the posterior ensemble. Note that the $N_a$ iterations are necessary because the prior ensemble is not Gaussian (if the prior is Gaussian, MDA is equivalent to a single ES update). Moreover, note that using Gaussian anamorphosis to transform variables only ensures that the marginal distributions of individual $d_i$'s are Gaussian, the joint distribution which is updated with DSI-ESMDA may not be Gaussian. In our tests, we noticed that only a few MDA iterations are required. In all cases presented in the next section, we use $N_a = 4$. DSI-ESMDA can also be applied to the same parameterization of DSI, that is, update the PCA coefficients with the data transformation of Eq.~\ref{Eq:CDFTrans}. However, our initial tests showed that this procedure did improve the results, actually the results were slightly worse. Moreover, using the PCA parameterization of DSI would prevent to use localization. The only correction we applied is to truncate in zero if the final predicted data is negative, which in our tests occurred with water production data before breakthrough. Note that we apply this truncation only to the final estimates, not during the DSI-ESMDA iterations.

\section{Test Cases}
\label{Sec:TestCases}

\subsection{Test Case 1}
\label{Sec:TestCase1}

The first test problem is a synthetic reservoir case created with rock and fluid properties typically found in the Campos Basin, Brazil. The reservoir model contains 50 $\times$ 70 $\times$ 10 gridblocks with uniform size of 50~m $\times$ 50~m $\times$ 5~m. A reference (true) case was generated using sequential Gaussian simulation for modeling porosity and sequential Gaussian co-simulation for permeability using the porosity as secondary variable and a correlation coefficient of 0.95. Table~\ref{Tab:GeoCase1} summarizes the geostatistical parameters used to generate the reference model. The model has two vertical oil producing and two vertical water injection wells placed on the borders of the reservoir as illustrated in Fig.~\ref{Fig:Case1Model}. The producers operated under as specified bottom-hole pressure (BHP) of 25,000~kPa while the injectors operate with a BHP of 35,000~kPa.

\begin{table}
	\centering
	\caption{Geostatistical parameters used to create the reference model and the prior ensemble. Test case 1}
	\label{Tab:GeoCase1}
	\begin{tabular}{lcc}
		\toprule
		Parameter & Porosity & Log-permeability \\
		\midrule
		Mean & 0.22 & 7.2~ln-mD \\
        Standard deviation & 0.05 & 0.60~ln-mD \\
        Variogram type & Spherical & Spherical \\
        Variogram maximum range & 1124.0~m & 1124.0~m \\
        Variogram minimum range & 281.0~m & 281.0~m \\
        Azimuth & 45$^\circ$ & 45$^\circ$ \\
		\bottomrule
	\end{tabular}
\end{table}

\begin{figure}
\centering
	\includegraphics[width=0.6\linewidth]{case1_model.pdf}
\caption{Test case 1.}
\label{Fig:Case1Model}
\end{figure}

Using the same geostatistical parameters of the reference model, we generated an ensemble of 500~realizations for testing DSI and DSI-ESMDA. The synthetic measurements correspond to oil and water rate at both production wells and water injection rate at both injectors. These observations were corrupted by adding random Gaussian noise with zero mean and standard deviation corresponding to 10\% of the data predicted by the reference model. For DSI, we kept 99\% of the singular value energy (Eq.~\ref{Eq:SVDEnergy}) which corresponded to 98~singular values. For DSI-ESMDA, we also kept 99\% of the singular value energy in the subspace inversion. We used $N_a = 4$ MDA iterations. Neither spatial nor temporal localizations were applied in this case. For comparisons, we also applied a standard history matching (that is, model-space inversion) using ES-MDA to update the same prior ensemble of 500 realizations with $N_a = 4$ without localization. It is worth noting that the results of the history matching with ES-MDA do not correspond to the reference solution, as the method is not guaranteed to sample the posterior PDF correctly for nonlinear problems. The objective is to compare the DSI results against a history matching procedure that is used in practice. There are rigorous sampling methods, such as Markov chain Monte Carlo and rejection sampling \citep{oliver:08bk} that could be used to generate the reference solution. Unfortunately, these methods are computationally prohibitive, even for a simple problem such as the one describe in this section. One alternative would be to simplify the problem by reducing the size of the model and the number of data points. However, this has already been done by \citep{sun:17b}, where it is shown that DSI obtained reasonable results compared to rejection sampling for a problem with few data points.

Figure~\ref{Fig:WaterRateTestCase1} shows the predicted water production rate for both wells of the model obtained with DSI, DSI-ESMDA. For comparisons, we included in each plot the water rate predicted by the history-matched models with ES-MDA. The results in this figure indicate that both DSI methods obtained similar predictions, which are in reasonable agreement with the standard ES-MDA. Figure~\ref{Fig:NpWpCase1} shows the field cumulative production of oil and water predicted by the prior ensemble and by each method. The cumulative production from the reference case is also included in this figure for comparisons. This figure shows that the uncertainty ranges predicted by the methods are similar. Figure~\ref{Fig:WaterRateTestHistCase1} shows the predicted water production rate for the first well considering three different sizes of the historical period. The main difference is observed for the case with no water breakthrough in the production history (cases with 20 data points in Fig.~\ref{Fig:WaterRateTestCase1}). For this case, DSI-ESMDA predicts a larger uncertainty range in the water production rate. In order to test the robustness of the methods, we selected another reference model with predictions outside the P10--P90 range from the prior ensemble and the results are presented in Fig.~\ref{Fig:WaterRateBiasedReferenceTestCase1}. Despite of the poor coverage of the prior ensemble, both methods obtained forecasts in reasonable agreement with the reference. However, we note that DSI-ESMDA obtained a sightly better data match for the first well (Figs.~\ref{Fig:WaterRateBiasedReferenceTestCase1}a and b) and a forecast range centered around the reference.

\begin{figure}
\centering
    \captionsetup{justification=centering}
    \subfloat[]{
      \includegraphics[width=0.5\textwidth]{case1_wpr_p1_dsi_51_ehm.pdf}
    }
    \subfloat[]{
      \includegraphics[width=0.5\textwidth]{case1_wpr_p1_dsi-esmda_51_ehm.pdf}
    }
    \linebreak
    \subfloat[]{
      \includegraphics[width=0.5\textwidth]{case1_wpr_p2_dsi_51_ehm.pdf}
    }
    \subfloat[]{
      \includegraphics[width=0.5\textwidth]{case1_wpr_p2_dsi-esmda_51_ehm.pdf}
    }

\captionsetup{justification=justified}
\caption{Water production rate in m$^\text{3}$/days for wells P1 (first row) and P2 (second row). Test case 1. (a) and (c) DSI, (b) and (d) DSI-ESMDA. The red dots are the observed data points and the red line is the prediction from the reference model. The grey region corresponds to the predictions within the percentiles P10--P90 obtained with the prior ensemble. The light blue region corresponds to the predictions within the percentiles P10--P90 obtained with DSI or DSI-ESMDA. The blue line corresponds to the percentile P50 obtained with DSI or DSI-ESMDA. The black lines correspond to the percentiles P10, P50 and P90 obtained by the history-matched models using ES-MDA. The vertical dashed line indicates the end of the history and beginning of the forecast period.}
\label{Fig:WaterRateTestCase1}
\end{figure}

\begin{figure}
\centering
    \captionsetup{justification=centering}
    \subfloat[]{
      \includegraphics[width=0.5\textwidth]{case1_Np_boxplot.pdf}
    }
        \subfloat[]{
      \includegraphics[width=0.5\textwidth]{case1_Wp_boxplot.pdf}
    }
\captionsetup{justification=justified}
\caption{Field cumulative production in $\text{10}^\text{6}$~m$^\text{3}$. (a) Oil and (b) water. Test case 1. The dashed red line indicates the cumulative production of the reference case.}
\label{Fig:NpWpCase1}
\end{figure}

\begin{figure}
\centering
    \captionsetup{justification=centering}
    \subfloat[]{
      \includegraphics[width=0.5\textwidth]{case1_wpr_p1_dsi_20.pdf}
    }
    \subfloat[]{
      \includegraphics[width=0.5\textwidth]{case1_wpr_p1_dsi-esmda_20.pdf}
    }
    \linebreak
    \subfloat[]{
      \includegraphics[width=0.5\textwidth]{case1_wpr_p1_dsi_51.pdf}
    }
    \subfloat[]{
      \includegraphics[width=0.5\textwidth]{case1_wpr_p1_dsi-esmda_51.pdf}
    }
    \linebreak
    \subfloat[]{
      \includegraphics[width=0.5\textwidth]{case1_wpr_p1_dsi_70.pdf}
    }
    \subfloat[]{
      \includegraphics[width=0.5\textwidth]{case1_wpr_p1_dsi-esmda_70.pdf}
    }
\captionsetup{justification=justified}
\caption{Water production rate in m$^\text{3}$/days for well P1 considering different number of observed data points 20 (first row), 51 (second row) and 70 data points (third row). Test case 1. (a), (c) and (e) DSI, (b), (d) and (f) DSI-ESMDA. See Fig.~\ref{Fig:WaterRateTestCase1} for description.}
\label{Fig:WaterRateTestHistCase1}
\end{figure}

\begin{figure}
\centering
    \captionsetup{justification=centering}
    \subfloat[]{
      \includegraphics[width=0.5\textwidth]{case1_wpr_p1_dsi_51_272.pdf}
    }
    \subfloat[]{
      \includegraphics[width=0.5\textwidth]{case1_wpr_p1_dsi-esmda_51_272.pdf}
    }
    \linebreak
    \subfloat[]{
      \includegraphics[width=0.5\textwidth]{case1_wpr_p2_dsi_51_272.pdf}
    }
    \subfloat[]{
      \includegraphics[width=0.5\textwidth]{case1_wpr_p2_dsi-esmda_51_272.pdf}
    }

\captionsetup{justification=justified}
\caption{Water production rate in m$^\text{3}$/days for wells P1 (first row) and P2 (second row) for a case with poor coverage of predictions from the prior ensemble. Test case 1. (a) and (c) DSI, (b) and (d) DSI-ESMDA. See Fig.~\ref{Fig:WaterRateTestCase1} for description.}
\label{Fig:WaterRateBiasedReferenceTestCase1}
\end{figure}

Both methods require to run reservoir simulations of the prior ensemble, which is clearly the dominating computational time. DSI also requires to solve the RML optimizations with the BFGS method, while DSI-ESMDA requires to apply the analysis (Eq.~\ref{Eq:DSI-ESMDA}) $N_a = 4$ times for each ensemble member. We measured the CPU running time of the inversion part of each method and the results are reported in Table~\ref{Tab:CPUTestCase1}. All computations were performed in the same computer (Intel Core i5-4690 CPU 3.5~GHz and 16~GB RAM). The results in this table show that DSI-ESMDA is notably faster than DSI, requiring only two seconds against approximately 25 minutes for DSI.

\begin{table}
	\centering
	\caption{CPU time for inversion (70 data points). Test case 1}
	\label{Tab:CPUTestCase1}
	\begin{tabular}{lc}
		\toprule
		Method & CPU time (seconds) \\
		\midrule
		DSI & 1506 \\
        DSI-ESMDA & 2 \\
		\bottomrule
	\end{tabular}
\end{table}

\clearpage

\subsection{Test Case 2}
\label{Sec:TestCase2}

The second test case is a more realistic history-matching problem known as UNISIN-I-H \citep{avansi:15a}. This problem is based on actual data from Namorado Field (Campos Basis, Brazil). The UNISIM-I-H model has 81 $\times$ 58 $\times$ 20 gridblocks, but only 37,000 are active. All gridblocks have a uniform size of 100~m $\times$ 100~m $\times$ 8~m. The original dataset is available for download at \citep{unisim-i-h:13}. The dataset consists of 500 realizations of petrophysical properties (porosity, permeability in the three orthogonal directions and net-to-gross ratio). Besides the 500 petrophysical realizations, the UNISIM-I-H case also includes six global parameters, whose prior uncertainties were modeled as independent triangle distributions with values shown in Table~\ref{Tab:UNISIM-ScalarPar}. In this field there are 25 long horizontal wells (14 producers and 11 water injectors). Figure~\ref{Fig:UNISIM-Wells} shows the position of the wells projected in the first layer of the model. The oil producing wells are perforated close to the top and the water injection wells are perforated near to the bottom of the reservoir. The observed data were generated by adding random Gaussian data-error to the data predicted by a reference fine-scale model (UNISIM-I-R). The UNISIM-I-R was constructed with a higher level of geological details in a grid with 3.5 million active gridblocks \citep{avansi:15a}. The observed data correspond to monthly ``measurements'' of oil and water rate and the noise level was assumed as 10\% of the data predicted by the model UNISIM-I-R. All wells are controlled by specified BHP during the historical and forecast periods.

\begin{figure}
	\centering
	\includegraphics[width=0.7\linewidth]{unisim_wells.png}
	\caption{Position of the wells. UNISIM-I-H}
	\label{Fig:UNISIM-Wells}
\end{figure}

\begin{table}
\caption{Prior distribution of global parameters. UNISIM-I-H}
\label{Tab:UNISIM-ScalarPar}
\begin{scriptsize}
\begin{center}
\begin{tabular}{lccc}
\toprule
Parameter & Mode & Min. & Max. \\
\midrule
Rock compressibility in $(\text{cm}^2/\text{kgf})$ & $5.3\times 10^{-5}$ & $1\times 10^{-5}$ & $9.6\times 10^{-5}$ \\
Depth of the oil-water contact at the East block (Fig.~\ref{Fig:UNISIM-Wells}) & 3174 & 3169 & 3179 \\
Maximum water relative permeability & 0.35 & 0.15 & 0.55 \\
Corey exponent of water relative permeability & 2.4 & 2.0 & 3.0 \\
Multiplier for vertical permeability & 1.5 & 0.0 & 3.0 \\
\bottomrule
\end{tabular}
\end{center}
\end{scriptsize}
\end{table}

For this test problem, we applied DSI, DSI-ESMDA and DSI-ESMDA with localization. We also applied a model-based inversion (history matching) with ES-MDA for comparisons. The dimension of the matrix $\Delta \mathbf{D}$ for the UNISIM-I-H case is $12825 \times 500$ and the SVD retaining 99\% of the singular values energy resulted in a vector of PCA coefficients with 395 elements for DSI. For DSI-ESMDA, we used $N_a = 4$ data assimilations and kept 99\% of the singular values in the subspace inversion. DSI-ESMDA with localization considered a critical length computed with $L_{x^\prime} = L_{y^\prime} = 2000$~m and $T = 6000$~days. These values were selected based on our previous experience testing ES-MDA for history matching this benchmark problem. We did not try different configurations for the critical length. The history matching with ES-MDA also used $N_a = 4$ and a spatial localization with critical length of 2000~m. Note that in the history matching case, the Kalman gain is applied to update model parameters (porosity, permeability, etc.). Therefore, it does not seem appropriate to introduce the ``time distance'' to compute the localization matrix in this case.

In ours tests, the DSI implementation failed to achieve reasonable data matches for the UNISIM-I-H case. This result came as a surprise because the same problem was not observed with DSI-ESMDA using the same prior ensemble. We conducted a series of experiments trying to solve this problem, but the reason for the poor performance of the optimizations is still unclear. Among our experiments, we tried to use both numerical and the approximate analytical gradients during the minimizations, however, the large majority of the optimization did not converge properly. We also introduced a rescaling procedure before the truncated SVD. Basically, instead of computing the SVD of the matrix $\Delta \mathbf{D}$ (as in Eq.~\ref{Eq:SVD}), we applied SVD to a scaled version

\begin{equation}\label{Eq:SVD-rescaled}
  \widehat{\Delta \mathbf{D}} \equiv \mathbf{C}_{\mathbf{e}}^{\scriptsize -\textrm{1/2}} \Delta \mathbf{D} = \widehat{\mathbf{U}} \widehat{\mathbf{\Sigma}} \widehat{\mathbf{V}}^{\scriptsize \top},
\end{equation}
and computed the square root of $\mathbf{C}_{\mathbf{d}}$ for PCA as

\begin{equation}
  \mathbf{C}_{\mathbf{d}}^{\scriptsize \textrm{1/2}} = \mathbf{C}_{\mathbf{e}}^{\scriptsize \textrm{1/2}} \widehat{\mathbf{U}} \widehat{\mathbf{\Sigma}}.
\end{equation}
The rationality for this procedure is to avoid losing relevant information during the truncation of small singular values because $\Delta \mathbf{D}$ may be poorly scaled. Unfortunately, this procedure did not result in significant improvements. We also tried the optimizations keeping all 499 singular values to preserve the maximum number of degrees freedom provided by the prior ensemble to match data. In this case, we observed an even worse performance. Conversely, we also tried to reduce the number of singular values by keeping only 95\% and 90\% of the energy, which resulted in 237 and 154 singular values, respectively. The idea was to check if using a small number of PCA coefficients would help to regularize the optimizations. Again, no noticeable improvements were observed.

In order to evaluate the quality of the final data matches, we computed the data-mismatch objective function normalized by the number of observed data points ($N_{d,\textrm{h}} = 9900$) for 500 posterior realizations obtained with DSI, DSI-ESMDA, DSI-ESMDA with localization and the history matching with ES-MDA. The normalized data mismatch objective function was computed as

\begin{eqnarray}\label{Eq:ON}
  \nonumber \mathcal{O}_{N,d} & = & \frac{1}{2N_{d,\textrm{h}}}\left( \mathbf{d}_{\textrm{obs}} - \mathbf{d}_{\textrm{h}}\right)^{\scriptsize \top} \mathbf{C}_{\mathbf{e}}^{\scriptsize -1} \left( \mathbf{d}_{\textrm{obs}} - \mathbf{d}_{\textrm{h}}\right)\\
  & = & \frac{1}{2N_{d,\textrm{h}}} \sum_{i=1}^{N_d} \left( \frac{d_{\textrm{obs},i} - d_{\textrm{h},i}}{\sigma_{e,i}}\right)^2,
\end{eqnarray}
where $\sigma_{e,i}$ is the data-error standard deviation of the $i$th datum. The last equality in (\ref{Eq:ON}) holds only for independent data errors. In the Appendix section of \citep{oliver:18b} it is shown that the expectation of $\mathcal{O}_{N,d}$ for a set of RML samples in a linear problem should be one half. Even though this value is valid only for linear problems, it serves as a reference. For example, if we have a predicted curve where the difference with all observed data points is exactly one standard deviation of the data error, then the normalized objective function of this curve is exactly 0.5. Analogously, we have $\mathcal{O}_{N,d} = 2$ and $\mathcal{O}_{N,d} = 4.5$ for two and three standard deviations, respectively. This effectively means that it would be difficult to justify in practice the acceptance of a data match with $\mathcal{O}_{N,d}$ significantly larger than five. Table~\ref{Tab:UNISIM-OF} shows the mean and standard deviation of $\mathcal{O}_{N,d}$ for each case. Clearly, DSI resulted too large values for $\mathcal{O}_{N,d}$, indicating the lack of convergence of the minimizations. The objective functions from DSI-ESMDA and DSI-ESMDA with localization have mean roughly ten times smaller. The history matching case with ES-MDA also resulted in a mean objective function significantly smaller than DSI. In terms of computational cost, the DSI method required approximately 28 hours to complete, while the DSI-ESMDA (with and without localization) require around 45 minutes each.

\begin{table}
\caption{Normalized data-mismatch objective function. UNISIM-I-H}
\label{Tab:UNISIM-OF}
\begin{center}
\begin{tabular}{lcc}
\toprule
Case & Mean & Standard deviation\\
\midrule
Prior & 456.7 & 333.462 \\
DSI & 26.6 & 7.379 \\
DSI-ESMDA & 2.7 & 0.003 \\
DSI-ESMDA with localization & 1.9 & 0.008 \\
ES-MDA & 3.0 & 0.109 \\
\bottomrule
\end{tabular}
\end{center}
\end{table}

The prior ensemble for the UNISIM-I-H case was provided by the authors of the benchmark and it is noteworthy that even though this is a synthetic problem, the predictions from the prior ensemble do not span the data from the reference case for several wells. This is clearly not an ideal situation for applying DSI or even any history-matching method. Ideally, the prior ensemble should provide a reasonable estimate of the prior uncertainty, at the very least, it should to be able to span the observations. In practice, we should revise the prior ensemble before using for data assimilation. However, here for the purposes of the investigation, we decided to test the methods with this deficient prior ensemble. Figures~\ref{Fig:WaterRateGoodPriorUNISIM} and \ref{Fig:WaterRateBadPriorUNISIM} show the results obtained by DSI, DSI-ESMDA and DSI-ESMDA with localization for three wells with good and poor coverage of the predictions from the prior ensemble, respectively. We selected these wells because they are representative of the results observed in this problem. Figure~\ref{Fig:WaterRateGoodPriorUNISIM} indicates that DSI failed to match data even for the wells with good prior coverage. As a result, the prediction from the reference model lies outside the predicted P10--P90 range. For the wells with poor coverage (Fig.~\ref{Fig:WaterRateBadPriorUNISIM}), DSI seems to fail to reduce the uncertainty range properly, for example, the posterior predictions for wells PROD021 and PROD025A have almost the same uncertainty range of the prior ones. DSI-ESMDA obtained reasonable data matches for all wells, however, the predictions are clearly too narrow as they do not span the reference. DSI-ESMDA with localization improved the results significantly, although it was not able to span the reference predictions, especially for the wells with poor prior coverage. Figure~\ref{Fig:WaterRateESMDAUNISIM} compares the results of DSI-ESMDA with localization with the history matching with ES-MDA. It is interesting to note that the history matched models also suffer from the lack of representativeness of the prior ensemble; see, for example, the plots (a) and (d) in Fig.~\ref{Fig:WaterRateESMDAUNISIM}. Figure~\ref{Fig:NpWpUNISIM} shows boxplots of field cumulative oil and water production predicted by the prior ensemble and by each method. The cumulative production from the reference case is also included in this figure for comparisons. Overall, the predictions are biased compared to the reference production, which is probably explained by the problems with the prior ensemble.

\begin{figure}
\centering
    \captionsetup{justification=centering}
    \subfloat[]{
      \includegraphics[width=0.33\textwidth]{unisim_wpr_na3d_dsi.pdf}
    }
    \subfloat[]{
      \includegraphics[width=0.33\textwidth]{unisim_wpr_na3d_dsi-esmda.pdf}
    }
    \subfloat[]{
      \includegraphics[width=0.33\textwidth]{unisim_wpr_na3d_dsi-esmda_local.pdf}
    }
    \linebreak
        \subfloat[]{
      \includegraphics[width=0.33\textwidth]{unisim_wpr_rjs19_dsi.pdf}
    }
    \subfloat[]{
      \includegraphics[width=0.33\textwidth]{unisim_wpr_rjs19_dsi-esmda.pdf}
    }
    \subfloat[]{
      \includegraphics[width=0.33\textwidth]{unisim_wpr_rjs19_dsi-esmda_local.pdf}
    }
    \linebreak
        \subfloat[]{
      \includegraphics[width=0.33\textwidth]{unisim_wpr_p24_dsi.pdf}
    }
    \subfloat[]{
      \includegraphics[width=0.33\textwidth]{unisim_wpr_p24_dsi-esmda.pdf}
    }
    \subfloat[]{
      \includegraphics[width=0.33\textwidth]{unisim_wpr_p24_dsi-esmda_local.pdf}
    }
\captionsetup{justification=justified}
\caption{Water production rate in m$^\text{3}$/days for three wells with good coverage of predictions from the prior ensemble. Well NA3D (first row), RJS19 (second row) and PROD24A (third row). (a), (d) and (g) DSI. (b), (e) and (h) DSI-ESMDA, (c), (f) and (i) DSI-ESMDA with localization. UNISIM-I-H. See Fig.~\ref{Fig:WaterRateTestCase1} for description.}
\label{Fig:WaterRateGoodPriorUNISIM}
\end{figure}

\begin{figure}
\centering
    \captionsetup{justification=centering}
    \subfloat[]{
      \includegraphics[width=0.33\textwidth]{unisim_wpr_p21_dsi.pdf}
    }
    \subfloat[]{
      \includegraphics[width=0.33\textwidth]{unisim_wpr_p21_dsi-esmda.pdf}
    }
    \subfloat[]{
      \includegraphics[width=0.33\textwidth]{unisim_wpr_p21_dsi-esmda_local.pdf}
    }
    \linebreak
    \subfloat[]{
      \includegraphics[width=0.33\textwidth]{unisim_wpr_p25_dsi.pdf}
    }
    \subfloat[]{
      \includegraphics[width=0.33\textwidth]{unisim_wpr_p25_dsi-esmda.pdf}
    }
    \subfloat[]{
      \includegraphics[width=0.33\textwidth]{unisim_wpr_p25_dsi-esmda_local.pdf}
    }
    \linebreak
    \subfloat[]{
      \includegraphics[width=0.33\textwidth]{unisim_wir_i23_dsi.pdf}
    }
    \subfloat[]{
      \includegraphics[width=0.33\textwidth]{unisim_wir_i23_dsi-esmda.pdf}
    }
    \subfloat[]{
      \includegraphics[width=0.33\textwidth]{unisim_wir_i23_dsi-esmda_local.pdf}
    }
\captionsetup{justification=justified}
\caption{Water rate in m$^\text{3}$/days for three wells with poor coverage of predictions from the prior ensemble. Well PROD021 (first row), PROD025A (second row) and INJ023 (third row). (a), (d) and (g) DSI. (b), (e) and (h) DSI-ESMDA, (c), (f) and (i) DSI-ESMDA with localization. UNISIM-I-H. See Fig.~\ref{Fig:WaterRateTestCase1} for description.}
\label{Fig:WaterRateBadPriorUNISIM}
\end{figure}

\begin{figure}
\centering
    \captionsetup{justification=centering}
    \subfloat[]{
      \includegraphics[width=0.5\textwidth]{unisim_wpr_na3d_dsi-esmda_local_ehm.pdf}
    }
    \subfloat[]{
      \includegraphics[width=0.5\textwidth]{unisim_wpr_p21_dsi-esmda_local_ehm.pdf}
    }
    \linebreak
    \subfloat[]{
      \includegraphics[width=0.5\textwidth]{unisim_wpr_rjs19_dsi-esmda_local_ehm.pdf}
    }
    \subfloat[]{
      \includegraphics[width=0.5\textwidth]{unisim_wpr_p24_dsi-esmda_local_ehm.pdf}
    }
    \linebreak
    \subfloat[]{
      \includegraphics[width=0.5\textwidth]{unisim_wpr_p25_dsi-esmda_local_ehm.pdf}
    }
    \subfloat[]{
      \includegraphics[width=0.5\textwidth]{unisim_wir_i23_dsi-esmda_local_ehm.pdf}
    }
\captionsetup{justification=justified}
\caption{Water rate in m$^\text{3}$/days for six wells (NA3D, PROD021, RJS19, PROD024A, PROD025A, INJ023) obtained with DSI-ESMDA with localization and history matching with ES-MDA. UNISIM-I-H. See Fig.~\ref{Fig:WaterRateTestCase1} for description.}
\label{Fig:WaterRateESMDAUNISIM}
\end{figure}

\begin{figure}
\centering
    \captionsetup{justification=centering}
    \subfloat[]{
      \includegraphics[width=0.9\textwidth]{unisim_Np_boxplot.pdf}
    }
    \linebreak
        \subfloat[]{
      \includegraphics[width=0.9\textwidth]{unisim_Wp_boxplot.pdf}
    }
\captionsetup{justification=justified}
\caption{Field cumulative production in $\text{10}^\text{6}$~m$^\text{3}$. (a) Oil and (b) water. UNISIM-I-H. The dashed red line indicates the cumulative production of the reference case.}
\label{Fig:NpWpUNISIM}
\end{figure}

\clearpage

\section{Field Case}
\label{Sec:FieldCases}

The field case corresponds to a large offshore turbidite reservoir in Campos Basis. Currently there are 24~wells producing oil in the field from a total of 43 vertical wells that have been drilled during 18~years of operation. The main recovery mechanism is pressure maintenance by a large aquifer. A total of 500 prior realizations of the reservoir were built by the asset team of the field using the best practices available to date in the Company. These realization include facies, porosity, permeability and net-to-gross ratio for each one of 11 producing zones. The engineers of the field also selected the oil-water relative permeability curves as parameters with relevant uncertainty. The relative permeability curves in six different regions of the model were parameterized using Corey functions with the exponents and the maximum relative permeability of water selected as uncertainty parameters with Gaussian prior distributions. The model has approximately 500,000 active gridblocks (total of 114 $\times$ 238 $\times$ 60  with an average size of 75~m $\times$ 75~m $\times$ 2~m). This field has a large number of sealing faults as illustrated in Fig.~\ref{Fig:FieldCaseModel}. All wells are controlled by specified total liquid production rate during the historical period and the forecast. The observed data corresponds to monthly measurements of oil and water rate at the well with a total of 26703 data points.

Unlike the UNISIM-I-H case, the predictions from the prior ensemble cover reasonably well the observed data for the large majority of the wells in the field, which creates a more favorable situation for the application of the methods. Once again, the optimizations in our DSI implementation failed to converge, providing unreasonable results for this field problem. DSI-ESMDA without localization showed severe reduction in the posterior variance, showing indications of ensemble colapse. Both results were not included in this paper. The only acceptable results obtained in this field are the ones from DSI-ESMDA with localization. In this case, we use the same configuration of the case UNISIM-I-H to define the critical length for localization, that is, $L_{x^\prime} = L_{y^\prime} = 2000$~m and $T = 6000$~days. For comparisons, we history matched the same ensemble of models using ES-MDA with $N_a = 4$ and localization with a critical length of 2000~m. Table~\ref{Tab:FieldCase-OF} presents the mean and standard deviation of the normalized data mismatch objective function. The results in this table indicate that DSI-ESMDA with localization obtained an excellent data match, with mean objective function of 0.55. The history matching with ES-MDA also improved significantly the data match, but with higher values of objective function. Figure~\ref{Fig:WaterRateFieldCase} shows the water production rate for eight representative wells of the field. The values in this figure were normalized to preserve the confidentiality of the information. Overall, the forecasts after DSI-ESMDA with localization are comparable with the forecasts from the history-matched models, despite some clear differences observed in some wells. Figure~\ref{Fig:NpWpFieldCase} shows boxplots of field cumulative oil and water production. The main difference between DSI-ESMDA and ES-MDA is for the cumulative water production, where DSI-ESMDA predicts a higher water production in the field.

\begin{table}
\caption{Normalized data-mismatch objective function. Field case}
\label{Tab:FieldCase-OF}
\begin{center}
\begin{tabular}{lcc}
\toprule
Case & Mean & Standard deviation\\
\midrule
Prior & 32.19 & 11.309 \\
DSI-ESMDA (with localization) & 0.55 & 0.004 \\
ES-MDA & 4.11 & 0.581 \\
\bottomrule
\end{tabular}
\end{center}
\end{table}

\begin{figure}
\centering
	\includegraphics[width=0.8\linewidth]{field_case_model_2d.pdf}
\caption{Top view of the field case model showing the large number of wells and faults.}
\label{Fig:FieldCaseModel}
\end{figure}

\begin{figure}
\centering
    \captionsetup{justification=centering}
    \subfloat[]{
      \includegraphics[width=0.47\textwidth]{field_case_wpr_field_dsi-esmda_local_ehm_norm.pdf}
    }
    \subfloat[]{
      \includegraphics[width=0.47\textwidth]{field_case_wpr_p2_dsi-esmda_local_ehm_norm.pdf}
    }
    \linebreak
    \subfloat[]{
      \includegraphics[width=0.47\textwidth]{field_case_wpr_p4_dsi-esmda_local_ehm_norm.pdf}
    }
    \subfloat[]{
      \includegraphics[width=0.47\textwidth]{field_case_wpr_p8_dsi-esmda_local_ehm_norm.pdf}
    }
    \linebreak
    \subfloat[]{
      \includegraphics[width=0.47\textwidth]{field_case_wpr_p9_dsi-esmda_local_ehm_norm.pdf}
    }
    \subfloat[]{
      \includegraphics[width=0.47\textwidth]{field_case_wpr_p11_dsi-esmda_local_ehm_norm.pdf}
    }
    \linebreak
    \subfloat[]{
      \includegraphics[width=0.47\textwidth]{field_case_wpr_p18_dsi-esmda_local_ehm_norm.pdf}
    }
    \subfloat[]{
      \includegraphics[width=0.47\textwidth]{field_case_wpr_p19_dsi-esmda_local_ehm_norm.pdf}
    }
\captionsetup{justification=justified}
\caption{Normalized water production rate obtained with DSI-ESMDA with localization. (a) Total field production, (b)--(h) seven selected wells. Field case. See Fig.~\ref{Fig:WaterRateTestCase1} for description.}
\label{Fig:WaterRateFieldCase}
\end{figure}

\begin{figure}
\centering
    \captionsetup{justification=centering}
    \subfloat[]{
      \includegraphics[width=0.5\textwidth]{field_case_Np_boxplot.pdf}
    }
     \subfloat[]{
      \includegraphics[width=0.5\textwidth]{field_case_Wp_boxplot.pdf}
    }
\captionsetup{justification=justified}
\caption{Normalized field cumulative production. (a) Oil and (b) water. Field case.}
\label{Fig:NpWpFieldCase}
\end{figure}

\section{Conclusions}
\label{Sec:Conclusions}

This paper introduced a new DSI implementation based on the data assimilation method ES-MDA. The new DSI-ESMDA was compared with the original DSI proposed in \citep{sun:17b,sun:17c}, which is based on PCA to reparameterize the predicted data from a prior ensemble combined to RML for sampling. The new implementation preserves the main advantage of the original DSI, namely, it is able to provide an ensemble of production forecasts requiring reservoir simulations only for a prior ensemble of models. We compared the DSI-ESMDA with the original DSI in two synthetic reservoir problems. We also applied DSI-ESMDA to a real field case with long production history and large number of wells. Based on the results for these test problems, we can summarize the following conclusions:

\begin{itemize}
  \item The proposed DSI-ESMDA is computationally faster than the original DSI. Even though the time to execute the reservoir simulations for the prior models tends to be dominant in both methods, the difference in the computational time for the inversion can be relevant for large problems. For example, for the UNISIM-I-H case, the original DSI required approximately 28 hours in a stand-alone computer while the DSI-ESMDA required only 45 minutes.
  \item The performance of both DSI implementations is highly dependent of the ability of the prior ensemble to provide reasonable estimates of the prior uncertainty. The same is also true for the more traditional model inversion with ES-MDA.
  \item The results indicate that the proposed DSI-ESMDA is more robust than the original DSI. In our tests, the optimizations required by DSI have not converged properly for the UNISIM-I-H case. As a result, DSI failed to obtained acceptable data matches and reasonable production forecasts. DSI-ESMDA, on the other hand, was able to match the observed data for all wells.
  \item The use of spatial and temporal localization improved significantly the results of the DSI-ESMDA method when the number of data point is large.
  \item The proposed DSI-ESMDA method with localization obtained forecasts of production comparable with the forecast provided by the posterior models generated with history matching using ES-MDA for a real field problem.
  \item The proposed method is very simple to implement. It does not require data transformations and it is straightforward integrate with different types of data and models.
\end{itemize}

\section*{Acknowledgement}
\label{Sec:Acknowledgement}
The authors would like to thank Petrobras for supporting this research and for the permission to publish this paper.

redpajama_set_name: RedPajamaArXiv


Ann Simpson is a member of The Shared Collective and comments here about her experience of working on an Art of Curation project with curator Anna Douglas to create the exhibition Backbone at Arcadia Gallery (2-10 November 2018).
Working as an artist collective under the guidance of Anna Douglas Curator has been the key to being able to continually think on our feet to put this exhibition together in a week. Three questions posed in the beginning got our intensive workshops off to a challenging and thoughtful start.
What might it mean to lend yourself to an image?
What might it mean to create a community of enquiry?
These provocations developed the way we viewed and thought about the photographs of older women taken by Shirley Baker during the 1960's, along with our own experiences of being older women ourselves. We had to begin to trust each other and develop our own community of enquiry, sharing ideas, feelings, history, culture, thoughts about our bodies, family and life events which became the way we lent ourselves to the photographs and then reflected on what these images might want from us. We talked and thought a lot, this process allowing us in the end to choose six images from over a hundred to base our exhibition on. Giving voice to our own stories "here and now" seemed to create a transformational echo to the "there and then" of the images.
It wasn't just the looking that was important it was also thinking about how we could use our own voices to give voices to the women in the photographs. How our experience now could give voice to the past of these women, hence the choosing of poetry and personal text along with the title of Backbone. Strong words and strong voices.
Curator, administrator, artists, technicians, local florist, local text art, local cafes that fed us, and lunches from the lady in the market all contributed to the exhibition happening, very much a community experience. One imagines the communities in which Shirley Baker took her photographs fostered similar care and friendship.


Overall result - notebookspec.com IS family friendly.
All sources consider notebookspec.com trustworthy and family friendly. Website notebookspec.com has a credible reputation.
Norton ConnectSafe evaluates notebookspec.com for any unsafe and insecure content. The results are critical for families with young children.
McAfee assesses notebookspec.com for a meaningful set of security threats. Featured dangers from annoying pop-ups to hidden Trojans, that can steal your identity, will be revealed. McAfee does not analyze notebookspec.com for mature or inappropriate content, only security checks are evaluated. McAfee SiteAdvisor results for notebookspec.com can be consulted here.
The WOT calculates reputation of the notebookspec.com. This reputation system receives ratings from users and information from third-party sources, assesses the notebookspec.com for safety features and confirms, whether notebookspec.com is suitable for children. WOT results for notebookspec.com can be consulted here.
Still concerned with notebookspec.com? Please, contact our team. We will carry our full audit of the notebookspec.com of your interest and update the information of the analysis.


text:
Q: Trouble With GridBagLayout I am having trouble with GridBagLayout.
A user selects a file, and if that file is bigger than the JTextArea that I display it in, all the Swing components in the shared GridBagLayout go haywire. If it is able to fit in the JTextField, all the Swing components are fine.
Here is a screenshot of the JFrame layout I desire:

And here is the JFrame layout I get when the JTextArea containing the file path is bigger than its allotted size.

All the other JTextFields are affected as well as the buttons below. I don't care if the text in the JTextArea is bigger than its size, I just want all the swing components to stay the same.
Here is the code where I add the Swing components into the File info panel:
    //Setup layout.
    gbc = new GridBagConstraints();
    //File info panel.
    gbc.insets = new Insets(3, 10, 3, 10);
    gbc.gridx = 0;
    gbc.gridy = 0;
    gbc.fill = GridBagConstraints.HORIZONTAL;
    info_panel.add(first_name_jta, gbc);
    gbc.gridx = 1;
    gbc.gridy = 0;
    info_panel.add(first_name_tf, gbc);
    gbc.gridx = 0;
    gbc.gridy = 1;
    info_panel.add(last_name_jta, gbc);
    gbc.gridx = 1;
    gbc.gridy = 1;
    info_panel.add(last_name_tf, gbc);
    gbc.gridx = 0;
    gbc.gridy = 2;
    info_panel.add(frame_type_jta, gbc);
    gbc.gridx = 1;
    gbc.gridy = 2;
    info_panel.add(frame_type_cb, gbc);
    gbc.gridx = 0;
    gbc.gridy = 3;
    info_panel.add(eye_size_jta, gbc);
    gbc.gridx = 1;
    gbc.gridy = 3;
    info_panel.add(eye_size_tf, gbc);

    //Frame panel.
    gbc.gridx = 0;
    gbc.gridy = 0;
    gbc.gridwidth = 2;
    gbc.fill = GridBagConstraints.BOTH;
    frame_panel.add(file_path_tf, gbc);
    gbc.gridy = 1;
    frame_panel.add(info_panel, gbc);
    gbc.gridy = 2;
    gbc.insets = new Insets(10, 60, 10, 60);
    gbc.fill = GridBagConstraints.NONE;
    gbc.anchor = GridBagConstraints.WEST;
    frame_panel.add(save_button, gbc);
    gbc.gridx = 1;
    gbc.gridy = 2;
    gbc.anchor = GridBagConstraints.EAST;
    frame_panel.add(cancel_button, gbc);

Any ideas?

A: Okay, that took a bit of effort.
Basically, when you build the frame_panel, you use gridwidth = 2 for the file_path_tf and info_panel, which is all fine an good, but you never reset the attribute when you add the buttons.
This means that save_button can occupy columns 0 and 1 and cancel_button can occupy 1 and 2
Reset the gridwidth attribute after you've added the info_pane and before you add the buttons
gbc.gridwidth = 1;

Also, I think you'll find JLabels much easier to deal with then JTextAreas for labeling fields, but that's just me.

redpajama_set_name: RedPajamaStackExchange


Get out in the garden (or bush, or field...) and start picking. I got a few young borage leaves, some cress, some puha, then I added a leek and a potato from my garden. Wash everything very well and cook with water, add salt to taste and a drizzle of good extra virgin olive oil.


text:
Arcadia's collapse triggers high street bloodbath as Debenhams begins liquidation
TheIndustry.fashion
A high street bloodbath is under way as the jobs of around 25,000 staff at Arcadia and Debenhams hang in the balance.
Some 13,000 staff at Sir Philip Green's Arcadia Group face an anxious wait following the business collapsing into administration.
And Debenhams, which is already in administration, said it would start a liquidation process after JD Sports confirmed it had pulled out of a possible rescue. The department store has around 12,000 staff.
Arcadia's brands, which includes Topshop, Dorothy Perkins and Burton, has hired Deloitte to handle the next steps after the pandemic "severely impacted" upon sales across its brands.
Many of Arcadia's staff worked at its brands' concessions in Debenhams, which had hoped for a rescue.
Exclusive talks with JD Sports have now ended after the sports chain retailer walked away. A winding down process has begun.
Arcadia, which runs 444 stores in the UK and 22 overseas, said 9,294 employees are currently on furlough.
No redundancies have been announced at Arcadia as a result of the appointment and stores will continue to trade, the administrators said, with many due to reopen on Wednesday when England's lockdown is lifted.
Ian Grabiner, chief executive of Arcadia, said: "This is an incredibly sad day for all of our colleagues as well as our suppliers and our many other stakeholders.
"The impact of the Covid-19 pandemic, including the forced closure of our stores for prolonged periods, has severely impacted on trading across all of our brands.
"Throughout this immensely challenging time our priority has been to protect jobs and preserve the financial stability of the group in the hope that we could ride out the pandemic and come out fighting on the other side.
"Ultimately, however, in the face of the most difficult trading conditions we have ever experienced, the obstacles we encountered were far too severe."
Retail trade union Usdaw has said it is seeking urgent meetings with Arcadia's administrators in a bid to preserve jobs.
Dave Gill, Usdaw national officer, said: "Now that Arcadia is in administration, it is crucial that the voice of staff is heard over the future of the business and that is best done through their trade union.
"We are seeking urgent meetings and need assurances on what efforts are being made to save jobs, the plan for stores to continue trading and the funding of the pension scheme.
"In the meantime, we are providing our members with the support and advice they need at this very difficult time."
The administrators said they will be "assessing all options available", which could see brands sold off in separate rescue deals.
Arcadia will continue to honour all online orders made over the Black Friday weekend and will continue to operate all of its current sales channels.
Matt Smith, joint administrator at Deloitte, said: "We will now work with the existing management team and broader stakeholders to assess all options available for the future of the group's businesses.
"It is our intention to continue to trade all of the brands, and we look forward to welcoming customers back into stores when many of them are allowed to reopen.
"We will be rapidly seeking expressions of interest and expect to identify one or more buyers to ensure the future success of the businesses."
Business Secretary Alok Sharma said he would be keeping a "very close eye" on the administrators' report on director conduct, and pledged the Government would support the affected workers.
He tweeted: "Within three months, the administrators have a duty to file a report on director conduct with The Insolvency Service – who will then determine whether a full investigation is required. I will be keeping a very close eye on this process."
Sharma added: "This is a deeply challenging time for retailers and we remain fully committed to supporting them, including through an unprecedented package of business support worth £280 billion."
Earlier on Monday, Mike Ashley's Frasers Group said an offer of a £50m lifeline for Arcadia was rejected. Ashley had previously been interested in acquiring Debenhams as well but pulled out of the process claiming its advisers had "frozen them" out.
It came as MPs called on Sir Philip to cover a shortfall in the pension scheme and urged the pension watchdog to fight on behalf of the group's workers.
A spokesman for The Pensions Regulator said: "We are aware of the challenges that the business is currently facing in these unprecedented times and we continue to work with the directors, the trustees and their respective advisers, as well as the PPF, to protect the position of the Arcadia pension schemes' members to the fullest extent possible."
Stephen Timms, chairman of the Work and Pensions Committee, called on Sir Philip to stump up funds to fill the pensions black hole, which is estimated to be as large as £350 million.
It is the latest retailer to have been hammered by store closures during the coronavirus pandemic.
Rivals including Edinburgh Woollen Mill Group and Oasis Warehouse have fallen into insolvency since lockdown measures were first imposed in March.
Cordwainers announce Winners of National Footwear Student of the Year Awards
80 new independent boutiques join ASOS Marketplace during COVID-19 lockdown
Updated: Warburg Pincus rules out imminent exit from Reiss

redpajama_set_name: RedPajamaCommonCrawl


In the late 1990's together with the boom in digital and information technologies, the concept of e-government first began to take shape. Since then, e-government has spread throughout the world. In 2007, e-government was launched in Georgia with the creation of the government commission supporting e-governance development, and in 2010, the Data Exchange Agency (DEA) was created under the Ministry of Justice of Georgia. One core function of the DEA is to assist in the development of e-governance. Since, the state has implemented a significant number of e-government projects including my.gov.ge, hr.gov.ge, eauction.ge, rs.ge. Looking to international rankings, progress is visible. According to the UN's E-government development index, Georgia rose from 72nd place in 2012 to 56th in 2014.
E-government in Georgia will, of course, continue to develop, but, at the same time, it should be useful and efficient – to a certain extent, herein lays a problem. While the government develops and improves its digital services and communications through information and communications technology, a large share of the population – potential e-citizens – lacks knowledge of how to use computers, as well as knowledge of how to use the internet. Survey data from the 2013 Caucasus Barometer (CB) shows that roughly half of the county's population (52%) has no basic knowledge of how to use a computer. This means that in all likelihood, these people are unable to use e-government services, or other means of communication with governmental bodies via the internet. In many ways, e-government without more or less advanced computer users is like a government without a population – its existence is pointless unless there are people who will benefit from its services. This blog post looks at the potential and perspectives of e-governance in Georgia considering self-assessed level of knowledge of computers by age and settlement type.
Stemming from the common belief that young people are good with technology, while the older generation has trouble using it, one might think that older people are the only group in society which has no basic knowledge of computers. While CB data confirms this impression to a certain extent, as 86% of those 56 and older report little to no knowledge of computers, it also shows that 24% of 18-35 year olds report having no basic knowledge of how to use a computer. Although the majority of 18-35 year olds (76%) reports knowledge of the computer, 14% of them report only a beginner's level of knowledge. Still, young people are likely most capable of using e-government services, compared with older populations.
Note: The question about computer knowledge asked about the level of knowledge of computer programs, excluding games. Options "Do not know" and "Refuse to answer" are excluded from the analysis throughout this blog post.
In addition to age, knowledge of computers differs by settlement type as well. CB 2013 shows that almost half (46%) of the population of urban settlements outside the capital and 67% of the rural population do not know how to use a computer, compared to 31% of capital residents. Distribution of internet access also falls along these lines. According to the Institute for Development of Freedom of Information's Statistics of Internet Users in Georgia – 2013 of 434,969 wired internet subscriptions in 2013, 273,396 were in Tbilisi. Imereti region comes in second with only 42,198 subscriptions. According to GeoStat, the population of Tbilisi in 2013 was 1,171,200 while the population of Imereti was 703,900. Therefore, Tbilisi had approximately 233 wired internet subscriptions per 1000 inhabitants, compared with only 60 in Imereti. Hence, in order to improve access to e-governance, the greatest amount of work will be spreading knowledge and access to technology in the populations of villages and urban settlements outside the capital. This is particularly important as residents of the capital can much more easily communicate with governmental bodies or receive services by visiting ministries or agencies, but for citizens living outside the capital there are fewer alternatives.
Nevertheless, in every settlement type, 18-35 year olds report more advanced knowledge of computers than those over 36 years old. In the capital, only 11% of young people report no knowledge of computers compared with 13% of youth residing in urban settlements outside the capital and 43% in rural settlements. Still, in all settlement types, knowledge of computers decreases with age.
This blog post has looked at e-government in Georgia in light of reported knowledge of computers. Despite the fact that the older generation generally knows less about computers and therefore has less access to the services that e-government provides, the young generation often has enough knowledge of computers to use its services. Considering that this young generation will replace the older one, it appears that in the future, with increasing knowledge of computers, e-government will be more widely used in Georgia. Nevertheless, compared to the capital, knowledge is lacking in other urban settlements and, especially, in rural settlements.
For more information, take a look at our earlier blog post on e-transparency in Georgia, or look through our data using the Online Data Analysis tool.


I shouldn't be surprised that I've been summoned to the game. The invitation has been at my doorstep for countless, careless seasons. I've ignored all warnings, thrown caution to the wind, knowing one day the wind would blow me back to meet my expiration.
I've never been afraid of what I knew one day would come. Yet in this moment, my lungs seize up in a gripping gasp, as I'm waved to take a seat across from my mortality.
Nothing flashes before my eyes, though people sometimes say things do. My family is the farthest thing from my mind. I dare not bring them along, even in thought, to this ghastly place.
There can be no reluctance as I sit, knowing this match is overdue. But there is something worse than fear in me. Remorse perhaps? Best to hide it from my face.
I gaze down to my final game, and know no trickery can help me now. I relied too much on such things – I should've played differently. Every regret piling up next to me, weighing on my strategy.
But there's no choice, my opponent will not wait – the first move is mine.
My fingers shake the cold stone pawn, and I risk a peek up across the board.
The wraith's hood hangs low, unmoving. Did he see?
My pawn jumps in distraction to his new spot.
The shade of a hand moves its own piece with ease, as sure as he's done countless times before. I glance to the faceless pawn in his grasp. How many has he collected? Am I doomed to join the ranks?
A cold draft sends chills down my spine. I look up in accusation. Is he breathing his intimidation at me? His shoulder raises in a shrug. I suppose it's to be expected, this is his game after all.
The pieces move in a dance worthy of daring the grimmest of reapers, but the gambit has begun, and the specter searches for my blunder. Knights, bishops, and even royalty cannot hide from death – and so, I'm learning, neither can I.
A distant tick-tock counts down until the moment the loser must take his bow.
I sidestep every skewer, throw off every threat.
Encore men, encore! Fight off the genuflect!
The grandmaster guides me to my endgame, a path he knows too well. He leads each attack and capture as a maestro conducts with his baton's swell.
I bury my head into my shaking hands. Can this be the end?
Out of the corner of my eye, a discovery is made. Dare I risk it? Death is on the line, after all.
Stealthily I ply my attempt at a pin.
The ghostly hand balls into a fist. He makes the proper sacrifice to save his King of the Abyss. I raise one brow at my smallest of victories and continue down the file, avoiding each restraint and bind. With each capture, I hail a small victory in my name. But with each sacrifice, I give thanks to the fallen for keeping my king safe again.
I do my best to avoid falling into the traps of my foe's clever tactics. I even try to make him laugh, but fail with my best antics.
Alas the pieces fall, and the tempo draws my game of life to its conclusion.
He didn't say it, but I heard it nonetheless. A bead of sweat slides from my brow, knowing this last move must be my best.
I drag my liege to safety behind a developed barricade. It's not the victory I had hoped for, but safety by blockade.
Death draws in his icy cold breath.
I meet my adversary's dark stare. No one cheats Death, but the draw was won, fair as each board's square.
Neither victory, nor defeat. This dilemma reaches uncharted territory, indeed. I cannot return to whence I came, and I dare not follow where he may lead.
I stare down at the board retracing steps, seeking victory that never came. My opponent sighs in slight reminder it's more about how one plays the game.
I match his sigh, but with contentment, releasing all my dread. I even give the smallest of chuckles, ready to join the dead.
With one long gaze back, I say my goodbyes and turn back to my new friend. With a last breath of courage, I ask him, "Shall we go one more round?" and bow to meet my end.
The thing being " long overdo" as the story states the thing is, makes the thing, this living, this match, come alive as your story does. Oh, and by the way, I found it under:I want to change the universe, and that I had 3 minutes for reading the story.