Skip to content
Permalink
Browse files
comments added
  • Loading branch information
watrasm committed Dec 11, 2020
1 parent 9bbf44e commit 52335dde6b30cef62af347714967a1834e575806
Showing 1 changed file with 10 additions and 10 deletions.
@@ -28,14 +28,14 @@ handles.dataset = 'o3_surface_20180701000000.nc';
handles.lon = ncread(handles.dataset, 'lon'); handles.nx = length(handles.lon);
handles.lat = ncread(handles.dataset, 'lat'); handles.ny = length(handles.lat);
handles.time = ncread(handles.dataset, 'hour');
handles.ozone = 'chimere_ozone';
handles.currentTime = 1;
handles.ozone = 'chimere_ozone'; %default ozone to be displayed as first
handles.currentTime = 1; %default hour set to 1
handles.hour = ncread(handles.dataset, handles.ozone,[1 1 handles.currentTime],[handles.nx handles.ny 1]);

map = pcolor(handles.lon, handles.lat,handles.hour');
map.EdgeAlpha=0; %changes the transparency to 0
load coastlines;
line(coastlon,coastlat);
map = pcolor(handles.lon, handles.lat,handles.hour'); %draws the data with pcolor
map.EdgeAlpha=0; %changes the transparency to 0
load coastlines;
line(coastlon,coastlat); %outlines the land contours to make the map easier to see

% Choose default command line output for bigdata
handles.output = hObject;
@@ -65,7 +65,7 @@ handles.color_scheme = handles.color_schemes(val); %set the color_scheme variabl
handles.hour = ncread(handles.dataset, handles.ozone,[1 1 handles.currentTime],[handles.nx handles.ny 1]);
map = pcolor(handles.lon, handles.lat,handles.hour');
map.EdgeAlpha=0;
colormap(handles.color_scheme)
colormap(handles.color_scheme) %changes the colour of the map to the chosen one
load coastlines;
line(coastlon,coastlat);
guidata(hObject, handles);
@@ -83,10 +83,10 @@ function slider_hour_Callback(hObject, eventdata, handles)


val = get(hObject, 'val');
val = round(val);
handles.currentTime = val;
val = round(val); %rounds the value so that we only get integers
handles.currentTime = val; %assigns current time to the value set on slider

set(handles.hourtext,'String',num2str(val));
set(handles.hourtext,'String',num2str(val)); %prints out the value on slider above it

handles.hour = ncread(handles.dataset, handles.ozone,[1 1 handles.currentTime],[handles.nx handles.ny 1]);
map = pcolor(handles.lon, handles.lat,handles.hour');

0 comments on commit 52335dd

Please sign in to comment.