how to Reading And Writing SAC (Seismic Analysis Code) Data Files in Fortran codes
Dear,all
Recently, I synthesized a seismogram by using Fortran codes, I need plot the synthesized seismogram and the data together, so I can verify the accuracy of code. Now I encounter a question: how to read the SAC data by Fortran code, I have searched some codes on Internet, the details as follow:the velr12a.sac is my data file. Code:
c read sac file So I run my code like this: Code:
[jing@localhost 3dzeng]$ g77 rsac1.f /usr/local/sac/lib/sac.a -o rsac1 -L/usr/X11R6/lib -lX11 -L/usr/lib/ -lm Yueling |
Hello again Yueling -
Well googling those undefined references seems to only produce SAC related hits, so I guess that suggests maybe something wrong with your SAC library? In case you missed it, there is another thread on the IRIS site about this problem. http://www.iris.washington.edu/piper...ry/000049.html Although not sure if it was resolved. It could be worth an email to the original poster on that site to see if he resolved the library issue. Ekrem.Zor at mam.gov.tr Let us know how you go. Steve |
Hi,telemeister,
Thank you and Ekrem's reply. When I compiled the Fortran code on 64 bit or 32 bit machine, I should add -m32 to my command as in the following line; Code:
g77 rsac1.f -o rsac1 /usr/local/sac/lib/sacio.a -m32 sac.a library. This may also run on 64 bit machine. Cheers! Yueling |
All times are GMT -5. The time now is 07:42 PM. |