A PREMlike model
Project description
premlike
This is a python module and some example notebooks to work with PREM, a famous 1D model of the Earth's interior published by Dziewonski and Anderson in 1981. The module was initially created to allow the Deep Earth Research Group at Leeds the University of Leeds to run a summer project to look at the structure of the core but the code has subsequently been used for a number of other research projects.
Features and limitations
Premlike allows the creation and evaluation of models that are "like" PREM in terms of their parameterization. That is, the P- and S-wave velocity, density and attenuation are described by piecewise polynomials. The module allows the calculation of the corresponding acceleration due to gravity, pressure, frequency dependent velocities and elastic moduli as a function of radius. These calculations are analytic (i.e. there is no numerical integration in the calculation of pressure). The module can easily be used to generate input for Obspy's TauPy module for the calculation of travel times, and for Mineos for the calculation of e.g. normal mode center frequencies.
Currently, Premlike does not support radial anisotropy although adding this is planned (however, note that TauPy does not currently support such models either). In addition, the creation of complete documentation and a more robust set of tests is ongoing.
Installation and use
This module relies on python (version 3) and Numpy. The software can
be installed with pip install premlike
Examples are distributed as Jupyter notebooks, which need Jupyter and Matplotlib to run. Calculation of travel time curves (in the third example notebook) needs Obspy.
Experienced users of git who want to contribute to the code may want to fork this repository in github and clone from their fork.
Mineos
In order to compute normal mode frequencies, we use mineos. I installed this as follows (working outside the prem4derg directory):
wget http://geoweb.cse.ucdavis.edu/cig/software/mineos/mineos-1.0.2.tgz
mkdir cig
tar -xzvf mineos-1.0.2.tgz
cd mineos-1.0.2
./configure --prefix=/Users/andreww/Code/cig
Edit the Makefile to add: -Wno-error -Wno-return-type to the CFLAGS because the C contains errors.
Add -fallow-argument-mismatch to FFLAGS because the Fortran contains errors.
make
make install
Examples of use
Example Jupyter notebooks can be accessed and explored by running jupyter notebook. Four examples are
currently provided:
- A density example, showing how a model can be defined and used to calculate mass, moment of inertia, gravity and pressure.
- A velocity example, showing how a model can be defined and used to calculate seismic velocities as a function of depth and period.
- A travel time example, showing how an obspy taupy model can be created and used to compute travel time curves.
- A normal modes example, showing how Mineos can be used to compute normal mode frequencies.
These examples are only starting point. For example, the code could be used to fit new models.
Development and support
Premlike is software under development, bugs and rough edges may abound. Users who are interested in changing the code are encouraged to create a fork on GitHub and submit changes via pull requests. Problems can be reported via issues, which also list areas where further development may be useful.
References
Dziewonski, A. M. and Anderson, D. L. (1981) Preliminary reference Earth model Physics of the Earth and Planetary Interiors vol.25 pp.297—356.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file premlike-0.1.0a2.tar.gz.
File metadata
- Download URL: premlike-0.1.0a2.tar.gz
- Upload date:
- Size: 16.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb002821de128f0b76459b8f37c2b2f314fbb2b50cbacdbcf5d8a6fcdcc6b34e
|
|
| MD5 |
739ce4aa18c0f2b952089aa0179a0985
|
|
| BLAKE2b-256 |
7843268dcd00e399c1bf234b964dbfa4bfd8e9ada5379fe3b39017a824965425
|
Provenance
The following attestation bundles were made for premlike-0.1.0a2.tar.gz:
Publisher:
publish.yml on andreww/premlike
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
premlike-0.1.0a2.tar.gz -
Subject digest:
cb002821de128f0b76459b8f37c2b2f314fbb2b50cbacdbcf5d8a6fcdcc6b34e - Sigstore transparency entry: 761387833
- Sigstore integration time:
-
Permalink:
andreww/premlike@72329328e197388937052cc1be401b9096601729 -
Branch / Tag:
refs/tags/v0.1.0a2 - Owner: https://github.com/andreww
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@72329328e197388937052cc1be401b9096601729 -
Trigger Event:
release
-
Statement type:
File details
Details for the file premlike-0.1.0a2-py3-none-any.whl.
File metadata
- Download URL: premlike-0.1.0a2-py3-none-any.whl
- Upload date:
- Size: 13.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee407f74e53ebf175432d0212f03ecdf824d49c6febbcad8a7f0cf7919ac5067
|
|
| MD5 |
7060f5b8ccccfbf0cc00d7b86822fe4a
|
|
| BLAKE2b-256 |
ad0aad88c61bd7d43f3c835d4a295b6fe0e2c9298f3a926efe41632d2c7f13bc
|
Provenance
The following attestation bundles were made for premlike-0.1.0a2-py3-none-any.whl:
Publisher:
publish.yml on andreww/premlike
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
premlike-0.1.0a2-py3-none-any.whl -
Subject digest:
ee407f74e53ebf175432d0212f03ecdf824d49c6febbcad8a7f0cf7919ac5067 - Sigstore transparency entry: 761387837
- Sigstore integration time:
-
Permalink:
andreww/premlike@72329328e197388937052cc1be401b9096601729 -
Branch / Tag:
refs/tags/v0.1.0a2 - Owner: https://github.com/andreww
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@72329328e197388937052cc1be401b9096601729 -
Trigger Event:
release
-
Statement type: