From f.darbyshire at gmail.com Tue Feb 9 07:50:09 2010 From: f.darbyshire at gmail.com (Fiona Darbyshire) Date: Tue, 9 Feb 2010 10:50:09 -0500 Subject: [SAC-HELP] Character formatting - SAC/fortran Message-ID: <256ff3741002090750n63d0cd92k669144e1d9c77fca@mail.gmail.com> I inherited a code for conversion of SAC to ASCII with extra information going into the top of the ASCII file (ready for input to another program). It's something I haven't used for quite some time and I've installed SAC 101.2 since the last time I used it. Something seems to have changed with respect to some of the data formatting, so I recompiled the source code and reran it. This solved one of my data formatting problems, but appears to have created another. There appears to be some spurious white space in front of station and component names which is creating an issue for the program and its use as input to another code. I extracted the relevant piece of fortran from the code; here it is: character*4 kstnm character*100 fin,fout write(*,*)'Enter infile' read(*,*)fin call rsac1(fin,x,nlen,beg,del,NMAX,nerr) call getkhv('KSTNM',kstnm,nerr) write(*,*) KSTNM open(unit=10,file='nmresult',status='unknown') write(10,*),KSTNM close(10) stop end For a SAC file in which the station name is AKVQ, I get the following result: Standard output: AKV File nmresult (viewed in nedit): AKV (In each case there is a single space in front of the station or component name) If I change the character*4 statement for a larger number, I get the full station name, but still with the space in front and the marker in the file under nedit. The space and the nul cause problems for inputting the station/component information to the next stage of the data analysis procedure. So my question is simply: why the space in front of the names, and is there a way to eradicate it? Thanks, Fiona Darbyshire Universit? du Qu?bec ? Montr?al -------------- next part -------------- An HTML attachment was scrubbed... URL: From rob at seismo.berkeley.edu Wed Feb 17 10:51:00 2010 From: rob at seismo.berkeley.edu (Rob Porritt) Date: Wed, 17 Feb 2010 10:51:00 -0800 Subject: [SAC-HELP] binary distribution linux-64 bit, examples compile issue Message-ID: <27cd59961002171051x58ac42d6p580e64097f2f125f@mail.gmail.com> Hi all, I've recently downloaded sac101.3b. I want to use the libraries (libsac.a) and so proceeded through the examples in the documentation, but the makefile returned errors. I was able to make it by adding -I../../include, -L../../lib, and -lm to the FFLAGS and CFLAGS: FFLAGS=-Wall `sac-config --cflags` -I../../include -L../../lib -lm CFLAGS=-Wall `sac-config --cflags` -I../../include -L../../lib -lm I also had to add a standard header to wsac5c.c to define INT32_MAX #include Hope this is helpful if anyone else has these problems. Rob -- Rob Porritt, GG UC Berkeley Earth and Planetary Sciences PhD Candidate Berkeley Seismological Laboratory http://seismo.berkeley.edu/~rob/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Norman.Heckscher at utas.edu.au Sun Feb 21 20:43:22 2010 From: Norman.Heckscher at utas.edu.au (Norman Heckscher) Date: Mon, 22 Feb 2010 15:43:22 +1100 Subject: [SAC-HELP] troubles compiling sac 101.3b on 64-bit linux (Fedora 11) In-Reply-To: <4AA68130.4030203@colostate.edu> References: <4AA68130.4030203@colostate.edu> Message-ID: <2dc0152c1002212043x2eeaddf6r6ec46cc6f99c3d6f@mail.gmail.com> Hi Derek, Over the last few days I have been attempting to move to a pure 64 bit environment. I am currently working with Ubuntu 9.10. During the process I have attempted to compile SAC as a pure 64 bit application. I encountered a similar error to yours during the compile process. I have managed to successfully compile SAC by editing the following file and commenting out the header code which defines getline on my system. Comment out the following code from /usr/include/stdio.h ################ edit ################ extern _IO_ssize_t getline (char **__restrict __lineptr, size_t *__restrict __n, FILE *__restrict __stream) __wur; ################ edit ################ After the compilation I returned the stdio.h file to its original state. I don't know if this will cause any problems with the functionality of SAC, but, my results seem to be similar to utilizing the pre-comiled SAC binaries up to this point. Cheers! -- Norman J. Heckscher CODES Private Bag 126 Hobart, 7001 AUSTRALIA On 9 September 2009 03:07, Derek Schutt wrote: > Hi, > > I've been trying to install SAC on my Fedora 11 box (kernel > 2.6.29.6-217.2.8.fc11.x86_64), but I've run into a compilation problem: > > When I do a no-option configure, then type "make", I get: > >>make > Making all in libedit > make[1]: Entering directory `/usr/local/build/libedit' > make[1]: Nothing to be done for `all'. > make[1]: Leaving directory `/usr/local/build/libedit' > Making all in utils > make[1]: Entering directory `/usr/local/build/utils' > make[1]: Nothing to be done for `all'. > make[1]: Leaving directory `/usr/local/build/utils' > Making all in src > make[1]: Entering directory `/usr/local/build/src' > gcc -DHAVE_CONFIG_H -I. -I../../sac-101.3b/src -I../inc > -I../../sac-101.3b/inc -I../libedit/include -c -o bbs/setbbv.o > ../../sac-101.3b/src/bbs/setbbv.c > In file included from ../../sac-101.3b/src/bbs/setbbv.c:12: > ../../sac-101.3b/inc/co.h:40: error: conflicting types for ?getline? > /usr/include/stdio.h:653: note: previous declaration of ?getline? was here > make[1]: *** [bbs/setbbv.o] Error 1 > make[1]: Leaving directory `/usr/local/build/src' > make: *** [all-recursive] Error 1 > > Any suggestions? > > Also, by the way, the "Readme.buildsac" that comes with the source code > shows this as a configuration option: > > --enable-matlab=/path/to/matlab Where to find Matlab and its > libraries. As of version 101.2, Matlab is only > available if requested. See CHANGES (2008-04-01) > for further details. > > > I gather from looking at the configure script, that this flag should be > "--with-matlab=/path/to/matlab" > > Right now, however, I'm trying just to get SAC to work without matlab. > > Thanks. I'm happy to e-mail the full output of "configure" if that would be > helpful. > > -Derek Schutt > > > _______________________________________________ > sac-help mailing list > sac-help at iris.washington.edu > http://www.iris.washington.edu/mailman/listinfo/sac-help > > From Norman.Heckscher at utas.edu.au Sun Feb 21 20:43:55 2010 From: Norman.Heckscher at utas.edu.au (Norman Heckscher) Date: Mon, 22 Feb 2010 15:43:55 +1100 Subject: [SAC-HELP] Fwd: troubles compiling sac 101.3b on 64-bit linux (Fedora 11) In-Reply-To: <2dc0152c1002212042l6cd4eb2ei77f849feadf0639a@mail.gmail.com> References: <4AA68130.4030203@colostate.edu> <2dc0152c1002212042l6cd4eb2ei77f849feadf0639a@mail.gmail.com> Message-ID: <2dc0152c1002212043l4df3e125m72157b7c567993f6@mail.gmail.com> Hi Derek, Over the last few days I have been attempting to move to a pure 64 bit environment. ?I am currently working with Ubuntu 9.10. ?During the process I have attempted to compile SAC as a pure 64 bit application. I encountered a similar error to yours during the compile process. ?I have managed to successfully compile SAC by editing the following file and commenting out the header code which defines getline on my system. Comment out the following code from /usr/include/stdio.h ################ edit ################ extern _IO_ssize_t getline (char **__restrict __lineptr, ? ? ? ? ? ? ? ? ? ? ? ? ? ?size_t *__restrict __n, ? ? ? ? ? ? ? ? ? ? ? ? ? ?FILE *__restrict __stream) __wur; ################ edit ################ After the compilation I returned the stdio.h file to its original state. I don't know if this will cause any problems with the functionality of SAC, but, my results seem to be similar to utilizing the pre-comiled SAC binaries up to this point. Cheers! -- Norman J. Heckscher CODES Private Bag 126 Hobart, 7001 AUSTRALIA On 9 September 2009 03:07, Derek Schutt wrote: > Hi, > > I've been trying to install SAC on my Fedora 11 box (kernel > 2.6.29.6-217.2.8.fc11.x86_64), but I've run into a compilation problem: > > When I do a no-option configure, then type "make", I get: > >>make > Making all in libedit > make[1]: Entering directory `/usr/local/build/libedit' > make[1]: Nothing to be done for `all'. > make[1]: Leaving directory `/usr/local/build/libedit' > Making all in utils > make[1]: Entering directory `/usr/local/build/utils' > make[1]: Nothing to be done for `all'. > make[1]: Leaving directory `/usr/local/build/utils' > Making all in src > make[1]: Entering directory `/usr/local/build/src' > gcc -DHAVE_CONFIG_H -I. -I../../sac-101.3b/src -I../inc > -I../../sac-101.3b/inc -I../libedit/include? -c -o bbs/setbbv.o > ../../sac-101.3b/src/bbs/setbbv.c > In file included from ../../sac-101.3b/src/bbs/setbbv.c:12: > ../../sac-101.3b/inc/co.h:40: error: conflicting types for ?getline? > /usr/include/stdio.h:653: note: previous declaration of ?getline? was here > make[1]: *** [bbs/setbbv.o] Error 1 > make[1]: Leaving directory `/usr/local/build/src' > make: *** [all-recursive] Error 1 > > Any suggestions? > > Also, by the way, the "Readme.buildsac" that comes with the source code > shows this as a configuration option: > > ?? --enable-matlab=/path/to/matlab???? Where to find Matlab and its > ????????????????????? libraries.? As of version 101.2, Matlab is only > ????????????????????? available if requested.? See CHANGES (2008-04-01) > ????????????????????? for further details. > > > I gather from looking at the configure script, that this flag should be > "--with-matlab=/path/to/matlab" > > Right now, however, I'm trying just to get SAC to work without matlab. > > Thanks.? I'm happy to e-mail the full output of "configure" if that would be > helpful. > > -Derek Schutt > > > _______________________________________________ > sac-help mailing list > sac-help at iris.washington.edu > http://www.iris.washington.edu/mailman/listinfo/sac-help > >