How to use the mudpy.runslip function in mudpy

To help you get started, we’ve selected a few mudpy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dmelgarm / MudPy / examples / forward_modeling / nepal.fwd.py View on Github external
rupture_speed=3.0  #Only necessary if onset times are not identified in rupt file
stf_type='dreger'
################################################################################


#Initalize project folders
if init==1:
    runslip.init(home,project_name)

# Run green functions          
if make_green==1: 
    if ncpus<2:
        runslip.make_green(home,project_name,station_file,fault_name,model_name,
            dt,NFFT,static,tsunami,hot_start,dk,pmin,pmax,kmax)
    else:
        runslip.make_parallel_green(home,project_name,station_file,fault_name,
            model_name,dt,NFFT,static,tsunami,hot_start,dk,pmin,pmax,kmax,ncpus)


#Now make synthetics for source/station pairs
if make_synthetics==1:
    if ncpus<2: 
        runslip.make_synthetics(home,project_name,station_file,fault_name,model_name,integrate,
                static,tsunami,beta,hot_start,time_epi)
    else:
        runslip.make_parallel_synthetics(home,project_name,station_file,fault_name,model_name,integrate,
                static,tsunami,beta,hot_start,time_epi,ncpus,custom_stf=None)
    
#Run forward comptuation or solve for inverse problem
if solve==1:
    if static==0: #Forward problem (full waveforms)
        forward.waveforms_fakequakes(home,project_name,fault_name,None,GF_list,
github dmelgarm / MudPy / run / template.fwd.py View on Github external
epicenter=array([84.708,28.147,15]) 
resample=1 #Resample synthetics to this rate (in Hz)
integrate=1 #=0 produces velocities, =1 makes displacements
beta=0 #Rake offset, usually a good idea to keep at zero
rupture_speed=3.0 #Fastest rupture allowed in km/s
num_windows=1
################################################################################


#Initalize project folders
if init==1:
    runslip.init(home,project_name)

# Run green functions          
if make_green==1: 
    runslip.make_green(home,project_name,station_file,fault_name,model_name,dt,NFFT,static,
                tsunami,hot_start,dk,pmin,pmax,kmax)  

#Now make synthetics for source/station pairs
if make_synthetics==1:
    #runslip.rupt2fault(home,project_name,rupture_name) 
    runslip.make_synthetics(home,project_name,station_file,fault_name,model_name,integrate,
                static,tsunami,beta,hot_start,time_epi)
    
#Run forward comptuation or solve for inverse problem
if solve==1:
    if static==0: #Forward problem (full waveforms)
        forward.waveforms_matrix(home,project_name,fault_name,rupture_name,station_file,GF_list,model_name,
                run_name,epicenter,time_epi,integrate,tsunami,hot_start,resample,beta,rupture_speed,
                num_windows,dt,NFFT)
    if static==1: #Forward problem (coseismics)
        forward.coseismics(home,project_name,rupture_name,station_file)
github dmelgarm / MudPy / examples / forward_modeling / nepal.fwd.py View on Github external
runslip.init(home,project_name)

# Run green functions          
if make_green==1: 
    if ncpus<2:
        runslip.make_green(home,project_name,station_file,fault_name,model_name,
            dt,NFFT,static,tsunami,hot_start,dk,pmin,pmax,kmax)
    else:
        runslip.make_parallel_green(home,project_name,station_file,fault_name,
            model_name,dt,NFFT,static,tsunami,hot_start,dk,pmin,pmax,kmax,ncpus)


#Now make synthetics for source/station pairs
if make_synthetics==1:
    if ncpus<2: 
        runslip.make_synthetics(home,project_name,station_file,fault_name,model_name,integrate,
                static,tsunami,beta,hot_start,time_epi)
    else:
        runslip.make_parallel_synthetics(home,project_name,station_file,fault_name,model_name,integrate,
                static,tsunami,beta,hot_start,time_epi,ncpus,custom_stf=None)
    
#Run forward comptuation or solve for inverse problem
if solve==1:
    if static==0: #Forward problem (full waveforms)
        forward.waveforms_fakequakes(home,project_name,fault_name,None,GF_list,
                model_name,run_name,dt,NFFT,G_from_file,G_name,source_time_function=stf_type,
                stf_falloff_rate=4.0,rupture_name=rupture_name,epicenter=epicenter,time_epi=time_epi)
    if static==1: #Forward problem (coseismics)
        forward.coseismics_matrix(home,project_name,rupture_name,station_file,G_from_file,G_name)
github dmelgarm / MudPy / examples / forward_modeling / nepal.fwd.py View on Github external
integrate=0 #=0 produces velocities, =1 makes displacements
beta=0 #Rake offset, usually a good idea to keep at zero
num_windows=1
rupture_speed=3.0  #Only necessary if onset times are not identified in rupt file
stf_type='dreger'
################################################################################


#Initalize project folders
if init==1:
    runslip.init(home,project_name)

# Run green functions          
if make_green==1: 
    if ncpus<2:
        runslip.make_green(home,project_name,station_file,fault_name,model_name,
            dt,NFFT,static,tsunami,hot_start,dk,pmin,pmax,kmax)
    else:
        runslip.make_parallel_green(home,project_name,station_file,fault_name,
            model_name,dt,NFFT,static,tsunami,hot_start,dk,pmin,pmax,kmax,ncpus)


#Now make synthetics for source/station pairs
if make_synthetics==1:
    if ncpus<2: 
        runslip.make_synthetics(home,project_name,station_file,fault_name,model_name,integrate,
                static,tsunami,beta,hot_start,time_epi)
    else:
        runslip.make_parallel_synthetics(home,project_name,station_file,fault_name,model_name,integrate,
                static,tsunami,beta,hot_start,time_epi,ncpus,custom_stf=None)
    
#Run forward comptuation or solve for inverse problem
github dmelgarm / MudPy / run / template.fwd.py View on Github external
################################################################################


#Initalize project folders
if init==1:
    runslip.init(home,project_name)

# Run green functions          
if make_green==1: 
    runslip.make_green(home,project_name,station_file,fault_name,model_name,dt,NFFT,static,
                tsunami,hot_start,dk,pmin,pmax,kmax)  

#Now make synthetics for source/station pairs
if make_synthetics==1:
    #runslip.rupt2fault(home,project_name,rupture_name) 
    runslip.make_synthetics(home,project_name,station_file,fault_name,model_name,integrate,
                static,tsunami,beta,hot_start,time_epi)
    
#Run forward comptuation or solve for inverse problem
if solve==1:
    if static==0: #Forward problem (full waveforms)
        forward.waveforms_matrix(home,project_name,fault_name,rupture_name,station_file,GF_list,model_name,
                run_name,epicenter,time_epi,integrate,tsunami,hot_start,resample,beta,rupture_speed,
                num_windows,dt,NFFT)
    if static==1: #Forward problem (coseismics)
        forward.coseismics(home,project_name,rupture_name,station_file)
github dmelgarm / MudPy / examples / forward_modeling / nepal.fwd.py View on Github external
if make_green==1: 
    if ncpus<2:
        runslip.make_green(home,project_name,station_file,fault_name,model_name,
            dt,NFFT,static,tsunami,hot_start,dk,pmin,pmax,kmax)
    else:
        runslip.make_parallel_green(home,project_name,station_file,fault_name,
            model_name,dt,NFFT,static,tsunami,hot_start,dk,pmin,pmax,kmax,ncpus)


#Now make synthetics for source/station pairs
if make_synthetics==1:
    if ncpus<2: 
        runslip.make_synthetics(home,project_name,station_file,fault_name,model_name,integrate,
                static,tsunami,beta,hot_start,time_epi)
    else:
        runslip.make_parallel_synthetics(home,project_name,station_file,fault_name,model_name,integrate,
                static,tsunami,beta,hot_start,time_epi,ncpus,custom_stf=None)
    
#Run forward comptuation or solve for inverse problem
if solve==1:
    if static==0: #Forward problem (full waveforms)
        forward.waveforms_fakequakes(home,project_name,fault_name,None,GF_list,
                model_name,run_name,dt,NFFT,G_from_file,G_name,source_time_function=stf_type,
                stf_falloff_rate=4.0,rupture_name=rupture_name,epicenter=epicenter,time_epi=time_epi)
    if static==1: #Forward problem (coseismics)
        forward.coseismics_matrix(home,project_name,rupture_name,station_file,G_from_file,G_name)