1. A method for testing a production scenario of a porous heterogeneous medium, by forming a Gaussian stochastic numerical model representing a distribution of a physical quantity in the porous heterogeneous medium, including selecting an initial geostatistical realization of the Gaussian stochastic numerical model, and modifying the initial geostatistical realization, in relation to observed dynamic data in the porous heterogeneous medium and representative of fluid displacement in the porous heterogeneous medium, by an iterative gradual deformation of the initial geostatistical realization, comprising: generating realizations independent of the initial geostatistical realization; associating with each of the realizations, a refinement indicator indicating sensitivity of an objective function when the initial geostatistical realization is used for the iterative gradual deformation and the refinement indicator being associated with each realization corresponding to a scalar product between the realization and a geostatistical gradient of the objective function in relation to a geostatistical realization wherein the geostatistical gradient is determined by an adjoint state method; selecting among the realizations, at least one other realization having the refinement indicator of largest absolute value; linearly combining, for each iteration, the initial geostatistical realization and the at least one other realization, and applying constraints to linear combination coefficients of the linearly combining of the initial geostatistical realization and the at least one other realization; using a simulator for calculating dynamic data from the linearly combining for each iteration and calculating and minimizing an objective function measuring a difference between the observed dynamic data and the calculated dynamic data; iteratively optimizing the linearly combining for each iteration until an optimum realization of the Gaussian stochastic numerical model is obtained, corresponding to a minimum value of the objective function; and testing the production scenario of the porous heterogeneous medium by using the optimum realization.