Index of functions
Basic physical properties
SeisModels.evaluate — Function.evaluate(m::SeisModel1D, field::Symbol, r; depth=false) -> valsEvaluate the model m at radius r km for the different property/ies in field, returning a scalar for scalar input, and an array for array input.
If depth is true, r is treated as a depth in km instead.
SeisModels.vp — Function.vp(m::SeisModel1D, r; depth=false, freq=reffrequency(m)) -> isotropic average VpReturn the value of isotropic average Vp (km/s) for model m at radius r km.
If depth is true, then r is given as a depth in km instead.
If freq is given, then the velocity is corrected for attenuation. This requires the model has attenuation and a reference frequency.
SeisModels.vs — Function.vs(m::SeisModel1D, r; depth=false, freq=reffrequency(m)) -> isotropic average VsReturn the value of isotropic average Vs (km/s) for model m at radius r km.
If depth is true, then r is given as a depth in km instead.
If freq is given, then the velocity is corrected for attenuation. This requires the model has attenuation and a reference frequency.
SeisModels.density — Function.density(m::SeisModel1D, r; depth=false) -> densityReturn the value of density (g/cm^3) for model m at radius r km.
If depth is true, then r is given as a depth in km instead.
SeisModels.vph — Function.vph(m::SeisModel1D, r; depth=false, freq=reffrequency(m)) -> VphReturn the value of Vph (km/s) for model m at radius r km.
If depth is true, then r is given as a depth in km instead.
If freq is given, then the velocity is corrected for attenuation. This requires the model has attenuation and a reference frequency.
SeisModels.vpv — Function.vpv(m::SeisModel1D, r; depth=false, freq=reffrequency(m)) -> VpvReturn the value of Vpv (km/s) for model m at radius r km.
If depth is true, then r is given as a depth in km instead.
If freq is given, then the velocity is corrected for attenuation. This requires the model has attenuation and a reference frequency.
SeisModels.vsh — Function.vsh(m::SeisModel1D, r; depth=false, freq=reffrequency(m)) -> VshReturn the value of Vsh (km/s) for model m at radius r km.
If depth is true, then r is given as a depth in km instead.
If freq is given, then the velocity is corrected for attenuation. This requires the model has attenuation and a reference frequency.
SeisModels.vsv — Function.vsv(m::SeisModel1D, r; depth=false, freq=reffrequency(m)) -> VsvReturn the value of Vsv (km/s) for model m at radius r km.
If depth is true, then r is given as a depth in km instead.
If freq is given, then the velocity is corrected for attenuation. This requires the model has attenuation and a reference frequency.
SeisModels.eta — Function.eta(m::SeisModel1D, r; depth=false) -> ηReturn the value of η for model m at radius r km.
If depth is true, then r is given as a depth in km instead.
SeisModels.Qμ — Function.Qμ(m::SeisModel1D, r; depth=false) -> QμReturn the value of Qμ for model m at radius r km.
If depth is true, then r is given as a depth in km instead.
SeisModels.Qmu — Function.Qμ(m::SeisModel1D, r; depth=false) -> QμReturn the value of Qμ for model m at radius r km.
If depth is true, then r is given as a depth in km instead.
SeisModels.Qκ — Function.Qκ(m::SeisModel1D, r; depth=false) -> QκReturn the value of Qκ for model m at radius r km.
If depth is true, then r is given as a depth in km instead.
SeisModels.Qkappa — Function.Qκ(m::SeisModel1D, r; depth=false) -> QκReturn the value of Qκ for model m at radius r km.
If depth is true, then r is given as a depth in km instead.
Model enquiry
SeisModels.depth — Function.depth(m, radius) -> depthReturn the depth in km for the model m given a radius in km.
SeisModels.hasattenuation — Function.hasattenuation(m) -> ::BoolReturn true if the model m includes attenuation and false otherwise.
SeisModels.hasdensity — Function.hasdensity(m) -> ::BoolReturn true if density is defined for model m, and false otherwise.
SeisModels.hasreffrequency — Function.hasreffrequency(m::PREMPolyModel) -> ::BoolReturn true if a reference frequency is defined for PREMPolyModel m, and false otherwise.
SeisModels.isanisotropic — Function.isanisotropic(m) -> ::BoolReturn true if the model m is anisotropic and false otherwise.
SeisModels.radius — Function.radius(m, depth) -> radiusReturn the radius in km for the model m given a depth in km.
SeisModels.reffrequency — Function.reffrequency(m::PREMPolyModel) = fReturn the reference frequency for a PREMPolyModel m in Hz.
SeisModels.surface_radius — Function.surface_radius(m) -> radiusReturn the surface radius in km of the SeisModel m.
Derived model properties
SeisModels.bulk_modulus — Function.bulk_modulus(m::SeisModel1D, r; depth=false) -> KReturn the bulk modulus K in GPa at radius r km in the model m.
If depth is true, r is treated as a depth in km instead.
SeisModels.gravity — Function.gravity(m::SeisModel1D, r; depth=false) -> gReturn the acceleration due to gravity, g, in m/s^2 at radius r in km.
If depth is true, r is treated as a depth in km instead.
SeisModels.mass — Function.mass(m::SeisModel1D, r; depth=false) -> massReturn the mass in kg between the centre of the model and the radius r km.
If depth is true, r is treated as a depth in km instead.
mass(m) -> massReturn the mass for the whole body in kg (between the centre of the model and the surface).
SeisModels.moment_of_inertia — Function.moment_of_inertia(m, r0=0, r1=surface_radius(m)) -> IReturn the moment of interia I in kg m² for the model m between radii r0 and r1 in km.
SeisModels.poissons_ratio — Function.poissons_ratio(m, r; depth=false) -> νReturn the Poisson's ratio for the model m given a radius r in km. The calculation uses the isotropic average velocities at r.
If depth is true, r is treated as a depth in km instead.
SeisModels.pressure — Function.pressure(m::SeisModel1D, r; depth=false) -> pReturn the pressure p in Pa at radius r km.
If depth is true, r is treated as a depth in km instead.
SeisModels.shear_modulus — Function.shear_modulus(m::SeisModel1D, r; depth=false) -> μReturn the shear modulus μ (often also called G) in GPa at radius r in the model m.
If depth is true, r is treated as a depth in km instead.
SeisModels.surface_mass — Function.surface_mass(m::SeisModel1D, r; depth=false) -> massReturn the mass in kg betwen radius r km and the surface.
If depth is true, r is treated as a depth in km instead.
SeisModels.youngs_modulus — Function.youngs_modulus(m, r; depth=false) -> EReturn the Young's modulus E in GPa for the model m given a radius r in km.
If depth is true, r is treated as a depth in km instead.
Input/output
SeisModels.read_mineos — Function.read_mineos(file) -> m::LinearLayeredModelRead a 1D seismic model from a Mineos tabular format file.
References:
- https://geodynamics.org/cig/software/mineos/mineos-manual.pdf
SeisModels.write_mineos — Function.write_mineos(file, m::LinearLayeredModel, freq=1.0, title="Model from SeisModels.jl")
write_mineos(io::IO, m, args...)Save a SeisModel1D as a Mineos 'tabular' format file to file on disk or to an io. Optionally supply the reference frequency freq in Hz (which defaults to 1 Hz) and a title.
Note that Mineos has two types of model file; one parameterised by radial knots with values interpolated linearly between them ('tabular' format), and one with PREM-style polynomials ('polynomial' format). Mineos uses the tabular format internally even if a polynomial file is read in, and testing suggests that polynomial files are not used correctly by the CIG version of Mineos, so it is not recommended to use them at all. Consequently, SeisModels does not support writing polynomial format files.
Reference
- Mineos manual, https://geodynamics.org/cig/software/mineos/mineos-manual.pdf
SeisModels.read_tvel — Function.read_tvel(file) -> model::LinearLayeredModel
read_tvel(io::IO) -> model::LinearLayeredModelRead a model from a file in the ttimes 'tvel' format. This format specifies a LinearLayeredModel with only isotropic Vp, Vs and density.
The two header lines are ignored but must be present.
SeisModels.write_tvel — Function.write_tvel(file, model::LinearLayeredModel; comment1="SeisModels.jl - P", comment2="SeisModels.jl - S")
write_tvel(io::IO, model; kwargs...)Write a model to file or an arbitrary IO object in the ttimes 'tvel' format.
Optionally supply the two comment lines, comment1 and comment2 which form the header of the file.
Conversion
SeisModels.LinearLayeredModel — Method.LinearLayeredModel(m::PREMPolyModel, spacing=20)Convert the model m into a LinearLayeredModel, with radial knots spaced a maximum of spacing km apart.
SeisModels.LinearLayeredModel — Method.LinearLayeredModel(m::SteppedLayeredModel)Convert the model m into a LinearLayeredModel, with radial knots spaced at the bottom and top of each layer in m.
SeisModels.PREMPolyModel — Method.PREMPolyModel(m::LinearLayeredModel, order=1; fref=1.0)Convert the model m into a PREMPolyModel, with maximum polynomial order. The reference frequency fref in Hz can be given.
SeisModels.PREMPolyModel — Method.PREMPolyModel(m::SteppedLayeredModel, order=0; fref=1.0)Convert the model m into a PREMPolyModel, with maximum polynomial order. The reference frequency fref in Hz can be given.
SeisModels.SteppedLayeredModel — Method.SteppedLayeredModel(m::Union{LinearLayeredModel, PREMPolyModel}, spacing=10)Convert the model m into a SteppedLayeredModel, with layer tops spaced a maximum of spacing km apart. Where layer tops of m lie between the regular set of spacing layer tops, extra layers are inserted. Thus layer tops in the new model always coincide with discontinuities in m.
Layers take the value of the properties at the midpoint of the spacing km interval in the original PREMPolyModel.
Construction
SeisModels.LinearLayeredModel — Method.LinearLayeredModel(; kwargs...) -> mConstruct a LinearLayeredModel by specifying keyword arguments. The length of arrays defines the number of layers and the presence of arguments determines whether the model has density, anisotropy and attenuation.
Note that radii are given in km, velocities in km/s, densities in g/cm³ and frequency in Hz.
Keyword arguments
Radii
r: The radius of a set of nodes ranging from the centre of the planet to the surface, in km. When the same value ofris repeated twice, a discontinuity is introduced at that radius. The first value ofrmust be 0 km. This is the only mandatory argument.
Isotropic properties
These must be given each as a Vector of values at each radial node. Each parameter (vp, density, Qμ, etc.) must have the correct number of layers.
vp: P-wave velocityvs: S-wave velocitydensity: Material density
Anisotropic parameters
If the model is anisotropic and the radial anisotropy parameters are all provided, then the Voigt average velocities are constructed automatically unless vp and/or vs are also given separately.
vpv: Vertical P-wave velocityvph: Horizontal P-wave velocityvsv: Vertical S-wave velocityvsh: Horizontally-polarised S-wave velocityeta: The ratio C₁₃/(Vph - 2Vsv), where cᵢⱼ is the Voigt elasticity matrix, the 1-direction is horizontal and the 3-direction is radial
Attenuation parameters
ASCII versions (Qmu, Qkappa) of these exist for ease of use as well as the Unicode versions (Qμ, Qκ). If both are supplied, an error is thrown.
QμorQmu: Shear modulus quality factorQκorQkappa: Bulk modulus quality factor
SeisModels.PREMPolyModel — Method.PREMPolyModel(; kwargs...) -> mConstruct a PREMPolyModel by specifying keyword arguments. The length of arrays defines the number of layers and the presence of arguments determines whether the model has density, anisotropy and attenuation.
Note that radii are given in km, velocities in km/s, densities in g/cm³ and frequency in Hz.
Keyword arguments
Radii
r: The upper radii of each layer in km. This is the only mandatory argument.
Isotropic properties
These must be given each as an (norder + 1)×nlayers Matrix of polynomial coefficients. Each parameter (vp, density, Qμ, etc.) may have a different polynomial order, but all must have the correct number of layers
vp: P-wave velocityvs: S-wave velocitydensity: Material density
Anisotropic parameters
If the model is anisotropic and the radial anisotropy parameters are all provided, then the Voigt average velocities are constructed automatically unless vp and/or vs are also given separately.
vpv: Vertical P-wave velocityvph: Horizontal P-wave velocityvsv: Vertical S-wave velocityvsh: Horizontally-polarised S-wave velocityeta: The ratio C₁₃/(Vph - 2Vsv), where cᵢⱼ is the Voigt elasticity matrix, the 1-direction is horizontal and the 3-direction is radial
Attenuation parameters
ASCII versions (Qmu, Qkappa) of these exist for ease of use as well as the Unicode versions (Qμ, Qκ). If both are supplied, an error is thrown.
QμorQmu: Shear modulus quality factorQκorQkappa: Bulk modulus quality factorfref: Reference Q frequency
SeisModels.SteppedLayeredModel — Method.SteppedLayeredModel(; kwargs...) -> mConstruct a SteppedLayeredModel by specifying keyword arguments. The length of arrays defines the number of layers and the presence of arguments determines whether the model has density, anisotropy and attenuation.
Note that radii are given in km, velocities in km/s, densities in g/cm³ and frequency in Hz.
Keyword arguments
Radii
r: The upper radius of a set of constant layers in km. The uppermost layer radius is taken to be the planetary radius. This is the only mandatory argument.
Isotropic properties
These must be given each as a Vector of values for each layer. Each parameter (vp, density, Qμ, etc.) must have the correct number of layers.
vp: P-wave velocityvs: S-wave velocitydensity: Material density
Anisotropic parameters
If the model is anisotropic and the radial anisotropy parameters are all provided, then the Voigt average velocities are constructed automatically unless vp and/or vs are also given separately.
vpv: Vertical P-wave velocityvph: Horizontal P-wave velocityvsv: Vertical S-wave velocityvsh: Horizontally-polarised S-wave velocityeta: The ratio C₁₃/(Vph - 2Vsv), where cᵢⱼ is the Voigt elasticity matrix, the 1-direction is horizontal and the 3-direction is radial
Attenuation parameters
ASCII versions (Qmu, Qkappa) of these exist for ease of use as well as the Unicode versions (Qμ, Qκ). If both are supplied, an error is thrown.
QμorQmu: Shear modulus quality factorQκorQkappa: Bulk modulus quality factor