#### 5.1. Example 1: Hydraulic Head Mapping

[34] The first application involves the estimation of a hypothetical hydraulic head distribution in an unconfined aquifer. Five wells are present in the aquifer, three of which measure the hydraulic head, and two of which are dry. The two dry wells represent censored data, or inequality constrained data, because we know that the water table is below the bottom of the well, but we do not know its exact location. We wish to estimate the water table depth at all unsampled locations, including the two dry wells. As an additional constraint, we know that the groundwater table cannot be above the land surface, and all estimation locations can also therefore be thought of either as inequality constrained parameters, or as censored data. For simplicity, we assume that the measurements in the wells are exact (i.e. no measurement error). An example where this assumption does not hold is presented in the second application.

[35] Figure 1a presents the available data and estimation constraints. We assume that the unconstrained spatial covariance of the water table distribution can be represented using an exponential covariance function:

with parameters *σ*^{2} = 1.0 m^{2}, *l* = 600 m, where *h*_{ij} is the separation distance between estimation points *i* and *j*. In a practical setting, this covariance information would be derived from additional sampling or previous experience. The hydraulic head is estimated at 1 m intervals.

[36] Figure 1c presents the estimated water table distribution using ordinary kriging. Because ordinary kriging cannot directly handle the inequality constraints imposed by the dry wells, these measurement location either have to be ignored, or the water table depth has to be set to a fixed value. In this case, ignoring the dry wells would yield best estimates at the dry well locations above the bottom of one of these wells, a physically inconsistent result. Therefore, as is often done in practice, the water table in the dry wells is assumed to be at the bottom of the well. This approach underestimates the uncertainty in the groundwater level at and around the dry well locations. In addition, ordinary kriging cannot incorporate the ground level constraint on the water table depth, and the uncertainty bounds of the estimate extend above ground. This is again a physically inconsistent result stemming from the Gaussian assumptions common to estimating uncertainty bounds using the kriging variance.

[37] Figure 1b presents the estimated water table distribution using the CGGS algorithm. No measured water table depth is specified at the dry well locations, but the groundwater level is constrained to be below the bottom of the well. In addition, the realizations are everywhere constrained to be below the ground surface. The Markov chain was initialized with the ordinary kriging best estimate of the hydraulic head distribution, because this was a realistic starting point that also did not violate the constraints for this application. The chain is run for a total of 50,000 realizations, because the large distance between measurements requires a relatively large number of realizations in order to effectively sample the uncertainty space. Because the starting point for the Markov chain is very good in this case, only the first 100 realization of the chain are discarded in the analysis. Contrary to the ordinary kriging result, none of the estimates or their uncertainty bounds violate the physical constraints imposed by the dry wells or ground surface. In addition, the uncertainty associated with the groundwater level at the dry wells is realistically represented, with wide uncertainty on the water table depth at these locations. Interestingly, for both dry wells, the best estimate of the groundwater depth is significantly below the bottoms of the wells for this example. Finally, the uncertainty intervals on the water table depth are not symmetric close to constraint boundaries, which is realistic for this situation and results from the use of a non-Gaussian a priori pdf.

[38] Figure 1d presents a sample conditional realization generated using a multi-Gaussian assumption as is representative of a traditional kriging sampling approach, and a sample conditional realization generated using the proposed constrained algorithm. The two realizations exhibit a similar degree of spatial variability, because they are both based on the same prior covariance model. As was already demonstrated in Figure 1b, however, the realization generated using the CGGS algorithm does not reach above ground level, and is better reflective of the uncertainty in groundwater levels at the locations of the dry wells.

