Write one trace of data with FREE block and INFO line.
c----------------------------------------------------------------------
subroutine sff_WTraceFI(lu,
& wid2line, nsamp, fdata, idata, last,
& nline, lines,
& cs, c1, c2, c3, nstack, ierr)
c
c Write one data block starting with DAST line.
c Write also FREE block and INFO line.
c The File will be closed after writing the last trace.
c
c input
c wid2line valid WID2 line
c nsamp number of samples
c fdata data array
c last must be true is the trace to be written is the
c last one in this file
c nline number of FREE block lines
c lines FREE block lines
c cs coordinate system
c c1, c2, c3 receiver coordinates
c nstack number of stacks
c
c ouput:
c ierr error status (ok: ierr=0)
c
c workspace:
c idata fdata will be converted to idata using sff_f2i
c (both array may be in same memory space - see
c comments on sff_f2i)
c
integer lu, nsamp, idata(nsamp), nline, nstack
real fdata(nsamp), c1, c2, c3
character wid2line*132, lines(nline)*80, cs*1
c----------------------------------------------------------------------
101 unsigned int nsamples=
static_cast<unsigned int>(*nsamp);
103 if (os.handlesinfo())
106 info.cs=sff::coosysID(*cs);
107 info.cx=
static_cast<double>(*c1);
108 info.cy=
static_cast<double>(*c2);
109 info.cz=
static_cast<double>(*c3);
110 info.nstacks=
static_cast<int>(*nstack);
113 if (os.handlestracefree())
115 sff::FREE tracefree=
freeblock(nline, lines, lines_len);
118 aff::LinearShape shape(0, nsamples-1, 0);
119 datrw::Tfseries series(shape, aff::SharedHeap<real>(fdata, *nsamp));
sff::FREE freeblock(integer *nline, char *lines, ftnlen lines_len)
create C++ FREE block from Fortran FREE lines
This struct is used to pass WID2 line data within libfapidxx.
::fapidxx::OFileUnits ostreammanager
the global ostream manager
void close(const int &unit)
close the file associated with this file unit