Skip to content
Diego Melgar edited this page Jun 23, 2015 · 12 revisions

Welcome to the Mudpy wiki. Here you will find some brief instructions on how to get the necessary codes to run MudPy and some brief tutorials to get you started.

Mudpy does both forward calculations and inverse modeling of finite fault slip models with regional data. MudPy can currently handle displacement time series, velocity time series, static field vectors and tsunami time series. In the near future it will also be able to handle strain data.

Installing MudPy

This symbol $ indicates things to type in your terminal, this >>> indicates things to type in Python.

Setup your Python environment

  1. Install NumPy and SciPy, you can do this manually as in the previous link. Alternatively (I would recommend this) get the Enthought Python Distribution or download Canopy which is a Matlab-like developing environment for Python. Both of those already include NumPy and SciPy and a bunch of other useful stuff and both are free if you have a .edu email address.

  2. Get ObsPy which is a set of Python libraries for seismology. Follow the installation instructions or just type at your terminal:

$ pip install obspy

  1. Verify the Obspy installation by typing >>> import obspy in python. No import errors means all's well.

Setup Mudpy

  1. Fire up a terminal window and navigate to the directory were you want to install the code.

  2. Clone the repository from github by typing:

$ git clone https://github.com/dmelgarm/MudPy.git

  1. Build the fk Green's function code. Inside the Mudpy directory navigate to src/fk then do
$ make clean
$ make all
  1. Add the Mudpy src/fk folder to your PATH variable by modifying your .bashrc or .profile file

  2. If the fk directory was properly added type $ fk.pl at the terminal, this should produce a help screen. Also type $ syn, this should produce another help screen.

  3. Add the Mudpy src/python folder to your PYTHONPATH variable.

  4. Define the MUD environment variable by typing $ export MUD = /path/to/mudpy/MudPy. You might want to make this change permanent by adding that line to your .bashrc file.

  5. If you have a multi-core computer and you want to run parallel jobs you need to install mpi4py see the parallel computing entry for more details