https://github.com/andreww/prem4derg

Implementation of PREM in Python for the Deep Earth Research Group in Leeds

https://github.com/andreww/prem4derg

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 1 committers (100.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.8%) to scientific vocabulary

Keywords

geodesy geophysics seismology
Last synced: 11 months ago · JSON representation

Repository

Implementation of PREM in Python for the Deep Earth Research Group in Leeds

Basic Info
  • Host: GitHub
  • Owner: andreww
  • License: mit
  • Language: Jupyter Notebook
  • Default Branch: main
  • Homepage:
  • Size: 1.81 MB
Statistics
  • Stars: 6
  • Watchers: 2
  • Forks: 1
  • Open Issues: 9
  • Releases: 0
Topics
geodesy geophysics seismology
Created almost 7 years ago · Last pushed about 2 years ago
Metadata Files
Readme License

README.md

prem4derg

This is a python module and some example notebooks to allow us (the Deep Earth Research Group at Leeds) to play around with PREM, a famous 1D model of the Earth's interior published by Dziewonski and Anderson in 1981.

Installation

This module relies on python (version 3), Numpy and Scipy. 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. Installation and managment of all these dependencies is most easily done in a conda environment. This can be done using the command:

conda create -n p4d -c conda-forge python=3.7 obspy scipy numpy matplotlib jupyter

This creates a new environment called p4d. Once an environment is created, this module can be downloaded by running:

git clone https://github.com/andreww/prem4derg.git

This creates a directory called prem4derg. Experianced users of git who want to contribute to the code may want to fork this repository in github and clone from their fork.

Two final steps will need to be done each time you want to use the code. These are to change directory into the prem4derg directory, and activate the p4d environemnt by running source activate p4d.

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

Prem4derg is new software, 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.

Owner

  • Name: Andrew Walker
  • Login: andreww
  • Kind: user

GitHub Events

Total
Last Year

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 48
  • Total Committers: 1
  • Avg Commits per committer: 48.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Andrew Walker a****r@l****k 48
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 12
  • Total pull requests: 1
  • Average time to close issues: over 1 year
  • Average time to close pull requests: less than a minute
  • Total issue authors: 2
  • Total pull request authors: 1
  • Average comments per issue: 0.17
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • andreww (11)
  • scs1cd (1)
Pull Request Authors
  • andreww (2)
Top Labels
Issue Labels
enhancement (8) good first issue (3) bug (2) documentation (1)
Pull Request Labels