next up previous contents
Next: Geometry Setting Up: Answers to Frequently Asked Previous: Data format questions   Contents

Tape reading and writing

This section contains frequently asked questions about reading and writing SEG-Y tapes with SU.

Tape reading/writing is more of an art than a science. Here are a few tips.

  1. Make sure your tape drive is set to be variable block length. If you are on an IBM RS6000, this means you will need to use smit to set blocksize=0 on your tape device. Having the tape drive set to some default constant blocksize (say blocksize=1024 or 512) will foil all attempts to read an SEG-Y tape.
  2. To read multiple tape files on a tape, use the non rewinding device. On an RS6000 this would be something like /dev/rmtx.1, see man mt for details.
  3. If this still doesn't work, then try:
    % dd if=/dev/rmtx of=temps bs=32767 conv=noerror
    
    Here, /dev/rmtx (not the real name of the device, it varies from system to system) is your regular (rewinding) tape device. In the option, bs=32767, we gave the right blocksize ($2^{16}+1$) for an IBM/RS6000. Try bs=32765 ($2^{16}-1$) on a SUN. This will dump the entire contents of the tape onto a single file.

Question 16   How do I write multiple SEG-Y files onto a tape?

Answer 16   Here is a shell script for writing multiple files on a tape:
#! /bin/sh

DEV=/dev/nrxt0  # non rewinding tape device

mt -f $DEV rewind

j=0
jmax=40

while test "$j" -ne "$jmax"
do
        j=`expr $j + 1`
        echo "writing tape file  $j"
        segywrite tape=$DEV bfile=b.$j hfile=h.$j verbose=1 buff=0 < ozdata.$j
done

exit 0


next up previous contents
Next: Geometry Setting Up: Answers to Frequently Asked Previous: Data format questions   Contents
John Stockwell 2007-04-10