avni.models.reference1d module#

This script/module contains routines that are used to analyze/visualize the data sets in the standard AVNI format.

class avni.models.reference1d.Reference1D(file=None)[source]#

Bases: object

A class for 1D reference Earth models used in tomography

property name#
derive()[source]#
read(file)[source]#

Read a card deck file used in OBANI. Other formats not ready yet

plot()[source]#
read_bases_coefficients(file)[source]#
coefficients_to_cards(base_units=True)[source]#

evaluates bases coefficients at prescribed depth levels to get a card deck file

base_units: convert from native units to base units in constants

write_mineos_cards(file)[source]#
read_mineos_cards(file, header=3)[source]#
get_Love_elastic()[source]#

Get the Love parameters and Voigt averaged elastic properties with depth

A,C,N,L,F: anisotropy elastic Love parameters

kappa: bulk modulus

mu: shear modulus

vphi: bulk sound velocity

xi: shear anisotropy ratio

phi: P anisotropy ratio

Zs, Zp: S and P impedances

get_mineralogical()[source]#

Get the Love parameters and Voigt averaged elastic properties with depth

gravity: gavity at each depth

Brunt-Vaisala Frequency: Used for Bullen’s parameter

Bullen: Bullen’s parameter

pressure: pressure at each depth

poisson: Poisson’s ratio

if_discontinuity(depth_in_km)[source]#

Returns whether a depth is a discontinuity.

get_discontinuity()[source]#

Get values, average values and contrasts at discontinuities

Returns a structure self.metadata[‘disc’] that has three arrays:

delta: containing absolute difference in parameters between smaller/larger radii

average: containing absolute average parameters between smaller/larger radii

contrasts: containing contrast in parameters (in %)

get_custom_parameter(parameters)[source]#

Get the arrays of custom parameters defined in various Earth models

evaluate_at_depth(depth_in_km, parameter='vsh', boundary='+', interpolation='linear')[source]#

Get the values of a parameter at a given depth

boundary: + for value at larger radius at a discontinuity

to_mineoscards(directory='.', fmt='cards')[source]#

Writes a model file that is compatible with MINEOS.

to_TauPmodel(directory='.', fmt='tvel')[source]#

Writes a model file that is compatible with TauP. file format options ‘tvel’ and ‘nd’.

Note: TauP can’t handle zero shear velocity in the ocean layer…

To work around this, zero values an ocean layer will be written as 1e-4.

to_axisem(directory='.', anelastic=True, anisotropic=True, fmt='bm')[source]#

Write 1D model to be used as an external model in axisem