segy2grd − Converting SEGY file to grd file format


segy2grd segyfile −Ggrdfile −Ixinc[unit][=|+][/yinc[unit][=|+]] −Rwest/east/south/north[r] [ −A[n|z] ] [ −Dxname/yname/zname/scale/offset/title/remark ] [ −F ] [ −Nnodata ] [ −S[zfile] ] [ −V ] [ −Z[flags] ] [ −:[i|o] ] [ −bi[s|S|d|D][ncol] ]


segy2grd reads an IEEE SEGY file and creates a binary grdfile. Either a simple mapping (equivalent to xyz2grd -Z) or a more complicated averaging where a particular grid cell includes values from more than one sample in the SEGY file can be done. segy2grd will report if some of the nodes are not filled in with data. Such unconstrained nodes are set to a value specified by the user [Default is NaN]. Nodes with more than one value will be set to the average value.


ASCII [or binary] file holding z or (x,y,z) values. xyz triplets do not have to be sorted (for binary triplets, see −b). 1-column z tables must be sorted and the −Z must be set).


grdfile is the name of the binary output grdfile.


x_inc [and optionally y_inc] is the grid spacing. Append m to indicate minutes or c to indicate seconds.


west, east, south, and north specify the Region of interest, and you may specify them in decimal degrees or in [+-]dd:mm[][W|E|S|N] format. Append r if lower left and upper right map coordinates are given instead of wesn. The two shorthands −Rg −Rd stand for global domain (0/360 or -180/+180 in longitude respectively, with -90/+90 in latitude).



Add up multiple values that belong to the same node (same as −Az). Append n to simply count the number of data points that were assigned to each node. [Default (no −A option) will calculate mean value]. Not used for simple mapping.


Give values for xname, yname, zname, scale, offset, title, and remark. To leave some of these values untouched, specify = as the value.


Force pixel registration [Default is grid registration].


No data. Set nodes with no input sample to this value [Default is NaN].


set variable spacing header is c for cdp, o for offset, b<number> for 4-byte float starting at byte number If -S not set, assumes even spacing of samples at the dx, dy supplied with -I


Override number of samples in each trace


applies scalar x-scale to coordinates in trace header to match the coordinates specified in -R


Specifies sample interval as s_int if incorrect in the SEGY file


Fix number of traces to read in. Default tries to read 10000 traces. -M0 will read number in binary header, -Mn will attempt to read only n traces.


Selects verbose mode, which will send progress reports to stderr [Default runs "silently"].


To create a grdfile from an even spaced SEGY file test.segy, try

segy2grd test.segy −I0.1/0.1 −Gtest.grd −R198/208/18/25 −V

Note that this will read in 18-25s (or km) on each trace, but the first trace will be assumed to be at X=198

To create a grdfile from the SEGY file test.segy, locating traces according to the CDP number, where there are 10 CDPs per km and the sample interval is 0.1, try

segy2grd test.segy −Gtest.grd −R0/100/0/10 −I0.5/0.2 −V −X0.1 −Y0.1

Because the grid interval is larger than the SEGY file sampling, the individual samples will be averaged in bins


GMT(l), grd2xyz(l), grdedit(l), pssegy(l)