Matlab处理气象数据(十一)数据的异常值计算

18 篇文章 70 订阅
%平均温度的异常值计算
load('Tem1.mat');%导入NCEP数据的面积加权年平均
load('Tem2.mat');%导入观测数据的面积加权年平均
m1=mean(Tem1); %求Tem1的平均值
m2=mean(Tem2);
a1=Tem1-m1; %求Tem1的距平
a2=Tem2-m2;
plot(a1,'r.-','linewidth',2);%画NCEP数据年平均气温折线图,红色实线实心点
hold on
plot(a2,'b.-','linewidth',2);
axis([ -inf inf -1.5 1.5]); %设置纵坐标范围
legend({'NCEP','Observed'},'Location','Northwest');%添加图例
set(gca,'xtick',[2 7 12 17 22 27 32],'xticklabel',{'1980','1985','1990','1995','2000','2005','2010'});%在x轴特定位置上添加标注
set(gca, 'FontSize',10,'FontWeight','Bold','tickdir','out') %设置标注为10号字、加粗、标记线向外
h=xlabel('Year'); %设置x轴名称
set(h, 'FontSize',10,'FontWeight','Bold')
h=ylabel('Temperarure(\circC)'); %设置y轴名称
set(h, 'FontSize',10,'FontWeight','Bold') 
xlim([1 35])%x轴范围锁定为1~35
box off %去掉外框
hold off

在这里插入图片描述

NCEP数据和观测数据平均温度的异常值
%最高温度的异常值计算
load('Temmax1.mat');
load('Temmax2.mat');
amax1=Temmax1-mean(Temmax1); %求Temmax1的距平
amax2=Temmax2-mean(Temmax2);
plot(amax1,'r.-','linewidth',2);%画NCEP数据最高气温折线图,红色实线实心点
hold on
plot(amax2,'b.-','linewidth',2);
axis([ -inf inf -1.5 1.5]); %设置纵坐标范围
legend({'NCEP','Observed'},'Location','Northwest');%添加图例
set(gca,'xtick',[2 7 12 17 22 27 32],'xticklabel',{'1980','1985','1990','1995','2000','2005','2010'});%在x轴特定位置上添加标注
set(gca, 'FontSize',10,'FontWeight','Bold','tickdir','out') %设置标注为10号字、加粗、标记线向外
h=xlabel('Year'); %设置x轴名称
set(h, 'FontSize',10,'FontWeight','Bold')
h=ylabel('Temperarure(\circC)'); %设置y轴名称
set(h, 'FontSize',10,'FontWeight','Bold')
xlim([1 35])%x轴范围锁定为1~35
box off %去掉外框
hold off

在这里插入图片描述

NCEP数据和观测数据最高温度的异常值
%最低温度的异常值计算
load('Temmin1.mat');
load('Temmin2.mat');
amin1=Temmin1-mean(Temmin1); %求Temmin1的距平
amin2=Temmin2-mean(Temmin2);
plot(amin1,'r.-','linewidth',2);%画NCEP数据最低气温折线图,红色实线实心点
hold on
plot(amin2,'b.-','linewidth',2);
axis([ -inf inf -1.5 1.5]); %设置纵坐标范围
legend({'NCEP','Observed'},'Location','Northwest');%添加图例
set(gca,'xtick',[2 7 12 17 22 27 32],'xticklabel',{'1980','1985','1990','1995','2000','2005','2010'});%在x轴特定位置上添加标注
set(gca, 'FontSize',10,'FontWeight','Bold','tickdir','out') %设置标注为10号字、加粗、标记线向外
h=xlabel('Year'); %设置x轴名称
set(h, 'FontSize',10,'FontWeight','Bold')
h=ylabel('Temperarure(\circC)'); %设置y轴名称
set(h, 'FontSize',10,'FontWeight','Bold') 
xlim([1 35])%x轴范围锁定为1~35
box off %去掉外框
hold off

在这里插入图片描述

NCEP数据和观测数据最低温度的异常值

相关链接:
Matlab处理气象数据——目录

  • 8
    点赞
  • 53
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值