pyrocko.fomosto.gemini¶
Fomosto backend for the GEMINI program system.
GEMINI (Green’s function of the Earth by MINor integration) by Jörg Dalkolmo
and Wolfgang Friederich computes complete synthetic seismograms for a
spherically symmetric, transversely isotropic, anelastic earth by numerical
integration of the equations of motion in the frequency domain [Friederich
& Dalkolmo 1995]. It consists of three programs, which this backend expects to
be installed as fomosto_gemini_Gemini_2_2, fomosto_gemini_Dispec_2_2
and fomosto_gemini_Totido_2_2, e.g. with the fomosto-gemini package:
Geminicomputes the Green’s basis solutions in the frequency-degree domain for a given source depth.Dispeccombines them with a moment tensor source and sums over the spherical harmonics, giving spectra at the receivers.Totidotransforms the spectra to the time domain.
The earth model, which may be transversely isotropic, is given in GEMINI’s own
polynomial format in the earthmodel entry of the store’s extra/gemini
file. The earthmodel_1d in the store’s config is an isotropic
approximation of it, used for travel time tables. If the earthmodel entry
is omitted, it is fitted to earthmodel_1d when the store is built.
Models can be converted between the formats on the command line:
python -m pyrocko.fomosto.gemini nd-to-gemini IN OUT
python -m pyrocko.fomosto.gemini gemini-to-nd IN OUT
Receivers must be at the surface. Components are computed in source-centred coordinates, with the source at the north pole and the receivers on the 180° meridian, so that any epicentral distance between 0° and 180° can be used.
References
Friederich, W. and Dalkolmo, J. (1995): Complete synthetic seismograms for a spherically symmetric earth by a numerical computation of the Green’s function in the frequency domain. Geophysical Journal International, 122, 537-550.
Functions
|
Build GF store with GEMINI. |
Get the GEMINI versions for which all programs are available. |
|
|
Initialize GF store for GEMINI. |
|
Command line tool to convert earth models between formats. |
Classes
|
Configuration of the GEMINI backend, stored in |
|
Earth model in GEMINI's native file format. |
|
Builds a GF store with GEMINI. |
|
Layer of a GEMINI earth model. |
|
Spherically symmetric, possibly transversely isotropic GEMINI earth model. |
- class GeminiLayer(r_bottom, coefs, qmu, qkappa)[source]¶
Bases:
objectLayer of a GEMINI earth model.
- Parameters:
r_bottom – radius of the bottom of the layer [km]
coefs – polynomial coefficients, array of shape
(ncoefs, 6). The columns are density [g/cm^3], vertical and horizontal P-wave velocity, vertical and horizontal S-wave velocity [km/s], and the anisotropy parameter eta. Rows are the coefficients of increasing powers of the normalized radiusx = r / r_surface.qmu – shear quality factor,
<= 0for a fluid layerqkappa – bulk quality factor
- class GeminiModel(layers, r_surface, reference_frequency=1.0, transversely_isotropic=False, comments=None)[source]¶
Bases:
objectSpherically symmetric, possibly transversely isotropic GEMINI earth model.
Densities are in [g/cm^3], velocities in [km/s] and radii in [km], as in the native file format of GEMINI. Layers are ordered from the centre to the surface.
- classmethod from_string(s)[source]¶
Parse earth model in GEMINI’s native file format.
This reads the format the same way as GEMINI’s
gtmanis.fdoes.
- isotropic_properties(layer, r)[source]¶
Get isotropic approximation of the material properties of a layer.
For a transversely isotropic model the equivalent isotropic Voigt average moduli are used, as by GEMINI (after Dziewonski & Anderson 1980). For an isotropic model only the vertical velocities are used, as by GEMINI.
- Parameters:
layer –
GeminiLayerof this modelr – radii [km]
- Returns:
(vp, vs, rho, qp, qs), arrays in SI units
- to_cake(rtol=0.0005)[source]¶
Get isotropic approximation as
pyrocko.cake.LayeredModel.Each polynomial layer is approximated by gradient layers, with nodes inserted until linear interpolation deviates by less than
rtol(relative) from the polynomials.Discontinuities are named, as needed for standard phase definitions, if they are roughly at the expected depth (see
discontinuity_depth_ranges): the top of a fluid layer is namedcmb, its bottomicb, and the shallowest discontinuity with a P-wave velocity increasing across 7.5 km/s is namedmoho.
- classmethod from_cake(mod, nlayers_max=20, rtol_velocity=0.002, rtol_q=0.1, nsamples_per_layer=20)[source]¶
Approximate
pyrocko.cake.LayeredModelby GEMINI layers.The model is split at its discontinuities. The material properties in each part are fitted with polynomials of up to third order in the normalized radius, the quality factors are averaged. As long as the total number of layers stays at most
nlayers_max, the worst fitting part is split further, at the node minimizing the misfit. The misfit is the maximum of the relative misfit of velocities and density divided byrtol_velocityand the relative deviation of the quality factors from the layer’s constant value divided byrtol_q. A warning is issued if it exceeds 1 in the end.
- max_deviation(mod, ddepth=10000.0)[source]¶
Get maximum relative deviation from an isotropic cake model.
Compares the isotropic approximation of this model to
modin terms of P- and S-wave velocities and density, at regularly sampled depths, avoiding the immediate vicinity of discontinuities.- Returns:
maximum relative deviation and depth [m] where it occurs
- class GeminiEarthmodel(...) pyrocko.fomosto.gemini.GeminiModel[source]¶
Bases:
ObjectEarth model in GEMINI’s native file format.
- class GeminiConfig(**kwargs)[source]¶
Bases:
ObjectConfiguration of the GEMINI backend, stored in
extra/gemini.- ♦ gemini_version¶
str, optionalVersion of the GEMINI programs to use (required, set by
fomosto init).
- ♦ earthmodel¶
pyrocko.fomosto.gemini.GeminiModel (
GeminiEarthmodel), optionalEarth model in GEMINI’s native format (radius in [km], density in [g/cm^3], velocities in [km/s], coefficients of polynomials in the normalized radius r/r_surface), possibly transversely isotropic. If not given, it is fitted to the isotropic
earthmodel_1dof the store’s config.
- ♦ time_region¶
tupleof 2pyrocko.gf.meta.Timingobjects, default:(<pyrocko.gf.meta.Timing object at 0x7f5d78cc9a90>, <pyrocko.gf.meta.Timing object at 0x7f5d786f8510>)Time window to be covered by the computed seismograms.
- ♦ cut¶
tupleof 2pyrocko.gf.meta.Timingobjects, optionalTime window to which the Green’s functions are cut before they are stored.
- ♦ time_window_factor¶
float, default:2.0Factor to enlarge the length of the FFT time window relative to
time_region(it is further enlarged to a power of two samples), to keep energy arriving after the time window from wrapping around into it.
- ♦ damping_time¶
float, optionalDamping time of the complex frequency [s], to suppress time-domain aliasing. Default is a fifth of the FFT time window length.
- ♦ frequency_max¶
float, optionalMaximum frequency [Hz]. Default is just below the Nyquist frequency of the store.
- ♦ slowness_max¶
float, default:0.6Maximum horizontal slowness [s/km], determining the maximum harmonic degree to compute at each frequency. Truncation of the harmonic degree range produces an artificial arrival with this slowness, so it should be above the slowness of the slowest phases of interest and arrive after the end of the time window.
- ♦ harmonic_degree_max¶
int, default:10000Absolute limit for the harmonic degree.
- ♦ degree_taper_length¶
int, default:40Length of the cosine taper applied at the upper end of the harmonic degree range by Dispec. The degree range is enlarged by this amount.
- ♦ include_physical_dispersion¶
bool, default:TrueWhether to use anelastic, frequency-dependent, complex moduli (at the reference frequency of the model). If false, GEMINI computes purely elastic, unattenuated seismograms.
- ♦ accuracy¶
float, default:0.0001Accuracy of the Bulirsch-Stoer integration in GEMINI.
- ♦ lowpass_order¶
int, default:0Order of Butterworth low-pass filter to apply (0: no filter).
- ♦ lowpass_corner¶
float, default:1.0Corner frequency of Butterworth low-pass filter [Hz].
- ♦ nlayers_max¶
int, default:20Maximum number of earth model layers supported by the GEMINI executable.
- ♦ keep_basis_solutions¶
bool, default:FalseWhether to keep the files with basis solutions computed by GEMINI (in the store’s
gemini_greendirectory) after the store has been built.
- class GeminiGFBuilder(store_dir, force=False, tmp=None, keep_tmp=False)[source]¶
Bases:
objectBuilds a GF store with GEMINI.
Step 1 runs
Geminifor each source depth (one block per depth). Step 2 runsDispecandTotidofor each of the elementary moment tensor sources (one block per source depth and range of up to 149 distances) and stores the Green’s functions.- async run(runner, jobs, on_done, remove_basis=False)[source]¶
Run the given jobs,
(step, iblock)pairs.Step 2 blocks wait for the step 1 block of their source depth, if it is among the jobs. With
remove_basis, the basis solutions of a source depth are removed when its step 2 jobs are done. This is only safe if the jobs include all of its step 2 blocks not done yet.
- build(store_dir, force=False, nworkers=None, continue_=False, step=None, iblock=None)[source]¶
Build GF store with GEMINI.
Follows the conventions of the
buildmethod ofpyrocko.gf.builder.Builderregarding thecontinue_,stepandiblockarguments. Step 1 computes the basis solutions withGemini(one block per source depth), step 2 computes and stores the Green’s functions withDispecandTotido. Withoutstep, both steps run as a pipeline.
- init(store_dir, variant, config_params=None, earthmodel=None)[source]¶
Initialize GF store for GEMINI.
- Parameters:
config_params – dict with parameters to override in the store’s config
earthmodel –
GeminiModel, possibly transversely isotropic, to be used. If given, the store’searthmodel_1dis set to its isotropic approximation, unless explicitly given inconfig_params. Otherwise, the GEMINI earth model is fitted toearthmodel_1d.