Fortran SFF API to data I/O streams in C++

◆ readtest()

subroutine readtest ( character*(*)  filename)

Definition at line 190 of file fapidtest.f.

Referenced by fapidtest().

190 c
191  character*(*) filename
192  integer lu
193  parameter(lu=10)
194 c time series
195  integer maxsamp, nsamp
196  parameter(maxsamp=100000)
197  real fdata(maxsamp)
198  integer idata(maxsamp)
199  equivalence(fdata, idata)
200 
201 c sff file header
202  character code*10, timestamp*13, scs*1, date*6, time*10
203  real sffversion, sc1, sc2, sc3
204  character*20 source
205 c
206 c sff trace
207  logical last
208  character rcs*1, wid2line*132
209  real rc1, rc2, rc3, tanf, dt
210  integer nstack
211 c
212  print *,'read test'
213  print *,'---------'
214  print *,'open ',filename(1:index(filename,' '))
215  call sff_ropens(lu, filename, sffversion, timestamp, code,
216  & source, scs, sc1, sc2, sc3, date, time, ierr)
217  if (ierr.ne.0) then
218  stop 'ERROR: opening file'
219  endif
220  print *,'sffversion: ', sffversion
221  print *,'timestamp: ', timestamp
222  print *,'code: ', code
223  print *,'source: ', source
224  print *,'scs, sc1, sc2, sc3: ', scs, sc1, sc2, sc3
225  print *,'date time: ', date, ' ', time
226  last=.false.
227  do while (.not.last)
228  print *,' '
229  print *,'read next trace'
230  nsamp=maxsamp
231  call sff_rtracei(lu, tanf, dt,
232  & wid2line, nsamp, fdata,
233  & idata, code, last,
234  & rcs, rc1, rc2, rc3, nstack, ierr)
235  print *,wid2line
236  print *,'nsamp: ',nsamp
237  print *,'rcs, rc1, rc2, rc3: ',rcs, rc1, rc2, rc3
238  print *,'nstack: ',nstack
239  print *,'dt: ',dt
240  print *,'tanf: ',tanf
241  print *,'code: ',code
242  if (ierr.ne.0) then
243  stop 'ERROR: reading trace'
244  endif
245  enddo
246  return
Here is the caller graph for this function: