Uncertainty in model predictions is caused to a large extent by the uncertainty in model parameters, while the identification of model parameters is demanding because of the inherent heterogeneity of the aquifer. A variety of inverse methods has been proposed for parameter identification. In this paper we present a novel inverse method to constrain the model parameters (hydraulic conductivities) to the observed state data (hydraulic heads). In the method proposed we build a conditioning pattern consisting of simulated model parameters and observed flow data. The unknown parameter values are simulated by pattern searching through an ensemble of realizations rather than optimizing an objective function. The model parameters do not necessarily follow a multi-Gaussian distribution, and the nonlinear relationship between the parameter and the response is captured by the multipoint pattern matching. The algorithm is evaluated in two synthetic bimodal aquifers. The proposed method is able to reproduce the main structure of the reference fields, and the performance of the updated model in predicting flow and transport is improved compared with that of the prior model.
 The inverse problem in hydrogeology aims to gain understanding about the characteristics of the subsurface, i.e., identification of model structure and corresponding parameters by integrating observed model responses such as hydraulic head and mass concentration data. Several inverse methods have been proposed to solve the inverse problem in the last several decades. At the early stages of inverse modeling, a single “best” estimate of hydraulic conductivities was pursued. Examples can be found in the works by Kitanidis and Vomvoris  and Hoeksema and Kitanidis [1984, 1985], who proposed the geostatistical method to identify the parameters of the underlying variogram that describes the multi-Gaussian random function used to characterize the spatial heterogeneity of hydraulic conductivities; once these parameters were identified, the hydraulic conductivity map was obtained by cokriging using the conductivity and piezometric head data. Another example can be found in the work by Carrera and Neuman , who treated the aquifer properties as piecewise homogeneous. These approaches produced maps of conductivity which were capable of reproducing the observed heads but which were too smooth to be used for transport predictions, since they lacked the short-scale variability observed in the field. It was, thus, realized that the aquifer should be characterized by heterogeneous distributions of the parameters (see de Marsily et al.  for a historic perspective on the treatment of heterogeneity in aquifer modeling). There are already several inverse methods capable of dealing with this heterogeneity, e.g., the pilot point method [RamaRao et al., 1995], the self-calibration method [Gómez-Hernández et al., 1997; Wen et al., 1999; Hendricks Franssen et al., 2003], the ensemble Kalman filter [Evensen, 2003; Chen and Zhang, 2006; Hendricks Franssen and Kinzelbach, 2008; Zhou et al., 2011, 2012], or the Markov chain Monte Carlo method [Oliver et al., 1997; Fu and Gómez-Hernández, 2009].
 In the above referred inverse methods, the groundwater model structure is described by a variogram model, which basically measures the correlation between two spatial locations. This two-point variogram-based model is not able to characterize curvilinear features, e.g., cross-bedded structures in fluvial deposits or erosion fractures in karstic formations, while these curvilinear structures play a key role in flow and especially solute migration modeling [e.g., Kerrou et al., 2008; Li et al., 2011a]. A solution to address this issue is to use multiple-point geostatistics. A “training image,” which contains the types of features to be reproduced by the aquifer model, is introduced as a geological conceptual model [Guardiano and Srivastava, 1993]. This training image is used to derive experimental local conditional distributions that serve to propagate the curvilinear patterns onto the simulated aquifer. Several programs based on multiple-point geostatistics are available, e.g., SNESIM [Strebelle, 2002], FILTERSIM [Zhang et al., 2006], SIMPAT [Arpat and Caers, 2007], and DS [Mariethoz et al., 2010a], and a detailed review on multiple-point geostatistics is provided by Hu and Chugunova . The advantages of using multiple-point geostatistics for the characterization of hydraulic conductivity and for flow and transport prediction have been confirmed after comparison with variogram-based simulation methods, both in synthetic examples and in real aquifers [e.g., Feyen and Caers, 2006; Huysmans and Dassargues, 2009; Journel and Zhang, 2006].
 Most of the inverse methods construct an objective function to measure the deviation between the simulated and observed data. Then, through an optimization algorithm, the initial aquifer models are modified until the observed data are well reproduced by the model predictions. However, during the optimization process, the aquifer spatial structure may be modified with respect to the structure of the initial guesses and become geologically unrealistic [Kitanidis, 2007]. To prevent this departure, techniques such as including a regularization term or using a plausibility criterion are combined with the objective function to constrain the deviation of the updated model from the prior model [Alcolea et al., 2006; Emsellem and de Marsily, 1971; Neuman, 1973]. But these methods have been challenged on their theoretical foundations [RamaRao et al., 1995; Rubin et al., 2010]. Some recent inverse methods use other avenues in an attempt to preserve the prior structure when perturbing the parameter values in the prior fields.
 Considering the limits of the conventional inverse methods and the advantages of multiple-point geostatistics, a reasonable solution is to use the multiple-point geostatistics to characterize the nonlinear structure and to try to preserve this structure when the model is updated using inverse methods. In this way, the curvilinear features are characterized properly and the model remains physically realistic during the inverse process. A few examples of such inverse methods include the gradual deformation method (GDM) [Hu, 2000; Caers, 2003], the probability perturbation method (PPM) [Caers, 2002; Caers and Hoffman, 2006] and the probability conditioning method (PCM) [Jafarpour and Khodabakhshi, 2011]. In all three methods, the prior model structure can be characterized by multiple-point statistics and the property realizations are updated in such a way that the prior model statistics are kept. The difference between the three methods resides in the way the observations are integrated and the way the realizations are updated. The main idea of the GDM is that the realizations are perturbed by modifying the random number used to draw from the conditional distribution functions inherent to the sequential simulation algorithm. This random number is chosen through optimizing a deformation parameter so that the mismatch between the simulated and observed dynamic data is reduced. The PPM is based on modifying the conditional probability functions themselves. For the case of PCM, the realizations are updated with a multiple-point simulation method under a soft constraint given by a probability map inferred from observed flow data. The probability map is built with the help of the ensemble Kalman filter.
 Alternatively to the inverse methods formulated in the framework of minimizing an objective function, the Markov chain Monte Carlo method provides another way to tackle the problem, namely, sampling from a posterior distribution that is already conditioned to observations. Two such examples that are capable of dealing with curvilinear structures are the blocking moving window algorithm [Alcolea and Renard, 2010] and the iterative spatial resampling [Mariethoz et al., 2010b]. Another avenue is treating the inverse problem as a search problem, e.g., the distance-based inverse method proposed by Suzuki and Caers . A large number of multiple-point simulations are constructed, from which a search scheme is used to select those consistent with the observed dynamic data. The spatial structure of the parameters is not disturbed since no modification is performed, simply a selection is carried out. The updated model should be geologically realistic as long as the prior model is so.
 In this paper, we present a novel approach to constrain hydraulic conductivity realizations to dynamic flow data. The most distinct novelty of the proposed method is that we formulate the inverse problem on the basis of pattern search instead of minimizing an objective function or sampling the posterior distribution. We assume that the hydraulic conductivity to be simulated is related to the geologic structure and to the flow dynamics in its neighborhood. The value at each simulated cell is determined by searching for matches, through an ensemble of realizations, to the conditional pattern composed of simulated hydraulic conductivities and observed flow data. The proposed pixel-based method is not only convenient to condition to local data but it is also able to capture the geologic structure inherent to the initial seed realization. The pattern is searched through an ensemble of realizations, all of which are consistent with the geologic structure, so that the pattern search method ensures that the updated fields are physically realistic and the prior statistics are preserved.
 The rest of the paper is organized as follows. In section 2, the proposed method is presented in detail. In section 3, a synthetic example is described to assess the performance of the method. In section 4, the results of the synthetic experiment are presented and analyzed. In section 5, the method is further evaluated with another example to test the effect of the number of conditioning data and of the boundary conditions. In section 6, a few issues about the method are discussed. In section 7, some conclusions about the proposed method are given.
 The method is based on the direct sampling algorithm proposed by Mariethoz et al. [2010a]. It has been extended to include transient state observation data, which requires the enlargement of the concept of training image to a training ensemble of realizations. Also, in the same line as the ensemble Kalman filter approach, the ensemble of realizations that serve as training image are updated as new sets of state observation data are collected.
