1. A computer-implemented method for an automated identification of surfaces in connection with building a geological-hydrodynamic model of an oil-and-gas deposit based on seismic data, the computer-implemented method comprising: 1) determining a model grid with a specified pitch and maximal allowable size on coordinate grid; 2) specifying control parameters of surfaces relative to the grid pitch; 3) determining a set of grid surfaces with respect to its pitch; 4) determining a domain in which each surface of the set of grid surfaces is defined and adding a plurality of grid nodes where no surface is defined; 5) specifying parameters of volumes of seismic data p, q; specifying coordinates X, Y of a newly added grid node of the plurality of grid nodes; specifying coordinates of an adjacent grid node x, y, separate from the newly added node, in which surface is defined; and specifying a surface depth parameter in the adjacent grid node z(x,y); 6) arranging the depths in a grid node of the plurality of grid nodes in increasing order and setting the depth of the i-th surface in this node equal to the i-th depth; 7) determining surfaces for processing; 8) determining functionals of surfaces and gradients of surfaces for processing; 9) determining the size of the current step along the gradient; 10) for each surface to be processed, determining what number of steps is required for a minimal value of the functional to be attained; in that case, 11) when the minimal value of the functional for each processed surface is less than the determined size of the current step along the gradient, making a displacement along the gradient by the found number of steps; 12) determining and storing the size of the displacement along the gradient in a non-transitory memory, and determining a maximum of the displacements made; 13) temporarily excluding the surfaces for which a decrease in the functional was obtained from processing; 14) determining the surfaces for which the functional was not decreased, and once this is done, reiterating steps 7) to 13); 15) rearranging the depths of the surfaces determined in the newly added grid node of the plurality of grid nodes in increasing order and setting the depth of the i-th surface in this node equal to the i-th depth; 16) determining values of the current grid pitches from the new data on surfaces; and 17) reiterating all steps of the method until the geological-hydrodynamic model of the oil-and-gas deposit with parameters specified at steps 1 and 2 is obtained.