- 积分
- 1473
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2015-10-28
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
家园的各位老师,能帮我看看下面的程序吗.我想绘制2016年200高度场的距平,程序出错了.谢谢
程序如下:
hgt1 = ncread('D:\matlab\MATLAB\wavelet\level\hgt.mon.mean.nc','hgt');
lon = ncread('D:\matlab\MATLAB\wavelet\level\hgt.mon.mean.nc','lon');
lat = ncread('D:\matlab\MATLAB\wavelet\level\hgt.mon.mean.nc','lat');
hgt2 = hgt1(:,:,10,97:456);
ran = 360;
[x,y] = meshgrid(lon,lat);
hgt_mn=zeros(ran,2340);
for i=1:ran
squ=squeeze(hgt2(8:85,17:46,i));
hgt_mn(i,:)=reshape(squ,1,2340);
end
hgt_nan=isnan(hgt_mn);
k=0;
for j=1:2340
if sum(hgt_nan(:,j)==0)
k=k+1;
hgt_(:,k)=hgt_mn(:,j);
end
end
HGT=zeros(size(hgt_));
% 求每月的距平
for i=1:12
%
HGT(i:12:ran-12+i,:)=hgt_(i:12:end,:)-repmat(mean(hgt_(i:12:end,:),1),size(hgt_(i:12:end,:),1),1);
end
MHGT = mean(HGT(349:360,1:2340));
m_proj('Equidistant cylindrical','long',[9.5 212],'lat',[-24.5 52]);
m_coast('patch',[0.98 0.98 0.98],'edgecolor','k');
m_grid('box','on','xtick',10,'tickdir','in','yaxislocation','left','fontsize',10);
xlabel('经度','fontsize',12);
ylabel('纬度','fontsize',12);
title('200hpa位势高度距平','fontsize',15);
hold on
[C,H]=m_contour(x(17:46,8:85),y(19:45,8:85),MHGT(8:85,17:46)',50,'ShowText','on',...
'Color','r','LineWidth',0.8);
clabel(C,H,'labelspacing',1000);
|
|