2.1. Flowchart of the Algorithm
 A flowchart of the proposed method is displayed in Figure 1, which consists of the following steps.
 1. Generate the prior ensemble of realizations. For the purpose of illustration we will consider that hydraulic conductivity is the parameter of interest. Let the ensemble be composed of Nr realizations and each hydraulic conductivity field be discretized into Nn cells. Multiple-point sequential simulation methods are applied to generate the conductivity field ensemble, e.g., using the SNESIM or the DS codes mentioned in the introduction section. A training image is needed for the generation. This training image will not be used again. At this initial stage, no observation state data are considered. The hydraulic conductivity hard data are honored if available. Time is set to zero.
 Loop on time t begins.
 2. Increase t to the next time step. Forecast the dependent state variables. For each realization of the ensemble, the hydraulic head data for the current time t are obtained by solving the transient flow equation, from time zero to time t, on the hydraulic conductivity field subject to initial and boundary conditions. (We assume that the initial and boundary conditions are known perfectly so that we can focus on the uncertainty caused by hydraulic conductivities.) At this stage we have an ensemble of hydraulic conductivity realizations that mimic the patterns of the training image, and the corresponding ensemble of piezometric head fields. These two ensembles will become now the training images in which to look for joint patterns of both conductivities and piezometric heads that will permit the generation of a new set of conductivity realizations consistent with the piezometric head measurements. Piezometric head data are observed, and become conditioning data.
 Loop on realizations begins.
 Loop on cells begins.
 3. A new ensemble of realizations will be generated. For each realization, define a random path visiting each cell except those with hydraulic conductivity measurements. For each cell with an unknown value (Ki) in the random path,
 3A. Determine the conditional data pattern of Ki. In this work, the data pattern is composed of both hydraulic conductivities and piezometric heads. The conditional hydraulic conductivities include measured hard data, if any, and previously simulated values. A maximum number M of conditional hydraulic conductivities and a maximum number N of conditional piezometric heads are set. Only the closest M hydraulic conductivities and the closest N observed heads are stored as conditional data constituting the conditioning pattern. For instance, in Figure 2, the conditioning data pattern for Ki consists of three hydraulic conductivities and two observed heads. The size of the conditional data pattern is not determined by a maximum search area but instead by the number of conditioning data. The varying-size search neighborhood scheme was proposed by Mariethoz et al. [2010a]. Advantages of this pattern configuration are twofold: (1) the size of the conductivity data event in the pattern is influenced by the density of the known conductivities; that is, when the known conductivities are sparse, the pattern will cover a large area to reach the maximum number of conditioning data (M). On the other hand, when the known conductivities are dense, the pattern will cover a small area, and only the nearest cells are used to account for the local variety. In other words, the flexible search neighborhood scheme has similar effect as multiple grids [Mariethoz et al., 2010a]. (2) Only hydraulic heads located near the unknown cell (N at most) are considered rather than all the heads over the field, which helps to avoid potential spurious correlation between simulated hydraulic conductivities and head observations.
 3B. Given the conditional pattern, start a search in the ensemble of training image couples (hydraulic conductivity–piezometric head) for a match to the conditional pattern. Randomly start from a realization couple in the ensemble and then follow the ensemble sequentially. The search is not conducted on the entire realization, but it is restricted to a close neighborhood around the location of Ki, this restriction is enforced because hydraulic heads depend not only on hydraulic conductivities but also on the boundary conditions and the presence of sinks or sources. More specifically, in this work, we search only within a 3 by 3 square as shown in Figure 3, i.e., only 9 pattern candidates in a 3 by 3 square are evaluated in each realization. Calculate the distance function (d) between the conditioning data and the candidate:
