# Persistent issue in gravfft -T+m

**URL:** <https://forum.generic-mapping-tools.org/t/persistent-issue-in-gravfft-t-m/5525>\
**Category:** Q&A\
**Created:** [November 13, 2024, 11:51am UTC](https://forum.generic-mapping-tools.org/t/persistent-issue-in-gravfft-t-m/5525 "2024-11-13T11:51:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![arctica](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/arctica/32/4567_2.png) [@arctica](https://forum.generic-mapping-tools.org/u/arctica)\
**Post date:** [November 13, 2024, 11:51am UTC](https://forum.generic-mapping-tools.org/t/persistent-issue-in-gravfft-t-m/5525/1 "2024-11-13T11:51:29Z")

</div>

Hello,

There appears to still be an issue with gravfft and -T+m option:

For example -

```auto
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: [http://forum.generic-mapping-tools.org/t/inconsistency-gravfft-between-6-3-and-6-4/4788](http://forum.generic-mapping-tools.org/t/inconsistency-gravfft-between-6-3-and-6-4/4788)

Tested on GMT version 6.5.0

Lester
