Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
function varargout = Project(varargin)
% Last Modified by GUIDE v2.5 31-Jul-2020 18:45:12
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @Project_OpeningFcn, ...
'gui_OutputFcn', @Project_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before Project is made visible.
function Project_OpeningFcn(hObject, ~, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to Project (see VARARGIN)
ncfile = 'surface.nc';
lati = ncread(ncfile, 'lat');
longe = ncread(ncfile, 'lon');
time = ncread(ncfile, 'hour');
fileName = dir('24HR_CBE_*.csv');
for k = 1 : length(fileName)
theFiles = fileName(k).name;
newMatrix = readmatrix(theFiles);
newMatrix(400,:) = [0];
newMatrix(:,700) = [0];
showmap = pcolor(longe,lati,newMatrix);
showmap.EdgeAlpha =0;
title(sprintf('The time is : %.0f',time(k)));
caxis(handles.axes1, [-0.5 1.5]);
colorbar();
c.Label.String = 'Levels';
load coast;
hold on;
s = plot(long,lat,'k');
showmap;
pause(0.8)
end
% Choose default command line output for Project
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes Project wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = Project_OutputFcn(~, ~, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
% --- Executes on button press in pushbutton4.
function pushbutton4_Callback(hObject, eventdata, handles)
%%CHIMERE BUTTON
ncfile = 'surface.nc';
lati = ncread(ncfile, 'lat');
longe = ncread(ncfile, 'lon');
time = ncread(ncfile, 'hour');
Chimere_ozone = ncread(ncfile, 'chimere_ozone');
for k = 1 : 25
% Matrix starts in the wrong rotation, so rotate it 270 degrees, mirror
% it horizontally and since the values are floating point values we
% want to increase their final value by 10^7 as to allow it to be
% viewed with the color map.
squezed = fliplr(rot90(rot90(rot90(squeeze(Chimere_ozone(:,:,k))))))*1.0e+07;
showmap = pcolor(longe,lati,squezed);
showmap.EdgeAlpha =0;
title(sprintf('The time is : %.0f',time(k)));
caxis(handles.axes1, [-0.5 1.5]);
colorbar();
c.Label.String = 'Levels';
load coast;
hold on;
s = plot(handles.axes1,long,lat,'k');
showmap;
pause(0.6)
end
% Choose default command line output for Project
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% hObject handle to pushbutton4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton5.
function pushbutton5_Callback(hObject, eventdata, handles)
%%EMEP BUTTON
ncfile = 'surface.nc';
lati = ncread(ncfile, 'lat');
longe = ncread(ncfile, 'lon');
time = ncread(ncfile, 'hour');
Emep_ozone = ncread(ncfile, 'emep_ozone');
for k = 1 : 25
squezed = fliplr(rot90(rot90(rot90(squeeze(Emep_ozone(:,:,k))))))*1.0e+07;
showmap = pcolor(longe,lati,squezed);
showmap.EdgeAlpha =0;
title(sprintf('The time is : %.0f',time(k)));
caxis(handles.axes1, [-0.5 1.5]);
c.Label.String = 'Levels';
load coast;
hold on;
s = plot(handles.axes1,long,lat,'k');
showmap;
pause(0.8)
end
% Choose default command line output for Project
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% hObject handle to pushbutton5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton6.
function pushbutton6_Callback(hObject, eventdata, handles)
%%ENSEMBLE BUTTON
ncfile = 'surface.nc';
lati = ncread(ncfile, 'lat');
longe = ncread(ncfile, 'lon');
time = ncread(ncfile, 'hour');
Ensemble_ozone = ncread(ncfile, 'ensemble_ozone');
for k = 1 : 25
squezed = fliplr(rot90(rot90(rot90(squeeze(Ensemble_ozone(:,:,k))))))*1.0e+07;
showmap = pcolor(longe,lati,squezed);
showmap.EdgeAlpha =0;
title(sprintf('The time is : %.0f',time(k)));
caxis(handles.axes1, [-0.5 1.5]);
c.Label.String = 'Levels';
load coast;
hold on;
s = plot(handles.axes1,long,lat,'k');
showmap;
pause(0.8)
end
% Choose default command line output for Project
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% hObject handle to pushbutton6 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton7.
function pushbutton7_Callback(hObject, eventdata, handles)
%%EURAD BUTTON
ncfile = 'surface.nc';
lati = ncread(ncfile, 'lat');
longe = ncread(ncfile, 'lon');
time = ncread(ncfile, 'hour');
Eurad_ozone = ncread(ncfile, 'eurad_ozone');
for k = 1 : 25
squezed = fliplr(rot90(rot90(rot90(squeeze(Eurad_ozone(:,:,k))))))*1.0e+07;
showmap = pcolor(longe,lati,squezed);
showmap.EdgeAlpha =0;
title(sprintf('The time is : %.0f',time(k)));
caxis(handles.axes1, [-0.5 1.5]);
c.Label.String = 'Levels';
load coast;
hold on;
s = plot(handles.axes1,long,lat,'k');
showmap;
pause(0.8)
end
% Choose default command line output for Project
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% hObject handle to pushbutton7 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton8.
function pushbutton8_Callback(hObject, eventdata, handles)
%%LOTOSEUROS BUTTON
ncfile = 'surface.nc';
lati = ncread(ncfile, 'lat');
longe = ncread(ncfile, 'lon');
time = ncread(ncfile, 'hour');
Lotoseuros_ozone = ncread(ncfile, 'lotoseuros_ozone');
for k = 1 : 25
squezed = fliplr(rot90(rot90(rot90(squeeze(Lotoseuros_ozone(:,:,k))))))*1.0e+07;
showmap = pcolor(longe,lati,squezed);
showmap.EdgeAlpha =0;
title(sprintf('The time is : %.0f',time(k)));
c.Label.String = 'Levels';
caxis(handles.axes1, [-0.5 1.5]);
load coast;
hold on;
s = plot(handles.axes1,long,lat,'k');
showmap;
pause(0.8)
end
% Choose default command line output for Project
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% --- Executes on button press in pushbutton9.
function pushbutton9_Callback(hObject, eventdata, handles)
%%MATCH BUTTON
ncfile = 'surface.nc';
lati = ncread(ncfile, 'lat');
longe = ncread(ncfile, 'lon');
time = ncread(ncfile, 'hour');
Match_ozone = ncread(ncfile, 'match_ozone');
for k = 1 : 25
squezed = fliplr(rot90(rot90(rot90(squeeze(Match_ozone(:,:,k))))))*1.0e+07;
showmap = pcolor(longe,lati,squezed);
showmap.EdgeAlpha =0;
title(sprintf('The time is : %.0f',time(k)));
caxis(handles.axes1, [-0.5 1.5]);
c.Label.String = 'Levels';
load coast;
hold on;
s = plot(handles.axes1,long,lat,'k');
showmap;
pause(0.8)
end
% Choose default command line output for Project
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% hObject handle to pushbutton9 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton10.
function pushbutton10_Callback(hObject, eventdata, handles)
%%MOCAGE BUTTON
ncfile = 'surface.nc';
lati = ncread(ncfile, 'lat');
longe = ncread(ncfile, 'lon');
time = ncread(ncfile, 'hour');
Mocage_ozone = ncread(ncfile, 'mocage_ozone');
for k = 1 : 25
squezed = fliplr(rot90(rot90(rot90(squeeze(Mocage_ozone(:,:,k))))))*1.0e+07;
showmap = pcolor(longe,lati,squezed);
showmap.EdgeAlpha =0;
title(sprintf('The time is : %.0f',time(k)));
caxis(handles.axes1, [-0.5 1.5]);
c.Label.String = 'Levels';
load coast;
hold on;
s = plot(handles.axes1,long,lat,'k');
showmap;
pause(0.8)
end
% Choose default command line output for Project
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% hObject handle to pushbutton10 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton11.
function pushbutton11_Callback(hObject, eventdata, handles)
%%SILAM BUTTON
ncfile = 'surface.nc';
lati = ncread(ncfile, 'lat');
longe = ncread(ncfile, 'lon');
time = ncread(ncfile, 'hour');
Silam_ozone = ncread(ncfile, 'silam_ozone');
for k = 1 : 25
squezed = fliplr(rot90(rot90(rot90(squeeze(Silam_ozone(:,:,k))))))*1.0e+07;
showmap = pcolor(longe,lati,squezed);
showmap.EdgeAlpha =0;
title(sprintf('The time is : %.0f',time(k)));
caxis(handles.axes1, [-0.5 1.5]);
c.Label.String = 'Levels';
load coast;
hold on;
s = plot(handles.axes1,long,lat,'k');
showmap;
pause(0.8)
end
% Choose default command line output for Project
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% hObject handle to pushbutton11 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
%Tritanopia button
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
colormap("copper");
colorbar();
% Choose default command line output for Project
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
%Deuteranopia button
colormap("bone");
colorbar();
% Choose default command line output for Project
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
%Protanopia button
colormap("summer");
colorbar();
% Choose default command line output for Project
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton13.
function pushbutton13_Callback(hObject, eventdata, handles)
ncfile = 'surface.nc';
lati = ncread(ncfile, 'lat');
longe = ncread(ncfile, 'lon');
time = ncread(ncfile, 'hour');
fileName = dir('24HR_CBE_*.csv');
for k = 1 : length(fileName)
theFiles = fileName(k).name;
newMatrix = readmatrix(theFiles);
newMatrix(400,:) = [0];
newMatrix(:,700) = [0];
showmap = pcolor(longe,lati,newMatrix);
showmap.EdgeAlpha =0;
title(sprintf('The time is : %.0f',time(k)));
caxis(handles.axes1, [-0.5 1.5]);
colorbar();
c.Label.String = 'Levels';
load coast;
hold on;
s = plot(long,lat,'k');
showmap;
pause(0.8)
end
% Choose default command line output for Project
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% hObject handle to pushbutton13 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton12.
function pushbutton12_Callback(hObject, eventdata, handles)
colormap("default");
colorbar();
% Choose default command line output for Project
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% hObject handle to pushbutton12 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)