Open file for writing and pass FREE block and SRCE line.
c----------------------------------------------------------------------
subroutine sff_WOpenFS(lu, filename,
& lines, nline,
& type, cs, c1, c2, c3, date, time, ierr)
c
c Open file for writing. Write STAT line, FREE block and SRCE line.
c
c input:
c filename name of file
c nline number of lines in FREE block
c lines lines in FREE block
c type type of source (any 20 character string)
c cs coordinate system (S: spherical, C: cartesian)
c c1, c2, c3 coordiantes as defined by SFF
c time, date time and date of source signal
c output:
c ierr error status (ok: ierr=0)
c
character filename*(*), type*(*), cs*1
character time*(*), date*(*)
character lines(nline)*80
c----------------------------------------------------------------------
88 datrw::oanystream &os=
94 srce.cs=sff::coosysID(*cs);
95 srce.cx=
static_cast<double>(*c1);
96 srce.cy=
static_cast<double>(*c2);
97 srce.cz=
static_cast<double>(*c3);
99 srce.date=
SRCEdate(date, time, date_len, time_len);
102 if (os.handlesfilefree())
104 sff::FREE filefree=
freeblock(nline, lines, lines_len);
sff::FREE freeblock(integer *nline, char *lines, ftnlen lines_len)
create C++ FREE block from Fortran FREE lines
datrw::oanystream & open(const int &unit, const std::string &filename)
open a new file
libtime::TAbsoluteTime SRCEdate(char *date, char *time, ftnlen date_len, ftnlen time_len)
create appropriate time string for SRCE line
::fapidxx::OFileUnits ostreammanager
the global ostream manager
std::string stringfromfstring(char *fstring, ftnlen slen)
create a C++ string from a Fortran string