示例#1
0
        ss[k]=s[i]*cos(deg2rad(r[i]))
        ds[k]=s[i]*sin(deg2rad(r[i]))
    else:
        ss[k]=0
        ds[k]=0
    
plt.figure()
plt.scatter(slab[:,1],slab[:,2],c=(ss**2+ds**2)**0.5,lw=0,s=60,cmap=plt.cm.jet)
plt.colorbar()


#Save it
i=where((ss**2+ds**2)**0.5>0)[0]
out=c_[slab[i,0:8],ss[i],ds[i],slab[i,8:10],zeros((len(i),2))]
fout='/Users/dmelgar/Chiapas2017/tsunami/scenario/chiapas_mentawai.rupt'
savetxt(fout,out,fmt='%d\t%.6f\t%.6f\t%.4f\t%.2f\t%.2f\t%.1f\t%.1f\t%.6f\t%.6f\t%.1f\t%.1f\t%.1f\t%.1f')


plt.show()


#Make dtopo
dtopo='/Users/dmelgar/Chiapas2017/tsunami/scenario/chiapas_mentawai.dtopo'
dl=0.02
y=arange(13,17,dl)
x=arange(-97,-91,dl)
#X,Y=meshgrid(x,y)
#x=X.ravel()
#y=Y.ravel()
forward.move_seafloor_okada(fout,dtopo,x,y)
示例#2
0
from mudpy.forward import move_seafloor_okada
from numpy import arange

mudpy_file = '/Users/dmelgar/Slip_inv/Wharton_tsun/forward_models/model6c.rupt'
out_file = '/Users/dmelgar/Slip_inv/Wharton_tsun/forward_models/model6c.dtopo'
x = arange(89, 95, 0.01)
y = arange(0.5, 4.0, 0.01)
refine_factor = None
mu = 40e9

fault = move_seafloor_okada(mudpy_file,
                            out_file,
                            x,
                            y,
                            refine_factor=refine_factor,
                            mu=mu)
示例#3
0
from mudpy import forward
from numpy import arange

Dx = 12e3
Dy = 8.10e3
mu = 10e9

usgs_model = '/Users/dmelgar/Nicaragua1992/p0005ddn.param'
mudpy_file = '/Users/dmelgar/Nicaragua1992/nicaragua.rupt'
dtopo_file = '/Users/dmelgar/Nicaragua1992/nicaragua.dtopo'

forward.usgs2rupt(usgs_model, mudpy_file, Dx, Dy)

x = arange(-91, -84, 0.02)
y = arange(8, 14, 0.02)

forward.move_seafloor_okada(mudpy_file, dtopo_file, x, y, mu=mu)
示例#4
0
from mudpy import forward
from numpy import arange


x=arange(-106,-95,0.05)+360
y=arange(14,20,0.05)

#forward.move_seafloor_okada(u'/Users/dmelgar/FakeQuakes/Mexico_scenarios/output/ruptures/all_CA.000046.rupt',u'/Users/dmelgar/FakeQuakes/Mexico_scenarios/output/ruptures/all_CA.000046.dtopo',x,y)
#forward.move_seafloor_okada(u'/Users/dmelgar/FakeQuakes/Mexico_scenarios/output/ruptures/all_CA.000057.rupt',u'/Users/dmelgar/FakeQuakes/Mexico_scenarios/output/ruptures/all_CA.000057.dtopo',x,y)
#forward.move_seafloor_okada(u'/Users/dmelgar/FakeQuakes/Mexico_scenarios/output/ruptures/all_CA.000062.rupt',u'/Users/dmelgar/FakeQuakes/Mexico_scenarios/output/ruptures/all_CA.000062.dtopo',x,y)
forward.move_seafloor_okada(u'/Users/dmelgar/FakeQuakes/Mexico_scenarios/output/ruptures/all_CA.000042.rupt',u'/Users/dmelgar/FakeQuakes/Mexico_scenarios/output/ruptures/all_CA.000042.dtopo',x,y)
示例#5
0
#
#epi=[-83.520,17.469,13.0]
#fout='/Users/dmelgar/Honduras2018/fault/rapid.fault'
#forward.makefault(fout,254,65,50,3,3,epi,4,4,1.0)
#
#mudpy_file='/Users/dmelgar/Honduras2018/fault/rapid.rupt'
#out_file='/Users/dmelgar/Honduras2018/fault/rapid.dtopo'
#
#x=arange(-85,-81,0.025)
#y=arange(15.5,18.5,0.025)
#
#forward.move_seafloor_okada(mudpy_file,out_file,x,y,refine_factor=None,mu=30e9,return_object=False)

usgs_model = '/Users/dmelgar/Honduras2018/fault/usgs.txt'
out_file_rupt = '/Users/dmelgar/Honduras2018/fault/usgs.rupt'
Dx = 5e3
Dy = 3e3

x = arange(-87, -80, 0.025)
y = arange(14.5, 20.5, 0.025)
forward.usgs2rupt(usgs_model, out_file_rupt, Dx, Dy)

out_file = '/Users/dmelgar/Honduras2018/fault/usgs.dtopo'
forward.move_seafloor_okada(out_file_rupt,
                            out_file,
                            x,
                            y,
                            refine_factor=None,
                            mu=30e9,
                            return_object=False)
示例#6
0
from mudpy.forward import move_seafloor_okada
from numpy import arange

#mudpy_file='/Users/dmelgar/Slip_inv/Ecuador_insar/output/inverse_models/models/sm_insar_5win_vr3.4.0014.noshallow.inv.total'
#out_file='/Users/dmelgar/Ecuador2016/tsunami/dtopo/sm_insar_5win_vr3.4.0014.noshallow.dtopo'
mudpy_file = '/Users/dmelgar/Slip_inv/Ecuador_insar/output/inverse_models/models/sm_insar_5win_vr3.4.0014.inv.total'
out_file = '/Users/dmelgar/Ecuador2016/tsunami/dtopo/sm_insar_5win_vr3.4.0014.dtopo'
x = arange(-82, -79, 0.005)
y = arange(-1.5, 1.5, 0.005)
refine_factor = None
mu = 40e9

fault = move_seafloor_okada(mudpy_file,
                            out_file,
                            x,
                            y,
                            refine_factor=refine_factor,
                            mu=mu,
                            return_object=True)