1.. index:: ! talwani2d
2.. include:: ../module_supplements_purpose.rst_
3
4*********
5talwani2d
6*********
7
8|talwani2d_purpose|
9
10Synopsis
11--------
12
13.. include:: ../../common_SYN_OPTs.rst_
14
15**gmt talwani2d** [ *table* ]
16[ |-A| ] [ |-D|\ *density* ] ]
17[ |-F|\ **f**\|\ **n**\ [*lat*]\|\ **v** ]
18[ |-M|\ [**h**]\ [**v**] ]
19[ |-N|\ *trackfile* ]
20[ |-T|\ *min*\ /*max*\ /\ *inc*\ [**+i**\|\ **n**]\ \|\ *file*\|\ *list* ]
21[ |-Z|\ *level*\ [*ymin*\ /*ymax*] ]
22[ |SYN_OPT-V| ]
23[ |SYN_OPT-bi| ]
24[ |SYN_OPT-d| ]
25[ |SYN_OPT-e| ]
26[ |SYN_OPT-h| ]
27[ |SYN_OPT-i| ]
28[ |SYN_OPT-o| ]
29[ |SYN_OPT-x| ]
30[ |SYN_OPT--| ]
31
32|No-spaces|
33
34Description
35-----------
36
37**talwani2d** will read the multi-segment *table* from file (or standard input).
38This file contains cross-sections of one or more 2-D bodies, with one polygon
39per segment.  The segment header must contain the parameter *density*, which
40states the the density of this body (individual body
41densities may be overridden by a fixed constant density contrast given via an optional **-D**).
42We can compute anomalies on an equidistant lattice (by specifying a lattice with
43**-T**) or provide arbitrary output points specified in a file via **-N**.
44Choose between free-air anomalies, vertical gravity gradient anomalies, or geoid anomalies.
45Options are available to control axes units and direction.
46
47
48Required Arguments
49------------------
50
51*table*
52    One or more ASCII files describing cross-sectional polygons of one or more bodies.  Polygons
53    will be automatically closed if not already closed, and repeated vertices will
54    be eliminated.  The segment header for each body will be examined for a density
55    parameter in kg/m^3; see **-D** for overriding this value.  If no *table* is given then we
56    read standard input.
57
58Optional Arguments
59------------------
60
61.. _-A:
62
63**-A**
64    The *z*-axis should be positive upwards [Default is down].
65
66.. _-D:
67
68**-D**\ *density*
69    Sets a fixed density contrast that overrides any per-body settings in the model file, in kg/m^3.
70
71.. _-F:
72
73**-F**\ **f**\|\ **n**\ [*lat*]\|\ **v**
74    Specify desired gravitational field component.  Choose between **f** (free-air anomaly) [Default],
75    **n** (geoid; optionally append average latitude for normal gravity reference value [45])
76    or **v** (vertical gravity gradient).
77
78.. _-M:
79
80**-M**\ [**h**]\ [**v**]
81    Sets distance units used.  Append **h** to indicate horizontal distances are in km [m],
82    and append **z** to indicate vertical distances are in km [m].
83
84.. _-N:
85
86**-N**\ *trackfile*
87    Specifies locations where we wish to compute the predicted value.  When this option
88    is used you cannot use **-T** to set an equidistant lattice. The output data records are written to
89    standard output (see **-bo** for binary output).
90
91.. _-T:
92
93**-T**\ *min*\ /*max*\ /\ *inc*\ [**+i**\|\ **n**]\ \|\ *file*\|\ *list*
94    Specify an equidistant output lattice.
95    For details on array creation, see `Generate 1D Array`_.
96
97.. |Add_-V| replace:: |Add_-V_links|
98.. include:: /explain_-V.rst_
99    :start-after: **Syntax**
100    :end-before: **Description**
101
102.. _-Z:
103
104**-Z**\ *level*\ [*ymin*\ /*ymax*]
105    Set a constant observation level [0].  Optionally, and for gravity anomalies only (**-Ff**),
106    append the finite extent limits of a 2.5-D body.
107
108.. |Add_-bi| replace:: [Default is 2 input columns].
109.. include:: ../../explain_-bi.rst_
110
111.. |Add_-d| unicode:: 0x20 .. just an invisible code
112.. include:: ../../explain_-d.rst_
113
114.. |Add_-e| unicode:: 0x20 .. just an invisible code
115.. include:: ../../explain_-e.rst_
116
117.. |Add_-h| replace:: Not used with binary data.
118.. include:: ../../explain_-h.rst_
119
120.. include:: ../../explain_-icols.rst_
121
122.. include:: ../../explain_-ocols.rst_
123
124.. include:: ../../explain_core.rst_
125
126.. include:: ../../explain_colon.rst_
127
128.. include:: ../../explain_help.rst_
129
130.. include:: ../../explain_distunits.rst_
131
132.. include:: ../../explain_array.rst_
133
134Examples
135--------
136
137To compute the free-air anomalies on an equidistant profile over a 2-D body that has been contoured
138and saved to body2d.txt, using 1700 kg/m^3 as a constant density contrast, with all distances in meters,
139try
140
141::
142
143    gmt talwani2d -T-200/200/2 body2d.txt -D1700 -Ff > 2dgrav.txt
144
145To obtain the vertical gravity gradient anomaly along the track given by the file crossing.txt
146for the same model, try
147
148::
149
150    gmt talwani2d -Ncrossing.txt body2d.txt -D1700 -Fv > vgg_crossing.txt
151
152
153The geoid anomaly for the same setup, evaluated at 60N, is given by
154
155::
156
157    gmt talwani2d -Ncrossing.txt body2d.txt -D1700 -Fn60 > n_crossing.txt
158
159
160Notes
161-----
162
163#. The 2-D geoid anomaly is a logarithmic potential and thus has no natural
164   reference level.  We simply remove the most negative (if density contrast
165   is positive) or positive (if density contrast is negative) computed value
166   from all values, rendering the entire anomaly positive (or negative).  You
167   can use :doc:`gmtmath </gmtmath>` to change the zero level to suit your needs.
168
169References
170----------
171
172Rasmussen, R., and L. B. Pedersen (1979), End corrections in potential field modeling,
173*Geophys. Prospect., 27*, 749-760.
174
175Chapman, M. E., 1979, Techniques for interpretation of geoid anomalies,
176*J. Geophys. Res., 84(B8)*, 3793-3801.
177
178Kim, S.-S., and P. Wessel, 2016, New analytic solutions for modeling vertical
179gravity gradient anomalies, *Geochem. Geophys. Geosyst., 17*,
180`http://dx.doi.org/10.1002/2016GC006263 <http://dx.doi.org/10.1002/2016GC006263>`_.
181
182Talwani, M., J. L. Worzel, and M. Landisman, 1959, Rapid gravity computations for
183two-dimensional bodies with application to the Mendocino submarine fracture zone,
184*J. Geophys. Res., 64*, 49-59.
185
186See Also
187--------
188
189:doc:`gmt.conf </gmt.conf>`, :doc:`gmt </gmt>`,
190:doc:`grdmath </grdmath>`, :doc:`gmtmath </gmtmath>`,
191:doc:`gravfft </supplements/potential/gravfft>`,
192:doc:`gmtgravmag3d </supplements/potential/gmtgravmag3d>`,
193:doc:`grdgravmag3d </supplements/potential/grdgravmag3d>`,
194:doc:`talwani3d </supplements/potential/talwani3d>`
195