Mineos.jl is a Julia wrapper around the Mineos programs to compute normal modes of the Earth and similar planets.
In Julia, simply do
julia> import Pkg; Pkg.add("Mineos")
The package relies on the SeisModels.jl
package to create models for computation by Mineos. This will be
installed if you follow the instructions above. However, to directly
use the functionality of SeisModels.jl to create models, you need to
add it to your environment using Pkg.add("SeisModels")
.
This is done using the eigenmodes
function, which accepts
a SeisModel.LinearLayeredModel
. For example, to compute
the frequency of ₀S₉ in PREM, ignoring toroidal modes and limiting the
calculation to a maximum angular order of 9 and radial order of 0, you can do:
julia> using Mineos, SeisModels
julia> modes = eigenmodes(LinearLayeredModel(PREM), lmax=9, nmax=0, toroidal=false, ic_toroidal=false);
julia> modes[0,:S,9].frequency
1.578258
eiegenmodes
returns a type (Mineos.Mode
) which contains the following
fields you can access:
type
: Type of oscillation, which is one of::spheroidal
: Spheroidal mode:toroidal
: Toroidal mode:ic_toroidal
: Toroidal mode in the inner core
n
: Radial orderl
: Angular orderphase_vel
: Phase velocity of mode in km/sgroup_vel
: Group velocity of mode in km/sfrequency
: Frequency of mode in mHzperiod
: Period of mode in sQ
: Attenuation of moderayleigh_quotient
: Rayleigh quotient of mode, which is the ratio of kinetic to potential energy minus one, which should be of ordereps
if the eigenfunction is accurate, whereeps
is the nominal error of the calculation integration scheme.
Note that you access mode nXl by
modes[n,X,l]
, where n
is the radial order, l
is the angular
order and X
is :S
for spheroidal or radial modes, :T
for
toroidal modes and :C
for inner core toroidal modes. (See
that X
is a Symbol
and therefore needs the :
before the character.)
See the help for eigenmodes
for a full list of keyword arguments.
The eigenfrequencies
function is similar to eigenmodes
, but only
returns eigenfrequencies for each mode in mHz.
The retrieval of eigenfunctions and calculation of synthetic seismogramss are not yet implemented, but are planned for the future. Pull requests adding this functionality are welcome.
If you find a problem with this Julia wrapper of Mineos, then please open an issue with as much description as possible to recreate the error.
If you would like to contribute code which implements new functionality or fixes bugs in Mineos.jl, please submit a pull request or get in touch.