[39] Note that the marginal pdf at each point for each conditional realization is modeled as a truncated Gaussian distribution. However, the overall pdf describing the uncertainty across the ensemble of realizations can take on a variety of forms (Figure 2). Away from constraint boundaries (e.g. *x* = 100 m), the pdf is close to Gaussian and similar to that which would be obtained using a traditional kriging setup. At locations where constraints have a significant impact on the estimates (e.g. *x* = 140 m), the final pdf looks like the truncated Gaussian pdf used in the sampling procedure. Near such boundaries (e.g. *x* = 138 m, *x* = 20 m), the distribution is skewed. These pdfs reflect the spread in the ensemble of conditional realizations used to characterize the uncertainty associated with parameter values at unsampled locations. Note that the product of a multidimensional truncated-Gaussian prior with a Gaussian likelihood function does not point-wise yield a truncated Gaussian distribution.

#### 5.2. Example 2: Contaminant Load Estimation

[40] The Humboldt River basin is located in North-Eastern Nevada in the United States, and its water resources have a variety of recreational and agricultural uses. The Humboldt River contains arsenic which results in large part from mining practices when mineralized rock is crushed and exposed to oxygen and water. The concentration history of dissolved arsenic in the North Fork of the Humboldt river and the total dissolved arsenic load supplied to downstream locations were previously estimated using the nonnegativity-enforcing Gibbs sampling approach of *Michalak and Kitanidis* [2005].

[41] The CGGS approach not only allows for this lower concentration bound to be enforced and measurement errors to be taken into account, but also provides a statistically rigorous methods for accounting for censored data where the measured concentration was below the detection limit. The new approach is compared with results obtained using ordinary kriging with a linear variogram, chosen based on an examination of the experimental variogram of available data and for easy comparison to Example 3 in *Michalak and Kitanidis* [2005]. The covariance structure of the contaminant concentrations is therefore modeled using a linear generalized covariance function:

where θ = 10^{−8} (*μ*g/l) ^{2}day^{−1}, *h*_{ij} is the time lag between the *i* and *j* estimation times, and the generalized covariance takes the place of the covariance *Q*_{ij} used for stationary parameter distributions.

[42] The concentration data were obtained from the EPA STORET database [*EPA*, 2003] and are plotted in Figure 3a. All measured and estimated concentrations must be nonnegative. Based on documentation from EPA, the detection limit is 3 *μ*g/l. The measurement error is assumed to be normally-distributed with a variance of 0.25(*μ*g/l)^{2}, yielding 95% confidence bounds of ±1 *μ*g/l, corresponding to the reported data precision.

[43] We discretize the concentration history into ten-day intervals, augmented by the times at which measurements were actually taken, with time zero starting on the day of the first measurement, 21 April 1999, yielding a total of *m* = 173 estimation times. Note that although we are interested in the variability of the arsenic concentration in time rather than in space, the approach presented in sections 3 and 4 is directly applicable, simply by substituting temporal coordinates *t* for spatial coordinates *x* in the algorithm presented in section 4.1.

[44] For this application, the median and 95% confidence intervals of the probability density functions of concentration values at ten day intervals are determined based on ensemble properties of conditional realizations generated using the method described in section 4. The Markov chain is initialized with the ordinary kriging best estimate of the concentration history, because this is a realistic starting point that also does not violate the constraints for this application. The chain is run for a total of 10,000 realizations. Because the starting point for the Markov chain is very good in this case, only the first 100 realization of the chain are discarded in the analysis. Results are plotted in Figure 3b. The equivalent plot using kriging with a linear variogram is presented in Figure 3c. As can be seen in these figures, the proposed approach behaves similarly to the kriging interpolation away from constraints, but the best estimate near constraints deviates from the kriging estimates. For the kriging application, the non-detect points are assumed to have no arsenic (0 *μ*g/l). An alternative approach which is sometimes used is to set non-detects at half the detection limit (1.5 *μ*g/l in this case).

[45] As can be seen from Figure 3b, the new methodology is effective at enforcing parameter nonnegativity, and constraining non-detects to below the detection limit without specifying a prior estimate of concentrations at those times. The measurement uncertainty is also reflected in the estimates. Note that the measurement error is modeled through the likelihood term (section 4.2), whereas the non-detects are modeled as an interval constraint in the range of zero to the detection limit. By design, the new methodology behaves similarly to kriging with a linear variogram in high concentration regions.