where dk and dh are the distances between the conditioning data and the candidate pattern corresponding to hydraulic conductivities and heads, respectively, and ω is a trade-off coefficient used to balance the influence of the two types of conditioning data. This weight technique has been applied in many inverse methods and a usual choice for the value of ω is 0.5 when two types of conditioning data are taken into account and the distance measures are normalized [e.g., Alcolea and Renard, 2010; Capilla and Llopis-Albert, 2009; Christiansen et al., 2011; Hendricks Franssen et al., 2003]. The expression of the distance function will be discussed later on.
 3C. Assign the value of Ki. If the distance function value d is less than a predefined threshold (dt), locate the value of K relative to the conditioning pattern in the matching realization and assign it to Ki. If dt = 0, the conditioning data are exactly matched; if dt > 0, a certain disagreement is allowed. To explicitly distinguish the misfits related with hydraulic conductivities and heads in the conditioning data pattern, we can define two thresholds, dt,k and dt,h. In the present work, hydraulic conductivities are considered as categorical variables (two facies with uniform values) and the corresponding dt,k is set to 0, indicating an exact fit. Normally dt,h is assigned a value larger than 0 to account for measurement errors and the difficulty of fitting exactly a continuous variable (a value of dt,h = 0.005 was used, after some trial, in the examples following). If no match is found with distances below the predefined thresholds, the pattern with the smallest distance is used.
 Loop back to step 3A for generation of the next cell until all cells for the current realization are visited.
 Loop back to step 3 to start the generation of the next realization until all realizations are generated.
 4. Perform postprocessing. Inconsistencies may appear during data assimilation as shown in Figure 4. We can find that the cells indicated by the ellipses are not consistent with their neighboring values and cannot be considered geologically realistic. We simply filter these inconsistent values out similarly as Henrion et al.  did. However, this might disturb the facies proportions since no proportion control strategy is applied. In order to reduce the influence of the artificial filtering on facies proportion, we only consider those inconsistent objects consisting of at most three cells. More complex postprocessing methods can be found in image processing algorithms, e.g., kernel principal component analysis [Kim et al., 2005; Mika et al., 1999], or others [Falivene et al., 2009].
 5. Update the training images. The set of conductivity realizations generated become the new set of training images.
 Loop back to step 2 for the next time step until all transient hydraulic heads have been used.
