Commit 50545f9a authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

new option

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 1029
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 399ca414
c this is <tesiff.f>
c------------------------------------------------------------------------------
c $Id: tesiff.f,v 1.2 2002-11-11 21:09:58 forbrig Exp $
c
c 18/11/98 by Thomas Forbriger (IfG Stuttgart)
c
......@@ -8,25 +9,32 @@ c
c REVISIONS and CHANGES
c 18/11/98 V1.0 Thomas Forbriger
c 11/11/99 V1.1 added white noise and boxcar
c 11/11/02 V1.2 timeshift only on request
c
c==============================================================================
c
program tesiff
c
character*79 version
parameter(version='TESIFF V1.1 create synthetic filter TEst SIgnals in stuttgart File Format')
parameter(version=
& 'TESIFF V1.2 create synthetic filter TEst SIgnals in SFF')
c
character*79 TESIFF_CVS_ID
parameter(TESIFF_CVS_ID=
& '$Id: tesiff.f,v 1.2 2002-11-11 21:09:58 forbrig Exp $')
c
c commandline
integer maxopt, lastarg, iargc
character*80 argument
parameter(maxopt=2)
parameter(maxopt=3)
character*2 optid(maxopt)
character*40 optarg(maxopt)
logical optset(maxopt), opthasarg(maxopt)
c
logical last
logical optshift
c
integer itrace,ntrace
integer itrace,ntrace,theminute
c
integer nsamp
real samprat
......@@ -58,9 +66,9 @@ c
c debugging
logical debug, verbose
c here are the keys to our commandline options
data optid/2h-d, 2h-v/
data opthasarg/2*.FALSE./
data optarg/2*1h-/
data optid/2h-d, 2h-v, 2h-s/
data opthasarg/3*.FALSE./
data optarg/3*1h-/
c
c------------------------------------------------------------------------------
c basic information
......@@ -70,12 +78,18 @@ c
if (iargc().eq.1) call getarg(1, argument)
if ((argument(1:5).eq.'-help').or.(iargc().lt.1)) then
print *,version
print *,'Usage: tesiff outfile'
print *,'Usage: tesiff outfile [-s]'
print *,' or: tesiff -help'
if (iargc().lt.1) stop 'ERROR: missing arguments'
print *,' '
print *,'create synthetic filter TEst SIgnals in stuttgart File Format'
print *,'create synthetic filter TEst SIgnals in SFF'
print *,' '
print *,'outfile file to save test signals'
print *,' '
print *,'-s shift each trace by one minute'
print *,' times the trace index'
print *,' '
print *,TESIFF_CVS_ID
stop
endif
c
......@@ -86,6 +100,7 @@ c
& optarg, optset, opthasarg)
debug=optset(1)
verbose=optset(2)
optshift=optset(3)
c
if (lastarg.eq.iargc()) stop 'ERROR: filename?'
c
......@@ -145,8 +160,10 @@ c
call fillsig(itrace, fdata, nsamp, free(1))
nfree=1
c
theminute=minute
if (optshift) theminute=theminute+itrace
call sff_PrepWID2(nsamp, samprat, station, year, month,
& day, hour, minute+itrace, comp, auxid, instype, second, calib,
& day, hour, theminute, comp, auxid, instype, second, calib,
& calper, hang, vang, wid2line, ierr)
if (ierr.ne.0) stop 'ERROR: preparing WID2 line'
c
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment