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

implemented chacox using libfapidxx

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:
SVN Revision: 3707
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent a4b24872
......@@ -68,18 +68,17 @@
# 14/03/2002 V1.0 Thomas Forbriger
# 05/07/2007 V1.1 prepared for package creation
# 13/12/2007 V1.2 g77 is the standard Fortran compiler now
# 17/01/2011 V1.3 migrated to new SVN scheme
# implemented offlix and chacox
# ============================================================================
# NOTICE: fallback solution (f2c is default) can be activated by the
# environment variable TF_FALLBACK
# This option will disappear somewhere in the future!
.PHONY: all
all: install
PROGRAMS=sehefi coma epi chaco sesoc offli sesot merse cooset offlix
PROGRAMS=sehefi coma epi chaco sesoc offli sesot merse cooset \
offlix chacox
install: $(PROGRAMS)
/bin/mv -fv $^ $(LOCBINDIR)
......@@ -129,6 +128,10 @@ cooset: %: %.o
$(CXX) -o $@ $^ -I$(LOCINCLUDEDIR) -lsffxx -ltime++ -lgsexx -laff \
chacox: %x: %.o
$(FC) -o $@ $< -ltf \
-lfapidxx -ldatrwxx -lsffxx -lgsexx -ltime++ -laff -L$(LOCLIBDIR)
offlix: %x: %.o
$(FC) -o $@ $< -ltf -lsffu -ltime_trad \
-lfapidxx -ldatrwxx -lsffxx -lgsexx -ltime++ -laff -L$(LOCLIBDIR)
......@@ -24,11 +24,12 @@ c
c 30/04/1997 Thomas Forbriger (IfG Stuttgart)
c 09/01/98 V1.1 set source type too
c 24/06/00 V1.2 don't use the error output channel for standard usage info
c 17/01/11 V1.3 use libfapidxx interface
program chaco
character*79 version
parameter(version='CHACO V1.2 change coordinates')
parameter(version='CHACO V1.3 change coordinates')
integer maxsamp, maxfree
parameter(maxsamp=100000, maxfree=400)
......@@ -55,17 +56,33 @@ c======================================================================
real sffversion
logical last
integer iargc
character*80 arg
c commandline
integer maxopt, lastarg, iargc
character*80 arg, fileformat
character*3 optid(maxopt)
character*40 optarg(maxopt)
logical optset(maxopt), opthasarg(maxopt)
c here are the keys to our commandline options
data optid/'-ty'/
data opthasarg/.true./
data optarg/'sff'/
c output usage
print *, version
print *, 'Usage: chaco infile outfile cofile c1,c2,c3 cs sourcetype'
print *, 'Usage: chaco infile outfile cofile c1,c2,c3 cs'
print *,' sourcetype [-ty f]'
print *, 'or: chaco -help'
print *, 'or: chaco -xhelp'
if (iargc().eq.1) then
call getarg(1, arg)
if (arg(1:5).eq.'-help') then
if (arg(1:5).eq.'-xhelp') then
call sff_help_details
else if (arg(1:5).eq.'-help') then
print *,'infile sff input data file'
print *,'outfile sff output data file'
print *,'cofile file containing receiver coordinates'
......@@ -77,12 +94,16 @@ c output usage
print *,' coordinate system to use'
print *,'sourcetype something like ''sledge-hammer'' or ''SISSY'' '
print *,' '
print *,'-ty f select data file format f'
print *,' '
print *,'As infile and outfile will be open at the same time'
print *,'the must not have the same name!'
print *,' '
print *,'This binary is compiled for a maximum of'
print *,' FREE block lines: ',maxfree
print *,' samples: ',maxsamp
print *,' '
call sff_help_formats
......@@ -99,6 +120,10 @@ c get arguments
call getarg(6, stype)
call tf_cmdline(7, lastarg, maxopt, optid,
& optarg, optset, opthasarg)
c open coordinate file
print *,'opening inputfile ',cofile(1:index(cofile,' '))
......@@ -108,6 +133,8 @@ c----------------------------------------------------------------------
c process file header
c open input file
print *,'opening input file ',infile(1:index(infile,' '))
call sff_select_format(fileformat, ierr)
if ( stop 'ERROR: selecting file format'
call sff_ROpenFS(luin, infile,
& sffversion, timestamp, code, nfree, free, lenmax, maxfree,
& type, os, o1, o2, o3,
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