2.2. Distance Function
 In the proposed method, the distance function plays a key role and it must be defined carefully. The Minkowski distance is a commonly used distance function as defined below [Borg and Groenen, 2005; Duda et al., 2001].
where is the distance function between the data event and the conditioning data pattern , n indicates the size of and , x can be hydraulic conductivity and head data, and q is a variable that, if equal to 1, gives rise to the Manhattan distance, and if it is equal to 2, to the Euclidian distance.
 1. Manhattan distance (city block distance) has been used as the dissimilarity measure in SIMPAT, a multiple-point geostatistical simulation algorithm [Arpat and Caers, 2007].
The distance values are normalized into the range [0,1] by dividing by n, which makes it convenient to define the threshold values, i.e., threshold values near 0 indicate very low deviation and near 1 very high deviation. It also helps in combining the distances for different attributes.
where dmax is the maximum deviation between and , together with n used to normalize the distance values.
 2. Weighted Euclidean distance attributes different weights to elements in the data event depending on their distance to the simulated cell, i.e., the nearer to the simulated cell, the more important, while in the unweighted Manhattan distance, all elements share the same weight.
where hi is the lag distance from the element in the data event to the simulated cell and ai is the same as in equation (3).
 A synthetic experiment is designed to evaluate the performance of the proposed method. The test aquifer is assumed confined and it covers a domain discretized into 100 × 80 × 1 cells, with cell dimensions of 1 m × 1 m × 10 m. A training image for the facies (Figure 5) was generated using the object-based geologic modeling program FLUVSIM [Deutsch and Tran, 2002]. This training image serves as a conceptual model of the bimodal aquifer composed of high-permeability sand and low-permeability shale. Uniform permeability values are assigned to the two facies, i.e., ln m d−1 for the shale and ln m d−1 for the sand. DS [Mariethoz et al., 2010a], a pattern-based multiple-point geostatistical simulation algorithm, is used to generate the reference facies field (Figure 6) by borrowing structures from the training image. Hydraulic conductivities at 20 locations in the reference are collected serving as the conditioning hard data (see Figure 6 for locations of the measurements).
 MODFLOW2000 [Harbaugh et al., 2000], a finite difference flow simulator, is used to solve the transient groundwater flow equation on the reference field subject to the boundary conditions: impermeable boundaries in the north and south, constant head in the west (H = 0 m) and prescribed flow rate in the east (Q = 100 m3 d−1). Notice that the flow pumping rates in the east boundaries are not uniform, but proportional to the conductivities at the boundary. The initial head is 0 m everywhere over the field. A simulation period of 30 days is discretized into 20 time steps following a geometric sequence of ratio 1.05. Specific storage is assumed constant and equal to 0.003 m−1. Piezometric head data at 63 observation locations are collected serving as the conditioning data to update the prior model parameters. Configuration of the 63 piezometers is shown in Figure 6.
 The number of conditioning data (20 hydraulic conductivity values, and 63 piezometric head time series) maybe unrealistically large for practical situations, although it may not be in controlled experiments. Example B below uses a reduced number of conditioning data. The main purpose of this example is to test the method in an extreme case with lots of state conditioning data. The larger the number of state conditioning data, the more stress is put on the inverse algorithm to find acceptable solutions.
 The prior ensemble of realizations consists of 500 realizations which are generated by DS using the same training image used to generate the reference (the reference field is, of course, not a member of the initial ensemble of realizations). The 20 conductivity hard data are honored when the prior realizations are generated. The prior ensemble is generated so that the uncertainties related with the conceptual model and hydraulic conductivity measurement are not considered in this experiment.
 The observed piezometric heads in the first 6 time steps (6.17 days) are used to update the prior realizations with the proposed method. The results after integrating the observations are presented and discussed in section 4.
