From 52335dde6b30cef62af347714967a1834e575806 Mon Sep 17 00:00:00 2001 From: watrasm Date: Wed, 9 Dec 2020 21:37:43 +0000 Subject: [PATCH] comments added --- bigdata.m | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/bigdata.m b/bigdata.m index 9a92497..4b551ea 100644 --- a/bigdata.m +++ b/bigdata.m @@ -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');