Commit b3251288 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

support full gemini model file format (transverse isotropic models)

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.

SVN Path:
SVN Revision: 4315
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 26740641
......@@ -36,10 +36,11 @@ c V1.6 14/02/97 introduced transform of velocties to dispersed velocities
c for a dominant period
c V1.7 17/03/99 provide different density transformations
c V1.8 22/12/11 migrated to gfortran
c V1.9 22/12/11 support input of files with transverse isotropic model
program chopmod
character*70 version
parameter(version='CHOPMOD V1.8 spherical --> flat earth')
parameter(version='CHOPMOD V1.9 spherical --> flat earth')
......@@ -95,9 +96,12 @@ c new model
double precision qbeta(maxlayer)
real*8 nuref
c gemini
logical optani
integer maxsection, nsection, nl
double precision alpha(maxsection, 4), beta(maxsection, 4)
double precision eta(maxlayer, 4)
double precision alphah(maxsection, 4), betah(maxsection, 4)
double precision rho(maxsection, 4), qm(maxsection), qk(maxsection)
double precision rb(0:maxsection), R
integer iflso(maxsection), nco(maxsection)
......@@ -118,18 +122,19 @@ c calculations
double precision zualpha, zubeta, zurho, zsalpha, zsbeta, zsrho
c commandline
integer maxopt, lastarg
character*2 optid(maxopt)
character*40 optarg(maxopt)
logical optset(maxopt), opthasarg(maxopt)
c here are the keys to our commandline options
data optid/2h-d,2h-s,2h-r,2h-o,2h-S,2h-n,2h-f,2h-p,2h-N/
data opthasarg/.FALSE.,2*.TRUE.,.FALSE.,.TRUE.,.FALSE.,3*.TRUE./
data optarg/1h-,4h0.02,5h1000.,1h-,2h1.,1h-,2h0.,2h0.,2h-1/
data optid/2h-d,2h-s,2h-r,2h-o,2h-S,2h-n,2h-f,2h-p,2h-N,'-t'/
data opthasarg/.FALSE.,2*.TRUE.,.FALSE.,.TRUE.,.FALSE.,3*.TRUE.,
& .false./
data optarg/1h-,4h0.02,5h1000.,1h-,2h1.,1h-,2h0.,2h0.,2h-1,'-'/
print *,version
print *,'Usage: chopmod [-s stepsize] [-r minradius] [-o] [-f freq]'
print *,' [-p per] [-S scanning] [-n] [-N n]'
print *,' [-p per] [-S scanning] [-n] [-N n] [-t]'
print *,' infile outfile'
print *,' or: chopmod -help'
if (iargc().lt.1) stop 'ERROR: missing parameters'
......@@ -176,6 +181,8 @@ c----------------------------------------------------------------------
print *,' n=-2 for Rayleigh waves (Biswas)'
print *,' n=-5 for Love waves (Biswas and Knopoff)'
print *,' (default n=',optarg(9)(1:3),')'
print *,'-t earth model has transverse isotropy'
print *,' (h-velocities and eta are ignored)'
print *,' '
print *,'infile GEMINI model file for spherical earth'
print *,'outfile Output containing model for flat earth'
......@@ -198,6 +205,7 @@ c set options
read(optarg(7), *) nuref
read(optarg(9), *) densexp
if (disperse) then
if (nuref.le.0.d0) stop 'ERROR: You must set a reference frequency'
read(optarg(8), *) domper
......@@ -219,8 +227,16 @@ c set options
c read file
if (debug) print *,'DEBUG: filename ',filename(1:fin)
call gemini_getmod(filename, lu, maxsection,
& rb, qm, qk, rho, alpha, beta, nsection, iflso, nco, text)
if (optani) then
call gemini_getani(filename, lu, maxsection, eta,
& rb, qm, qk, rho, alpha, alphah, beta, betah,
& nsection, iflso, nco, text)
call gemini_getmod(filename, lu, maxsection,
& rb, qm, qk, rho, alpha, beta, nsection, iflso, nco, text)
c call gemini_getmod(filename, lu, maxsection,
c & rb, qm, qk, rho, alpha, beta, nsection, iflso, nco, text)
c go through all sections of polynomal model and chop model
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment