Обновление
parent
e0e7ff530a
commit
235753fd1a
File diff suppressed because it is too large
Load Diff
30
Program.m
30
Program.m
|
@ -10,10 +10,10 @@ param.k=1.2; % коэффициент для расчёта доверитель
|
|||
%% Подгрузка сведений об катаклизме
|
||||
% N = 1 - Япония [11,3,2011]
|
||||
% N = 2 - Чили [16,9,2015]
|
||||
N = 1;
|
||||
N = 6;
|
||||
prev=10;
|
||||
next=5;
|
||||
|
||||
param.prev=prev;
|
||||
load katalog
|
||||
|
||||
param.M=katalog(N).M; % магнитуда
|
||||
|
@ -31,9 +31,8 @@ param.day_x=dd;
|
|||
|
||||
param.filename_report=[katalog(N).Location,'_', myformat(katalog(N).day,2)...
|
||||
, myformat(katalog(N).month,2), myformat(katalog(N).year,4),'.mat'];
|
||||
|
||||
|
||||
param.type_sensor='ssies';
|
||||
%% Первичная информация
|
||||
for i=param.sattelite_available
|
||||
for j=[10^(0.43*param.M) 1000]
|
||||
param.sattelite_range=i;%15:18; % Выбор с какого спутника требуются данные
|
||||
|
@ -42,7 +41,10 @@ for i=param.sattelite_available
|
|||
grafik(param,katalog(N))
|
||||
end
|
||||
end
|
||||
|
||||
%% Корреляционные матрицы
|
||||
param=analysis_corr(param);
|
||||
%% Превышение порога
|
||||
%param=analysis_limit(param);
|
||||
|
||||
function grafik(param,katalog)
|
||||
win1=figure;
|
||||
|
@ -112,13 +114,13 @@ for i=1:b
|
|||
end
|
||||
end
|
||||
|
||||
function explot(ax,y,setXLim,param)
|
||||
x=[];
|
||||
for i=1:length(param.dates)
|
||||
x(i)=param.dates(i).day;
|
||||
end
|
||||
plot(ax,x,y,'Color','k','Marker','o');
|
||||
xticks(x)
|
||||
function limit=explot(ax,y,setXLim,param)
|
||||
%x=[];
|
||||
%for i=1:length(param.dates)
|
||||
% x(i)=param.dates(i).day;
|
||||
%end
|
||||
plot(ax,y,'Color','k','Marker','o');
|
||||
xticks(1:length(param.dates))
|
||||
N_sat=findNsat(param.report,param.sattelite_range,param.R_quake);
|
||||
xtlabels={param.report.data(N_sat).date};
|
||||
xticklabels(xtlabels{1})
|
||||
|
@ -136,6 +138,6 @@ plot(ax,XLim,[L1 L1],'Color','b','LineStyle','--');
|
|||
plot(ax,XLim,[L2 L2],'Color','b','LineStyle','--');
|
||||
plot(ax,XLim,[Q2 Q2],'Color','m','LineStyle','--');
|
||||
YLim=ax.YLim;
|
||||
plot(ax,[param.day_x param.day_x],YLim,'Color','r');
|
||||
ax.XLim=setXLim;
|
||||
plot(ax,[1+param.prev 1+param.prev],YLim,'Color','r');
|
||||
ax.XLim=[1 length(param.dates)];
|
||||
end
|
BIN
katalog.mat
BIN
katalog.mat
Binary file not shown.
|
@ -61,20 +61,7 @@ for i=1:str
|
|||
end
|
||||
end
|
||||
|
||||
function extract_data_fun(sattelite, year, month, type_sensor)
|
||||
foldername=['DATA/f' num2str(sattelite) '/' type_sensor '/' num2str_new(year,4) '/' num2str_new(month,2)];
|
||||
target=ls(foldername);
|
||||
[str row]=size(target);
|
||||
for i=1:str
|
||||
if target(i,end-2:end)=='.gz'
|
||||
message=['Распаковка:',target(i,:),'\n'];
|
||||
fprintf(message);
|
||||
gunzip([foldername,'/',target(i,:)],foldername);
|
||||
message=['Распакован\n'];
|
||||
fprintf(message);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function download_fun(sattelite, year, month, type_sensor)
|
||||
% https://satdat.ngdc.noaa.gov/dmsp/data/f18/ssies/2020/05/
|
||||
|
@ -93,10 +80,13 @@ for i=1:length(url)
|
|||
url_file = [url_site url(i).file];
|
||||
filename = ['DATA/f' num2str(sattelite) '/' type_sensor '/' num2str_new(year,4) '/' num2str_new(month,2) '/' url(i).file];
|
||||
mkdir(['DATA/f' num2str(sattelite) '/' type_sensor '/' num2str_new(year,4) '/' num2str_new(month,2)])
|
||||
outfilename = websave(filename,url_file);
|
||||
message='скачано\n';
|
||||
if ~exist(filename,'file')
|
||||
outfilename = websave(filename,url_file);
|
||||
message='скачано\n';
|
||||
else
|
||||
message='уже есть\n';
|
||||
end
|
||||
fprintf(message);
|
||||
|
||||
end
|
||||
|
||||
a=1;
|
||||
|
|
Loading…
Reference in New Issue