Since there is not too much information, I write down some experience about the this.
To locate the local maxima and local minima of 3D data, there are two algorithm. One is the near-grid here theory.cm.utexas.edu/henkelman/code/bader/ by henkelman , one is the here https://arxiv.org/pdf/1010.4916 by Trinkle.
The two algorithm is used to integrate the bader charge of systems, which i'm not sure if this is your case.
The second algorithm is more accurate but complex too. The near grid one may be easy if you want to write your own code for your own data.