4. Results and Discussions
4.1. Hydraulic Conductivity Characterization
Figure 7 shows the first four realizations in the ensemble before and after the head data are assimilated. The prior realizations (left column in Figure 7) are conditioned to 20 hydraulic conductivity measurements and the updated realizations (right column) are consistent with both measured conductivity and observed piezometric head data. We can find that the prior realizations deviate considerably from the reference field while the updated realizations resemble closely the reference. In other words, the main channel pattern is captured after integrating the observed piezometric heads. However, we notice that the updated realizations exhibit a little higher variability near the west boundaries than in the east (indicated by the three ellipses in the reference field). This can be attributed partly to the boundary conditions, since piezometric heads around prescribed head boundaries are not sensitive to hydraulic conductivity fluctuations.
Figure 8 summarizes the prior and posterior statistic metrics of ln K over the ensemble of realizations. The ensemble average (the second row of Figure 8, EA) of the prior realizations exhibits no channel trend while the updated EA shows clear channels and resembles the reference field. The ensemble standard deviation (the third row of Figure 8, Std. dev.) shows a significant reduction of uncertainty, i.e., in the prior model the uncertainties around the hard data are small and the uncertainties grow big when far away from the hard data locations while in the updated case they are reduced everywhere. We also plot the RMSE (the fourth row of Figure 8) taking advantage of knowing the reference field exactly. The RMSE(x)i at a cell i is computed as
where Nr is the number of realizations in the ensemble, x can be either the ln K or the hydraulic head h, the superscripts sim and ref indicate simulation and reference model, respectively. Similarly with the standard deviation, the RMSE(ln K) field confirms the importance of assimilating observed piezometric head data in characterizing the structure of hydraulic conductivity. The error is clearly reduced in the updated ensemble compared with the prior case. Moreover, we calculate the average RMSE(ln K) over the field and it is reduced from 3.0 m d−1 in the prior model to 1.5 m d−1 in the updated model. As we have mentioned previously, the structure identification near the west boundaries is less improved compared with the east part (separated by the dashed line) because of the influence of the prescribed head boundaries.
4.2. Prediction Capability of the Updated Model
 To evaluate the prediction capacity of the updated model, we will use it to forecast piezometric head evolution and mass transport. The initial and boundary conditions remain the same as during the model calibration. Figure 9 shows the evolution of hydraulic head with time in the simulation period (30 days) at two of the piezometers, where the left column shows predictions with the prior model and the right column shows predictions with the updated model after conditioning on the observed hydraulic head data until 6.17 days. The prediction uncertainty is substantially reduced in the updated ln K model compared with the prior model. The average RMSE(h) at each time step over the hydraulic field is calculated and is shown in Figure 10. We can argue that the hydraulic head prediction with the updated model is improved not only at the observation locations but over the whole field. Figure 11 summarizes the ensemble average, standard deviation, and RMSE of the flow prediction at the end of the simulation with the prior and calibrated model, separately.
