-
Notifications
You must be signed in to change notification settings - Fork 0
/
tectonics_plot.py
executable file
·269 lines (217 loc) · 11.8 KB
/
tectonics_plot.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Generates plot comparing erosion rates to various metrics potentially related
to tectonics.
Written by Adam M. Forte for
"Low variability runoff inhibits coupling of climate, tectonics, and
topography in the Greater Caucasus"
If you use this code or derivatives, please cite the original paper.
"""
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import colors
from matplotlib import gridspec
df=pd.read_csv('data_tables/gc_ero_master_table.csv')
# Extract main variables of interest
ksn=df['mean_ksn'].to_numpy()
ksn_u=df['se_ksn'].to_numpy()
e=df['St_E_rate_m_Myr'].to_numpy()
e_u=df['St_Ext_Unc'].to_numpy()
# Import convergence
cdf=pd.read_csv('data_tables/interpolated_convergence.txt')
c=cdf['con_vel'].to_numpy()
chi=cdf['con_vel_hi'].to_numpy()-c
clo=c-cdf['con_vel_lo'].to_numpy()
l=cdf['lc_vel'].to_numpy()
lhi=cdf['lc_vel_hi'].to_numpy()-l
llo=l-cdf['lc_vel_lo'].to_numpy()
g=cdf['gc_vel'].to_numpy()
ghi=cdf['gc_vel_hi'].to_numpy()-g
glo=g-cdf['gc_vel_lo'].to_numpy()
# Import swath distances
sdf=pd.read_csv('data_tables/swath_distances.txt')
ds=sdf['D_along_SW'].to_numpy()
db=sdf['D_from_SW'].to_numpy()
# Index
idx=np.where((df['sample_name']!='16AF01') & (df['region']!='LC'))
idx_ngc=np.where((df['sample_name']=='16AF01'))
idx_lc=np.where((df['region']=='LC'))
# Structure error
c_u=np.vstack((clo[idx].reshape(1,len(clo[idx])),chi[idx].reshape(1,len(chi[idx]))))
c_u_ngc=np.vstack((clo[idx_ngc].reshape(1,len(clo[idx_ngc])),chi[idx_ngc].reshape(1,len(chi[idx_ngc]))))
c_u_lc=np.vstack((clo[idx_lc].reshape(1,len(clo[idx_lc])),chi[idx_lc].reshape(1,len(chi[idx_lc]))))
l_u=np.vstack((llo[idx].reshape(1,len(llo[idx])),lhi[idx].reshape(1,len(lhi[idx]))))
l_u_ngc=np.vstack((llo[idx_ngc].reshape(1,len(llo[idx_ngc])),lhi[idx_ngc].reshape(1,len(lhi[idx_ngc]))))
l_u_lc=np.vstack((llo[idx_lc].reshape(1,len(llo[idx_lc])),lhi[idx_lc].reshape(1,len(lhi[idx_lc]))))
g_u=np.vstack((glo[idx].reshape(1,len(glo[idx])),ghi[idx].reshape(1,len(ghi[idx]))))
g_u_ngc=np.vstack((glo[idx_ngc].reshape(1,len(glo[idx_ngc])),ghi[idx_ngc].reshape(1,len(ghi[idx_ngc]))))
g_u_lc=np.vstack((glo[idx_lc].reshape(1,len(glo[idx_lc])),ghi[idx_lc].reshape(1,len(ghi[idx_lc]))))
c_vec=np.linspace(0.1,12,100)
c_vec_l=(c_vec/(10*100))*1e6
dips=np.arange(5,55,10)
z_vec_l=[]
for i in range(len(dips)):
z_vec=c_vec_l*np.sin(np.deg2rad(dips[i]))
z_vec_l.append(z_vec)
##### FIGURE 1 ########
fig1=plt.figure(num=1,figsize=(20,6))
dbnorm=colors.Normalize(vmin=0,vmax=100)
ax1=plt.subplot(1,3,1)
sc1=ax1.scatter(l[idx],e[idx],s=60,c=db[idx],norm=dbnorm,cmap='plasma',zorder=2,edgecolors='k')
ax1.errorbar(l[idx],e[idx],xerr=l_u,yerr=e_u[idx],linestyle='none',c='black',zorder=1,elinewidth=0.5)
ax1.scatter(l[idx_ngc],e[idx_ngc],s=60,c=db[idx_ngc],norm=dbnorm,cmap='plasma',zorder=2,edgecolors='k',marker='s')
ax1.errorbar(l[idx_ngc],e[idx_ngc],xerr=l_u_ngc,yerr=e_u[idx_ngc],linestyle='none',c='black',zorder=1,elinewidth=0.5)
ax1.scatter(l[idx_lc],e[idx_lc],s=60,c=db[idx_lc],norm=dbnorm,cmap='plasma',zorder=2,edgecolors='k',marker='^')
ax1.errorbar(l[idx_lc],e[idx_lc],xerr=l_u_lc,yerr=e_u[idx_lc],linestyle='none',c='black',zorder=1,elinewidth=0.5)
cbar1=plt.colorbar(sc1,ax=ax1)
cbar1.ax.set_ylabel('Distance from Center [km]')
ax1.set_xlabel('LC Velocity [mm/yr]')
ax1.set_ylabel('Erosion Rate [m/Myr]')
ax1.set_yscale('log')
ax1.set_ylim((10,10**4))
ax1.set_xlim((0,14))
ax2=plt.subplot(1,3,2)
sc2=ax2.scatter(g[idx],e[idx],s=60,c=db[idx],norm=dbnorm,cmap='plasma',zorder=2,edgecolors='k')
ax2.errorbar(g[idx],e[idx],xerr=g_u,yerr=e_u[idx],linestyle='none',c='black',zorder=1,elinewidth=0.5)
ax2.scatter(g[idx_ngc],e[idx_ngc],s=60,c=db[idx_ngc],norm=dbnorm,cmap='plasma',zorder=2,edgecolors='k',marker='s')
ax2.errorbar(g[idx_ngc],e[idx_ngc],xerr=g_u_ngc,yerr=e_u[idx_ngc],linestyle='none',c='black',zorder=1,elinewidth=0.5)
ax2.scatter(g[idx_lc],e[idx_lc],s=60,c=db[idx_lc],norm=dbnorm,cmap='plasma',zorder=2,edgecolors='k',marker='^')
ax2.errorbar(g[idx_lc],e[idx_lc],xerr=g_u_lc,yerr=e_u[idx_lc],linestyle='none',c='black',zorder=1,elinewidth=0.5)
cbar2=plt.colorbar(sc2,ax=ax2)
cbar2.ax.set_ylabel('Distance from Center [km]')
ax2.set_xlabel('GC Velocity [mm/yr]')
ax2.set_ylabel('Erosion Rate [m/Myr]')
ax2.set_yscale('log')
ax2.set_ylim((10,10**4))
ax2.set_xlim((0,14))
ax3=plt.subplot(1,3,3)
sc3=ax3.scatter(c[idx],e[idx],s=60,c=db[idx],norm=dbnorm,cmap='plasma',zorder=2,edgecolors='k')
ax3.errorbar(c[idx],e[idx],xerr=c_u,yerr=e_u[idx],linestyle='none',c='black',zorder=1,elinewidth=0.5)
ax3.scatter(c[idx_ngc],e[idx_ngc],s=60,c=db[idx_ngc],norm=dbnorm,cmap='plasma',zorder=2,edgecolors='k',marker='s')
ax3.errorbar(c[idx_ngc],e[idx_ngc],xerr=c_u_ngc,yerr=e_u[idx_ngc],linestyle='none',c='black',zorder=1,elinewidth=0.5)
ax3.scatter(c[idx_lc],e[idx_lc],s=60,c=db[idx_lc],norm=dbnorm,cmap='plasma',zorder=2,edgecolors='k',marker='^')
ax3.errorbar(c[idx_lc],e[idx_lc],xerr=c_u_lc,yerr=e_u[idx_lc],linestyle='none',c='black',zorder=1,elinewidth=0.5)
cbar3=plt.colorbar(sc3,ax=ax3)
cbar3.ax.set_ylabel('Distance from Center [km]')
ax3.set_xlabel('LC-GC Convergence [mm/yr]')
ax3.set_ylabel('Erosion Rate [m/Myr]')
ax3.set_yscale('log')
ax3.set_ylim((10,10**4))
ax3.set_xlim((0,14))
fig2=plt.figure(num=2,figsize=(15,8))
ax1=plt.subplot(2,1,1)
dbnorm=colors.Normalize(vmin=0,vmax=100)
sc1=ax1.scatter(c[idx],e[idx],s=60,c=db[idx],norm=dbnorm,cmap='plasma',zorder=3,edgecolors='k')
ax1.errorbar(c[idx],e[idx],xerr=c_u,yerr=e_u[idx],linestyle='none',c='black',zorder=1,elinewidth=0.5)
ax1.scatter(c[idx_ngc],e[idx_ngc],s=60,c=db[idx_ngc],norm=dbnorm,cmap='plasma',zorder=2,edgecolors='k',marker='s')
ax1.errorbar(c[idx_ngc],e[idx_ngc],xerr=c_u_ngc,yerr=e_u[idx_ngc],linestyle='none',c='black',zorder=1,elinewidth=0.5)
ax1.scatter(c[idx_lc],e[idx_lc],s=60,c=db[idx_lc],norm=dbnorm,cmap='plasma',zorder=2,edgecolors='k',marker='^')
ax1.errorbar(c[idx_lc],e[idx_lc],xerr=c_u_lc,yerr=e_u[idx_lc],linestyle='none',c='black',zorder=1,elinewidth=0.5)
for i in range(len(dips)):
ax1.plot(c_vec,z_vec_l[i],c='k',linestyle='--',linewidth=1,zorder=1)
ax1.plot(c_vec,c_vec_l,c='k',linestyle=':',linewidth=2,zorder=1)
ax1.axhline(300,linestyle=':',zorder=1)
ax1.axhline(500,linestyle=':',zorder=1)
cbar1=plt.colorbar(sc1,ax=ax1)
cbar1.ax.set_ylabel('Distance from Center [km]')
ax1.set_xlabel('GC-LC Convergence [mm/yr]')
ax1.set_ylabel('Erosion Rate [m/Myr]')
ax1.set_yscale('log')
ax1.set_ylim((10,10**4))
ax1.set_xlim((0,12))
ax2=plt.subplot(2,1,2)
cnorm=colors.Normalize(vmin=0,vmax=12)
sc2=ax2.scatter(-db[idx],e[idx],s=60,c=c[idx],norm=cnorm,cmap='Spectral_r',zorder=2,edgecolors='k')
ax2.errorbar(-db[idx],e[idx],yerr=e_u[idx],linestyle='none',c='black',zorder=1,elinewidth=0.5)
ax2.scatter(db[idx_ngc],e[idx_ngc],s=60,c=c[idx_ngc],norm=cnorm,cmap='Spectral_r',zorder=2,edgecolors='k',marker='s')
ax2.errorbar(db[idx_ngc],e[idx_ngc],yerr=e_u[idx_ngc],linestyle='none',c='black',zorder=1,elinewidth=0.5)
ax2.scatter(-db[idx_lc],e[idx_lc],s=60,c=c[idx_lc],norm=cnorm,cmap='Spectral_r',zorder=2,edgecolors='k',marker='^')
ax2.errorbar(-db[idx_lc],e[idx_lc],yerr=e_u[idx_lc],linestyle='none',c='black',zorder=1,elinewidth=0.5)
ax2.axhline(300,linestyle=':',zorder=1)
ax2.axhline(500,linestyle=':',zorder=1)
cbar2=plt.colorbar(sc2,ax=ax2)
cbar2.ax.set_ylabel('GC-LC Convergence')
ax2.set_xlabel('Distance from Center [km]')
ax2.set_ylabel('Erosion Rate [m/Myr]')
ax2.set_yscale('log')
ax2.set_ylim((10,10**4))
#### FIGURE 3
dips=np.arange(5,30,5)
z_vec_l=[]
for i in range(len(dips)):
z_vec=c_vec_l*np.sin(np.deg2rad(dips[i]))
z_vec_l.append(z_vec)
gs=gridspec.GridSpec(1,2,width_ratios=[1,2])
fig3=plt.figure(num=3,figsize=(15,6))
ax1=plt.subplot(gs[0])
dbnorm=colors.Normalize(vmin=0,vmax=100)
sc1=ax1.scatter(c[idx],e[idx],s=60,c=db[idx],norm=dbnorm,cmap='plasma',zorder=3,edgecolors='k')
ax1.errorbar(c[idx],e[idx],xerr=c_u,yerr=e_u[idx],linestyle='none',c='black',zorder=1,elinewidth=0.5)
ax1.scatter(c[idx_ngc],e[idx_ngc],s=60,c=db[idx_ngc],norm=dbnorm,cmap='plasma',zorder=2,edgecolors='k',marker='s')
ax1.errorbar(c[idx_ngc],e[idx_ngc],xerr=c_u_ngc,yerr=e_u[idx_ngc],linestyle='none',c='black',zorder=1,elinewidth=0.5)
ax1.scatter(c[idx_lc],e[idx_lc],s=60,c=db[idx_lc],norm=dbnorm,cmap='plasma',zorder=2,edgecolors='k',marker='^')
ax1.errorbar(c[idx_lc],e[idx_lc],xerr=c_u_lc,yerr=e_u[idx_lc],linestyle='none',c='black',zorder=1,elinewidth=0.5)
for i in range(len(dips)):
ax1.plot(c_vec,z_vec_l[i],c='k',linestyle='--',linewidth=1,zorder=1)
ax1.plot(c_vec,c_vec_l,c='k',linestyle=':',linewidth=2,zorder=1)
cbar1=plt.colorbar(sc1,ax=ax1,orientation='horizontal')
cbar1.ax.set_xlabel('Distance from Center [km]')
ax1.set_xlabel('GC-LC Convergence [mm/yr]')
ax1.set_ylabel('Erosion Rate [m/Myr]')
ax1.set_yscale('log')
ax1.set_ylim((10,10**4))
ax1.set_xlim((0,12))
ax2=plt.subplot(gs[1])
cnorm=colors.Normalize(vmin=2,vmax=10)
sc2=ax2.scatter(-db[idx],e[idx],s=60,c=c[idx],norm=cnorm,cmap='Spectral_r',zorder=2,edgecolors='k')
ax2.errorbar(-db[idx],e[idx],yerr=e_u[idx],linestyle='none',c='black',zorder=1,elinewidth=0.5)
ax2.scatter(db[idx_ngc],e[idx_ngc],s=60,c=c[idx_ngc],norm=cnorm,cmap='Spectral_r',zorder=2,edgecolors='k',marker='s')
ax2.errorbar(db[idx_ngc],e[idx_ngc],yerr=e_u[idx_ngc],linestyle='none',c='black',zorder=1,elinewidth=0.5)
ax2.scatter(-db[idx_lc],e[idx_lc],s=60,c=c[idx_lc],norm=cnorm,cmap='Spectral_r',zorder=2,edgecolors='k',marker='^')
ax2.errorbar(-db[idx_lc],e[idx_lc],yerr=e_u[idx_lc],linestyle='none',c='black',zorder=1,elinewidth=0.5)
cbar2=plt.colorbar(sc2,ax=ax2,orientation='horizontal')
cbar2.ax.set_xlabel('GC-LC Convergence')
ax2.set_xlabel('Distance from Center [km]')
ax2.set_ylabel('Erosion Rate [m/Myr]')
ax2.set_yscale('log')
ax2.set_ylim((10,10**4))
fig4=plt.figure(num=4,figsize=(15,8))
ax1=plt.subplot(2,1,1)
dbnorm=colors.Normalize(vmin=0,vmax=100)
sc1=ax1.scatter(c[idx],ksn[idx],s=60,c=db[idx],norm=dbnorm,cmap='plasma',zorder=3,edgecolors='k')
ax1.errorbar(c[idx],ksn[idx],xerr=c_u,yerr=ksn_u[idx],linestyle='none',c='black',zorder=1,elinewidth=0.5)
ax1.scatter(c[idx_ngc],ksn[idx_ngc],s=60,c=db[idx_ngc],norm=dbnorm,cmap='plasma',zorder=2,edgecolors='k',marker='s')
ax1.errorbar(c[idx_ngc],ksn[idx_ngc],xerr=c_u_ngc,yerr=ksn_u[idx_ngc],linestyle='none',c='black',zorder=1,elinewidth=0.5)
ax1.scatter(c[idx_lc],ksn[idx_lc],s=60,c=db[idx_lc],norm=dbnorm,cmap='plasma',zorder=2,edgecolors='k',marker='^')
ax1.errorbar(c[idx_lc],ksn[idx_lc],xerr=c_u_lc,yerr=ksn_u[idx_lc],linestyle='none',c='black',zorder=1,elinewidth=0.5)
cbar1=plt.colorbar(sc1,ax=ax1)
cbar1.ax.set_ylabel('Distance from Center [km]')
ax1.set_xlabel('GC-LC Convergence [mm/yr]')
ax1.set_ylabel('$k_{sn}$ [m]')
ax1.set_xlim((0,12))
ax1.set_ylim((0,550))
ax2=plt.subplot(2,1,2)
cnorm=colors.Normalize(vmin=0,vmax=12)
sc2=ax2.scatter(-db[idx],ksn[idx],s=60,c=c[idx],norm=cnorm,cmap='Spectral_r',zorder=2,edgecolors='k')
ax2.errorbar(-db[idx],ksn[idx],yerr=ksn_u[idx],linestyle='none',c='black',zorder=1,elinewidth=0.5)
ax2.scatter(db[idx_ngc],ksn[idx_ngc],s=60,c=c[idx_ngc],norm=cnorm,cmap='Spectral_r',zorder=2,edgecolors='k',marker='s')
ax2.errorbar(db[idx_ngc],ksn[idx_ngc],yerr=ksn_u[idx_ngc],linestyle='none',c='black',zorder=1,elinewidth=0.5)
ax2.scatter(-db[idx_lc],ksn[idx_lc],s=60,c=c[idx_lc],norm=cnorm,cmap='Spectral_r',zorder=2,edgecolors='k',marker='^')
ax2.errorbar(-db[idx_lc],ksn[idx_lc],yerr=ksn_u[idx_lc],linestyle='none',c='black',zorder=1,elinewidth=0.5)
cbar2=plt.colorbar(sc2,ax=ax2)
cbar2.ax.set_ylabel('GC-LC Convergence')
ax2.set_xlabel('Distance from Center [km]')
ax2.set_ylabel('$k_{sn}$ [m]')
ax2.set_ylim((0,550))
fig5=plt.figure(num=5,figsize=(10,10))
ax1=plt.subplot()
plt.scatter(e,ksn,s=50,c='k',zorder=2)
plt.errorbar(e,ksn,yerr=ksn_u,xerr=e_u,linestyle='none',c='black',zorder=1,elinewidth=0.5)
plt.xscale('log')
plt.yscale('log')
ax1.axvline(300,linestyle=':')
ax1.axvline(500,linestyle=':')
plt.xlabel('Erosion Rate [m/Myr]')
plt.ylabel('$k_{sn}$ [m]')