c program recfunk
c 9/26/00 JJP
c multitaper program to invert for receiver functions
c SINGLE STATION WITH SPECTRAL WEIGHTING
c "Multiple Taper Correlation" (MTC) Receiver functions are described in
c
c Park, J., and V. Levin, Receiver functions from multiple-taper spectral
c correlation estimates, Bull. Seismo. Soc Amer., in press 2000.
c PREPRINT: http://www.geology.yale.edu/~jjpark/recfunk.pdf
c
c spectral estimates of pre-event noise
c weight the inversion in the frequency domain, thereby avoiding the
c usual problem with microseism noise in 0.1-0.5 Hz
c
c the main advantage of MTC is not the noise damping, however -- the
c cross-correlation of the horizontal and vertical components is used
c in place of spectral division when estimating the RF.
c this approach appears to be more stable and gives RF-uncertainties
c in the frequency domain that are useful for stacking.
c
c this version of the RF code reads a file of data filenames and time intervals
c the data must be SAC format with horizontals rotated to radial & transverse
c the file is "in_recfunk" and has lines of the form:
c
c 1997.070.19.33.bh? <-- code replaces ? with r,t,z
c 57 52 <-- start time of analysis window, window duration (sec)
c 1997.076.08.15.bh?
c 62 62
c ...
c ...
c ...
c stop <-- tells code that data is finished, 599 events max
c
c code does NOT combine data with different sample rates
c data files limited to 15K pnts. To increase, see common block /datastuff/
c
c many intermediate quantities are plotted with PLOTIT as the code proceeds.
c other intermediate quantities can be plotted by uncommenting calls to PLOTIT
c
c the program computes RFs in the Freq domain for multiple records
c then it computes composite RFs that are dependent on either
c Back-azimuth or epicentral distance. The standard bin width is 10 degrees
c with stacked RFs computed every 5 degrees. You can change this in the code.
c RF are not migrated in this process, so the user is prompted for parameters
c that narrow the focus of the stacks
c e.g. a BAZ-sector over which to compute an epicentral RF profile.
c
c the PLOTIT graphs of RF sweeps can be improved upon, natch
c the code writes the BAZ- and EPICEN-dependent RFs to files
c in a format easily digested by GMT (traces are separated by ">" lines)
c
c filenames: out[rt]_baz.grid out[rt]_epi.grid
c
c these files are overwritten everytime you run the program
c so rename them to save them
c
c to compile recfunk:
c
c xf77 -o recfunk recfunk.f plotlib
c
c The "-fast -native" option will generate a faster executable. Note that
c
c alias xf77 'f77 -I${OPENWINHOME}/include -L${OPENWINHOME}/lib -lxview -lolgx -lX11'
c
c plotlib is PLOTIT plotting package, used to plot results thruout the code
c PLOTIT resides at love.geology.yale.edu FTP site at pub/park/Plotxy
c
c EISPACK routines TINVIT and TRIDIB compute Slepian tapers for spectrum analysis
c