Figure 12 illustrates the configuration of the transport prediction experiment. Conservative particles are released linearly along x = 10 m and three control planes across the field are placed to record the arrival times of the particles. The random walk particle tracking program RW3D [Fernàndez-Garcia et al., 2005; Li et al., 2011b, 2011c] is used to solve the transport equation in the ln K fields once the flow has reached steady state. Advection and dispersion are both considered, with longitudinal and transverse dispersivities of 0.5 m and 0.05 m, respectively. The porosity is assumed constant as 0.3. Figure 13 shows the breakthrough curves (BTCs) at the three planes for the prior ensemble (Figure 13, left) and for the updated ensemble (Figure 13, right). We can see that the updated model reproduces the reference BTCs better than the prior model does, i.e., the median of the travel times in the updated model resembles the reference BTCs. Moreover, the prediction uncertainties measured by the 5th and 95th percentiles are significantly reduced, i.e., the confidence interval is narrower, after the hydraulic heads are conditioned.
5. Synthetic Example B
 In the previous synthetic example there are 20 hard conductivity data and 63 piezometers used to calibrate the prior model. To further examine the performance of the proposed method we test another application in a more realistic example where the observations are available at only 9 locations. The inclusion of a pumping well in the center of the domain also allows to investigate the method under a different flow configuration. This example is similar to the one by Alcolea and Renard  with respect to the conditioning hard data, hydraulic head piezometers and boundary conditions.
 The research domain of 100 m × 100 m × 10 m is discretized into 100 × 100 × 1 cells. The reference field is generated with the multiple point geostatistical simulation algorithm SNESIM [Strebelle, 2002] using the training image in Figure 14a. The reference field is shown in Figure 14b, where the hydraulic conductivities are assumed constant within each facies, i.e., K = 10 m d−1 for sand and K = 10−3 m d−1 for shale. The transient flow equation is solved on the reference confined aquifer under the boundary conditions: prescribed head boundaries in the west (H = 1 m) and in the east (H = 0 m) and impermeable boundaries in the north and south. A pumping well with a production of 100 m3 d−1 is located at well 9 in Figure 14b. The initial head is 0 m over the field. The simulation period of 30 days is discretized into 20 time steps following a geometric sequence of ratio 1.2.
