Obtaining second derivatives

Hi dear friends of GMT,

I need your wisdom, I would like to know how I could get the second derivative of a geographical bathymetric grid to extract the positions of the local maximum second derivative of flat areas in different bathymetric profiles. I have been looking in the documentation and found that the grdfft module can give me the second vertical derivatives using:

gmt grdfft mygrid.grd -D -D -V -Gmygrid_second_derivative.nc

Would it be ok to use this method, or could you recommend me another methodology in GMT to obtain that result?

Thank you very much in advance for your support.

All the best,
Oscar

You could try with grdmath’s D2DX2 and D2DY2.

See also EXTREMA and SADDLE.