1. A computer based method of optimizing development of an underground medium, from a geological model including a set of grid cells discretizing the medium with a facies value assigned to each cell wherein a difference is measured between measured dynamic data values and simulated dynamic data values by using a computer based flow simulator applied to the geological model and the geological model is modified to reduce the difference, comprising: a) defining at least one geographical zone within the underground medium by selecting a set of cells of the geological model; b) determining, for the facies, with an optimization process, an average proportion in the at least one geological zone allowing the difference to be reduced; c) modifying proportions of the facies in each cell of the at least one geographical zone, with a block indicator cokriging method constrained by the average proportions, wherein an indicator function is defined for each facies in each cell as a binary function by cokriging as an occurrence probability of the facies of this cell and by assigning value 0 to any modified proportion which is less than 0 and assigning value 1 to any modified proportion greater than 1 and normalizing proportions of the facies which are modified so that in each cell a sum of the proportions of the facies is equal to 1; and d) simulating with a computer a new geological model constrained by the proportions of the facies which are modified and optimizing development of the underground medium by using the simulated model.