SEGYWRITE - write an SEG-Y tape
segywrite <stdin tape=
Required parameters:
tape= tape device to use (see sudoc segyread)
Optional parameter:
verbose=0 silent operation
=1 ; echo every 'vblock'
traces
vblock=50 echo every 'vblock' traces under verbose option
buff=1 for buffered device (9-track reel tape drive)
=0 possibly useful for
8mm EXABYTE drive
conv=1 =0 don't convert to IBM format
hfile=header ebcdic card image header file
bfile=binary binary header file
trmin=1 first trace to write
trmax=INT_MAX last trace to write
endian=1 =0 for little-endian machines (PC's, DEC,etc...)
errmax=0 allowable number of consecutive tape IO errors
format= override value of format in binary header file
Note: The header files may be created
with 'segyhdrs'.
Note: For buff=1 (default) tape is
accessed with 'write', for buff=0
tape is accessed with fwrite. Try
the default setting of buff=1
for all tape types.
Caveat: may be slow on an 8mm streaming
(EXABYTE) tapedrive
Warning: segyread or segywrite to 8mm
tape is fragile. Allow time
between successive reads and writes.
Precaution: make sure tapedrive is set
to read/write variable blocksize
tapefiles.
For more information, type: sudoc <segywrite>
Warning: may return the error message
"efclose: fclose failed"
intermittently when segyreading/segywriting to
8mm EXABYTE tape,
even if actual segyread/segywrite is
successful. However, this
may indicate that your tape drive has been set
to a fixed block
size. Tape drives should be set to variable
block size before reading
or writing tapes in the SEG-Y format.
Credits:
SEP: Einar Kjartansson
CWP: Jack, Brian, Chris
: John Stockwell (added EXABYTE functionality)
Notes:
Brian's subroutine, float_to_ibm,
for converting IEEE floating
point to IBM floating point is NOT
portable and must be
altered for non-IEEE machines. See the subroutine notes below.
On machines where shorts are not 2
bytes and/or ints are not
4 bytes, routines to convert SEGY 16
bit and 32 bit integers
will be required.
The program, segyhdrs, can be used
to make the ascii and binary
files required by this code.