Friday, August 1, 2008

Rayleigh Wave Dispersion Code chenray.f

click title to see Google Drive directory JParkCodes

This a a computer code that performs the 1D layered-media reflectivity method to compute Rayleigh-wave dispersion. Was an exercise for me when adapting the computational scheme of the GJI paper by Xiaofei Chen (1993) for layered anisotropic media. Uses model files in the same format used by the anisotropic surface-wave code aniprop.f and the anisotropic body-wave codes anirec.f and related. The read statements read the anisotropic parameters into dummy variables and ignore them. The code only plots dispersion curves for phase velocity CVEL, but does not compute GVEL, the group velocity. The values of CVEL are *not* written out for later use. You can modify the code yourself to write out cvel values.

c chenray - to calculate propagating Rayleigh modes of layered structure
c revised to calculate dispersion curves 7/7/95, debugged 7/27/08
c 9/2/94 - cannibalized from aniprop to test its structure
c xf77 -o /home/jjpark/bin/chenray chenray.f /home/jjpark/Plotxy/plotlib.a /home/jjpark/Ritz/jlib.a
c xf77 -o /Users/jjpark/bin/chenray chenray.f /Users/jjpark/Plotxy/plotlib.a /Users/jjpark/Ritz/jlib.a
c
c will calculate Rayleigh wave dispersion & eigenfunctions using formulas
c of Chen (1993)
c max is 100 layers over a halfspace
c model is read from file 'model'
c reads nl=#_of_layers, then depth_i,rho_i,alpha_i,beta_i, i=1,nl+1
c ee, e1 and e2 are 4x4 matrices that get partitioned into 2x2 submatricies to
c separate out the reflection and transmission of waves at an interface.
c
c rt(j) is generalized reflection coef \tilde{R}_du at jth interface
c tt(j) is generalized transmission coef \tilde{T}_d at jth interface
c rt0 is gnrlzd refl coef \tilde{R}_ud^(0) at free surface (0th interface)
c rtm(*,*,j) is matrix of modified R/T coefs at the jth interface
c rtm0(2,2) is matrix of modified R/T coefs at free surface - 0th interface
c
c OUTPUT: makes plots of dispersion, but does not write phase velocity (cvel) to a file
c or compute the group velocity (gvel). The code has not worked in 1994, and I chose to
c push on to the general anisotropic surface wave code aniprop.f, rather than to debug this
c Rayleigh-wave code. This code was revived and debugged in 2008(!) by JPark
c

4 comments:

burgos said...

Hi, I'm looking for rough dispersion code for a montecarlo inversion in my own research.
So I'm trying yours but I have a compilation problem, what is the "csolve" routine ?..
Can you put it in the site.
Thanks

Fearless Leader said...

yes, the code is uploaded and posted on 29th October 2009

Anonymous said...

hi ,i woould like to get the code for Rayleigh model,to plot graph & to estimate latent error rate the model

Pankaj K Mishra said...

I tried to compile it in GNU fortran..but...where are other subroutines.
pankaj@Pankaj:~$ gfortran test.f
test.f:143.13:

do sl=eps,smax,ds
1
Warning: Deleted feature: Loop variable at (1) must be integer
test.f:143.16:

do sl=eps,smax,ds
1
Warning: Deleted feature: Start expression in DO loop at (1) must be integer
test.f:143.20:

do sl=eps,smax,ds
1
Warning: Deleted feature: End expression in DO loop at (1) must be integer
test.f:143.25:

do sl=eps,smax,ds
1
Warning: Deleted feature: Step expression in DO loop at (1) must be integer
/tmp/ccdW5iUP.o: In function `zzget_':
test.f:(.text+0x225e): undefined reference to `csolve_'
test.f:(.text+0x2978): undefined reference to `csolve_'
test.f:(.text+0x34d2): undefined reference to `csolve_'
/tmp/ccdW5iUP.o: In function `MAIN__':
test.f:(.text+0x5332): undefined reference to `plotit_axes_'
test.f:(.text+0x54db): undefined reference to `plotit_'
test.f:(.text+0x5588): undefined reference to `plotit_axes_'
test.f:(.text+0x56a3): undefined reference to `plotit_'
collect2: ld returned 1 exit status
pankaj@Pankaj:~$

 
Link