Giter Site home page Giter Site logo

hongjianfang / pysurf96 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from miili/pysurf96

2.0 1.0 0.0 30 KB

Python wrapper for modelling surface wave dispersion curves from surf96 - Computer Programs in Seismology, R. Hermann

Python 13.35% Fortran 86.65%

pysurf96's Introduction

PySurf96

Python23

Modelling Surface Wave Dispersion Curves

This is a slim wrapper around the program surf96 from Computer programs in seismology by R. Hermann (http://www.eas.slu.edu/eqc/eqccps.html) for forward modelling of Rayleigh and Love wave dispersion curves.

In this realisation the Fortran77 code is wrapped by f2py, which makes the forward computation approximately 8x faster compared over calling a Python subprocess.

More useful software for seismology at https://pyrocko.org.

Installation

This package is for Python 2 and Python 3.

Prerequisits are numpy and a Fortran77 compiler, like GNU GCC.

sudo python setup.py install

Or through pip:

pip install git+https://github.com/miili/pysurf96

Example

import numpy as np
from pysurf96 import surf96

# Define the velocity model in km and km/s
thickness = np.array([5., 23., 8., 0])
vs = np.array([2, 3.6, 3.8, 3.3])
vp = vs * 1.73
rho = vp * .32 + .77

# Periods we are interested in
periods = np.linspace(1., 20., 20)

velocities = surf96(thickness, vp, vs, rho, periods,
                    wave='love', mode=1, velocity='group', flat_earth=True)

Citations and Acknowledgments

Herrmann, R. B. (2013) Computer programs in seismology: An evolving tool for instruction and research, Seism. Res. Lettr. 84, 1081-1088, doi:10.1785/0220110096

Thanks to Hongjian Fang for creating the Fortran subroutine (https://github.com/caiweicaiwei/SurfTomo)

pysurf96's People

Contributors

miili avatar

Stargazers

Stephen avatar XIN LIU avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.