5.2. Prior Model and Conditioning Data
 The prior model ensemble consists of 500 realizations which are generated with the same algorithm (SNESIM) and the same training image (Figure 14a). This ensemble does not include the reference field. Each realization is conditioned to the lithofacies measured from the reference field at the nine wells (Figure 14b), six of which are in sand and the other three are in shale. The location of the conditioning wells does not correspond to a random sampling, but it implicitly assumes that there is a priori geological/geophysical information that helps drilling most of the wells in highly conductive zones. The head dynamics at the nine wells in the reference field are collected for the first 10 time steps (4.17 days) and used as conditioning data. The resulting model will be evaluated from facies recognition and flow prediction capacity.
5.3. Calibrated Model
5.3.1. Facies Recognition
Figure 15 summarizes the reproduction of the facies by the conditional realizations. Figure 15 (top) shows a single realization. It can be seen how, after updating, the channel location is much closer to the one in the reference, the main channel features around the conditioning wells are reproduced; however they fail to match the entire length of the isolated branch toward the bottom of the reference, and the branch on the upper right corner. In both cases the difficulty to identify these two channel branches has to do with the small sensitivity that conductivity at these locations has with respect to piezometric heads. Notice that both unidentified areas are connected to the no flow boundaries in one of their extremes, so the flow channeling effect, particularly for the branch in the upper right corner, does not exist. (This latter fact can better be noticed in Figure 16.) Figure 15 (middle) shows the probability that a given cell is in sand, and Figure 15 (bottom) shows the ensemble variance map. When analyzing these last two maps, it is noticeable the improvement that incorporating the piezometric head data brings to the characterization of the hydraulic conductivity field. It is clear that the characterization is best for the channels which are most affected by the presence of the pumping well. It is also clear that if no wells had been located in the channels, their identification would have been less precise. The largest uncertainties after updating are next to the left boundary, again because of the lack of sensitivity of the hydraulic conductivities to the piezometric heads next to prescribed head boundaries.
5.3.2. Flow Prediction
 Regarding flow predictions beyond the conditioning period, Figure 16 shows the flow prediction at the end of simulation period (30 days) in one realization of the ensemble, and Figure 17 displays the head evolution at the nine wells in the prior and updated model. From Figure 16 we can reach similar conclusions as when analyzing the characterization of the conductivities, the updated model does quite a good job except for the part of the channel branch toward the bottom that the conditioning model is not capable of capturing. Figure 17 shows the head evolution up to and past the conditioning period in all the 500 realizations before and after updating. We can appreciate the large reduction on the spread of the piezometric head evolution in the different realizations. Analyzing each well individually, we notice that piezometric head assimilation allows setting the barriers that prevent the effect of the pumping to reach wells 7 and 8; well 1 still displays too much fluctuation in the updated model, this is due to the difficulty of the updating algorithm to capture the blob of shale which is in the reference field between wells 1 and 9, this failure to capture such a feature may be due to the fact that such a feature is not too recurrent in the training image and therefore it does not replicate often in the 500 realizations; wells 2, 3, and 4 are much better reproduced since the main channel branches connecting them to well 9 are present; well 5 evolution is related to its connection to the prescribed west head boundary and to the large shale barrier between the well 5 and the pumping well 9, the reproduction of these two features in the updated fields produces such a good reproduction for well 5; well 6 is very well reproduced during the conditioning period, but afterward the drawdowns are larger than observed, probably if the conditioning period had been larger, better results could have been obtained; finally, well 9, the one with the largest drawdowns reduces substantially its fluctuations with regard to the initial realizations, but the conditioning is not as good as in the rest of the wells in absolute terms. The difficulty to match better well 9 is related to the very large variability on the drawdowns at well 9 in the seed realizations; trying to find close matches to the conditional patterns when generating the conductivity values for the nodes around the pumping well is particularly difficult for the initial time steps, because the initial seed conductivities can have quite different pattern structure, and therefore, quite heterogeneous piezometric heads around the pumping well.
 The method we have presented takes advantage of the latest developments on multiple point geostatistics and presents what we believe is a conceptually completely new approach to inverse modeling in hydrogeology. While the method has been demonstrated to work in two quite different experimental setups, there remain a number of issues that should be further investigated in the future, such as the following.
 1. How should continuous hydraulic conductivities be handled? The main attractiveness of the DS simulation is that it can handle easily continuous distributions of the parameters being simulated; however, in our first attempts of implementing the inverse pattern search algorithm using continuous hydraulic conductivities, it was always too difficult to find close enough matching patterns to the conditional one, resulting, at the end, in too noisy images. For this reason, we resorted back to the binary definition of the hydraulic conductivity field to ease the finding of the matching patterns. The inverse pattern search algorithm should work with continuous conductivities but there is a need to explore the impact of the size of the ensemble of realizations, to optimize the searching strategy and to come up with good postprocessing algorithms that filter out the noise that appears in the final realizations.
 2. How should the distance functions be fine-tuned? Which distance function to use when comparing patterns to the conditioning one was already an issue in the DS algorithm. This issue is augmented when the simulation is multivariate and two different variables have to be considered. Each variable will have its own distance, how should these two distances be combined? Should they be equally weighted? Should the Euclidean distance from the cells in the pattern to the cell being simulated be considered in computing the distance between patterns? Which should the acceptance thresholds be? These are questions that require further analysis. In our case, we ended with an equal weight for both the normalized conductivity distance and the normalized piezometric head distance, and we used a threshold equal to zero for the conductivities, and a threshold of 0.005 for the heads; in the latter case, we had to do some trial-and-error analysis, since when the threshold was too small, it was difficult to find any match, but if it was too high, the matches were not too good, and noise was apparent in the realizations.
 3. How is sample space represented by the final ensemble of realizations? At this point, it is difficult to make any assertion on whether the final ensemble of realizations spans a space of uncertainty similar to the one that would be obtained by, for instance, sampling from a posterior distribution by a Markov chain Monte Carlo algorithm.
