Permalink
Cannot retrieve contributors at this time
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?
5011CEM-Visualisation_Project/Input_Model.m
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
106 lines (94 sloc)
3.82 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% | |
ok=input("input 1 to continue and 0 to exit:"); | |
while ok==1 | |
if ok==0 | |
break | |
end | |
fprintf("1=Meteorologic Model Silam\n") | |
fprintf("2=Meteorologic Model Match\n") | |
fprintf("3=Meteorologic Model Ensemble\n") | |
fprintf("4=Meteorologic Model Chimere\n") | |
fprintf("5=Meteorologic Model Eurad\n") | |
fprintf("6=Meteorologic Model Mocage\n") | |
fprintf("7=Meteorologic Model Emep\n") | |
ncf=input("choose file:"); | |
%% | |
figure(1) | |
if ncf==1 | |
title('Meteorologic Model: Silam') | |
pnc='Individual_Models\W_fr-meteofrance,MODEL,SILAM+FORECAST+SURFACE+O3+0H24H_C_LFPW_20180701000000.nc'; | |
end | |
if ncf==2 | |
title('Meteorologic Model: Match') | |
pnc='Individual_Models\W_fr-meteofrance,MODEL,MATCH+FORECAST+SURFACE+O3+0H24H_C_LFPW_20180701000000.nc'; | |
end | |
if ncf==3 | |
title('Meteorologic Model: Ensemble') | |
pnc='Individual_Models\W_fr-meteofrance,MODEL,ENSEMBLE+FORECAST+SURFACE+O3+0H24H_C_LFPW_20180701000000.nc'; | |
end | |
if ncf==4 | |
title('Meteorologic Model: Chimere') | |
pnc='Individual_Models\W_fr-meteofrance,MODEL,CHIMERE+FORECAST+SURFACE+O3+0H24H_C_LFPW_20180701000000.nc'; | |
end | |
if ncf==5 | |
title('Meteorologic Model: Eurad') | |
pnc='Individual_Models\W_fr-meteofrance,MODEL,EURAD+FORECAST+SURFACE+O3+0H24H_C_LFPW_20180701000000.nc'; | |
end | |
if ncf==6 | |
title('Meteorologic Model: Mocage') | |
pnc='Individual_Models\W_fr-meteofrance,MODEL,MOCAGE+FORECAST+SURFACE+O3+0H24H_C_LFPW_20180701000000.nc'; | |
end | |
if ncf==7 | |
title('Meteorologic Model: Emep') | |
pnc='Individual_Models\W_fr-meteofrance,MODEL,EMEP+FORECAST+SURFACE+O3+0H24H_C_LFPW_20180701000000.nc'; | |
end | |
clf | |
y = transpose(double(ncread(pnc,'longitude'))); | |
zlabel('ozone') | |
x = transpose(double(ncread(pnc,'latitude'))); | |
time = ncread(pnc,'time'); | |
ozone = ncread(pnc,'unknown'); | |
h=input("input an integer between 0 and 26 representing 1 of the 25 hours:"); | |
z = ozone(:,:,h); | |
mesh(x,y,z) | |
[x,y] = meshgrid(x, y); | |
%% | |
figure(2) | |
clf | |
% Create the map | |
worldmap('Europe'); % set the part of the earth to show | |
load coastlines | |
plotm(coastlat,coastlon) | |
land = shaperead('landareas', 'UseGeoCoords', true); | |
geoshow(gca, land, 'FaceColor', [0.5 0.7 0.5]) | |
lakes = shaperead('worldlakes', 'UseGeoCoords', true); | |
geoshow(lakes, 'FaceColor', 'blue', 'EdgeColor', 'cyan') | |
rivers = shaperead('worldrivers', 'UseGeoCoords', true); | |
geoshow(rivers, 'Color', 'blue') | |
cities = shaperead('worldcities', 'UseGeoCoords', true); | |
geoshow(cities, 'Marker', '.', 'Color', 'magenta') | |
setm(gca,'ffacecolor','#0072BD') | |
surfm(x,y,z, 'EdgeColor', 'none','FaceAlpha', 0.6) % edge colour outlines the edges, 'FaceAlpha', sets the transparency | |
%% | |
figure(3) | |
clf | |
worldmap('Europe'); % set the part of the earth to show | |
load coastlines | |
plotm(coastlat,coastlon) | |
%bordersm('countries','FaceColor', [0.5 0.7 0.5]) | |
setm(gca,'ffacecolor','#0072BD') | |
land = shaperead('landareas', 'UseGeoCoords', true); | |
geoshow(gca, land, 'FaceColor', [0.5 0.7 0.5]) | |
lakes = shaperead('worldlakes', 'UseGeoCoords', true); | |
geoshow(lakes, 'FaceColor', 'blue', 'EdgeColor', 'cyan') | |
rivers = shaperead('worldrivers', 'UseGeoCoords', true); | |
geoshow(rivers, 'Color', 'blue') | |
cities = shaperead('worldcities', 'UseGeoCoords', true); | |
geoshow(cities, 'Marker', '.', 'Color', 'magenta') | |
NumContours = 4; | |
contourfm(x, y, z, NumContours,'r') | |
Plots = findobj(gca,'Type','Axes'); | |
Plots.SortMethod = 'depth'; | |
clear | |
ok=input("input 1 to continue and 0 to exit:"); | |
end |