[cig-commits] r12876 - in seismo/3D/ADJOINT_TOMO/flexwin: . test_data
alessia at geodynamics.org
alessia at geodynamics.org
Mon Sep 15 06:34:18 PDT 2008
Author: alessia
Date: 2008-09-15 06:34:18 -0700 (Mon, 15 Sep 2008)
New Revision: 12876
Removed:
seismo/3D/ADJOINT_TOMO/flexwin/test_data/iasp91.hed
seismo/3D/ADJOINT_TOMO/flexwin/test_data/iasp91.tbl
Modified:
seismo/3D/ADJOINT_TOMO/flexwin/README
seismo/3D/ADJOINT_TOMO/flexwin/make_gfortran
seismo/3D/ADJOINT_TOMO/flexwin/seismo_subs.f90
Log:
Fixed sac compilation issue
Modified: seismo/3D/ADJOINT_TOMO/flexwin/README
===================================================================
--- seismo/3D/ADJOINT_TOMO/flexwin/README 2008-09-13 22:14:55 UTC (rev 12875)
+++ seismo/3D/ADJOINT_TOMO/flexwin/README 2008-09-15 13:34:18 UTC (rev 12876)
@@ -11,13 +11,8 @@
This is a bare-bones instruction set. For more details read the flexwin manual (latex/flexwin_manual.pdf) and the flexwin article (latex/flexwin_paper.pdf).
-IMPORTANT NOTE: This beta test release contains some code that is under a
-licence that makes it non-distributable. As flexwin beta testers, you are NOT
-authorized to pass on any part of this distribution to third parties. This
-restriction will be removed as soon as flexwin is officially released.
-
THE PACKAGE
-----------
@@ -62,23 +57,10 @@
COMPILATION
-----------
-NOTE: Do NOT use the configure script for beta test compilation. It will not
-work.
-
FLEXWIN requires the following libraries external to the package in order to
-compile and run: libsacio.a and libSacLib.a. Eventually, both libraries
-will be distributed by IRIS as part of the SAC package (at the moment only
-libsacio is distributed this way). For the time being, you should compile
-libSacLib.a using the source code in the SacLib directory that accompanies
-flexwin (instructions later).
+compile and run: libsacio.a and libsac.a. Both libraries
+are distributed by IRIS as part of the SAC package (version 101.2 and above).
-IMPORTANT NOTE: The SacLib directory is a temporary fix. The SAC source code
-from which the SacLib library is compiled is proprietary and should not be
-distributed by anyone other than IRIS. Brian Savage - the author of SacLib -
-is currently working on a new version of the library that will be distributed
-with future versions of SAC. The official release of flexwin will require
-linkage to this new library.
-
If your compiler of choice is gfortran, then you should be able to use the
make_gfortran makefiles with only minor modifications (notably you may need to
change the search path for the libsacio.a library). If you prefer another
@@ -90,16 +72,13 @@
Steps to compile the flexwin package:
-(1) Compile libSacLib.a. In the SacLib directory (which is outside the flexwin
-directory) type: "make -f make_gfortran".
-
-(2) Compile libtau.a and create iasp91.hed and iasp91.tbl. In the
+(1) Compile libtau.a and create iasp91.hed and iasp91.tbl. In the
flexwin/ttimes_mod directory type: "make -f make_gfortran". This will compile
libtau.a, and two programs, remodl and setbrn. The makefile will also run
remodl and setbrn to create the iasp91.hed and iasp91.tbl files. You should
then type "make -f make_gfortran install" to install the iasp91 files.
-(3) Compile flexwin. Edit the make_gfortran file in the flexwin root directory to ensure the SACLIBDIR variable points to the location of your SAC libraries (by default /opt/sac/lib). Then type "make -f make_gfortran".
+(2) Compile flexwin. Edit the make_gfortran file in the flexwin root directory to ensure the SACLIBDIR variable points to the location of your SAC libraries (by default $SACHOME/lib). Then type "make -f make_gfortran".
You should end up with the flexwin executable. The program requires the iasp91
files (or links to them) to be present in the directory from which the code is
@@ -109,8 +88,7 @@
TEST DATA SET
-------------
-You should test your compiled code on the test_data dataset provided. In the
-flexwin/test_data directory, type "./flexwin < input.test". The results of your
+You should test your compiled code on the test_data dataset provided. In the flexwin/test_data directory, type "./flexwin < input.test". The results of your
run will be found in the MEASURE subdirectory, and
should match those found in the MEASURE.orig
subdirectory.
Modified: seismo/3D/ADJOINT_TOMO/flexwin/make_gfortran
===================================================================
--- seismo/3D/ADJOINT_TOMO/flexwin/make_gfortran 2008-09-13 22:14:55 UTC (rev 12875)
+++ seismo/3D/ADJOINT_TOMO/flexwin/make_gfortran 2008-09-15 13:34:18 UTC (rev 12876)
@@ -1,15 +1,14 @@
# $Id: Makefile,v 1.3 2005/10/28 18:32:53 alessia Exp $
-OPT= -g -m32 -ffixed-line-length-132 -Wall
+OPT= -m32 -ffixed-line-length-132 -Wall
FC = gfortran
-CFLAGS = ${OPT}
-FFLAGS = ${OPT}
+CFLAGS=`sac-config --cflags` ${OPT}
-SACLIBDIR=/opt/sac/lib
-QDSACLIBDIR=../SacLib
TAULIBDIR=ttimes_mod
-LIBS= -lsacio -lSacLib -ltau -lm
+SACLIBDIR=${SACHOME}/lib
+LIBS= -lsacio -lsac -ltau -lm
+
PROGS= flexwin
default:${PROGS}
@@ -26,15 +25,15 @@
.SUFFIXES: $(SUFFIXES)
.f.o:
- $(FC) ${FFLAGS} -c -o $@ $<
+ $(FC) ${CFLAGS} -c -o $@ $<
.F.o:
- $(FC) ${FFLAGS} -c -o $@ $<
+ $(FC) ${CFLAGS} -c -o $@ $<
.f90.o:
- $(FC) ${FFLAGS} -c -o $@ $<
+ $(FC) ${CFLAGS} -c -o $@ $<
-flexwin:flexwin.f90 ${LIB2}
- $(FC) ${FFLAGS} flexwin.f90 -o flexwin ${LIB2} -L${TAULIBDIR} -L${QDSACLIBDIR} -L${SACLIBDIR} ${LIBS}
+flexwin:flexwin.f90 ${LIB2}
+ $(FC) ${CFLAGS} flexwin.f90 -o flexwin ${LIB2} -L${TAULIBDIR} -L${SACLIBDIR} ${LIBS}
clean:
rm -f ${LIB2} ${PROGS} *.o *.mod
Modified: seismo/3D/ADJOINT_TOMO/flexwin/seismo_subs.f90
===================================================================
--- seismo/3D/ADJOINT_TOMO/flexwin/seismo_subs.f90 2008-09-13 22:14:55 UTC (rev 12875)
+++ seismo/3D/ADJOINT_TOMO/flexwin/seismo_subs.f90 2008-09-15 13:34:18 UTC (rev 12876)
@@ -469,16 +469,22 @@
double precision, intent(in) :: delta_t
real, dimension(:), allocatable :: x_sngl
- real delta_t_sngl
+! real delta_t_sngl
allocate(x_sngl(n))
x_sngl(1:n) = sngl(x(1:n))
- delta_t_sngl = sngl(delta_t)
+! delta_t_sngl = sngl(delta_t)
+ ! old version - uses old SacLib
! does band-pass filter
- call xapiir(x_sngl,n,'BU',sngl(TRBDNDW),sngl(APARM),IORD,'BP',sngl(FSTART),sngl(FEND),delta_t_sngl,PASSES)
+ !call xapiir(x_sngl,n,'BU',sngl(TRBDNDW),sngl(APARM),IORD,'BP',sngl(FSTART),sngl(FEND),delta_t_sngl,PASSES)
+
+ ! new version, uses subroutines in libsac.a
+ ! does band-pass filter
+ call xapiir(x_sngl,n,'BU',TRBDNDW,APARM,IORD,'BP',FSTART,FEND,delta_t,PASSES)
+
x_filt(1:n) = dble(x_sngl(1:n))
deallocate(x_sngl)
Deleted: seismo/3D/ADJOINT_TOMO/flexwin/test_data/iasp91.hed
===================================================================
--- seismo/3D/ADJOINT_TOMO/flexwin/test_data/iasp91.hed 2008-09-13 22:14:55 UTC (rev 12875)
+++ seismo/3D/ADJOINT_TOMO/flexwin/test_data/iasp91.hed 2008-09-15 13:34:18 UTC (rev 12876)
@@ -1 +0,0 @@
-link ../iasp91.hed
\ No newline at end of file
Deleted: seismo/3D/ADJOINT_TOMO/flexwin/test_data/iasp91.tbl
===================================================================
--- seismo/3D/ADJOINT_TOMO/flexwin/test_data/iasp91.tbl 2008-09-13 22:14:55 UTC (rev 12875)
+++ seismo/3D/ADJOINT_TOMO/flexwin/test_data/iasp91.tbl 2008-09-15 13:34:18 UTC (rev 12876)
@@ -1 +0,0 @@
-link ../iasp91.tbl
\ No newline at end of file
More information about the cig-commits
mailing list