|
| 1 | +% read from accuacc.data to plot snapshot of nucleation |
| 2 | +% var = load('./lk22_h80_N25_T1/'); |
| 3 | +% var = load('./lk22_h80_N25_T1/vardep-lk22_h80_N25_T1.dat'); |
| 4 | +% var = load('./lk20_h90_N25_T2/vardep-lk20_h90_N25_T2.dat'); |
| 5 | +% var = load('./lk 20_h90_N25_T2_slip/vardep-lk20_h90_N25_T2.dat'); |
| 6 | +var = load('h90_N25_T2/vardep-h90_N25_T2.dat'); |
| 7 | +% var = load('eq_h90_N25_T2/NG/vardep-lk20_h90_N25_T2.dat'); |
| 8 | + |
| 9 | +depth = var(:,1); |
| 10 | +eff = var(:,2); |
| 11 | +dc = var(:,3); |
| 12 | +pab = var(:,4); |
| 13 | +pa = var(:,5); |
| 14 | + |
| 15 | +len=length(pa); |
| 16 | + |
| 17 | +%% calculate accumulative slip on the fault |
| 18 | +% num = load('../Patch_num4.txt'); |
| 19 | +data = load('400km_1km_smooth.gts'); % load meshing - read geometry |
| 20 | +nvex = data(1,1); ncell = data(1,3); |
| 21 | +vertex = data(2:nvex+1,:); |
| 22 | +cell = data(2+nvex:1+nvex+ncell,:); |
| 23 | + |
| 24 | +%% |
| 25 | +load('/Users/duoli/Documents/Mexico/2014SSE/Contour/guerrero.mat'); |
| 26 | +[x,y] = km2lonlat_mex(vertex(:,1)/1000,vertex(:,2)/1000,-55); % rotation back to longitude-latitude |
| 27 | + |
| 28 | +figure; |
| 29 | +set(gcf,'position',[100 100 850 750]); |
| 30 | +subplot(2,2,1); |
| 31 | +hold on; |
| 32 | +box on; |
| 33 | +set(gca,'linewidth',1.2,'fontsize',12); |
| 34 | +% scatter(x(1:1:end,1),y(1:1:end,1),8,100*accslip(1:1:end),'filled'); |
| 35 | +set(gca,'xlim',[-102.5, -99],'ylim',[16.5,19],'fontsize',12); |
| 36 | +% title('Mapview of a-b'); |
| 37 | +xlabel('longitude'); |
| 38 | +ylabel('latitude'); |
| 39 | +colormap jet; |
| 40 | + |
| 41 | +cl = colorbar ; |
| 42 | +% cl.Limits = [0 50] ; |
| 43 | +caxis([-0.0035 0.0035 ]) ; |
| 44 | +cl.Label.String = 'a-b' ; |
| 45 | + |
| 46 | +tr = triangulation(cell(1:len,:),x,y,-vertex(:,3)); |
| 47 | +trisurf(tr,pab,'edgecolor','none','facealpha',0.9); |
| 48 | + |
| 49 | +% earthquake |
| 50 | +eq = load('/Users/duoli/Documents/Mexico//2014SSE/Contour/2014Eq_USGS.txt'); |
| 51 | +plot(eq(1,1),eq(1,2),'pr','markerfacecolor','r','markersize',16); % 2014 Papanoa epicenter from USGS |
| 52 | +af = load('/Users/duoli/Documents/Mexico//2014SSE/Contour/2014Eq_aftershock.txt'); |
| 53 | +% plot(af(:,1),af(:,2),'pk','markerfacecolor','y','markersize',16); % 2014 Papanoa epicenter from USGS |
| 54 | +% city |
| 55 | +city = load('/Users/duoli/Documents/Mexico//2014SSE/Contour/city2.txt'); |
| 56 | +plot(city(:,1),city(:,2),'sk','markerfacecolor','k','markersize',6); % 2014 Papanoa epicenter from USGS |
| 57 | + |
| 58 | +% set(gca,'Yscale','log','YLim',[1.91e20 1.98e20]); |
| 59 | + |
| 60 | +% trench, coastline and depth contour |
| 61 | +trch = load('/Users/duoli/Documents/Mexico//2014SSE/Contour/MAT_trench.txt'); |
| 62 | +[tr_xr,tr_yr] = lonlat2km_mex(trch(:,1),trch(:,2),0); |
| 63 | +plot(trch(:,1),trch(:,2),'-k','linewidth',2.0); |
| 64 | +% plot(trch(1:12:end,1),trch(1:12:end,2)+0.015,'<k','markerface','k'); |
| 65 | +[ncst_xr,ncst_yr] = lonlat2km_mex(ncst(:,1),ncst(:,2),0); %% sphere plattern + rotate 70 degree. |
| 66 | +mapshow(ncst(:,1),ncst(:,2),'DisplayType','line','color','k','linewidth',1.2); |
| 67 | + |
| 68 | +depcon = load('/Users/duoli/Documents/Mexico//2014SSE/Contour/contour_latlon2.txt'); |
| 69 | +mapshow(depcon(:,1),depcon(:,2),'displaytype','line','color','w','linestyle','-.','linewidth',1.5); |
| 70 | + |
| 71 | + |
| 72 | +% legend('data','2014 Mw7.2','Aftershocks','GPS stations','trench','coastline','isodepth'); |
| 73 | + |
| 74 | +% |
| 75 | +subplot(2,2,2); |
| 76 | +hold on; |
| 77 | +box on; |
| 78 | +set(gca,'linewidth',1.2,'fontsize',12); |
| 79 | +% scatter(x(1:1:end,1),y(1:1:end,1),8,100*accslip(1:1:end),'filled'); |
| 80 | +set(gca,'xlim',[-102.5, -99],'ylim',[16.5,19],'fontsize',12); |
| 81 | +% title('Mapview of effective normal stress'); |
| 82 | +xlabel('longitude'); |
| 83 | +ylabel('latitude'); |
| 84 | +colormap jet; |
| 85 | + |
| 86 | +cl = colorbar ; |
| 87 | +% cl.Limits = [0 50] ; |
| 88 | +caxis([0 50 ]) ; |
| 89 | +cl.Label.String = 'effective normal stress (MPa)' ; |
| 90 | + |
| 91 | +trisurf(tr,eff/10,'edgecolor','none','facealpha',0.9); |
| 92 | + |
| 93 | +% earthquake |
| 94 | +plot(eq(1,1),eq(1,2),'pr','markerfacecolor','r','markersize',16); % 2014 Papanoa epicenter from USGS |
| 95 | +% plot(af(:,1),af(:,2),'pk','markerfacecolor','y','markersize',16); % 2014 Papanoa epicenter from USGS |
| 96 | +% city |
| 97 | +plot(city(:,1),city(:,2),'sk','markerfacecolor','k','markersize',6); % 2014 Papanoa epicenter from USGS |
| 98 | + |
| 99 | +% set(gca,'Yscale','log','YLim',[1.91e20 1.98e20]); |
| 100 | + |
| 101 | +% trench, coastline and depth contour |
| 102 | +plot(trch(:,1),trch(:,2),'-k','linewidth',2.0); |
| 103 | +% plot(trch(1:12:end,1),trch(1:12:end,2)+0.015,'<k','markerface','k'); |
| 104 | +mapshow(ncst(:,1),ncst(:,2),'DisplayType','line','color','k','linewidth',1.2); |
| 105 | +mapshow(depcon(:,1),depcon(:,2),'displaytype','line','color','w','linestyle','-.','linewidth',1.5); |
| 106 | + |
| 107 | +% legend('data','2014 Mw7.2','Aftershocks','GPS stations','trench','coastline','isodepth'); |
| 108 | + |
| 109 | +subplot(2,2,3); |
| 110 | +hold on; |
| 111 | +box on; |
| 112 | +set(gca,'linewidth',1.2,'fontsize',12); |
| 113 | +% scatter(x(1:1:end,1),y(1:1:end,1),8,100*accslip(1:1:end),'filled'); |
| 114 | +set(gca,'xlim',[-102.5, -99],'ylim',[16.5,19],'fontsize',12); |
| 115 | +xlabel('longitude'); |
| 116 | +ylabel('latitude'); |
| 117 | +colormap jet; |
| 118 | + |
| 119 | +cl = colorbar ; |
| 120 | +% cl.Limits = [0 50] ; |
| 121 | +caxis([0 200 ]) ; |
| 122 | +cl.Label.String = 'dc (mm)' ; |
| 123 | + |
| 124 | +trisurf(tr,dc,'edgecolor','none','facealpha',0.9); |
| 125 | + |
| 126 | +% plot(af(:,1),af(:,2),'pk','markerfacecolor','y','markersize',16); % 2014 Papanoa epicenter from USGS |
| 127 | +% city |
| 128 | +plot(city(:,1),city(:,2),'sk','markerfacecolor','k','markersize',6); % 2014 Papanoa epicenter from USGS |
| 129 | + |
| 130 | +% set(gca,'Yscale','log','YLim',[1.91e20 1.98e20]); |
| 131 | + |
| 132 | +% trench, coastline and depth contour |
| 133 | +plot(trch(:,1),trch(:,2),'-k','linewidth',2.0); |
| 134 | +% plot(trch(1:12:end,1),trch(1:12:end,2)+0.015,'<k','markerface','k'); |
| 135 | +mapshow(ncst(:,1),ncst(:,2),'DisplayType','line','color','k','linewidth',1.2); |
| 136 | +mapshow(depcon(:,1),depcon(:,2),'displaytype','line','color','w','linestyle','-.','linewidth',1.5); |
| 137 | + |
| 138 | +% legend('data','2014 Mw7.2','Aftershocks','GPS stations','trench','coastline','isodepth'); |
| 139 | + |
| 140 | +subplot(2,2,4); |
| 141 | +hold on; |
| 142 | +box on; |
| 143 | +set(gca,'linewidth',1.2,'fontsize',12); |
| 144 | +% scatter(x(1:1:end,1),y(1:1:end,1),8,100*accslip(1:1:end),'filled'); |
| 145 | +set(gca,'xlim',[-102.5, -99],'ylim',[16.5,19],'fontsize',12); |
| 146 | +xlabel('longitude'); |
| 147 | +ylabel('latitude'); |
| 148 | +colormap jet; |
| 149 | + |
| 150 | +cl = colorbar ; |
| 151 | +% cl.Limits = [0 50] ; |
| 152 | +caxis([0.01 0.05]) ; |
| 153 | +cl.Label.String = 'a' ; |
| 154 | + |
| 155 | +trisurf(tr,pa,'edgecolor','none','facealpha',0.9); |
| 156 | +% plot(af(:,1),af(:,2),'pk','markerfacecolor','y','markersize',16); % 2014 Papanoa epicenter from USGS |
| 157 | +plot(city(:,1),city(:,2),'sk','markerfacecolor','k','markersize',6); % 2014 Papanoa epicenter from USGS |
| 158 | + |
| 159 | +% set(gca,'Yscale','log','YLim',[1.91e20 1.98e20]); |
| 160 | +% trench, coastline and depth contour |
| 161 | +plot(trch(:,1),trch(:,2),'-k','linewidth',2.0); |
| 162 | +% plot(trch(1:12:end,1),trch(1:12:end,2)+0.015,'<k','markerface','k'); |
| 163 | +mapshow(ncst(:,1),ncst(:,2),'DisplayType','line','color','k','linewidth',1.2); |
| 164 | +mapshow(depcon(:,1),depcon(:,2),'displaytype','line','color','w','linestyle','-.','linewidth',1.5); |
| 165 | + |
| 166 | +% legend('data','2014 Mw7.2','Aftershocks','GPS stations','trench','coastline','isodepth'); |
0 commit comments