Plotting Rayinvr velocity modelsPlotting SEGY data in GMT.Merging two GMT grid files
Plotting Rayinvr velocity models
- Plotting a Rayinvr velocity model is quite simple. Optionally, seismic data can be plotted on top of the velocity model (mentioned later on this page) for a composite plot.
- Include the following options in the "pltpar" section of the "r.in" parameter file.
- modout=1, dxmod=5., dzmod=0.25, modi=1,2,5, xmmin=0., xmmax=260.,
- Read the "modout.doc" documentation text file included with the Rayinvr source code, for detailed information about these parameters. If you are new to Rayinvr, you can experiment with this example »upload/rayinvr_example.tar.gz, modifying as previously explained.
- Run Rayinvr. With these new options, this will write out some new files. One of them is "fort.35". This is a GMT style XYZ file. Since the xyz coordinates in this file are on a regular grid, the XYZ file can be transformed directly to a .grd file without the need to grid it:
- Run the GMT utility "xyz2grd" on fort.35, with the appropriate options. This will produce a GMT netCDF grid file. For example:
xyz2grd fort.35 -R0/260/0/25 -I1/0.1 -N0 -Goutput.grd
- The options for xyz2grd are -R for the region, -I for the resolution (increment) of the data (set this equal to the increment in fort.35) in x and y, -N sets the value of points with no data. See the manpage for xyz2grd for detailed info.
- Normal GMT programs can now be used to create plots of the velocity model and/or seismic section.
Plotting SEGY data in GMT.
This is a useful thing to do, because GMT is highly configurable and produces good quality output. Also the seismic data can be plotted on top of a velocity model, for a combined plot.
- First, the SEGY data must have the floating point data in IEEE format (not the standard SEGY IBM format). This is easily done in Claritas. Use the defaults for WRITESEGY, but change the FORMAT option to IEEE. This will output a SEGY file that can be used for plotting. The other default options (EBCDIC header, Big endian) are fine for this purpose.
- Seismic Unix can also write these kinds of SEGY files. Simply write a segy file with SU as normal using the "segywrite" program, but include the option "conv=0".
- Second, use the GMT program PSSEGY to plot the SEGY data. This will produce a bitmap image of the seismic data (not vector polygons). This program can be slow, depending of the size of the SEGY file. Here is an example of pssegy usage, which is plotting traveltime(s) vs. offset(m).
- PSSEGY may give errors when plotting the SEGY file. It may state that the SEGY file is not in IEEE format, but this error is misleading. This error is raised when a segy header field (the SU name for this field is "format") is not equal to 5. However, SU and Claritas will not allow this value to be set to 5, therefore ignore this error.
#!/bin/bash
psbasemap -R-10000/10000/0/2.5 -JX18/-12 \
-Bf1000a1000:"Offset (m)":/f0.1a0.2:"Two Way Traveltime (s)":WseN \
-Z0.001 -X0.8i -Y1.5i -K > output.ps
pssegy obsich2_GMT.segy -R -JX -D0.35 -C50.0 -B-30 -F0/0/0 -So -O >> output.ps
Merging two GMT grid files
GmtMergeGrids