資源簡介
MATLAB畫氣溶膠厚度分布在寧夏地區的程序,為求世界國界shape特出次程序
代碼片段和文件信息
clc;??%清屏
clear;?%清空
datadir=‘C:\Users\dell\Desktop\數據\AOD\year\‘;?%指定批量數據所在的文件夾
filelist=dir([datadir‘*.nc‘]);?%指定批量數據的類型
k=length(filelist);
filename=[datadirfilelist(1).name];
%?M=‘OMAEROe_003_SingleScatteringAlbedoMW_483_5‘%SSA年
?M=‘OMAEROe_003_AerosolOpticalThicknessMW_483_5‘%AOD年
%?M=‘MYD08_D3_6_AOD_550_Dark_Target_Deep_Blue_Combined_Mean‘%AOD年
%?M=‘MYD08_D3_6_Deep_Blue_Angstrom_Exponent_Land_Mean‘;%AE年
%?M=‘MYD08_M3_6_Deep_Blue_Angstrom_Exponent_Land_Mean_Mean‘%季節AE
%?M=‘MYD08_M3_6_AOD_550_Dark_Target_Deep_Blue_Combined_Mean_Mean‘%AODsenson
%?lon=ncread(filename‘lon‘);%讀取經度變量
%??lat=ncread(filename‘lat‘);%讀取緯度變量
%?Y=min(lat):0.2:max(lat);
%?X=min(lon):0.2:max(lon);
%?[XIYI]=meshgrid(XY);%畫網格
V=[];
b=2004;
figure
%????set(gcf‘Units‘‘inches‘‘Position‘[0.11.5106.3])
for?s=1:k;
????b=b+1;
???????filename=[datadirfilelist(s).name];
?????lon=ncread(filename‘lon‘);%讀取經度變量
??lat=ncread(filename‘lat‘);%讀取緯度變量
??Y=min(lat):0.2:max(lat);
X=min(lon):0.2:max(lon);
[XIYI]=meshgrid(XY);%畫網格
%????ncdisp(filename);%顯示nc文件的所有結構,以便大概了解里面的內容
%????ncdisp(filenameM);%
?N=ncread(filenameM);%獲取變量數據?
?V=[V?N];
??N(N>1)?=?0.5;
%?????3*5position
????m_proj(‘equidistant?cylindrical‘‘lat‘[35?39.5]‘lon‘[104?108]);?
????set(gcf‘Units‘‘inches‘‘Position‘[0.050.0598])
????if?(rem(s5))
????axes(‘Units‘‘inches‘‘Position‘[1.3*(rem(s5)-0.96)?6-2*(fix(s/5+0.1))?4.5??1.8]);
????else
????axes(‘Units‘‘inches‘‘Position‘[1.28*(rem((s-1)5)+0.1)?6-2*(fix((s-1)/5+0.1))?4.5?1.8]);
????end
??if?(rem(s5)~=1)?
???????m_grid(‘linestyle‘‘none‘‘tickdir‘‘in‘‘xtick‘(104:1:107)...
?????‘ytick‘[]‘linewidth‘0.3‘FontSize‘8‘fontname‘‘Times?New?Roman‘);?????
?????????
??else
??????m_grid(‘linestyle‘‘none‘‘tickdir‘‘in‘‘xtick‘(104:1:107)...
?????‘ytick‘(-90:1:90)‘linewidth‘0.3‘FontSize‘8‘fontname‘‘Times?New?Roman‘);?
end
%?????
%%5*2position
%??m_proj(‘equidistant?cylindrical‘‘lat‘[35?50]‘lon‘[72?100]);?
%?set(gcf‘Units‘‘inches‘‘Position‘[0.050.055.57.9])
%?if?(rem(s2)==1)
%?axes(‘Units‘‘inches‘‘Position‘[0.05?0.75*(9.4-s)?3??1.5]);
%?else
%?axes(‘Units‘‘inches‘‘Position‘[2.1?0.75*(9.4-(s-1))?3?1.5]);
%?end
%?%%
%5*2橫縱坐標標簽的控制
%?m_coast(‘color‘‘k‘‘linewidth‘1.2);?
%?if?(rem(s2)==1)
%?????m_grid(‘linestyle‘‘none‘‘tickdir‘‘in‘‘xtick‘[]...
%?????‘ytick‘(34:2:50)‘linewidth‘0.3‘FontSize‘10‘fontname‘‘Times?New?Roman‘);
%?%?elseif?((fix(s/9)==1)|(rem(s2)==0))
%?%?????m_grid(‘linestyle‘‘none‘‘tickdir‘‘in‘‘xtick‘(70:4:110)...
%?%?????‘ytick‘[]‘linewidth‘0.3‘FontSize‘10‘fontname‘‘Times?New?Roman‘);?
%?end
%?if?(fix(s/9)==1)|(rem(s2)==0)
%?????m_grid(‘linestyle‘‘none‘‘tickdir‘‘in‘‘xtick‘(70:4:110)...
%?????‘ytick‘[]‘linewidth‘0.3‘FontSize‘10‘fontname‘‘Times?New?Roman‘);
%?end
%%?1*3position
%?m_proj(‘equidistant?cylindrical‘‘lat‘[35?39.5]‘lon‘[104?108])
%?set(gcf‘Units‘‘inches‘‘Position‘[00103])
%?swi
評論
共有 條評論