1.  Clone the git repository : Pre-processing

2. cd SrfGen folder

3. make a copy of setSrfParams.py from template

 cp setSrfParams.py.template setSrfParams.py

4. edit all parameters related to specific type of rupture model you want ( and remove all unwanted ones)

(the comments in setSrfParams should indicate what parameters are for what type)

or check for required parameters from createSRF.py or below

    if TYPE == 1:
        # point source to point source srf
        srf = CreateSRF_ps(LAT, LON, DEPTH, MAG, MOM, STK, RAK, DIP, DT, \
        PREFIX, stoch = STOCH)
    elif TYPE == 2:
        # point source to finite fault srf
        srf = CreateSRF_ff(LAT, LON, MAG, STK, RAK, DIP, DT, PREFIX, \
                           SEED, depth = DEPTH, mwsr = MWSR, \
                           stoch = STOCH, corners = True, \
                           genslip_version= GENSLIP, rvfrac = RVFRAC, slip_cov = SLIP_COV, \
                           rough = ROUGH)
    elif TYPE == 3:
        # finite fault descriptor to finite fault srf
        srf = CreateSRF_ff(LAT, LON, MAG, STK, RAK, DIP, DT, PREFIX, \
                           SEED, FLEN, DLEN, FWID, DWID, DTOP, \
                           SHYPO, DHYPO, stoch = STOCH, corners = True, \
                           genslip_version= GENSLIP, rvfrac = RVFRAC, slip_cov = SLIP_COV, \
                           rough = ROUGH)
    elif TYPE == 4:
        # multi segment finite fault srf
        srf = CreateSRF_multi(M_NSEG, M_SEG_DELAY, M_MAG, M_MOM, \
                              M_RVFAC_SEG, M_GWID, M_RUP_DELAY, M_FLEN, \
                              M_DLEN, M_FWID, M_DWID, M_DTOP, M_STK, \
                              M_RAK, M_DIP, M_ELON, M_ELAT, M_SHYPO, \
                              M_DHYPO, DT, SEED, PREFIX, CASES, \
                              genslip_version= GENSLIP, rvfrac = RVFRAC, slip_cov = SLIP_COV, \
                              stoch = STOCH, rough = ROUGH)



5. Run setCreateSRF.py

Note: remember to move files to agreed structure for automated workflow if using auto-submit



Optional:

plotting the SRFs
plotting scripts should run at the end of the model generation, but if it did not, or you need to re-run some plots; you can run plot_srf_square.py and plot_srf_map.py

Note: the plotting may fail if visualization repository are not added into the path. If this happens, clone visualization repo. (PS. to run plotting scripts GMT must be built and installed on the machine you are running)

1. clone visualization repo

optional: 1a. add gmt folder to system PATH ( this will prevent future crashes for running createSRF.py)

2. build gmt. ( this is necessary for plotting)

you can download corresponding build/release from GMT or rebuild them

  • No labels