Monday, November 13, 2006

Oil&Gas: How to read EBCDIC SEGY Header

SEGY type of file is a seismic file that use by Geophysicist & Geologist to help them to interpret the fault or horizon in earth subsurface. This type of file has a header in EBCDIC and binary format. Using UNIX / Linux, we could extract the EBCDIC information from the file.

The command to extract the header is:

#dd if=field.segy conv=ascii ibs=3200 count=1

Some text without carriage return will appear. You could format the output using the following command: 

#dd if=$1 conv=ascii ibs=3200 count=1 | awk 'BEGIN{RS="C[0-9 ][0-9]"}{printf "C%2d%s\n",NR,$0}'

2 comments:

Unknown said...

This worked fine, thanks a lot

Unknown said...

How to convert ASCII OR text file to segy file?