1SEGY2GRD(1) GMT SEGY2GRD(1)
2
3
4
6 segy2grd - Converting SEGY data to a GMT grid
7
9 segy2grd segyfile -Ggrdfile
10 -Iincrement
11 -Rregion [ -A[n|z] ] [ -D[+xxname][+yyname][+zzname][+sscale][+ooff‐
12 set][+ninvalid][+ttitle][+rremark] ] [ -L[nsamp] ] [ -M[ntraces] ] [
13 -Nnodata ] [ -Q<mode><value> ] [ -S[header] ] [ -V[level] ] [ -bibi‐
14 nary ] [ -:[i|o] ]
15
16 Note: No space is allowed between the option flag and the associated
17 arguments.
18
20 segy2grd reads an IEEE SEGY file and creates a binary grid file.
21 Either a simple mapping (equivalent to xyz2grd -Z) or a more compli‐
22 cated averaging where a particular grid cell includes values from more
23 than one sample in the SEGY file can be done. segy2grd will report if
24 some of the nodes are not filled in with data. Such unconstrained nodes
25 are set to a value specified by the user [Default is NaN]. Nodes with
26 more than one value will be set to the average value.
27
29 segyfile is an IEEE floating point SEGY file. Traces are all assumed to
30 start at 0 time/depth.
31
32 -Ggrdfile
33 grdfile is the name of the binary output grid file.
34
35 -I x_inc [and optionally y_inc] is the grid spacing. Append m to
36 indicate minutes or s to indicate seconds.
37
38 -Rwest/east/south/north[/zmin/zmax][+r][+uunit]
39 west, east, south, and north specify the region of interest, and
40 you may specify them in decimal degrees or in
41 [±]dd:mm[:ss.xxx][W|E|S|N] format Append +r if lower left and
42 upper right map coordinates are given instead of w/e/s/n. The
43 two shorthands -Rg and -Rd stand for global domain (0/360 and
44 -180/+180 in longitude respectively, with -90/+90 in latitude).
45 Alternatively for grid creation, give Rcodelon/lat/nx/ny, where
46 code is a 2-character combination of L, C, R (for left, center,
47 or right) and T, M, B for top, middle, or bottom. e.g., BL for
48 lower left. This indicates which point on a rectangular region
49 the lon/lat coordinate refers to, and the grid dimensions nx and
50 ny with grid spacings via -I is used to create the corresponding
51 region. Alternatively, specify the name of an existing grid
52 file and the -R settings (and grid spacing, if applicable) are
53 copied from the grid. Appending +uunit expects projected (Carte‐
54 sian) coordinates compatible with chosen -J and we inversely
55 project to determine actual rectangular geographic region. For
56 perspective view (-p), optionally append /zmin/zmax. In case of
57 perspective view (-p), a z-range (zmin, zmax) can be appended to
58 indicate the third dimension. This needs to be done only when
59 using the -Jz option, not when using only the -p option. In the
60 latter case a perspective view of the plane is plotted, with no
61 third dimension.
62
64 -A[n|z]
65 Add up multiple values that belong to the same node (same as
66 -Az). Append n to simply count the number of data points that
67 were assigned to each node. [Default (no -A option) will calcu‐
68 late mean value]. Not used for simple mapping.
69
70 -D[+xxname][+yyname][+zzname][+sscale][+ooffset][+ninvalid][+tti‐
71 tle][+rremark]
72 Give one or more combinations for values xname, yname, zname
73 (give the names of those variables and in square bracket their
74 units, e.g., "distance [km]"), scale (to multiply grid values
75 after read [normally 1]), offset (to add to grid after scaling
76 [normally 0]), invalid (a value to represent missing data
77 [NaN]), title (anything you like), and remark (anything you
78 like). Items not listed will remain untouched. Give a blank
79 name to completely reset a particular string. Use quotes to
80 group texts with more than one word. Note that for geographic
81 grids (-fg) xname and yname are set automatically.
82
83 -L Let nsamp override number of samples in each trace.
84
85 -M[ntraces]
86 Fix number of traces to read in. Default tries to read 10000
87 traces. -M0 will read number in binary header, -Mntraces will
88 attempt to read only n traces.
89
90 -Nnodata
91 No data. Set nodes with no input sample to this value [Default
92 is NaN].
93
94 -Q<mode><value>
95
96 Can be used to change two different settings depending on mode:
97 -Qxx-scale applies scalar x-scale to coordinates in trace
98 header to match the coordinates specified in -R.
99
100 -Qys_int specifies sample interval as s_int if incorrect
101 in the SEGY file.
102
103 -S[header]
104 Set variable spacing; header is c for cdp, o for offset, or
105 bnumber for 4-byte float starting at byte number. If -S not set,
106 assumes even spacing of samples at the x_inc, y_inc supplied
107 with -I.
108
109 -V[level] (more ...)
110 Select verbosity level [c].
111
112 -r (more ...)
113 Set pixel node registration [gridline].
114
115 -^ or just -
116 Print a short message about the syntax of the command, then
117 exits (NOTE: on Windows just use -).
118
119 -+ or just +
120 Print an extensive usage (help) message, including the explana‐
121 tion of any module-specific option (but not the GMT common
122 options), then exits.
123
124 -? or no arguments
125 Print a complete usage (help) message, including the explanation
126 of all options, then exits.
127
129 To create a grid file from an even spaced SEGY file test.segy, try
130
131 gmt segy2grd test.segy -I0.1/0.1 -Gtest.nc -R198/208/18/25 -V
132
133 Note that this will read in 18-25s (or km) on each trace, but the first
134 trace will be assumed to be at X=198
135
136 To create a grid file from the SEGY file test.segy, locating traces
137 according to the CDP number, where there are 10 CDPs per km and the
138 sample interval is 0.1, try
139
140 gmt segy2grd test.segy -Gtest.nc -R0/100/0/10 -I0.5/0.2 -V -Qx0.1 -Qy0.1
141
142 Because the grid interval is larger than the SEGY file sampling, the
143 individual samples will be averaged in bins
144
146 gmt, grd2xyz, grdedit, pssegy, xyz2grd
147
149 2019, P. Wessel, W. H. F. Smith, R. Scharroo, J. Luis, and F. Wobbe
150
151
152
153
1545.4.5 Feb 24, 2019 SEGY2GRD(1)