Skip to content

Commit baf7ba0

Browse files
committed
obkh
1 parent 21602f4 commit baf7ba0

File tree

2 files changed

+141
-1
lines changed

2 files changed

+141
-1
lines changed

documentation/modules/gmtgravmag3d.md

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,144 @@ Required Arguments (not all)
2121
are assumed constant (controlled by **density** or **mag_params**). Following cases are: 4 columns -> 4rth col
2222
magnetization intensity; 5 columns: mag, mag dip; 6 columns: mag, mag dec, mag dip; 8 columns: field dec, field dip,
2323
mag, mag dec, mag dip. When n columns > 3 the third argument of the **mag_params** option is ignored.
24+
25+
- **arg1** : In alternative to `fname` pass in a Mx3 matrix or a \myreflink{GMTdataset} with at least 3 columns.
26+
`arg1` can also be a \myreflink{GMTfv} type like those produced by the _solids_ functions (\myreflink{sphere}, etc)
27+
but it must be one made of triangles. That is, the output of \myreflink{cube} wont work because the body is
28+
made out of quadrangles. Note, if the **body** option is used neither this option nor **fname** are used.
29+
30+
- **C** or **density** : -- *density=??*\
31+
Sets body density in _SI_. Append either a constant, the name of a grid file or a \myreflink{GMTgrid}
32+
grid with variable densities. This option is mutually exclusive with **mag_params**
33+
34+
- **H** or **mag_params** : -- *mag_params=f_dec/f_dip/m_int/m_dec/m_dip*\
35+
Sets parameters for computing a magnetic anomaly. Use *f_dec*/*f_dip* to set the geomagnetic
36+
declination/inclination in degrees. *m_int*/*m_dec*/*m_dip* are the body magnetic intensity
37+
declination and inclination.
38+
39+
- **F** or **track** : -- *track=xy_loc*\
40+
Provide *xy_loc* (file name or GMTdataset) locations where the anomaly will be computed. Note,
41+
this option is mutually exclusive with the **save** option.
42+
43+
\textinput{common_opts/opt_save_grd}
44+
45+
- **M** or **body** : -- *body=shape,params* **|** *body=(shape=name, params=...)*\
46+
(An alternative to **raw_triang** and **stl**). Create geometric bodies and compute their grav/mag effect.
47+
Select among one or more of the following bodies, where *x0* & *y0* represent the horizontal coordinates
48+
of the body center [default to 0,0 positive up], *npts* is the number of points that a circle is discretized
49+
and *n_slices* apply when bodies are made by a pile of slices. For example Spheres and Ellipsoids are made of
50+
*2 x n_slices* and Bells have *n_slices* [Default 5]. It is also possible to select more than one body.
51+
For example **body**=*((shape=:prism, params="1/1/1/-5/-10/1"), (shape=:sphere, params="1/-5"))* computes
52+
the effect of a prism and a sphere. Unfortunately there is no current way of selecting distinct densities
53+
or magnetic parameters for each body.
54+
55+
- *bell,height/sx/sy/z0[/x0/y0/n_sig/npts/n_slices]* Gaussian of height *height* with characteristic
56+
STDs *sx* and *sy*. The base width (at depth *z0*) is controlled by the number of sigmas (*n_sig*) [Default = 2]
57+
58+
- *cylinder,rad/height/z0[/x0/y0/npts/n_slices]* Cylinder of radius *rad* and height *height* and base at depth *z0*
59+
60+
- *cone,semi_x/semi_y/height/z0[/x0/y0/npts]* Cone of semi axes *semi_x/semi_y* height *height* and base at depth *z0*
61+
62+
- *ellipsoid,semi_x/semi_y/semi_z/z_center[/x0/y0/npts/n_slices]* Ellipsoid of semi axes *semi_x/semi_y/semi_z*
63+
and center depth *z_center*
64+
65+
- *prism,side_x/side_y/side_z/z0[/x0/y0]* Prism of sides *x/y/z* and base at depth *z0*
66+
67+
- *pyramid,side_x/side_y/height/z0[/x0/y0]* Pyramid of sides *x/y* height *height* and base at depth *z0*
68+
69+
- *sphere,rad/z_center[/x0/y0/npts/n_slices]* Sphere of radius *rad* and center at depth *z_center*
70+
71+
\textinput{common_opts/opt_R}
72+
73+
- **Tv** or **index** : -- *index=vert_file* **|** *index=D*\
74+
Gives name of a vertex file defining a closed surface. The file formats correspond to the output
75+
of the \myreflink{triangulate} module. The form *raw_triang=D* means that we can also
76+
pass the data as a \myreflink{GMTdataset}
77+
78+
- **Tr** or **raw_triang** : -- *raw_triang=raw_file* **|** *raw_triang=D*\
79+
A *raw* format is a file with N rows (one per triangle) and 9 columns corresponding to the *x, y, z*
80+
coordinates of each of the three vertex of each triangle. The form *raw_triang=D* means that we can also
81+
pass the data as a \myreflink{GMTdataset}
82+
83+
- **Ts** or **stl** or **STL** : -- *stl=raw_file*\
84+
Alternatively, the **stl** option indicates that the surface file is in the ASCII STL
85+
(Stereo Lithographic) format. These two type of files are used to provide a closed surface.
86+
87+
- **noswap** or **no_swap** : -- *noswap=true*\
88+
The closed surface formats (_STL_ or _raw_) are assumed to be provided with the facets (triangles)
89+
following the counter-clockwise order. If that is not the case, _i.e._ they are clockwise oriented,
90+
use this option to bring them to the expected order. However, this order may not be easy to check.
91+
In case of doubt, compute the gravity anomaly caused by the body and see if it has the expected signal.
92+
93+
Optional Arguments
94+
------------------
95+
96+
- **E** or **thickness** : -- *thickness=??*\
97+
Give layer thickness in m [Default = 0 m]. Use this option only when the triangles describe a non-closed
98+
surface and you want the anomaly of a constant thickness layer.
99+
100+
- **L** or **z_obs** or **observation_level** : -- -- *z_obs=0*\
101+
sets level of observation [Default = 0]. That is the height (z) at which anomalies are computed.
102+
103+
- **S** or **radius** : -- *radius=30*\
104+
Set search radius in km (valid only in the two grids mode OR when **thickness**) [Default = 30 km].
105+
This option serves to speed up the computation by not computing the effect of prisms that
106+
are further away than *radius* from the current node.
107+
108+
\textinput{common_opts/opt_V}
109+
110+
**Z** or **level** or **reference_level** : -- *level=0*\
111+
level of reference plane [Default = 0]. Use this option when the triangles describe a non-closed
112+
surface and the volume is defined from each triangle and this reference level. An example will
113+
be the water depth to compute a Bouguer anomaly.
114+
115+
**Q** or **onebased** or **one_based** : -- *onebased=true*\
116+
Use this option if the indices in file (**index**) is 1-based instead of the default (C) 0-based.
117+
This option is needed when indices are 1-based, as likely is the case when bodies may have been
118+
created in Julia.
119+
120+
\textinput{common_opts/opt_f}
121+
Geographic grids (dimensions of longitude, latitude) will be converted to
122+
meters via a "Flat Earth" approximation using the current ellipsoid parameters.
123+
124+
\textinput{common_opts/opt_h}
125+
126+
\textinput{common_opts/opt__i}
127+
128+
\textinput{common_opts/opt_o}
129+
130+
\textinput{common_opts/opt__r}
131+
132+
Grid Distance Units
133+
-------------------
134+
135+
If the grid does not have meter as the horizontal unit, append **+u**\ *unit* to the input file name to convert from the
136+
specified unit to meter. If your grid is geographic, convert distances to meters by supplying **f=:g** instead.
137+
138+
Example
139+
-------
140+
141+
To compute the magnetic anomaly of a cube of unit sides located at 5 meters depth and centered at -10,1 in a domain
142+
*R="-15/15/-15/15"* with a magnetization of 10 Am with a declination of 10 degrees, inclination of 60 in a magnetic field
143+
with -10 deg of declination and 40 deg of inclination, do:
144+
145+
\begin{examplefig}{}
146+
```julia
147+
using GMT
148+
149+
G = gravmag3d(region="-15/15/-15/15", I=0.1, mag_params="10/60/10/-10/40", body=(shape=:prism, params="1/1/1/-5/-10/1"));
150+
viz(G, colorbar=true)
151+
```
152+
\end{examplefig}
153+
154+
See Also
155+
--------
156+
157+
\myreflink{grdgravmag3d}, \myreflink{gravprisms}, talwani2d, talwani3d, \myreflink{triangulate}
158+
159+
Reference
160+
---------
161+
162+
Okabe, M., 1979, Analytical expressions for gravity anomalies due to
163+
polyhedral bodies and translation into magnetic anomalies, *Geophysics*,
164+
44, 730-741.

documentation/modules/grdgravmag3d.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ If two grids are provided then the gravity/magnetic effect of the volume between
2727
Provide *xy_loc* (file name or GMTdataset) locations where the anomaly will be computed. Note,
2828
this option is mutually exclusive with the **save** option.
2929

30-
\textinput{common_opts/opt_save_grd}
3130

3231
Optional Arguments
3332
------------------

0 commit comments

Comments
 (0)