Ellipticity calculation with the fortran interface

All geopsy forums are in their very early stage. So a restricted number of forums has been created. If your question does not fit into one of the available categories, post here.
Post Reply
Posts: 1
Joined: Thu Aug 05, 2021 3:58 am

Ellipticity calculation with the fortran interface

Post by pejmansh »

Dear Marc,
When I am using Fortran interface for the Rayleigh wave dispersion curves, I get the same results as using gpdc on the command line. However, using the Fortran interface for the ellipticity, I obtaing zero values for some frequencies while using gpell on the command line produces non-zero values for them. When the Fortran Interface produces a non-zero value for a frequency, it is the same as the absolute value of the gpell command line result .I have seen his issue for all the models I tried.
For example:
1. three layers with h=[10., 90.] m, Vp=[375., 1750., 4500.] m/s, Vs=[200., 1000., 3000.] m/s, and density=[2000., 2000., 2000.] kg/m3.
https://drive.google.com/file/d/15nYc6e ... sp=sharing

2. four layers with h=[4000., 60000., 100000.] m, Vp=[5600., 7560., 8160., 8400.]m/s, Vs=[3200., 4200., 4800., 4200.]m/s, and density=[2593., 3098., 3308., 3399.] kg/m3
https://drive.google.com/file/d/1NzGRaV ... sp=sharing

On the Geopsy website, there is a guide for using the Fortran interface for calculating the dispersion curve, but not for ellipticity
https://www.geopsy.org/wiki/index.php/C ... sion_curve

Based on that and the headers in the FortranInterface.h I am using:
CALL dispersion_curve_init(verbose)
CALL ellipticity_curve(nLayers, h, vp, vs, rho, nSamples, omega, nModes, ell, dopeak)
I set dopeak to 0.

I am using Geopsy 3.3.3 on Ubuntu 20.04 LTS.

I was wondering if you could help me with this problem?

Thank you so much in advance.
Site Admin
Posts: 699
Joined: Mon Aug 13, 2007 11:48 am
Location: ISTerre

Re: Ellipticity calculation with the fortran interface

Post by admin »


The problem comes from the high precision requested inside ellipticity_curve function.
In FortranInterface.cpp around line 191 you should find:

Code: Select all

  QGpCoreWave::Dispersion dispersion (*nModes, &x);
  QGpCoreWave::Ellipticity ell(*nModes, &x);

  dispersion.calculate(&rayleigh, &ell);
Replace precision 1e-12 by 1e-10. This is modified for release 3.5.0-preview which is not yet available. Meanwhile you can edit the code and re-build the library QGpCoreWave. This was the unique difference with gpell.

Best regards,
Post Reply