爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 13757|回复: 2

[秀图] matlab 展示SCS三维海底地形图

[复制链接]

新浪微博达人勋

发表于 2019-8-26 15:49:21 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
matlab 展示SCS三维海底地形图

只为秀图而已咯,哈哈

  1. clc ; close ; clear;
  2. path = 'xx';
  3. lon0=ncread([path,'ETOPO1_Bed_g_gmt4.grd'],'x');
  4. lat0=ncread([path,'ETOPO1_Bed_g_gmt4.grd'],'y');
  5. topo0=ncread([path,'ETOPO1_Bed_g_gmt4.grd'],'z');
  6. topo0=topo0';

  7. lonmin = 98;
  8. lonmax = 130;
  9. latmin = 0;
  10. latmax = 30;
  11. ix = find(lon0>lonmin & lon0<lonmax);
  12. iy = find(lat0>latmin & lat0<latmax);

  13. tlon = lon0(ix);
  14. tlat = lat0(iy);
  15. topo = topo0(iy,ix);
  16. data = topo; data(data>=0)=nan;
  17. [xx,yy] = meshgrid(tlon,tlat);
  18. max = max(data(:));min = min(data(:));
  19. %% ----------------plot topo by joker------------
  20. close ;
  21. figure
  22. view([12 -10 50])
  23. %surf(x',y',topog,[1 1],'-k','linewidth',2);
  24. hold on
  25. surf(xx,yy,data);
  26. shading interp;
  27. axis([lonmin lonmax latmin latmax min max])%lon:30~55(x);lat:-40~0(y);
  28. xlabel('longitude(E)','FontSize',16);
  29. ylabel('latitude(S)','FontSize',16);
  30. zlabel('Depth(m)','FontSize',16);
  31. %colormap(b2r(min,max));
  32. mycolor=zeros(3,202);
  33. mycolor(1,:)=[0:0.01:1 zeros(1,101)+1];
  34. mycolor(2,:)=[0:0.01:1 1:-0.01:0];
  35. mycolor(3,:)=[zeros(1,101)+1 1:-0.01:0];
  36. mycolor = mycolor';
  37. colormap(mycolor);
  38. h = colorbar('v');
  39. caxis([min max]);

  40. set(get(h,'ylabel'),'string','Depth(m)','fontsize',21);
  41. text(lonmin+5,latmax-5,10,'China','color','k','fontsize',25);
  42. text(lonmax-5,latmax-15,10,'Pacific','color','k','fontsize',20);
  43. text(lonmin+15,latmin+10,10,'SCS','color','k','fontsize',20);

  44. set(gca,'fontsize',16);
  45. disp(' !!OK!! ');
复制代码


SCS.jpg
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2019-8-26 15:58:34 | 显示全部楼层
赞!学习一下
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2019-8-30 14:16:09 | 显示全部楼层
漂亮!!
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表