7. Summary and Conclusions
 We present a novel inverse method in this paper to estimate model parameters by assimilating the observed flow data. The proposed method aims at recognizing the spatial heterogeneity of the non-Gaussian distributed model parameters while guaranteeing the flow responses consistent with the observations. The model parameters are characterized by multiple-point geostatistics what not only relaxes the assumption that the parameters follow a Gaussian distribution but also is able to characterize complex curvilinear geologic structures. The inverse method is based on the direct sampling of Mariethoz et al. [2010a] and it is formulated on the basis of pattern searching, i.e., search an ensemble of realizations for a data set which matches the conditional pattern composed of model parameters and observations. A distance function is introduced to measure the misfit between the conditional pattern and candidates. The searching scheme avoids the need to use any optimization approach, and therefore, the danger of falling onto local minima. Another advantage of the proposed method is that it is not only easy to condition to hard data, since it is a pixel-based method, but it also capable of describing complex geologic features while preserving a prior random function model.
 The performance of the proposed method is assessed by two synthetic experiments in an aquifer composed of two facies, sand and shale with contrasting hydraulic conductivity values. The prior hydraulic conductivity models are updated by integrating observed piezometric head data using the proposed method. The main channel structures in the reference field are found to be well reproduced by the updated models. Furthermore, the prediction capacity of the updated models are evaluated in flow and transport simulations, for which both prediction error and uncertainty are significantly reduced.
 The authors gratefully acknowledge the financial support from the Ministry of Science and Innovation, project CGL2011-23295. The first author also acknowledges the scholarship provided by the China Scholarship Council (CSC  3020). The authors would like to thank Grégoire Mariethoz (University of New South Wales) and Philippe Renard (University of Neuchâtel) for their enthusiastic help in answering questions about the direct sampling algorithm. Grégoire Mariethoz and two anonymous reviewers are also thanked for their comments during the reviewing process, which helped improving the final paper.