Skip to content

Pisco earthquake 1: Setup the folder structure

Diego Melgar edited this page Aug 18, 2015 · 3 revisions

Please consult the Mudpy installation wiki to make sure you have all the necessary codes running. If everything is ok then continue on.

Now we will create a parameter file for the inverse problem and to use it to setup the folder structure. For the Pisco event I've created a template file pisco_insar.inv.py in the examples/pisco folder.

Open this file and notice the block of code:

init=1 #Initalize project
make_green=0 #Compute GFs
make_synthetics=0 #Compute synthetics for a given model at given stations
G_from_file=0# =0 read GFs and create a new G, =1 load G from file
invert=0  # =1 runs inversion, =0 does nothing

These are the control flags which determine what gets done when you run a parameter file, for now we are going to initialize the folder structure of a new project so set them all to zero except for init (short for initialize) which must be set to 1.

Now we are going to define the folders where the inversion data and results will be saved, edit the variables:

home='/Users/dmelgar/Slip_inv/'
project_name='Pisco_insar'

home is the folder where you will save all your slip inversions. This folder must already exist, if it doesn't, then create it. project will be a folder within your home folder that contains all the files and results for this inversion.

Now run the parameter file by typing at your terminal:

$ python $MUD/examples/pisco/pisco_insar.py

Now check your file browser you should now have a new folder structure for this inversion.