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
%%Open NetCDF files
filenamenc = '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')
disp('3: Ensemble map model')
disp('4: Eurad map model')
disp('5: Lotoseuros map model')
disp('6: Match map model')
disp('7: Mocage map model')
disp('8: Silam map model')
modelChoice = input('Enter the map model number you want to use: ')
if modelChoice == 1
ozoneModel = 'chimere_ozone'
clc;
pause(2)
elseif modelChoice == 2
ozoneModel = 'emep_ozone'
clc;
pause(2)
elseif modelChoice == 3
ozoneModel = 'ensemble_ozone'
clc;
pause(2)
elseif modelChoice == 4
ozoneModel = 'eurad_ozone'
clc;
pause(2)
elseif modelChoice == 5
ozoneModel = 'lotoseuros_ozone'
clc;
pause(2)
elseif modelChoice == 6
ozoneModel = 'match_ozone'
clc;
pause(2)
elseif modelChoice == 7
ozoneModel = 'mocage_ozone'
clc;
pause(2)
elseif modelChoice == 8
ozoneModel = 'silam_ozone'
clc;
pause(2)
end
clc;
%%Read data from NetCDF file
disp('Loading data in progress')
lon = ncread(filenamenc,'lon'); %%assign the longtitude
lat = ncread(filenamenc,'lat'); %%assign the latitude
h = ncread(filenamenc,'hour'); %%assign the hours
ozoneChoice = ncread(filenamenc,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
colormap spring
elseif colourblind == 2
colormap winter
elseif colourblind == 3
colormap autumn
end
clc
disp('The map in the figure will load shortly ..')
%%Loops through the hours
for k = 1 : length(h)
clf; %%clear figure
matrix = pcolor(X,Y,ozoneChoice(:,:,k)'); %%assign the data
matrix.EdgeAlpha = 0;
matrix.FaceAlpha = 0.8;
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') %%cities on the map
hold on;
plot(long,lat,'k')
title(sprintf('Ensemble Data on Europe'))
pause(0.3)
end