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

support multiple formats

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/branches/libdatrwxx.su
SVN Revision: 3494
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 52a33ed2
......@@ -67,7 +67,7 @@
#
# ============================================================================
#
all: refract
all: refract refractx
#----------------------------------------------------------------------
# standard edit targets
......
......@@ -2,7 +2,7 @@ c this is <refract_opt.inc>
c------------------------------------------------------------------------------
c $Id$
c
c 17/03/98 by Thomas Forbriger (IfG Stuttgart)
c Copyright 1998 by Thomas Forbriger (IfG Stuttgart)
c
c options common block for refract
c
......@@ -26,6 +26,7 @@ c REVISIONS and CHANGES
c 17/03/98 V1.0 Thomas Forbriger
c 24/05/00 V1.1 activated
c 29/07/00 V1.2 introduced opt_Tannotate
c 26/11/10 V1.3 support additional file formats
c
c==============================================================================
c
......@@ -52,6 +53,7 @@ c file reading
character*80 opt_Farrival
character*80 opt_Ftaper
character*80 opt_Fmodel
character*80 opt_Fformat
c
c scaling
real opt_Sxmin, opt_Sxmax, opt_Stmin, opt_Stmax
......@@ -62,7 +64,8 @@ c
c common blocks
common /refract_optS/ opt_Ttitle, opt_Txlabel, opt_Tylabel,
& opt_Tannotate,
& opt_Fpicks, opt_Farrival, opt_Ftaper, opt_Fmodel
& opt_Fpicks, opt_Farrival, opt_Ftaper,
& opt_Fmodel, opt_Fformat
common /refract_optI/ opt_Lwidth, opt_Lmax, opt_Cmax, opt_Smode
common /refract_optR/ opt_Tscale, opt_Cbgrgb, opt_Cfgrgb,
& opt_Sxmin, opt_Sxmax, opt_Stmin, opt_Stmax,
......
......@@ -47,6 +47,7 @@ c 16/07/2003 V4.5 new option to label traces
c 09/09/2004 V4.6 new option to label traces with station names
c 16/06/2005 V4.7 - set defaults in doplot subroutine
c - prefer blue
c 26/11/2010 V4.8 provide additional input formats
c
c==============================================================================
c
......@@ -54,7 +55,7 @@ c
c
character*79 version
parameter(version=
& 'REFRACT V4.7 REFRACTion seismics - data interpretation')
& 'REFRACT V4.8 REFRACTion seismics - data interpretation')
c
c get common blocks
include 'refract_dim.inc'
......
......@@ -31,6 +31,7 @@ c 18/01/2001 V1.3 corrected braces around units
c 17/06/2003 V1.4 introduced new option plflag_tracenum
c 09/09/2004 V1.5 introduced new option plflag_tracename
c 04/12/2009 V1.6 use correct DIN notation for units
c 26/11/2010 V1.7 provide means to select file formats
c
c==============================================================================
c
......@@ -60,7 +61,7 @@ c CVS Id
& '$Id$')
c commandline
integer maxopt
parameter(maxopt=59)
parameter(maxopt=60)
character*3 optid(maxopt)
character*120 optarg(maxopt)
logical optset(maxopt), opthasarg(maxopt)
......@@ -97,6 +98,9 @@ c file reading
data (optid(i), i=40,43) /'-Fp','-Fa','-Ft','-Fm'/
data (opthasarg(i), i=40,43) /4*.TRUE./
data (optarg(i), i=40,43) /4*'-NONE-'/
data optid(60) /'-ty'/
data opthasarg(60) /.TRUE./
data optarg(60) /'sff'/
c seismograms scaling
data (optid(i), i=44,54) /'-Sx','-St','-Se','-Sa','-Sc','-Sm',
& '-Sr','-Si','-SM','-SO','-SR'/
......@@ -166,6 +170,7 @@ c file reading
opt_Farrival=optarg(41)
opt_Ftaper=optarg(42)
opt_Fmodel=optarg(43)
opt_Fformat=optarg(60)
c
c seismogram scaling
opt_Sxrange=optset(44)
......
......@@ -30,6 +30,7 @@ c 12/01/2001 V1.2 introduced plflag_hypoffset
c 19/06/2003 V1.3 count traces in file
c 18/11/2010 V1.4 has to call sff_close to be compatible with
c libfapidxx
c 26/11/2010 V1.5 support additional formats
c
c==============================================================================
c
......@@ -45,6 +46,7 @@ c get common blocks
include 'refract_data.inc'
include 'refract_para.inc'
include 'refract_pgpara.inc'
include 'refract_opt.inc'
c
c use data space as input buffer
integer idata(maxsamples)
......@@ -54,6 +56,7 @@ c some helpfull things
integer i, iargc, ierr, lu, j, allnsamples, k
parameter(lu=10)
character*80 infile
character*80 fileformat
character*240 selection
logical useselect, hot, moreflags
c
......@@ -120,6 +123,7 @@ c read extra flags values
moreflags=.true.
do while ((i.lt.iargc()).and.(moreflags))
call getarg(i+1, selection)
fileformat=opt_Fformat
if (selection(1:2).eq.'t:') then
i=i+1
useselect=.true.
......@@ -130,6 +134,9 @@ c eval selection
& 'WARNING (readdata): something wrong with your ',
& 'selections for ',
& infile(1:(index(infile,' ')-1)),'?'
c set file format
elseif (selection(1:2).eq.'f:') then
fileformat=selection(3:)
c set style
elseif (selection(1:2).eq.'s:') then
i=i+1
......@@ -163,6 +170,7 @@ c
c go and open file
print *,' '
print *,'open ',infile(1:index(infile,' '))
call sff_select_format(fileformat)
call sff_ROpenS(lu, infile, sffversion, timestamp, code,
& source(nfiles), scs, sc1, sc2, sc3, date, time, ierr)
if (ierr.ne.0) stop 'ERROR (readdata): opening data file'
......
......@@ -30,6 +30,7 @@ c 25/05/2000 V1.1 quick info was missing
c 11/01/2001 V1.2 introduced hypocenter option
c 17/06/2003 V1.3 introduced plflag_tracenum
c 09/09/2004 V1.4 introduced plflag_tracenum
c 26/11/2010 V1.5 provide help regarding file formats
c
c==============================================================================
c
......@@ -258,6 +259,14 @@ c
print *,' '
print *,' h:h,l,s'
print *,' '
print *,'Input file format - f:'
print *,'----------------------'
print *,' '
print *,' For each input file you can select a data fiel format'
print *,' from the list given below (at end of help text).'
print *,' '
print *,' f:formatID'
print *,' '
print *,'Menus to be used in interactive picking mode:'
print *,'============================================='
print *,' '
......
Markdown is supported
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