# Model description for gmt talwani3d, free air gravity anomaly calculation

**URL:** <https://forum.generic-mapping-tools.org/t/model-description-for-gmt-talwani3d-free-air-gravity-anomaly-calculation/5113>\
**Category:** Q&A\
**Tags:** gmt\
**Created:** [July 21, 2024, 10:54pm UTC](https://forum.generic-mapping-tools.org/t/model-description-for-gmt-talwani3d-free-air-gravity-anomaly-calculation/5113 "2024-07-21T22:54:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tana](https://avatars.discourse-cdn.com/v4/letter/t/3ab097/32.png) [@tana](https://forum.generic-mapping-tools.org/u/tana)\
**Post date:** [July 21, 2024, 10:54pm UTC](https://forum.generic-mapping-tools.org/t/model-description-for-gmt-talwani3d-free-air-gravity-anomaly-calculation/5113/1 "2024-07-21T22:54:46Z")

</div>

I am trying to calculate a simple model of free air anomaly using the gmt talwani3d by placing cylinders 0.05km high at 0.15km and 0.1km below the surface of a 10km x 10km flat surface. In the description of the 3D model table, I have written the z level and density contrast in the header for the two segments, but how do I specify the height of cylinders?  
Can someone provide a suitable sample model description?

---

<div class="post-metadata">

**Author:** ![Joaquim](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/joaquim/32/16_2.png) [@Joaquim](https://forum.generic-mapping-tools.org/u/Joaquim)\
**Post date:** [July 22, 2024, 6:02pm UTC](https://forum.generic-mapping-tools.org/t/model-description-for-gmt-talwani3d-free-air-gravity-anomaly-calculation/5113/2 "2024-07-22T18:02:22Z")

</div>

One thing that is recommended when examples in docs are not enough is to try look at the tests. I found that these thee tests use talwani3d (I never used it myself)

> <https://github.com/GenericMappingTools/gmt/blob/master/test/potential/cyltest.sh>

> <https://github.com/GenericMappingTools/gmt/blob/master/test/potential/prism_check.sh>

> <https://github.com/GenericMappingTools/gmt/blob/master/test/potential/sphtest.sh>

You should look also to `gmtgravmag3d`. It must be able to do what you want.

[https://docs.generic-mapping-tools.org/dev/supplements/potential/gmtgravmag3d.html](https://docs.generic-mapping-tools.org/dev/supplements/potential/gmtgravmag3d.html)

---

<div class="post-metadata">

**Author:** ![tana](https://avatars.discourse-cdn.com/v4/letter/t/3ab097/32.png) [@tana](https://forum.generic-mapping-tools.org/u/tana)\
**Post date:** [July 23, 2024, 12:06am UTC](https://forum.generic-mapping-tools.org/t/model-description-for-gmt-talwani3d-free-air-gravity-anomaly-calculation/5113/3 "2024-07-23T00:06:29Z")

</div>

Dear Joaquim,  
Thank you very much. These sample scripts are very much useful for me.  
Model cylinder should be described a series of circle with different vertical levels. Model cylinder of Cyltest.sh is described with 10 same circle with same depth interval, 375.1 m. I found reducing the mid-level circles did not change the free air anomaly much, only top and bottom circles are crucial.  
I would like to check gmt gravmag3d, too.

Thank you again for the useful information.
