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

libfapidxx version of seusei (suseix) implemented

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: 5313
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent d5ec2e89
...@@ -27,13 +27,14 @@ ...@@ -27,13 +27,14 @@
# libfapidxx, respectively) # libfapidxx, respectively)
# 11/01/2013 V1.8 added sigscale to program targets # 11/01/2013 V1.8 added sigscale to program targets
# 17/04/2013 V1.9 lisousi has its own place now (moved source code) # 17/04/2013 V1.9 lisousi has its own place now (moved source code)
# 28/10/2013 V.10 implemented libfapidxx-version of suseix
# #
# ============================================================================ # ============================================================================
PROGRAMS=tsfilt stufi rotate coro xyz2uvw susei evelo tesiff teswf \ PROGRAMS=tsfilt stufi rotate coro xyz2uvw susei evelo tesiff teswf \
phasedsignals hamres siggen smoos dise foutra teseco resaseda gatherdiff \ phasedsignals hamres siggen smoos dise foutra teseco resaseda gatherdiff \
autocorr cross tidofi fredofi sigfit noisymize sigval fidasexx soutifu \ autocorr cross tidofi fredofi sigfit noisymize sigval fidasexx soutifu \
deconv geophone siggenx sigscale deconv geophone siggenx sigscale suseix
.PHONY: all .PHONY: all
all: install doc all: install doc
...@@ -134,6 +135,9 @@ stufi: %: %.o ...@@ -134,6 +135,9 @@ stufi: %: %.o
$(FC) $(FFLAGS) $(LDFLAGS) $< -o $@ -lseife -ltf -lsff $(FC) $(FFLAGS) $(LDFLAGS) $< -o $@ -lseife -ltf -lsff
susei evelo tesiff teswf rotate coro xyz2uvw: %: %.o susei evelo tesiff teswf rotate coro xyz2uvw: %: %.o
$(FC) $(FFLAGS) $(LDFLAGS) $< -o $@ -ltf -lsff $(FC) $(FFLAGS) $(LDFLAGS) $< -o $@ -ltf -lsff
suseix: %x: %.o
$(FC) $(FFLAGS) $(LDFLAGS) $< -o $@ -ltf \
-lfapidxx -ldatrwxx -lsffxx -lgsexx -ltime++ -laff
phasedsignals siggen hamres smoos dise: %: %.o phasedsignals siggen hamres smoos dise: %: %.o
$(FC) $(FFLAGS) $(LDFLAGS) $< -o $@ \ $(FC) $(FFLAGS) $(LDFLAGS) $< -o $@ \
-ltf -lsffu -ltime -lsff -lgsl -lm -lgslcblas -ltf -lsffu -ltime -lsff -lgsl -lm -lgslcblas
......
...@@ -30,13 +30,14 @@ c 16/06/98 V1.0 Thomas Forbriger ...@@ -30,13 +30,14 @@ c 16/06/98 V1.0 Thomas Forbriger
c 27/02/99 V1.1 add more than two c 27/02/99 V1.1 add more than two
c 22/10/01 V1.2 calculate arithmetic mean of traces c 22/10/01 V1.2 calculate arithmetic mean of traces
c 27/01/04 V1.3 switch for normalization c 27/01/04 V1.3 switch for normalization
c 28/10/13 V1.4 use libfapidxx to support additional file formats
c c
c============================================================================== c==============================================================================
c c
program susei program susei
c c
character*79 version character*79 version
parameter(version='SUSEI V1.3 SUm of SEIsmograms') parameter(version='SUSEI V1.4 SUm of SEIsmograms')
c c
c dimensions c dimensions
integer maxsamps, maxfree integer maxsamps, maxfree
...@@ -48,14 +49,14 @@ c input data ...@@ -48,14 +49,14 @@ c input data
integer ixdata(maxsamps), iydata(maxsamps) integer ixdata(maxsamps), iydata(maxsamps)
equivalence(xdata,ixdata) equivalence(xdata,ixdata)
equivalence(ydata,iydata) equivalence(ydata,iydata)
character*80 inxname, inyname character*80 inxname, inyname, inputformat
integer lui integer lui
parameter(lui=11) parameter(lui=11)
c output data c output data
real data(maxsamps) real data(maxsamps)
integer idata(maxsamps) integer idata(maxsamps)
equivalence(data,idata) equivalence(data,idata)
character*80 outname character*80 outname, outputformat
character*132 wid2line character*132 wid2line
integer luo integer luo
parameter(luo=10) parameter(luo=10)
...@@ -73,8 +74,8 @@ c sff extras ...@@ -73,8 +74,8 @@ c sff extras
c commandline c commandline
integer maxopt, lastarg, iargc integer maxopt, lastarg, iargc
character*80 argument character*80 argument
parameter(maxopt=2) parameter(maxopt=5)
character*2 optid(maxopt) character*3 optid(maxopt)
character*40 optarg(maxopt) character*40 optarg(maxopt)
logical optset(maxopt), opthasarg(maxopt) logical optset(maxopt), opthasarg(maxopt)
c c
...@@ -82,15 +83,16 @@ c ...@@ -82,15 +83,16 @@ c
c debugging c debugging
logical debug logical debug
c here are the keys to our commandline options c here are the keys to our commandline options
data optid/2h-d,3h-nn/ data optid/'-d','-nn','-ty','-it','-ot'/
data opthasarg/2*.FALSE./ data opthasarg/2*.FALSE.,3*.TRUE./
data optarg/2*1h-/ data optarg/2*'-','sff','sff','sff'/
c c
c------------------------------------------------------------------------------ c------------------------------------------------------------------------------
c basic information c basic information
c c
print *,version print *,version
print *,'Usage: susei [-nn] file1 file2 ... outfile' print *,'Usage: susei [-nn] [-ty f] [-it f] [-ot f]'
print *,' file1 file2 ... outfile'
print *,' or: susei -help' print *,' or: susei -help'
c c
if (iargc().lt.1) stop 'ERROR: missing arguments' if (iargc().lt.1) stop 'ERROR: missing arguments'
...@@ -104,8 +106,14 @@ c ...@@ -104,8 +106,14 @@ c
print *,' In that case the amplitude should be normalized' print *,' In that case the amplitude should be normalized'
print *,' by the number of traces stacked. This option' print *,' by the number of traces stacked. This option'
print *,' turns off amplitude normalization.' print *,' turns off amplitude normalization.'
print *,'-ty f choose file format ''f'' instead of SFF'
print *,' for input and output files'
print *,'-it f choose input file format ''f'' instead of SFF'
print *,'-ot f choose output file format ''f'' instead of SFF'
print *,' ' print *,' '
print *,'$Id$' print *,'$Id$'
print *,' '
call sff_help_formats
stop stop
endif endif
if (iargc().lt.3) stop 'ERROR: too few arguments' if (iargc().lt.3) stop 'ERROR: too few arguments'
...@@ -118,12 +126,22 @@ c ...@@ -118,12 +126,22 @@ c
& optarg, optset, opthasarg) & optarg, optset, opthasarg)
debug=optset(1) debug=optset(1)
nonormalize=optset(2) nonormalize=optset(2)
inputformat=optarg(3)
outputformat=optarg(3)
if (optset(4)) inputformat=optarg(4)
if (optset(5)) inputformat=optarg(5)
c c
nsumfiles=iargc()-lastarg-2 nsumfiles=iargc()-lastarg-2
c c
call getarg(lastarg+1, inxname) call getarg(lastarg+1, inxname)
call getarg(lastarg+nsumfiles+2, outname) call getarg(lastarg+nsumfiles+2, outname)
c c
c
call sff_select_input_format(inputformat, ierr)
if (ierr.ne.0) stop 'ERROR: selected input format is not supported'
call sff_select_output_format(outputformat, ierr)
if (ierr.ne.0) stop 'ERROR: selected output format is not supported'
c
c------------------------------------------------------------------------------ c------------------------------------------------------------------------------
c c
c c
......
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