- 积分
- 237
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2018-10-24
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
matlab 展示SCS三维海底地形图
只为秀图而已咯,哈哈
- clc ; close ; clear;
- path = 'xx';
- lon0=ncread([path,'ETOPO1_Bed_g_gmt4.grd'],'x');
- lat0=ncread([path,'ETOPO1_Bed_g_gmt4.grd'],'y');
- topo0=ncread([path,'ETOPO1_Bed_g_gmt4.grd'],'z');
- topo0=topo0';
- lonmin = 98;
- lonmax = 130;
- latmin = 0;
- latmax = 30;
- ix = find(lon0>lonmin & lon0<lonmax);
- iy = find(lat0>latmin & lat0<latmax);
- tlon = lon0(ix);
- tlat = lat0(iy);
- topo = topo0(iy,ix);
- data = topo; data(data>=0)=nan;
- [xx,yy] = meshgrid(tlon,tlat);
- max = max(data(:));min = min(data(:));
- %% ----------------plot topo by joker------------
- close ;
- figure
- view([12 -10 50])
- %surf(x',y',topog,[1 1],'-k','linewidth',2);
- hold on
- surf(xx,yy,data);
- shading interp;
- axis([lonmin lonmax latmin latmax min max])%lon:30~55(x);lat:-40~0(y);
- xlabel('longitude(E)','FontSize',16);
- ylabel('latitude(S)','FontSize',16);
- zlabel('Depth(m)','FontSize',16);
- %colormap(b2r(min,max));
- mycolor=zeros(3,202);
- mycolor(1,:)=[0:0.01:1 zeros(1,101)+1];
- mycolor(2,:)=[0:0.01:1 1:-0.01:0];
- mycolor(3,:)=[zeros(1,101)+1 1:-0.01:0];
- mycolor = mycolor';
- colormap(mycolor);
- h = colorbar('v');
- caxis([min max]);
- set(get(h,'ylabel'),'string','Depth(m)','fontsize',21);
- text(lonmin+5,latmax-5,10,'China','color','k','fontsize',25);
- text(lonmax-5,latmax-15,10,'Pacific','color','k','fontsize',20);
- text(lonmin+15,latmin+10,10,'SCS','color','k','fontsize',20);
- set(gca,'fontsize',16);
- disp(' !!OK!! ');
复制代码
|
-
|