[46] Traditional geostatistical simulation, on the other hand, leads to conditional realizations and confidence intervals reaching into the negative parameter range, which have no physical significance, and can be misleading. In addition, kriging requires explicit assumptions about the concentration for non-detect samples, and cannot account for the finite uncertainty range for these measurement times.

[47] Figure 3d presents a sample conditional realization generated using a multi-Gaussian assumption as is representative of a traditional kriging setup, and a sample conditional realization generated using the CGGS algorithm. The two realizations exhibit similar degrees of spatial variability, because they are both based on the same covariance model. As was already demonstrated in Figure 3c, however, the realization generated using the proposed algorithm does not violate the nonnegativity constraint, and is better reflective of the uncertainty in concentrations at times of non-detect samples.

[48] The obtained estimates can also be used in conjunction with flowrate information to estimate total contaminant load, as was presented in *Michalak and Kitanidis* [2005]. River flow data for the equivalent time period, however, were not available. Therefore, flows for 1 January 1971, through 31 December 1981, are averaged to obtain a representative hydrograph for the stream [*USGS*, 2001]. These daily average flows are used to estimate the flowrate history for the period of 21 April 1999, through 30 July 2003, by assigning to each day a flowrate equivalent to the average flow for that calendar day. These flows are presented in Figure 4.

[49] To estimate the total contaminant load, individual conditional realizations are weighted using river flows, yielding an ensemble of contaminant loads that can be used to describe the uncertainty associated with this quantity. The total loads are presented in Figure 5 for the kriging and constrained approaches. As discussed in *Michalak and Kitanidis* [2005], for this river, high concentration events are associated with high flows. Therefore, because the proposed method has a stronger impact close to constraint boundaries, the impact of the constraints on total load is relatively limited. However, Figure 5 shows that the kriging approach consistently underestimates contaminant loads relative to the constrained approach, which is more consistent with the physical bounds on parameter values. This effect is more pronounced than that discussed in *Michalak and Kitanidis* [2005], because the current approach is able to provide a better representation of observations with non-detect concentrations. At the end of the four-year period, the new approach estimates a statistically significantly higher contaminant load relative to the kriging approach, at the 0.05 confidence level. This effect is important because it implies that methods that do not account for physical constraints on parameter values, especially with regard to nonnegativity and representation of non-detect values, can lead to strong underestimation of contamination.

#### 5.3. Example 3: Estimation of Historical Contaminant Distribution

[50] The final example application involves the identification of the historical distribution of a contaminant in a two-dimensional aquifer, and is modeled after the heterogeneous example presented in *Michalak and Kitanidis* [2004b]. The two-dimensional distribution at time *T*_{a} is estimated based on downgradient concentration measurements taken at time *T*_{b} = *T*_{a} + 2000 days. The affected aquifer is represented as having a deterministically heterogeneous hydraulic conductivity field.

[51] The domain is finite, measuring 1024 m and 512 m in the *x*_{1} and *x*_{2} directions, respectively. It is discretized into 128 × 64 nodes in the *x*_{1} and *x*_{2} directions, respectively, resulting in an 8 m × 8 m grid. No-flux boundary conditions are applied at the top and bottom boundaries for both flow and transport. The left-hand side and right-hand side boundaries have prescribed constant heads, resulting in a mean gradient of 3.472 × 10^{−2} m/m. Details regarding the aquifer heterogeneity are available in *Michalak and Kitanidis* [2004b]. The flow solution is obtained using MODFLOW [*McDonald and Harbaugh*, 1988; *Harbaugh and McDonald*, 1996].

[52] The actual contaminant distribution at time *T*_{a} used in this example is presented in Figure 6a. The plume profile at time *T*_{b} is obtained using MT3DMS [*Zheng*, 1990; *Zheng and Wang*, 1999]. The boundary conditions used to solve the forward problem are:

where *t* is time, *x*_{i} are the spatial directions (*i* = 1, 2), **x** = (*x*_{1}, *x*_{2}), *C* is resident concentration, *η* is porosity, *D*_{ij} is the *i*,*j*th entry of the dispersion tensor, and *v*_{i} is fluid velocity in the direction *x*_{i}. Uncorrelated random error with a standard deviation of 1 × 10^{−3} mg/l is added to the observations to represent measurement error.

[53] The distribution at time *T*_{b} is presented in Figure 6b, along with sampling locations. The sampling is conducted on a 32 m × 32 m grid, yielding a total of 105 observation locations. We recover the contaminant distribution in the region Ω_{a} = {**x**: *x*_{1} ∈ (0,256), *x*_{2} ∈ (168, 392)}. For the purpose of solving the inverse problem, this area is discretized into 8 m intervals, yielding 896 points at which the concentration at time *T*_{a} is to be estimated. This represents a strongly underdetermined problem. The adjoint approach of *Michalak and Kitanidis* [2004b] is applied to define the sensitivity matrix **H** needed to solve the inverse problem, which defines the sensitivity of each observation at time *T*_{b} to a historical concentration at each location in the domain Ω_{a}. The covariance of the concentration distribution at time *T*_{a} is taken from this earlier work, where it was estimated using a Restricted Maximum Likelihood approach. A cubic generalized covariance model was used:

where *h*_{ij} is the physical separation distance between the *i*th and *j*th locations at which the contaminant distribution is to be estimated, and θ = 10^{−6} (mg/l)^{2} m^{−3} [*Michalak and Kitanidis*, 2004b].

[54] Figure 6d presents the recovered historical distribution using a linear geostatistical inverse modeling approach, analogous to the method presented in *Michalak and Kitanidis* [2004b]. Although the overall distribution at time *T*_{a} is recovered reasonably well, the best estimate includes areas with negative concentrations. Even in locations where the best estimate itself is positive, the uncertainty bounds can encompass negative values, as seen in the one-dimensional slice presented in Figure 7b. Figure 6c presents the recovered historical distribution using the proposed CGGS approach. The Markov chain is initialized with the absolute value of the best estimate obtained using linear inverse modeling, because this is a starting point that does not violate the constraints for this application. The chain is run for a total of 1000 realizations. As in the two previous applications, the first 100 realization of the chain are discarded in the analysis. The applied constraint in this case is nonnegativity within the entire domain. As can be seen from this figure, the best estimate is indeed everywhere nonnegative. In addition, as seen in Figure 7a, the entire probability density function at each point is constrained to be nonnegative, yielding positive uncertainty bounds.

[55] Furthermore, the accuracy and precision of the estimates are improved by the addition of the constraint. First, the third peak in the historical contaminant distribution, which is absent in the estimate obtained using the linear approach, is correctly inferred in the best estimates of the constrained approach. Second, because of the strong implicit constraint on total contaminant mass offered by the plume measurements, the addition of the nonnegativity constraint decreases the uncertainty throughout the domain. Conceptually, through mass conservation, by eliminating the possibility for negative concentrations, the possibility for some large positive concentrations is eliminated as well. This effect can be seen clearly by comparing Figures 7a and 7b, where the uncertainty bounds for the constrained approach are everywhere narrower relative to the linear approach. This effect is especially pronounced in areas of low concentration. Overall, the new approach successfully enforces physical constraints in an inverse modeling setup, while improving the precision and accuracy of the obtained estimates. Note that the inverse modeling approach used for the solution of the solute inverse problem assumes a known transport model, parameterized in **H**. The current literature on stochastic methods for solving solute transport inverse problems in groundwater hydrology does not consider uncertainties in transport parameters (see, e.g. review in *Michalak and Kitanidis* [2004b]), although a few recent works have considered such uncertainty in a deterministic context [e.g. *Sun et al.*, 2006; *Sun*, 2007]. Relaxing this assumption within a probabilistic framework is the topic of ongoing research. The innovation presented in the current paper, however, focuses specifically on the treatment of the constraints within the solution space.