Skip to content
Permalink
Browse files
added useful comments
  • Loading branch information
barbulea committed Aug 10, 2020
1 parent 7924ff5 commit 6057c8ed283c3ce2c38c7131c6cd4faa8ebdd4f7
Showing 1 changed file with 18 additions and 11 deletions.
@@ -1,10 +1,13 @@
%%Open NetCDF files
filename = 'o3_surface_20180701000000.nc';
clc;

%%Information about software
disp('This software allows you to visualise the ozone layer on the European Map')
disp('This software provides support for colour blind users.')
pause(2)
clc
%%User choose what map model wants to see
disp('Pick 1 of the 8 ozone map models')
disp('1: Chimere map model')
disp('2: Emep map model')
@@ -51,21 +54,24 @@ elseif modelChoice == 8
end
clc;

%%Read data from NetCDF file
disp('Loading data in progress')
lon = ncread(ncfile,'lon');
lat = ncread(ncfile,'lat');
h = ncread(ncfile,'hour');
ozoneChoice = ncread(ncfile,ozoneModel);
[X,Y] = meshgrid(lon,lat);
lon = ncread(ncfile,'lon'); %%assign the longtitude
lat = ncread(ncfile,'lat'); %%assign the latitude
h = ncread(ncfile,'hour'); %%assign the hours
ozoneChoice = ncread(ncfile,ozoneModel); %%it takes the user map model
[X,Y] = meshgrid(lon,lat); %%create meshgrid with data
clc;

%%Colour blinds issues menu
disp('If you have colourblind please choose what type:')
disp('1.Protanopia')
disp('2.Deuteranopia')
disp('3.Tritanopia')
disp('0.I do not have')
colourblind = input('Enter: ')

%%Colour the map with the user input
if colourblind == 0
colormap default
elseif colourblind == 1
@@ -79,16 +85,17 @@ end
clc

disp('The map in the figure will load shortly ..')
%%Loops through the hours
for k = 1 : length(h)
clf;
matrix = pcolor(X,Y,ozoneChoice(:,:,k)');
clf; %%clear figure
matrix = pcolor(X,Y,ozoneChoice(:,:,k)'); %%assign the data
matrix.EdgeAlpha = 0;
matrix.FaceAlpha = 0.8;
load coast
cities = shaperead('worldcities', 'UseGeoCoords', true);
bar = colorbar;
load coast %%load coastlines
cities = shaperead('worldcities', 'UseGeoCoords', true);%%load cities
bar = colorbar; %%legend to know the value of the ozone
bar.Label.String = 'Ozone Level';
geoshow(cities, 'Marker', '+', 'Color', 'red')
geoshow(cities, 'Marker', '+', 'Color', 'red') %%cities on the map
hold on;
plot(long,lat,'k')
title(sprintf('Ensemble Data on Europe'))

0 comments on commit 6057c8e

Please sign in to comment.