Thread: an inquiry regarding SAC in ubuntu 64 bit

Started: 2013-04-04 21:18:17
Last activity: 2013-04-05 04:04:11
Topics: SAC Help
Ali Abdolali
2013-04-04 21:18:17
-- Dear list members.
I am a coastal engineer who is not familiar with seismology. for my
project, I have to use SAC in order to convert recorded data of
seismometers to acceleration and velocity. as far as i found in IRIS and
other seismic communities, SAC is the only program which can do it for me.
however, after 3 days working on different version of it (Linux 64 bit and
Cygwin) I couldn't mount it. I mean I cannot run it. it makes me nervous
cause I couldn't find an step by step guide.
i have installed UBUNTU 64 bit on my PC.
in the README file in SAC directory, it is written I have to just set the
environment. but I cannot understand what is the meaning of :

For csh and tcsh, edit ~/.cshrc adding the lines
setenv SACHOME /usr/local/sac
source ${SACHOME}/bin/sacinit.csh

After saving and exiting the file, enter
source ~/.cshrc

For bash, edit ~/.bashrc adding the lines
export SACHOME=/usr/local/sac
source ${SACHOME}/bin/sacinit.sh

After saving and exiting the file, enter
source ~/.bashrc


what is did is as follows:
1-download the sac-101.5c-linux_x86_64.tar.qz

2-copy it into HOME
3-run the terminal
4-write -xzf sac-101.5c-linux_x86_64.tar.gz in the terminal (the directory
called SAC is now in the same place (HOME))
5- go inside bin directory.
6-there is 2 files SACINIT.CSH and SACINIT.sh
7-when i open those files, what I have to do? what changes I have to do in
these 2 files and other content of bin?
do I need copy
setenv SACHOME /usr/local/sac
source ${SACHOME}/bin/sacinit.csh
in it and save it? or something else? what is BASH and what I need to do
for it? what sort of command I have to write in terminal to finish the
setting environment and what I have to write to run the SAC?
please consdier that it makes me confused and I don't know what I have to
do? it is due to lack of knowledge.
is there anybody who know what I have to do? I really appreciate your help.
with my kindest regards
Ali


------------------------------
Ali Abdolali
PhD. Candidate, Department of Civil Engineering, University of Roma Tre
No,62, Via Vito Volterra, Rome, Italy
Tel: +39-3884781904, +39-0657333635 Fax: +39-06-57333441
website: http://www.uniroma3.it
E-mail: *aabdolali<at>uniroma3.it, <aabdolali<at>uniroma3.it>
ali_abdolali<at>aut.ac.ir, <ali_abdolali<at>aut.ac.ir>** a.abdolali<at>ptpco.com*

------------------------------

------------------------------

------------------------------

  • Milton Plasencia
    2013-04-05 04:04:11

    Hi Ali,

    You can follow the instructions in the README file after
    uncompressing the distribution.
    Then you must define some environment variables, in your .bash_profile or .profile
    file in your HOME directory.
    below an example for yuur system but it is the same on Linux system

    # SAC Environment variables
    export SACHOME=/home/ali/sac
    export PATH=$PATH:$SACHOME/bin
    export SACAUX=$SACHOME/aux
    export SACLIB=$SACHOME/lib/sacio.a
    export SAC_USE_DATABASE=0
    export SAC_PPK_LARGE_CROSSHAIRS=1

    Important is the shell, in OSX i use bash shell, so you must use the same,
    On Linux you have bash shell

    Change the PATH of the variable according your system.
    After you edit you .bash_profile or .profile,
    do:

    prompt> source .bash_profile
    in order to set the environment variables.
    Finally run sac.

    HTH.

    Milton


    * * * * * * * * * * * * * * * * * * * * * * *
    Milton P. PLASENCIA LINARES

    Centro di Ricerche Sismologiche (CRS)
    Istituto Nazionale di Oceanografia e di Geofisica Sperimentale - OGS

    Borgo Grotta Gigante 42/C
    (34010) Sgonico - TRIESTE - ITALIA
    Tel: +39 040 2140 141 (Udine)
    Tel: +39 040 2140 256 (Trieste)
    Fax: +39-040-327307

    E-mail: mplasencia<at>inogs.it

    ASAIN (Antarctic Seismographic Argentinean Italian Network)
    *********************************








    On Apr 4, 2013, at 8:18 PM, ali abdolali <ali.abdolali.85<at>gmail.com> wrote:



    -- Dear list members.
    I am a coastal engineer who is not familiar with seismology. for my project, I have to use SAC in order to convert recorded data of seismometers to acceleration and velocity. as far as i found in IRIS and other seismic communities, SAC is the only program which can do it for me.
    however, after 3 days working on different version of it (Linux 64 bit and Cygwin) I couldn't mount it. I mean I cannot run it. it makes me nervous cause I couldn't find an step by step guide.
    i have installed UBUNTU 64 bit on my PC.
    in the README file in SAC directory, it is written I have to just set the environment. but I cannot understand what is the meaning of :

    For csh and tcsh, edit ~/.cshrc adding the lines
    setenv SACHOME /usr/local/sac
    source ${SACHOME}/bin/sacinit.csh

    After saving and exiting the file, enter
    source ~/.cshrc

    For bash, edit ~/.bashrc adding the lines
    export SACHOME=/usr/local/sac
    source ${SACHOME}/bin/sacinit.sh

    After saving and exiting the file, enter
    source ~/.bashrc


    what is did is as follows:
    1-download the sac-101.5c-linux_x86_64.tar.qz

    2-copy it into HOME
    3-run the terminal
    4-write -xzf sac-101.5c-linux_x86_64.tar.gz in the terminal (the directory called SAC is now in the same place (HOME))
    5- go inside bin directory.
    6-there is 2 files SACINIT.CSH and SACINIT.sh
    7-when i open those files, what I have to do? what changes I have to do in these 2 files and other content of bin?
    do I need copy
    setenv SACHOME /usr/local/sac
    source ${SACHOME}/bin/sacinit.csh
    in it and save it? or something else? what is BASH and what I need to do for it? what sort of command I have to write in terminal to finish the setting environment and what I have to write to run the SAC?
    please consdier that it makes me confused and I don't know what I have to do? it is due to lack of knowledge.
    is there anybody who know what I have to do? I really appreciate your help.
    with my kindest regards
    Ali


    Ali Abdolali
    PhD. Candidate, Department of Civil Engineering, University of Roma Tre
    No,62, Via Vito Volterra, Rome, Italy
    Tel: +39-3884781904, +39-0657333635 Fax: +39-06-57333441
    website: http://www.uniroma3.it
    E-mail: aabdolali<at>uniroma3.it, ali_abdolali<at>aut.ac.ir, a.abdolali<at>ptpco.com
    _______________________________________________
    sac-help mailing list
    sac-help<at>iris.washington.edu
    http://www.iris.washington.edu/mailman/listinfo/sac-help


13:53:39 v.22510d55