Hello,
There appears to still be an issue with gravfft and -T+m option:
For example -
gravfft HM_topo.grd -Gairy.grd -T0/2700/3300/1035+m -Z65000 -V -fg -N1200/1200
gravfft [INFORMATION]: Allocates memory and read data file
gravfft [INFORMATION]: netCDF grid HM_topo.grd has no default CPT.
gravfft [INFORMATION]: Reading grid from file HM_topo.grd
gravfft [INFORMATION]: Grid dimensions (n_rows by n_columns): 121 x 121 FFT dimensions: 1200 x 1200
gravfft [INFORMATION]: Extending grid via copying onto larger memory-aligned grid
gravfft [INFORMATION]: Mid value removed from real component: 3714.6871 Variance reduction: 73.15
gravfft [INFORMATION]: Grid (real component) extended via edge-point symmetry at all edges, then tapered to zero over 100 % of extended area
gravfft [INFORMATION]: Level used for upward continuation: 3714.69
gravfft [INFORMATION]: Forward FFT...
gravfft [INFORMATION]: 2-D FFT using FFTW
gravfft [INFORMATION]: Picking a (probably sub-optimal) FFTW plan quickly.
gravfft [INFORMATION]: Inverse FFT...
gravfft [INFORMATION]: 2-D FFT using FFTW
gravfft [INFORMATION]: Picking a (probably sub-optimal) FFTW plan quickly.
gravfft [INFORMATION]: Demultiplexing complex grid before writing can take place.
gravfft [INFORMATION]: Evaluating Parker for term = 1
gravfft [INFORMATION]: 2-D FFT using FFTW
gravfft [INFORMATION]: Picking a (probably sub-optimal) FFTW plan quickly.
gravfft [INFORMATION]: Evaluating Parker for term = 2
gravfft [INFORMATION]: 2-D FFT using FFTW
gravfft [INFORMATION]: Picking a (probably sub-optimal) FFTW plan quickly.
gravfft [INFORMATION]: Evaluating Parker for term = 3
gravfft [INFORMATION]: 2-D FFT using FFTW
gravfft [INFORMATION]: Picking a (probably sub-optimal) FFTW plan quickly.
gravfft [INFORMATION]: 2-D FFT using FFTW
gravfft [INFORMATION]: Picking a (probably sub-optimal) FFTW plan quickly.
The program never gets to the end and close off the grid file. The only solution seems to be to compute the shape of the Moho (via -Q) and then apply a density contrast to get the gravity potential.
Seems to have been spotted previously: https://forum.generic-mapping-tools.org/t/inconsistency-gravfft-between-6-3-and-6-4/4788
Tested on GMT version 6.5.0
Lester