The purpose of this page is to notify users of the Computer Program in Seismology (CPS) package of repairs or extensions made to the code. Whenever this page is updated, the down loadable version of CPS is updated at the download FTP site.,
While fixing the code, I use the opportunity to modify the
dispersion display program srfphv96 so that plots of
Love and Rayleigh dispersion use the same scales:
|
|
-C cmdfil
-A acmdfil
-L lcmdfil
where the following are examples of the different files:
cmdfil: 'HAM.RDD.val' 1 0.01 'CI' 'CUS.RDD.val' 1000 0.01 'CI' 'R41.RDD.val' 1025 0.01 'CI' 'S42.RDD.val' 1050 0.01 'CI' 'S43.RDD.val' 1075 0.01 'CI' acmdfil: 'HAM.RDD.val' 1 0.01 'CI' 0.04 'CUS.RDD.val' 1000 0.01 'CI' 0.04 'R41.RDD.val' 1025 0.01 'CI' 0.04 'S42.RDD.val' 1050 0.01 'CI' 0.04 'S43.RDD.val' 1075 0.01 'CI' 0.04 cmdfil: 'HAM.RDD.val' 1 0.01 'CI' 0.04 'HAM' 'CUS.RDD.val' 1000 0.01 'CI' 0.04 'CUS' 'R41.RDD.val' 1025 0.01 'CI' 0.04 'R41' 'S42.RDD.val' 1050 0.01 'CI' 0.04 'S42' 'S43.RDD.val' 1075 0.01 'CI' 0.04 'S43' |
![]() |
Note that one can use all three commands. To make the plot
shown, the following command line was used:
genplt -XMIN 100 -XMAX 1000 -YMAX 0.0001 -YMIN 0.000001 -XLOG -YLOG -L cmdfil -TX 'distance (km)' -TY 'Filtered Velocity' -LPOS 'BL'
The new set of command line flags are as as follow:
-G The default name of the final dispersion file is StaCmp.dsp.
With this flag, the output dispersion file is the original filename with
.dsp appended, e.g., NMSLMBHZ01.dsp
-T Show the 'Tomo' button
-DMIN dmin only use traces with distances ≥ dmin km
-DMAX dmax only use traces with distances ≤ dmax km
-11MIN 11min only use traces with IHDR11 ≥ 11min
-11MAX llmax only use traces with IHDR11 ≤ 11max
When processing there are several steps that are performed on different pages: select the trace on page 1, set the units on page 2, set the multiple filter analysis and display parameters on page 3 and then select the dispersion on page 4. Then repeat the entire process for the next waveform. Normally the parameters on pages 2 and 3 are not changed. The new Autofeed button permits one to skip pages 2 and 3. This small change saves a lot of time and mouse movements when working with large data sets.
The second change was specifically written for use with inter-station Green's functions computed by cross-correlating ground noise. Since gsac is used, the stack function saves the number of traces in the ihdr11 variable. The command line of do_mft can be used to use only traces with a range of ihdr11 values. The command line can also select distance ranges now, a feature of use for earthquake data. Finally a new -T flag introduces a Tomo button.
The Tomo button executes the script MFTDOOVERLAY that is in the users PATH. It is currently used to determine the tomographically predicted dispersion between the station and epicenter for earthquakes or two stations for cross-correlation, and then to overlay this onto the MFT image. The two figures show the buttons and the predicted dispersion.
![]() |
The purpose of making this overlay is to assist in
determining the proper period range for dispersion. For
earthquake data, the spectral shape is often used as a guide,
but the comparison may be useful. Another obtain is to overlay
model predicted dispersion curves created from the -S flag of
sdpegn96. The script MFTDOOVERLAY can be
programmed to do a lot of things. For example a combination of
gsacGMT can be used to create the file map.eps
which can be viewed using gv or other PostScript view:
![]() |
| Original
code |
Corrected
code |
![]() |
![]() |
| OLD
(problem) |
NEW
(Repaired) |
![]() |
![]() |
Usage: Setup SOL WIN32 SOL-EGCS LINUX LINUX64 CYGWIN OSX
SOL SUN Solaris Compilers
SOL-GNU SUN Solaris with gcc/g77 compilers
CYGWIN CYGWIN 98/NT/2K/XP gcc/g77 Compilers
CYGWIN40 CYGWIN 98/NT/2K/XP gcc/gfortran Compilers
LINUX40 Linux with gcc/gfortran compilers
LINUX6440 Linux 64 bit with gcc/gfortran compilers
OSX40 Apple with gcc/gfortran compilers
OSX40-32 Apple with 32-bit gcc/gfortran compilers
Older systems - not modern
LINUX Linux with gcc/g77 compilers
LINUX64 Linux 64 bit with gcc/g77 compilers
OSX Apple with gcc/g77 compilers
Upgraded the distributed IRIS programs evalresp from version 3.2.40 to 3.3.3 and rdseed from 4.8 to 5.0. In order to support the CPS architectures, e.g., CYGWIN (Windows), MacOS-X, LINUX and Solaris, changes were made to these codes. The changes are given in the links in this section. This upgrade was required in order to continue to use the most recent SEED volumes.
The two programs are installed in PROGRAMS.330/bin with the executable nanames evalresp and rdseed. The IRIS distribution found in PROGRAMS.330/IRIS/rdseedv5.0 provides the executables rdseed.linux (64 bit), rdseed.MAC.x86 (64 bit), rdseed.powerpc, rdseed.sparc (64 bit), and rdseed.sun.x86 (64 bit). If you wish to use these programs, you must install them in your system and adjust the path to find them.
evalresp - The
SLU version has the fixes suggested by Eric J. Haug of
SLU in May, 2008 to handle continuation for FIRST
with a large number of coefficients. Basically we need to
get past the tendency of some SEED writers to put the
following phase in the RESP file "No Abbreviation
Referenced" for Response in units lookup and Response out
units lookup. This is a proble with the CMG-5TD
accelerometer which has a very, very FIR stage.
rdseed - Several changes were made.
Another change relates to the strupr routine. Since this is actually provided by some libraries, we must avoid a double definition. By making this global change the rdseed version of this is preserved and there is no conflict with other definitions. Thus all instances of strupr are changed to Strupr and a definition is placed in Include/rdseed.h. Changes were made in Decoders/process_data.c, Decoders/process_event_requests.c, Main/ah_resp.c, Main/output_css.c, Main/rdseed.c and Main/summary.c.
Utilities/alloc_linklist_element.c - malloc wants a size_t cast. This is changed from an int
Parsers/makefile - remove CC=gcc since not all compilers use gcc - note that CC is defined in the main Makefile
Printers/makefile - remove CC=gcc since not all compilers use gcc - note that CC is defined in the main Makefile
Snoop/makefile - remove CC=gcc since not all compilers use gcc - note that CC is defined in the main Makefile
Utilities/makefile - remove CC=gcc since not all compilers use gcc - note that CC is defined in the main Makefile
Parsers/parse_50.c - get rid of non-printing characters in the output
Main/output_resp.c - Send information about the
network to stderr, e.g., station, network, component,
location, on_date, off_date, latitude, longitude,
elevation, response file : rdseed -f seed_volume -R > out
2>&1 which using the sh or bash shells.
(Sample stderr output)
Compiler warnings: : Significant warnings appear using gcc -c -g -Wall instead of the normal gcc -c in the makefifles. Most of the warnings are due to the fact that the current rdseed is not written in ANSI C but rather in the original Kernighan and Ritchie style. Someone else should clean up this code.
decode_steim.c: In function `decode_steim':
decode_steim.c:231: warning: integer overflow in expression
decode_steim.c:231: warning: integer overflow in expression
Con Z [B|O|A|T0|T1|T2|T3|T4|T5|T6|T7|T8|T9] File external_sac_file [Suffix suffix]
One marker must be set to define the zero time of the pulse in order to prevent incorrect delays. The following example creates an impulse, sets "O" to the start of the impulse, convolves with the internal function "Triangle" and then uses the "Convolve" command to do the same:
gsac << EOFA comparison of the files tr.sac and nimp.sac.con shows that they are the same and have the same spectral amplitudes, except at high frequency because of the different sample rates.
#####
# define the filter
#####
fg imp delta 0.1 npts 256
w imp.sac
r imp.sac
# set the o marker
ch o 0
w
triangle w 1.0
w tr.sac
#####
# define the impulse with a different sample rate
#####
fg imp delta 0.05 npts 512
w nimp.sac
r nimp.sac
conv z o f tr.sac s ".con"
w
q
EOF
tprep96 -M model.TI -L -R -NMOD 500 -d dfile -HS 10 -HR 0Of course isotropic models can be used with these programs, also though the computations will take longer than for the corresponding isotropic codes.
tdisp96
tlegn96
tregn96
tpulse96 -V -p -l 4 -d dfile > tifile96
fprof96 -A < tifile96
plotnps -F7 -W10 -EPS -K -BGFILL < SACPSD.PLT > 2.eps
convert -trim 2.eps im2.png
gm convert -trim 2.eps gm2.png
plotnps -F7 -W10 -EPS -K -I < SACPSD.PLT > 3.eps
convert -trim 3.eps im3.png
gm convert -trim 3.eps gm3.png
![]() |
![]() |
| plotnps
-F7 -W10 -EPS -K < GRAYSC.PLT > t.eps gm convert -trim t.eps graysc.png |
plotnps
-F7 -W10 -EPS -K -I < GRAYSC.PLT > t.eps gm convert -trim t.eps grayscinv.png |
STA IWT ARRIVAL TIME PhIDQL PHASE FM CHAN LAT LON ELEV
OK001 0 20100213053058.250 2 0 i S X Z 35.5611 -97.2895 350.00
OK001 0 20100213053057.219 1 0 i P C Z 35.5611 -97.2895 350.00
OK002 0 20100213053100.168 2 0 i S X Z 35.5493 -97.1966 354.00
... ... ... ... ...
HYPO71 Quality : BA
Gap : 84 deg
ch evla 35.5331 evlo -97.2982 evdp 5.52
ch ocal 2010 02 13 05 30 55 968
Upgraded the distributed IRIS programs evalresp from version 3.2.38 to 3.2.40 and rdseed from 4.7.5 to 4.8. In order to support the CPS architectures, e.g., CYGWIN (Windows), MacOS-X, LINUX and Solaris, changes were made to these codes. The changes are given in the links in this section. This upgrade was required in order to continue to use the most recent SEED volumes.
The two programs are installed in PROGRAMS.330/bin with the executable nanames evalresp and rdseed. The IRIS distribution found in PROGRAMS.330/IRIS/rdseedv4.8 provides the executables rdseed.linux, rdseed.ppcMac, rdseed.intelMac, rdseed.Sun86. rdseed.SunSparc. If you wish to use these programs, you must install them in your system and adjust the path to find them.
evalresp - The
distributed code has an #include <malloc.h>. This is
deprecated in MacOS-X to <malloc/malloc.h> which
means that the code will not compile. Since modern
compilers provide the prototypes for malloc in
<stdlib.h>. I changed alloc_fctns.c, parse_fctns.c, regexp.c and string_fctns.c by commenting out the
#include <malloc.h> and ensuring the presence of a
#include <stdlib.h>.
Detailed changes.
NOTE THAT evalresp-3.2.40 will configure properly for the MacOS.
rdseed - Several changes were made.
Include/sac.h: The most important was to change the use of long in the definition of the integer SAC header values to int. Becore computers were truly 32 bit, short meant a 2 byte integer, long a 4 byte integer, and int could mean a byte integer. Currently, int means 4 bytes. A problem arises on 64 bit machines, for which a long means an 8 byte integer. One way around this is to use the -m32 flag on the compiler. CPS changes the long to int.
Utilities/alloc_linklist_element.c
- malloc
wants a size_t cast.
This is changed from an int
Ah/makefile - remove CC=gcc since not all compilers use gcc - note that CC is defined in the main Makefile
Decoders/makefile
- remove CC=gcc since not all compilers use gcc
Parsers/makefile - remove CC=gcc since not all compilers use gcc
Main/output_sac.c -
Place comments into the pole-zero file giving
information about the station, network, date, etc. The
SAC pole-zero file is created using the command
rdseed -f seed_volume
-p
(Sample SAC pole-zero
file)
Main/output_resp.c -
Send information about the network to stderr, e.g.,
station, network, component, location, on_date,
off_date, latitude, longitude, elevation, response
file : rdseed -f
seed_volume -R > out 2>&1 which
using the sh or
bash shells.
(Sample stderr
output)
Updated the manual entry in Main/rdseed.1 to make the command line flags more complete on the first page. The pdf version of this document is in PROGRAMS.330/DOC/IRIS.pdf where you will find evalresp.pdf, rdseed.pdf and SEEDManual_V2.4.pdf. (no change from November 17, 2007)
Compiler warnings: : Significant warnings appear using gcc -c -g -Wall instead of the normal gcc -c in the makefifles. Most of the warnings are due to the fact that the current rdseed is not written in ANSI C but rather in the original Kernighan and Ritchie style. Someone else should clean up this code.
cc -I../Include -c -g -c -o decode_steim.o decode_steim.c
decode_steim.c: In function `decode_steim':
decode_steim.c:231: warning: integer overflow in expression
decode_steim.c:231: warning: integer overflow in expression
for all compiles, and
cc -I../Include -c -g -c -o parse_30.o parse_30.c
parse_30.c: In function `parse_type30':
parse_30.c:96: warning: cast to pointer from integer of different size
on just the 64-bit LINUX compiler (note that the -w32 compiler flag was not used since the change to Include/sac.h makes this unnecessary).
RMS Error : 0.150 sec
Travel_Time_Table: nnCIA
Latitude : 35.9288 +- 0.0130 N 1.4501 km
Longitude : 43.2796 +- 0.0173 E 1.5470 km
Depth : 13.65 +- 0.88 km
Epoch Time : 1247949147.952 +- 0.31 sec
Event Time : 20090718203227.952 +- 0.31 sec
Event (OCAL) : 2009 07 18 20 32 27 952
HYPO71 Quality : CD
Gap : 161 deg
Jessie Bonner noted some compile problems:
Change fortran code that had type declaration after a data statement: VOLIV/src/jsamat.f (line 45) used in joint96 and gprep96 (line 92)
Modify subroutine four. Evidently a g77 compiler, which is no longer supported, did not like the fact the there was a call four(complex_array …) while internally the code was subroutine four(real_array … ). This was valid in FORTRAN77 since the memory storage would be the same if one had a real array x(20), a two dimensional array x(2,10) or a complex array x(10) since the memory organization was:
MEMORY | 1 | 2 | 3 | 4 | ...
1-D real array | x(1) | x(2) | x(2) | x(4) | ...
2-D real array | x(1,1) | x(2,1) | x(1,2) | x(2,2) | ...
Complex array | Re[x(1)] | Im[x(1)] | Re[x(2)] | Im[x(2)] | …
This was carefully fixed by
defining a revised routine zfour(z,npts,isign,dt,df) in
all
code. This is a step in defining every variable in a manner
compatible with modern computer languages.
The program files updated
were as follow:
VOLII/src/sacmat96.f
VOLII/src/sacmft96.f
VOLII/src/sacpom96.f
VOLIII/src/spulse96.f
VOLIV/src/rftndr96.f
VOLIV/src/twofft.f
VOLV/src/ffilt96.f
VOLV/src/fspec96.f
VOLVI/src/hpulse96.f
VOLVI/src/hrftn96.f
VOLVI/src/hudson96.f
VOLVI/src/trftn96.f
VOLVIII/src/sacdecon.f
VOLVIII/src/sacevalr.f
VOLVIII/src/sacfilt.f
VOLVIII/src/saciterd.f
VOLVIII/src/sacspc96.f
VOLIX/src/cpulse96.f
The following documentation was
updated:
DOC/OVERVIEW.pdf/cps330o.pdf
DOC/GSAC.pdf/cps330g.pdf
DOC/STRUCT.pdf/cps330c.pdf
DOC/SOURCE.pdf/cps330s.pdf
CALPLOT.pdf/cps330p.pdf
Hermann Zeyen noticed a problem in the FORTRAN implementation of the subroutine arsac in the file SUBS/sacsubf.f. "if the number of data is multipleof five, the program tries to read one line too much." This is not a problem in the C version in SUBS/sacsubc.c
Modified the SLU version of rdseed to improve comments in the sac pole-zero file.
Corrected moment magnitude definition in fmech96 to replace the 16.05 by 16.1 in log Mo (dyne-cm) = 16.1 + 1.5 Mw
Added a new command to gsac. The mt command uses the precompute Green's functions (e.g., f96tosac -B -G or f96tosac -B -T ) to compute a Z, R, T seismogram or the 3 ZRT seismograms for a doubel couple source. The output will be in units of m/s for a step dislocation. The purpose of this command is to be able to quickly create forward synthetics for use in finite-fault inversion.
Changed the part sacmft96 that selects the period limits. The previous code looked like if(p .ge. pmin .and. p .le. pmax.and. p.ge.permin .and. p.le.permax)then which had roundoff problems as noted by Renata Schivardi at INGV Bologna. The code was changed to be slightly more generous by changing the test to if(p .ge. 0.99*pmin .and. p .le. 1.01*pmax .and. p.ge. 0.99*permin .and. p.le.1.01*permax)then
Changed the part of sacmat96 that selects the period limits. The previous code was if(p .ge. pmin .and. p .le. pmax)then This was changed to if(p .ge. 0.99*pmin .and. p .le. 1.01*pmax)then to overcome roundoff error. This problem was noted by Renata Schivardi at INGV Bologna.
Modified gsac to permit a title to be placed on the figure generated by the plotsp command.
Corrected xlim command of gsac so that the plot axes are correctly reset after the command xlim off.
Added new options to the gsac rotate3 command: rotate3 to uvwsts2 and rotate3 to uvwtril.
The reason for this is that a field
system had a broadband sensor with internal UVW sensors and also
an accelerometer. As part of seismic network quality control, the
recordings of each were corrected for instrument response and the
derived ground motions were compared for that part of the signal
with high signal-to-noise. These should be identical since the
ground motion is the same. For our field system, this
did not occur, and we returned the broadband and
accelerometer to the university and compared the recordings to a
reference system. A similar comparison showed that the
problem was with the broadband sensor. The rotate3 to uvw was
added to gsac to isolate the internal UVW sensor that was
the cause of the problem. To do this the ZNE motion of the test
and reference systems were rotated to the UVW coordinate system of
the test system and the individual UVW traces were compared.
Because we compared two different 3-component sensors, recording
of the UVW channels of each would not have worked since each was
different.
A description of the coordinate system transformation inplemented
now is gsac given in the PDF document rotate3.pdf
At the request of Chuck Ammon, hudson96 now has a flag that permits one to override the model computed T*. This is invoked with the command option -TSTAR tstar . A valid range of the tstar is >= 0. If one enters a value of 0.0 the program sets this internally to 0.0001 as a quick way to implement this without a major code rewrite.
Incorporated a fix in subroutines PROGRAMS.330/SUBS/sacsubf.f and PROGRAMS.330/SUBS/sacsubc.c to use the Enumerated Types for IZTYPE of IUNKN, IB, IDAY, IO, IA, IT0, IT1, ..., IT9.
Modified PROGRAMS.330/VOLVI/src/hudson96.f to fix logical errors in the time delay correction for the T* operator, and more importantly to overcome numerical proplems for the S-wave incident at the receiver. This was done by replacing an explicit matrix sub-determinant by a compound matrix value.
Modified PROGRAMS.330/VOLV/src/time96.f to compute the travel time and ray parameter for the sS arrival.
The distribution now includes the source code for the menu program for terminals, dialog (dialog-1.1-20080819)
Modified the file gsac_sac.c in PROGRAMS.330/VOLVIII/gsac.src to improve the detection of a non-sac file. Hopefully this will prevent problems when trying to read sac files with the incorrect byte order.
Renamed the utility program CAL in PROGRAMS.330/CALPLOT/Utility to calplt. The reason for this is that MacOS-X does not distinguish between upper and lowercase executable names, and CAL conflicts with the calendar program cal. Since CAL was used in shell scripts to annotate plots, instances of CAL will be changed to calplt until all are corrected. The graphics output of the program is renamed CALPLT.PLT to be consistent with the naming convention of other programs. Correct documentation in PROGRAMS.330/DOC and MOMENT_TENSOR tutorial and others tutorials to reflect this change.
Corrected the MOMENT_TENSOR tutorial scripts to provide more information on copying files. Also corrected the DOBYTEORDER in the GREEN directory of precomputed Green's functions.
Fixed a but in the programs spulse96, hspec96, hudson96, time96, timmod96 and refmod96 which was due to the fact that the parameter refdep was not defined in subroutine frstar. This was discovered because of memory dump problems on some computers.
Introduced a new program fmlpr which is based on the program lprmech written by Charles J. Ammon. This program is controlled from the command line and creates two files. The first is a printer-plot tabulation of a double-couple focal mechanism solution, and the second provides those results in a global CMT 'ndk' format. A example run if given by the line
fmlpr
"TITLE" "DATETIME" "GEOG" EVDP MW strike dip rake "FILE1" "FILE2"
"FILE3"
TITLE DATETIME and GEOG are enclosed in quotes
FILE1 - name of file with stations used
FILE2 - file with data summary: NSTA NCMP MINPER
FILE3 - file with filtering commands
fmlpr "USGS/SLU Moment Tensor
Solution" "${YEAR} ${MO} ${DY} ${HR} ${MN} ${SEC} ${MSEC} ${LAT}
${LON} ${DEPTH} ${MAG}" "${STATE}" ${HS} ${MW} ${STK} ${DIP}
${RAKE} sumstaused.txt sumswavendk.txt sumwfilter.txt
Here the first string
provides a title for the printer plot, the second string provides
information about the earthquake location and the third string
provides a geographical description of the earthquake sourcce
zone. These nest items, e.g., HS, MW, STK, DIP and RAKE are
the source depth, moment magnitude and double-couple source
parameters. The last three items are text files for turther
annotation. The sumstaused.txt lists the stations used
for the source inversion, sumswavendk.txt consists of a
single line with three numbers - the number of stations used, the
number of components and the minimum period used in the inversion.
The last file, sumwfilter.txt, lists the gsac
signal preparation commands so that the filter band is known.
When invoked as
fmlpr "USGS/SLU Moment Tensor Solution" "2008 10 14 03 07 28
000 35.76 -100.704 5.0 3.80" "Texas" 11.0
3.65 285 70 -80 sumstaused.txt sumswavendk.txt sumwfilter.txt
with sumstaused.txt containing
IU.ANMO TA.MSTX
US.CBKS US.JCT US.KSU1 US.OGNE US.SDCO
US.WMOK
and sumswavendk.txt contining
8 19 10
and sumwfilter.txt containing
hp c 0.05 n 3
lp c 0.10 n 3
br c 0.12 0.25 n 4 p 2
two files are created: 20081014030728.msg, which is the printer plot, and 20081014030728.ndk, which is the solution information in the Global CMT ndk format (http://www.seismology.harvard.edu/projects/CMT/catalog/allorder.ndk_explained ). The contents of the file 20081014030728.ndk are
ENS 2008/10/14 03:07:28:0 35.76 -100.70 5.0 3.8 0.0 EL SALVADOR
C20081014030728A B: 0 0 0 S: 8 19 10 M: 0 0 0 CMT: 1 TRIHD: 0.2
CENTROID: 0.0 0.0 35.76 0.00 -100.70 0.00 11.0 0.0 FREE S-20090105234025
21 -2.379 0.000 2.526 0.000 -0.147 0.000 2.681 0.000 -0.949 0.000 -0.064 0.000
V10 3.758 24 7 0.000 9 102 -3.758 64 211 3.758 285 70 -80 78 22 -116
redodate
2009 01 01 00 01 02 456 -3660
returns
2008 12 31 23 00 02 456
I require this in order to
specify window segments for traces that I wish to
download. Previously i started at the origin time, but I
needed more signal for inversion, so I would like to start some
offset (a negative number) before the specified origin
time. This code segment indicates how this would be
used in a shell script, where I would like to start 60 seconds
before the origin time:
YEAR=2009
MONTH=01
DAY=01
HOUR=00
MINUTE=01
SECOND=02
MSEC=456
OFFSET=-60
redodate ${YEAR} ${MONTH} ${DAY} ${HOUR} ${MINUTE} ${SECOND} ${MSEC} ${OFFSET} >
tmp
read YEAR MONTH DAY HOUR MINUTE SECOND MSEC < tmp
echo "YEAR :" ${YEAR}
echo "MONTH :" ${MONTH}
echo "DAY :" ${DAY}
echo "HOUR :" ${HOUR}
echo "MINUTE :" ${MINUTE}
echo "SECOND :" ${SECOND}
echo "MSEC :" ${MSEC}
rm -f tmp
Modified two routines in gsac: gsac_rot.c and gsac_rot3.c. Basically I had problems with statements like if( az[0] != az[1] ) and if ( baz[0] != baz[1] ) because of roundoff error. So I repalced this with if(ABS(az[0] - az[1]) > 0.01) and the same for the baz test
Modified plotxvig to permit the use of a -C flag. When this is set, the arrow cursor for display is replaced by a crosshair. The pupose of this is to be able to read axis numbers for a point within a plot.
Modified do_mft to permit the use of a cross-hair cursor. Note that this is not perfectly implemented. The purpose of both of these changes is to be able to compare the dispersion shown in a regular plot to that of the multiple filter analysis when plotting both side-by-side. I was comparing observed dispersion to an independent tomographic estimate.
Modified udelaz so that one can also use -GCARC to get the epicentral distance in degrees and -DIST to get the epicentral distance in kilometers. The previoous -DELDEG and -DELKM still work. This was done to make the command syntax closer to that of gsac.
Modified the CALPLOT graphics programs plotxvig, plot4014, plotnps, plotgif and plotpng to support -X0x_offset and -Y0y_offset flags. These were always part of the reframe command for repositioning a plot. I added this feature for use mostly with plotxvig so that I can display plots that are too high on the page.
Changes #define NCHAR 1000 in VOLVIII/gsac.src/gsac_parse_command.c to #define NCHAR 2000 to permit more file names on the command line. I niticed this when trying to read in a lot of files, but I dod not have this problem with using a wild card.
Corrected the gsac_refr.c (refraction analysis routine) of gsac, so that the refraction velocities are given correctly for a reverse spread, e.g., negative distances which would yield negative slopes and velocities.
Modified refmod96 so that the line width parameter (e.g., command line -W width) applies to the reflected arrivals. For multilayered models, the line width or pattern is a function of the reflection coefficient of the deepest reflecting interface to be able to focus on the important reflection. The reflection times are still the times to the deepest layer, e.g., if the deepest layer boundary is 3, then the rays computed are 1 1, 1 2 2 1 for the first reflection, and 1 1 1 1 and 1 2 2 1 1 2 2 1 for the first multiple; however the mixed multiple 1 2 2 1 1 1 is not computed. A plot showing the refraction and reflection predictions is given in refmod96 examples
Corrected hudson96 so that the SH arrival times are computed and ultimately placed in the file96 and sac file trace headers (May 25, 2008). To properly set the arrival time, the start of the teleseismic attenuation pulse is determined empirically using two FFT's. This must be done using the same DT as for the synthetic because of the frequency dispersion inherent in the causal T* operator (May 28, 2008). Corrected indexing when merging source and receiver structure with teleseism structure. The halfspace was not inserted correctly (May 29, 2008).
Modified evalresp in PROGRAMS.330/IRIS/evalresp-3.2.38.slu to handle FIR stages with a large number of coefficients. Specifically, Change Eric J. Haug SLU May, 2008 to handle continuation for FIRST with a large number of coefficients. Basically we need to get past the tendency of some SEED writers to put the following phase in the RESP file "No Abbreviation Referenced" for Response in units lookup and Response out units lookup. The modified code provides the same output as the current version of the IRIS jevalresp
Corrected error in gsac (gsac_sort.c) which prevented a sort on an integer variable. Also correct a typo so that a sort up ihdr11 works.
Created a new program hudson96 which makes approximate teleseismic synthetics following the work of Hudson(1969). This approach focuses on the direct teleseismic P or S arrival through the use of a stationary phase approximation for the ray parameter connecting the direct arrival from the source to the receiver. The interesting feature of this approach is the use of propagator matrices for the source and reciever crusts, so that the depth pahses are automatically included as well as the details fo the source and receiver crustal models. The program is self contained in that the travel time, T* and geometrical spreading are comptued within the program. A tutorial on the use of the program is on the tutorial page.
Hudson, J. A. (1969). A quantitative evaluation of seismic signals at teleseismic distances - II. Body waves and surface waves from an extended source, Geophys. J. Roy. astr. Soc. 18, 353-370.
The programs time96, timmod86, refmod96, spulse96, and hspec96 were upgraded with the same travel time routine used in hudson96, to now compute the geometrical spreading for teleseismic arrivals.
Added a new flag to hprep96. The -ML length_mul is typically used in increase the length for wavenumber integration,L , estimated using the Bouchon criteria, which is that dk = 2 pi / L . There are circumstances when the default value of L is a little too small, and significant noise signals occur at later time. This option is easieer than trying to guess the correct value of L for the command line override, e.g., -XL xleng
Tested the Earth flattening used in hspec96, tspec96, surf96, joint96, sdisp96, sregn96 and slegn96
Created a new program ttime96
Installed identical travel time routines for TI models in the following programs: ttime96, ttimmod96, tspec96 and hprep96.
The travel time validation is given at the links Isotropic Model Test and Transverse Isotropic Model Test
Fixes errors in tspec96 that affected synthetics with Q. For an isotropic model, the output of tspec96 agrees with that of hspec96
Installed identical travel time routines for isotropic models in the following programs: time96, timmod86, refmod96, spulse96, hspec96. The new routines provide the correct results for flat and spherical velocity models for travel times, ray parameter, T* of the P, S, pP and sP phases. They also correctly handle the artifice of representing the atmosphere by a stack of layers with negative layer thickness so that a depth of 0 corresponds to the surface of the solid.
Modified gsac. Under ppk / plotpk the 'l' or 'L' command returns the epoch time to the right of the amplitude. The purpose of this is to facility estimating time differences from two successive 'L' commands on different parts of the trace
Corrected a memory allocation error in PROGRAMS.330/VOLII/src/do_pom3.c
There were a number of changes made to the wavenumber integration and surface-wave codes to permit a better Earth-flattening transformation to permit the computation of seismigrams for a spherical Earth by using the plane-layered code. These transformations were tested using mineos. A description of the current status of the Earth flattening studies is given at the following link. http://www.eas.slu.edu/TUTORIAL/SPHERICITY
A detailed tutorial on teleseismic
synthetics and source inversion must be prepared.
This update changes the following programs: sdisp96, sregn96
and slegn96 in PROGRAMS.330/VOLIII/src, srfdis96,
srfdrr96 and srfdrl96 in PROGRAMS.330/VOLIV/src,
and hspec96 in PROGRAMS.330/VOLVI/src. Note hspec96
was modified on January 14, 2008 to correctly handle the source
and receiver depth insertion for the flattening. The use fo the
reference depth still needs work to handle atmospheric layers
about the surface.
Upgraded the distributed IRIS programs evalresp from version 3.2.25 to 3.2.38 and rdseed from 4.5 to 4.7.5. In order to support the CPS architectures, e.g., CYGWIN (Windows), MacOS-X, LINUX and Solaris, changes were made to these codes. The changes are given in the links in this section. This upgrade was required in order to continue to use the most recent SEED volumes.
The two programs are installed in PROGRAMS.330/bin with the executable nanames evalresp and rdseed. The IRIS distribution of rdseed provides the executables rdseed.linux, rdseed.ppc-mac, rdseed.intelmac and rdseed.solaris. These binaries are available in the PROGRAMS.330/IRIS/rdseed4.7.5 directory of CPS. If you wish to use these programs, you must install them in your system and adjust the path to find them.
evalresp - The
distributed code has an #include <malloc.h>. This is
deprecated in MacOS-X to <malloc/malloc.h> which
means that the code will not compile. Since modern
compilers provide the prototypes for malloc in
<stdlib.h>. I changed alloc_fctns.c, parse_fctns.c,
regexp.c and string_fctns.c by commenting out the #include
<malloc.h> and ensuring the presence of a #include
<stdlib.h>.
Detailed changes.
NOTE THAT evalresp-3.2.40 will configure properly for the MacOS. When this is officially released, it will be included in CPS!
rdseed - Several changes were made.
The most important was to change the use of long in the definition of the integer SAC header values to int. Becore computers were truly 32 bit, short meant a 2 byte integer, long a 4 byte integer, and int could mean a byte integer. Currently, int means 4 bytes. A problem arises on 64 bit machines, for which a long means an 8 byte integer. One way around this is to use the -m32 flag on the compiler. CPS changes the long to int.
Another change relates to the strupr routine. This is actually provided by some libraries. Thus all instances of strupr are changed to Strupr and a definition is placed in Include/rdseed.h
Utilities/alloc_linklist_element.c - add #include <stdlib.h> to define malloc()
Ah/makefile - remove CC=gcc since not all compilers use gcc - note that CC is defined in the main Makefile
Decoders/makefile - remove CC=gcc since not all compilers use gcc
Parsers/makefile - remove CC=gcc since not all compilers use gcc
Utilities/log_errors.c - change the syntax of stderr_to_file from stderr_to_file(char *fmt, char*ap) to void stderr_to_file(char *fmt, va_list ap) for comparibility with <stdio.h>
Main/output_sac.c -
Place comments into the pole-zero file giving
information about the station, network, date, etc.
(Sample SAC pole-zero
file)
Main/output_resp.c -
Send information about the network to stderr, e.g.,
station, network, component, location, on_date,
off_date, latitude, longitude, elevation, response
file name, component azimuth and dip and sample rate
in print_resp.
(Sample stderr output)
Updated the manual entry in Main/rdseed.1 to
make the command line flags more complete on the first
page. The pdf version of this document is in PROGRAMS.330/DOC/IRIS.pdf
where you will find evalresp.pdf, rdseed.pdf
and SEEDManual_V2.4.pdf.
Detailed changes
The modified rdseed was successfully compiled
on both 32 and 64 bit Intel LINUX machines using the
GNU compilers, on a SPARC Solaris machine using SUN
compilers, on an Intel Windows machine under the
CYGWIN environment, and under MacOX-X using the GNU
compilers. The only compiler warnings were the
following:
cc -I../Include -c -g -c -o decode_steim.o decode_steim.c
decode_steim.c: In function `decode_steim':
decode_steim.c:231: warning: integer overflow in expression
decode_steim.c:231: warning: integer overflow in expression
for all compiles, and
cc -I../Include -c -g -c -o parse_30.o parse_30.c
parse_30.c: In function `parse_type30':
parse_30.c:96: warning: cast to pointer from integer of different size
on just the 64-bit LINUX compiler (note that the -w32 compiler flag was not used).
Modified the code of wvfmch96 so that there is no internal limit on the number of waveforms for which forward synthetics are required. In the present distribution, the maximum number of waveforms permitted for use by wvfmch96, wvfgrd96, wvfmt96 and wvfmtd96 is 2000, with each trace permitted to consist of 4096 points. Because wvfmch96 creates a forward synthetic for a given moment tensor description, this program can be used as part of a QC process to evaluate all recorded waveforms in a data center. Since there can easily be more than 2000 such waveforms today, hard dimension limits are a major inconvenience. The logic of wvfmch96 was modified so that the forward synthetic is created separately for each input file, rather than reading in all files and corresponding Green's functions into memory.
Hacked a fix for the distance computation used in gsac (gsac_subs.c) and udelaz. The problem was that if the event - station latitude/longitude pair differed in coordinates by 0.0001 degree or less, then the computed distance in kilometers was incorrect because of roundoff error of the angles used for the elliptic integrals. The artifice used for distances less than 1.0 km, is to use the spherical relation delkm = 6371.003 * delradian for the short distances.
Error in the DIF routine found by Harley Benz in gsac_dif.c. The erros was that the first point was incorrectly defined.
October 04, 2007
Modified sacmft96 and sacpom96 to take ABS(DIST) where DIST is from the SAC header. This is because I sometimes require negative distances when using shallow refraction data. For a split spread, the gsac refr command will display the split spread. The refl command will also work now. The only bad thing is that the refraction velocities may now appear to be negative. These changes were made as part of an effort to develop a procedure for determining shallow S-wave velocity structure.
A problem with the distance/azimuth computations in gsac was noticed in the process of computing epicentral distances less than 1 km. This problem will also affect udelaz. This is currently under investigation.
gsac - implemented two new commands in prs (plotrecordsection): ScaleRelative (SR) and ScaleAbsolute power (SA Power) to control the amplitude of the traces in the record section. ScaleRelative is the old behavior which just scales each trace to the same maximum amplitude (AMP value), except that the scaling now applies only to the actual trace window and not the whole trace. ScaleAbsolute 0.0 adjusts all traces to plot true amplitude. If the non-time axis is distance, then ScaleAbsolute 1.0 adjusts for geometrical spreading by multiplying all traces by distpower . For a true refracted arrival (e.g., with no velocity gradients), power=1.5 would show the refractions at the same level. The current gsac version is now[V1.1.21 30 AUG 2007]
wvfgrd96 is now modified so that the output traces, e.g., TRACE.obs and TRACE.pre have the time shift applied. This means that if pltsac is used with the flag -USER9 the time shift will be displayed even though the traces align. The objective here is to present the observed and predicted in such a way to focus on amplitude and phase differences and not time shifts.
gsac - modified the write command to support 'append suffix' and 'prepend prefix'. To illustrate the differences between sac2000, we will work in a subdirectory with the files located in the level above:
|
> sac2000 |
GSAC - Computer Programs in Seismology [V1.1.19 01 AUG
2007] |
gsac modified to permit the use of the SAC commands plot1 (p1) and plot2 (p2) to force multi-trace plot (which is the default of the gsac plot ) and overlay (respectively). Note that the SAC plot shows a single trace at a time. This is inconvenient for normal use and gsac will reserve the plot (p) for a multitrace view.
Initial development of new source model for surface-wave and waveform inversion - the crack. Following Nakano, M., and H. Kumagi (2005). Waveform inversion of volcano-seismic signals assuming possible source geometries, Geophys. Res. Letters 32, L12302, doi:10.1029/2005GL022666, a new command line option -CRACK is permitted for the programs srfgrd96, sdprad96, sdpspc96 and wvfmch96. The crack is specified in terms of the parameters -DIP dip -STK -RAKE rake -MW mw or -M0 mo where dip is the dip of the crack, stk is the dip-direction of the crack (dips down to the right when looking in the direction of strike). The rake is used to indicate an expanding crack (positive) or closing crack (negative). The moment magnitude or moment are positive numbers.
At present the program fmplot is not modified, nor is the output of sdprad96 to indicate that the crack model was used instead of the earthquake double couple.
The reason for this introduction of a new source was to study the Utah mine collapse of 2007 08 06 08 48 40!
gsac - corrected map command so that it now correctly
handles the station off and epicenter off
commands. Previously the epicenters were always plotted.
gsac is at version V1.1.19 01 AUG 2007
gsac - corrected error in the remove trend rtr command. Roundoff error messed up the determination of the regression equation a + bx . Previously x was the time index, e.g., i=0, i < npts. For long time seeries this let to large errors in the determinant. I replaced this by defining x as i/npts with varies between 0 and 1 for the time series.
gsac- implemented a new option to ppk (plotpk), e.g.,
ppk pq or ppk pquality
This is functionally similar to the previously introduced 'ppk quality' except that the purpose is to simultaneously define a useful trace and to reset the P-time. For my source inversion, I set the theoretical P-time using the AK135 predicted times. This is OK for source inversion since the inversion code permits a simple waveform time shift. However for broadband depth or energy determination, it is necessary to start at the P time. To speed up the review, I added this new option. So now move the crosshair to the P-wave first arrival, and then click any mouse button. Simultaneously the P-arrival time is reset and the trace is marked as one to be used (IHDR20 is set to +1).
saciterd - repaired an error with the use of the -2 flag. This was not done correctly in the earlier code. A change was made in late 2006 - early 2007 on line 490. This was not correctly done. This was repaired today. Running the code with the tutorial data set yields the same figures as in the tutorial. Matt Sibol of Multi max.com noted the discrepancy.
saclhdr - modified the format statement for printing reals from %f to %g so that a band amplitude because of dividing by zero gives +1e+38 and -1e38 for DEPMAX and DEPMIN
gsac - Added an option to ppk (plotpk), e.g.,
ppk q
For source inversion, one must examine many traces to decide
which to use since the inversion results are strongly
influenced by bad data. For teleseismic and regional
data, one may review hundreds of traces. So gsac was
modified to permit a rapid assessment of the trace quality.
The assessment is placed in the integer header value IHDR20
(gsac notation) and a subsequent shell script examines the
value there to decide if the trace should be moved to the
final directory for source inversion.
The purpose is to use the plotpk display to quickly
define whether to use a trace for a source inversion.
For teleseismic inversion one must examine the quality of the
P-wave arrivals, so one reads the traces, bandpasses, sorts
with distance, applies a suitable xlim and executes the
command
GSAC> ppk relative perplot 4
q
The result is the image

The default behavior is that a mouse click says accept - of course one can use the 'a' key to accept and the 'r' key to reject. The default behavior of the mouse click can be changed using the menu at the bottom. When a trace is accepted or rejected, a red '+' or a blue 'X' is drawn at the lower left corner of the trace. The effect of these operations is to set the integer header position 20, which I call IHDR20 to +1 for accept and 0 for reject. The default value of this header field is -12345 This changes added about 300 lines of trivial code to gsac_plotpk.c. (In the image above, the P times are from the velocity model. The slight offset is no problem for the inversion since the inversion programs implement a time shift). This process of performing QC for P, SH and SV is shown the shell script IDOQC
The value of this approach to assess trace quality was immediately apparent by the resulting improved source inversions. The current version of gsac is V1.1.18 31 MAR 2007
time96 - corrected the on-line help to reflect the -P -SV and -SH flags
wvfmch96, wvfmtd96, wvfmt96 and wvfgrd96 - added error checking on the input files - reject a data set if the number of sample points is <= 4 or if DEPMAX=DEPMIN, which indicates a faulty data set. Current version of wvfmtd96 and wvfmt96 were modified to use both the external a priori and internal variance weighting schemes.
time96 – now supports the -P -SV and -SH flags to give first arrival time and corresponding ray parameter for the first arrival. Previously only supported P-wave. Why? I wanted to automate source inversion by having this program define first arrival times rather than interactively reading them. This is possible because I already know the location. The section of the shell script that does this is
for i in *sac
do
GCARC=`saclhdr -GCARC $i`
EVDP=`saclhdr -EVDP $i`
A=`time96 -M ${MODEL} -GCARC ${GCARC} -T -EVDP ${EVDP}`
T0=`time96 -M ${MODEL} -GCARC ${GCARC} -T -EVDP ${EVDP} -SV`
echo ${GCARC} ${EVDP} ${A} ${T0}
gsac << EOF
rh $i
synchronize O
ch A ${A} T0 ${T0} T1 ${T0}
wh
quit
EOF
done
The 'synchronize O' is used to reset the time stamp so that 'O' , the offset of the origin time with respect to the reference time, is zero. In this case then the 'A' will be the travel time of the P first arrival.
The fft command of gsac was augmented to permit the syntax fft length 1 or fft length 2 or fft length 4 which adds additional zeros to increase the frequency domain resolution. gsac is now at version V1.1.17 22 Feb 2007
The computation of epicentral distance in kilometers was changed in gsac, udelaz and edabac. Prior to this it was estimated from the great circle arc, thus assuming a spherical Earth. It is now computed numerically by direct evaluation of an incomplete elliptic integral of the second kind. Sac uses Rudoe's reverse formula (Geodesy, G. Bomford, Carlendon Press, 4th ed, 1980, Section 2.15(b), page 121. Rather than getting confused about inverse tangents, the idea of Rudoe was used, e.g., the plane through the center of the Earth, the station and epicenter intersects the spheroid as an ellipse, and the linear distance is computed along the ellipse. However, this derivation uses vector analysis more that it does trigonometric relations. The computation of the SAC header value dist agrees with the values of sac2000 (based on a comparison of 19554 different combinations of EVLA, EVLO, STLA and STLO.
Output formats of sacmft96 were changed to avoid format overflow (***** in FORTRAN) when AZ, BAZ and GCARC had the undefined values of -12345.
January 24, 2007
timmod96 has two new out options:
timmod96 -TIMEP pfile
timmod96 -TIMES sfile
where pfile or sfile are ASCII files with a one distance – time pair per line, e.g.,
124.454140 20.464310
238.482346 35.048897
145.274033 24.015045
350.404083 48.721909
which can be created from the DIST and A (for P) sac header values through a loop
for i in *Z
do
saclhdr -NL -DIST -A >> ptime
done
This option permits plotting measured first arrivals on the same plot as the model predicted values
gsac – the merge command now has the command line option GAP gap_value. Before this change, a merge of SAC files having gaps resulted in a zero fill of the gaps. Now the user value is inserted. This may permit a user program to detect the gap. For example if the SAC trace consists of integers from the ray 24 bit digitizer, the expected extreme values are ±8388608. A “MERGE GAP 1.0e+9” would fill the trace with an impossible number which can then be flagged.
gsac – new command outcsv This command causes all traces in memory to be output in ASCII as comma separated variables (CSV) in the file name f001.csv. Each row of output consists of the values at one time sample with entries “Time,amp_trace_1,amp_trace2 ...” The reason for this command was to create a simple output format that could be read by Excel or OpenOffice spreadsheet programs so that students can perform simple time series analysis and plots. Note that OpenOffice does not permit more than 65536 to be read in
Modifications to gsac: Introduced new commands grid, xgrid, ygrid, background. The grid options permit setting a grid on plots and also too define the color and type of the grid lines. The background command permits setting a background color in the plotting frames.
GSAC>
GSAC - Computer Programs in Seismology [V1.1.15 17 JAN 2007]
Copyright 2004, 2005,
2006, 2007 R. B. Herrmann
Also corrected appearance of the help screen and got the grids to work on the plotsp command. My excuse is that I only had battery power in a house without electricity for two days because of the ices storm
Fixed fmech96, which did not set the back azimuth correctly. Now one can create Z R T and Z N E three-component synthetics using fmech96, convert them to SAC format using f96tosac and used gsac to read in the Z N E to make the Z R T and everything agrees.
Correct error in surf96, joint96. Love only dispersion data were not processed correctly. The minor change was in surf96.f and joint96.f
Changed all dimensions for layering to now have 200 layers instead of 100. Note this does not apply to the Cerveny programs cprep96, cpulse96, cseis96.
changed time96 so that it now can output the ray parameter. This gets around the problem of using udtdd which is an implementation of the Jeffreys-Bullen curves. There is now a consistency between the model96 synthetics and the travel time prediction. time96 is used to predict ray parameter and first arrival for teleseismic P-wave synthetics. See the tutorial.
Reformatted help entries in gsac to be easier to read.
Implemented new commands in gsac: version, triangle, boxcar, trapezoid. version lists the version number. triangle, boxcar and trapezoid are time domain filters that convolve the traces in memory with an isosceles triangle defined by its halfwidth, a boxcar defined by its width, and a trapezoid defined by the length of its three segments. All of these pulses are designed to have unit area and function as a lowpass filter. There is some granularity in the implementation that means that the sequence of commands
triangle width 1.0
is not the
same as two commands
boxcar width 1.0
boxcar width 1.0
even though
this should be true by virtue of the convolution theorem.
Changed SUBS/f96subf.f and recompiled everything using file96 format because of incorrect format for writes. This now fully implements the change of December 12, 2006.
Changed VOLIII/src/spulse96.f VOLV/src/genray96.f VOLVI/src/hpulse96.f VOLIX/src/cpulse96.f to set the file96 header values for evlat evlon stlat and stlon to -12345 in order to set up the ultimate SAC header correctly.
sdpdsp96: Corrected error in test of xmin/xmax/ymin/ymax that precluded a plot
Changed map.sh created by gsac map command to remove references to RESIN which is already set by the GMTXXX/share/dbase/grdraster.info. The latest version of gsac is [V1.1.12 19 OCT 2006]
fixed obtuse error in sregn96 slegn96 sdisp96 for an all fluid velocity model. this did not affect solid or fluid/solid model computations. Also fixed the depth axis notation for sdpder96.:
Fixed allocation error in do_mft3.c of do_mft
gsac Version 1.1.11 – Commands ignore a leading #. Also the pole-zero and frequency-amplitude-phase files ignore leading blanks. Finally the ABS macro in gsac.h was correctly written, meaning that the x -x works properly in plotpk whether the first x is the earliest or the latest time. The ignore leading blanks in the response files was required to overcome some laxness in some pole-zero files. Finally the ignore # serves the same purpose as in the sh or bash shells – e.g., to have an inline comment. This means that gsac commands in a shell script can now have comments. For example, we can now
#!/bin/sh
#####
# generate a pulse and low pass filter it
#####
gsac << EOF
#####
# generate a pulse
#####
fg triangle delta 0.05 npts 1024
#####
# lowpass at 1 Hz
#####
lp c 1 n 2
#####
# save as the file LP.sac
#####
w LP .sac # a comment can be placed here too
quit
EOF
Modified the CALPLOT routines plotnps and plotdbg to work in a 64-bit environment by removing and reference to the old MS-DOS. The problem was that negative numbers were incorrectly written with the "%ld" format specification. These were replaced globally by "%d".
Corrected a major error in the first arrival computations in gsac in the interpolation routine. This was caused by a time series with more than 10,000,000 and involved floating point roundoff problems in the time array used for interpolation.
Began adapting codes to the gcc/gfortran (4.2) compiler suite. For the most part this just required adhering to the strict 72 character line for the FORTRAN 77 standard.
The gfortran 4.2 uses buffered IO, thus overcoming slow IO of the gfortran 4.0 suite
The new makefiles force a 4 byte header for the unformatted sequential IO instead of the default 8 byte.
Corrected a major error in the first arrival computations in time96, timmod96, refmod96, hprep96, hspec96, tspec96, spulse96. Faulty logic gave too early an arrival time if the first arrival was the direct wave. This was fixed by computing the distance at which the critical ray appears; if this is greater than the desired distance, then use the direct arrival time. In addition we found that one of the refraction times was not comptued correctly which velocity decreases with depth. The error means that the pole-zero option was not correctly implemented. (Thanks to C. J. Ammon).
Correct a major error in the transfer command in gsac_trans.c in gsac. The error means that the pole-zero option was not correctly implemented. (Thanks to C. J. Ammon).
Added map command to gsac. This command creates a well commented GMT script that plots stations, epicenters, raypaths and topography. The shell script can be easily edited to change the default plotting parameters.
Corrected login in gsac_in.c for interpolation. The existing routine lost points.
Added decimation command to gsac
April 26, 2006
Corrected gsac_lh.c and gsac_ch.c to properly handle the IEVREG header variable. sac2000 actually has internal list of the Flinn-Engdahl regions that print out a nice string for the integer variable. gsac now just outputs the integer value of this field.
prfmod96 is available. This was written to display regional velocity models from the joint inversion of receiver functions and surface waves in Korea. The user defines a profile in terms of the latitude and longitude at the ends of the profile. The coordinates of each model (station) and station model file are read in. This program plots a contoured velocity map from stations within +-W of the profile. The contours are labeled. The use has control over the contour intervals and the labeling intervals.
Major changes to the VOLVII waveform inversion programs. wvfmtd96 and wvfmt96 are now multi-pass programs that perform and inversion, determine an alignment time shift and weighting, and then perform final inversion. The logic of the code follows that developed by Harley Benz at USGS for teleseismic inversion. As part of the code modifications, wvfgrd96 and wvfmch96 were also modified.
Error in gsac/ gsac_prs.c that tried to flush X11 when in plot mode and not X11 mode. This caused the program to crash. Also prs relative works. I noticed this when I wants to plot observed versus predicted teleseismic P-wave traces, windowed about the P arrival as a function of distance. This was done to support the newly modified wvfmtd96 which permits time shifting
Fixed major error in PROGRAMS.330/CALPLOT/src/XVIG/src/window.c The execl( ...,init_height, 0) was WRONG!. It should have been execl(...,init_height, NULL) where NUL is a (char *)0. This error appeared using a 64 bit LINUX. Thanks to Domenico Di Giacomo, INGV - Istituto Nazionale di Geofisica e Vulcanologia, Sezione di Milano.
Added a backup or return to previous display option to the plot command of gsac. This is useful when previewing many traces using the perplot option to skip back to re-examing missed features.
Changed internal routines to prevent a mis-setting of USER1 and USER2. USER1 and USER2 are set to be the minimum and maximum periods of the filtered trace. When picking P- and S-arrival times, one may wish to filter the trace with a zero-phase bandpass filter to see the arrival. The pick is then saved using the wh command. Until this fix the USER1 and USER2 were also set. Then then led to an inconsistency that the header information would not reflect the trace content. Now the minimum and maximum periods are preserved, but only written out when the w command rewrites the trace. This fix was introduced in the source code for all bandpass filters, the transfer and whiten commands.
Began adapting codes to the gcc/gfortran (4.0) compiler suite. For the most part this just required adhereing to the strict 72 character line for the FORTRAN 77 standard. There are still problems with the surf96/rftn96/joint96 suites
Introduced an O or o option to gsac to permit synchronize to set the reference time as the origin time.
Corrected the PDF documentation for the synthetic seismogram overview in PROGRAMS.330/DOC/OVERVIEW.pdf/cps330.pdf. This error was introduced in June, 2005 with the introduction of the new commands time96 and refmod96. Sorry
Extended gsac to have a GUI based refraction/reflection analysis tool with the refr command
This required modifications to the CALPLOT library by introducing a gcontrol command and hyperbolic cursor.
fixed but in gsac interal time routine to correctly set milliseconds for epoch to human time
Modified gsac transfer routine to handle GSE frequency-amplitude-phase FAP response file.
Fixed cut option in gsac so that cut CAL YEAR MONTH DAY HOUR MINUTE SECOND MILLISECOND works correctly.
time96 created to predict P first arrival times for flat and spherical earth velocity models. This is used to define the starting time window for teleseismic synthetics to avoid unnecessary white space before the first arrival. The use of this program in a shell script to compute the teleseismic P-wave signal but to apply a phase-velocity filter to focus on teleseismic P for speed
for GCARC in \
20 21 22 23 24 25 26 27 28 29 \
30 31 32 33 34 35 36 37 38 39 \
40 41 42 43 44 45 46 47 48 49 \
50 51 52 53 54 55 56 57 58 59 \
60 61 62 63 64 65 66 67 68 69 \
70 71 72 73 74 75 76 77 78 79 \
80 81 82 83 84 85 86 87 88 89 \
90 91 92 93 94 95 96 97 98 99 \
100 101 102 103 104 105
do
#####
# convert epicentral distance in degrees to kilometers
# for the Earth
#####
dist=`echo ${GCARC} | awk '{print 111.195*$1}' `
#####
# for this distance and source depth get the ray parameter
# and define the phase velocity limits
#####
RAYP=`udtdd -EVDP ${HS} -GCARC ${GCARC}`
CVAL=`echo ${RAYP} | awk '{print 1.0/$1}' `
CMAX=`echo ${RAYP} | awk '{print 4.0/$1}' `
C1=`echo ${RAYP} | awk '{print 3.2/$1}' `
C2=`echo ${RAYP} | awk '{print 0.49/$1}' `
CMIN=`echo ${RAYP} | awk '{print 0.46/$1}' `
#####
# get P travel time == arrival time
Fixed major error in PROGRAMS.330/CALPLOT/src/XVIG/src/window.c The execl( ...,init_height, 0) was WRONG!. It should have been execl(...,init_height, NULL) where NUL is a (char *)0. This error appeared using a 64 bit LINUX. Thanks to Domenico Di Giacomo, INGV - Istituto Nazionale di Geofisica e Vulcanologia, Sezione di Milano.
#####
A=`time96 -M AK135sph.mod -GCARC ${GCARC} -T -EVDP ${HS}`
T0=`echo $A | awk '{printf "%f", $1 - 100}' `
cat > dfile << EOF
${dist} 1.0 1024 ${T0} 0.0
EOF
hprep96 -M AK135sph.mod -HS ${HS} -HR 0.0 -EQEX -TF -BH -d dfile \
-CMAX ${CMAX} -C1 ${C1} -C2 ${C2} -CMIN ${CMIN} \
-NDEC 1
hspec96 -H
hpulse96 -p -V -l 1 >> file96v
hpulse96 -p -D -l 1 >> file96d
Modified sacmft96 and do_mft to create a temporary file called MFT96.disp instead of MFT96.DSP to avoid problems when using a caseless file system, e.g., Cygwin under Windows
Modified sacmft96 so that color contouring ande the spectral amplitude plots reflect the envelope amplitudes within in the chosen group velocity window. Prior to this, colors and amplitudes were set by the amplitudes of the entire filtered trace.
Fixed typos in gsac which had Pp instead of pP in the Teleseismic phase menu for plotpk. Also ensured that the reset in prs actually reset all parameters
hspec96 now has an earth flattening routine for spherical earth models. Note hprep96 and tspec96 must be upgraded to handle a spherical model.
Implemented B option to plotpk command of gsac to permit moving back in a multipage display. (requested by Risheng Chu of SLU)
Implemented fileid command of gsac to permit trace labeling. The syntax was extended to permit placement at upper (UC) and lower (LC) center of each plot. (Requested by Luis Rivera and Jeroen Ritsema)
February 11, 2005
Added boxcar to gsac funcgen command - PROGRAMS.330/XOLVIII/gsac.src/gsac_fg.c
Added debug statements to gsac transfer command to catch types in response input - PROGRAMS.330/XOLVIII/gsac.src/gsac_trans.c
Modified PROGRAMS.330/CALPLOT/src/cmd/plotxvig.c to introduce a new window behavior. If the window is resized before an erase, the next frame will then use the window. This means that a non-default window size does nto ahve to be changed. The gframe calplot command has been changed to perform an automatic erase but to prohibit a resize.
Corrected gsac xlim commmand to correctly handle GMT and CAL arguments and to forbid xlim o -10 o 10 if o is not set withing the header
Modified PROGRAMS.330/CALPLOT/src/XVIG/src/xvig.c to unlock the keyboard for the terminal window. Successful, except that the first character is lost because of the event catching mechanism. More low level X11 work must be done. On Solaris with the CDE window manager, the trace window can only be moved use the Move under the menu option and not by dragging the window - I will not worry about this in the future
Modified VOLIII/src/spulse96.f VOLVI/src/hpulse96.f VOLIX/src/cpulse96.f VOLV/src/gpulse96.f to add a -Z flag to indicate that the internal parabolic or triangular pulses are to be zero phase - this is required if we attempt to model the interstation Green's functions obtained by cross-correlation of background noise, otherwise there will be a delay causing a mismatch of synthetic and observed responses. This also necessitated a change in the documentation DOC/OVERVIEW.pdf/cps330o.pdf
SUBS/SUBS
sacsubc.c, sacsubc.h, sacsubf.c Added brsach and arsach only header information. Previously brsac was used with the overhead of reading all the data. This fixed a problem in saclhdr with very large files
grphsubc.c fixed logic in clipping routine (baker@usgs.gov)
VOLI/src
stereo.f new program to plot stereonets
VOLIII/src
sio.f corrected minor typos
sdprad96.f corrected minor typos
srfgrd96.f corrected minor typos
sdpspc96.f corrected minor typos
VOLV/src
genray96.f subroutine chkdep, hm1 not defined changed to dm1, baker@usgs.gov
gpulse96.f LER not defined in subroutine source - baker@usgs.gov
ttimmod96.f subroutine fstarr - vlmm undefined - changed to vlmn, baker@usgs.gov
fmdfit.f extra long lines split
fmplot changed default so that no nodal planes are plotted unless requested by strike,. dip, rake, force or moment tensor flags. In this simnple mode the command fmplot -F fmplot.tmp will just plot first motion data. It is then is then up to the analyst to use the stereonet producted by stereo to determine the nodal planes and then to rerun fmplot for the final plot
VOLVI/src
tspec96.f vlmm not defined in subroutine fstarr relace with vlmn, baker@usgs.gov
hprep96.f vlmm not defined in subroutine fstarr relace with vlmn, baker@usgs.gov
VOLVII/src
mtd.f slip not defined in subroutine trans1, baker@usgs.gov
VOLVIII/src
saclhdr.c use brsach instead of brsac - do not need data but want header of potentially large trace file
saciterd.f nbumps undefined in subroutine tdomain, changed to nshift. tshift undefined in subroutine tdomain changed the theshift, baker@usgs.gov
elocate.f emares not
defined in subroutine sumup - now set to -9.99
-VELMOD flag cretes the file VEL.MOD. It no longer loists
the sample velocity model fileN
sacfilt.f LER not defined in subroutine gcmdln baker@usgs.gov
sacdecon.f thshift undefined in main routine - change dto the shift baker@usgs.gov
VOLVIII/gsac.src
Many changes
Improvements:
plot, plotpk - low level plot routines changed to let qdp decimation be controlled by screen resolution
plot, plotpk - low level plot routines changed to reduce number of non-drawing penup moves
prs (plotrecordsection) - low level plot routines changed to reduce number of non-drawing penup moves
cut, xlim - now also take GMT 2004 002 01 02 03 445 and CAL 2004 01 02 01 02 03 455 to define the time window
GNU readline implemented - the user may use the 4 arrow keys to move around the command line and to view history of commands
New commands
reverse - reverse a time series
correlate - cross-correlate time series
sign - one bit sgn() operator
stack - stack traces in memory
whiten - force flat amplitude spectrum
markt - put up velocity tics at 1, 2, 3, 4, 5, 6, 7 and 8 km/sec (note that these values are pre-assigned. The user specification is not yet implemented)
taper - trace taper implemented
DOC/GSAC.pdf/cps330g.pdf
Documentation was modified to reflect new gsac commands, change to elocate, and description of fmplot (duplicated in the DOC/SOURCE.pdf/cps330s.pdf manual) and stereo
add convolve to gsac
test, test, test
document, document, document
Last changed 11 July 2011