- 积分
- 286
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-4-14
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
这是我做的6各月的时间高度距平剖面图,但是曲线不平滑,用什么方法能把曲线变平滑,我用interp2差值一直显示错误,求各位帮忙啊
程序是:ncinf=netcdf.open('f:\shum.mon.mean.nc','NOWRITE');
lon=ncread('f:\shum.mon.mean.nc','lon');
lat=ncread('f:\shum.mon.mean.nc','lat');
lev=ncread('f:\shum.mon.mean.nc','level');
time=ncread('f:\shum.mon.mean.nc','time');
shum10=ncread('f:\shum.mon.mean.nc','shum',[40 26 1 10],[4 4 8 65],[1 1 1 12]);
ave10=zeros(1,65);
AVE10=zeros(1,8);
for i=1:8
for j=1:65
ave=mean(mean(shum10(:,:,i,j)));
ave10(j)=ave;
end
AVE10(i)=mean(ave10);
end
ynAVE10=zeros(1,8);
for i=1:8
ave=mean(mean(shum10(:,:,i,64)));
ynAVE10(i)=ave;
end
juping10=zeros(1,8);
juping10=ynAVE10-AVE10;
shum11=ncread('f:\shum.mon.mean.nc','shum',[40 26 1 11],[4 4 8 65],[1 1 1 12]);
ave11=zeros(1,65);
AVE11=zeros(1,8);
for i=1:8
for j=1:65
ave=mean(mean(shum11(:,:,i,j)));
ave11(j)=ave;
end
AVE11(i)=mean(ave11);
end
ynAVE11=zeros(1,8);
for i=1:8
ave=mean(mean(shum11(:,:,i,64)));
ynAVE11(i)=ave;
end
juping11=zeros(1,8);
juping11=ynAVE11-AVE11;
shum12=ncread('f:\shum.mon.mean.nc','shum',[40 26 1 12],[4 4 8 65],[1 1 1 12]);
ave12=zeros(1,65);
AVE12=zeros(1,8);
for i=1:8
for j=1:65
ave=mean(mean(shum12(:,:,i,j)));
ave12(j)=ave;
end
AVE12(i)=mean(ave12);
end
ynAVE12=zeros(1,8);
for i=1:8
ave=mean(mean(shum12(:,:,i,64)));
ynAVE12(i)=ave;
end
juping12=zeros(1,8);
juping12=ynAVE12-AVE12;
shum1=ncread('f:\shum.mon.mean.nc','shum',[40 26 1 1],[4 4 8 66],[1 1 1 12]);
ave1=zeros(1,66);
AVE1=zeros(1,8);
for i=1:8
for j=1:66
ave=mean(mean(shum1(:,:,i,j)));
ave1(j)=ave;
end
AVE1(i)=mean(ave1);
end
ynAVE1=zeros(1,8);
for i=1:8
ave=mean(mean(shum1(:,:,i,65)));
ynAVE1(i)=ave;
end
juping1=zeros(1,8);
juping1=ynAVE1-AVE1;
shum2=ncread('f:\shum.mon.mean.nc','shum',[40 26 1 2],[4 4 8 66],[1 1 1 12]);
ave2=zeros(1,66);
AVE2=zeros(1,8);
for i=1:8
for j=1:66
ave=mean(mean(shum2(:,:,i,j)));
ave2(j)=ave;
end
AVE2(i)=mean(ave2);
end
ynAVE2=zeros(1,8);
for i=1:8
ave=mean(mean(shum2(:,:,i,65)));
ynAVE1(i)=ave;
end
juping2=zeros(1,8);
juping2=ynAVE2-AVE2;
shum3=ncread('f:\shum.mon.mean.nc','shum',[40 26 1 3],[4 4 8 66],[1 1 1 12]);
ave3=zeros(1,66);
AVE3=zeros(1,8);
for i=1:8
for j=1:66
ave=mean(mean(shum3(:,:,i,j)));
ave3(j)=ave;
end
AVE3(i)=mean(ave3);
end
ynAVE3=zeros(1,8);
for i=1:8
ave=mean(mean(shum3(:,:,i,65)));
ynAVE3(i)=ave;
end
juping3=zeros(1,8);
juping3=ynAVE3-AVE3;
shum4=ncread('f:\shum.mon.mean.nc','shum',[40 26 1 4],[4 4 8 66],[1 1 1 12]);
ave4=zeros(1,66);
AVE4=zeros(1,8);
for i=1:8
for j=1:66
ave=mean(mean(shum4(:,:,i,j)));
ave4(j)=ave;
end
AVE4(i)=mean(ave4);
end
ynAVE4=zeros(1,8);
for i=1:8
ave=mean(mean(shum4(:,:,i,65)));
ynAVE4(i)=ave;
end
juping4=zeros(1,8);
juping4=ynAVE4-AVE4;
JP=[juping11;juping12;juping1;juping2;juping3;juping4];
[l,t]=meshgrid(double(lev(1:8)),1:6);
contourf(t,l,JP);
set(gca, 'YDir', 'reverse');
colorbar;
|
|