-
Notifications
You must be signed in to change notification settings - Fork 0
/
Display_Quantiles_Maps.m
159 lines (120 loc) · 4.96 KB
/
Display_Quantiles_Maps.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
function[]=Display_Quantiles_Maps(V_Time,M_Data_TargetIsland2,str_simulated_rain,V_Lat_TargetIsland2,V_Lon_TargetIsland2)
nb_simul=length(str_simulated_rain);
%Maps probability exceedance
V_datavect_forseason=datevec(V_Time);
V_month=V_datavect_forseason(:,2);
M_Data_TargetIsland2_toplot=M_Data_TargetIsland2;
my_colormap=colormap('jet');
for my_quantile=10:20:90
figure(400+my_quantile)
clf
V_q_obs=quantile(M_Data_TargetIsland2_toplot,my_quantile/100,2);
my_max=max(V_q_obs);
subplot(3,3,3)
hold on
Plot_coastline(1)
for my_gauge=1:length(V_q_obs)
my_ind_color=min(floor(V_q_obs(my_gauge)/my_max*255)+1,255);
my_color=my_colormap(my_ind_color,:);
plotm(V_Lat_TargetIsland2(my_gauge),V_Lon_TargetIsland2(my_gauge),'o','MarkerSize',5,'color','k','MarkerFaceColor',my_color)
end
colormap('jet')
caxis([0 my_max])
colorbar
title(strcat('obs rain - annual - quantile:',num2str(my_quantile),'%'))
axis equal tight
M_q_sim=[];
for my_sim=1:nb_simul
M_sim=str_simulated_rain(my_sim).data;
V_q_sim=quantile(M_sim,my_quantile/100,2);
M_q_sim=[M_q_sim V_q_sim];
end
V_q_sim=median(M_q_sim,2);
subplot(3,3,6)
hold on
Plot_coastline(1)
for my_gauge=1:length(V_q_sim)
my_ind_color=min(floor(V_q_sim(my_gauge)/my_max*255)+1,255);
my_color=my_colormap(my_ind_color,:);
plotm(V_Lat_TargetIsland2(my_gauge),V_Lon_TargetIsland2(my_gauge),'o','MarkerSize',5,'color','k','MarkerFaceColor',my_color)
end
colormap('jet')
caxis([0 my_max])
colorbar
title(strcat('sim rain - annual - quantile:',num2str(my_quantile),'%'))
axis equal tight
subplot(3,3,9)
hold on
Plot_coastline(1)
my_max_diff=max(abs(V_q_obs-V_q_sim));
for my_gauge=1:length(V_q_sim)
my_ind_color=min(floor(abs(V_q_obs(my_gauge)-V_q_sim(my_gauge))/my_max_diff*255)+1,255);
my_color=my_colormap(my_ind_color,:);
plotm(V_Lat_TargetIsland2(my_gauge),V_Lon_TargetIsland2(my_gauge),'o','MarkerSize',5,'color','k','MarkerFaceColor',my_color)
end
colormap('jet')
caxis([0 my_max_diff])
colorbar
title('absolute error')
axis equal tight
for my_season=1:2
if my_season==1
inds_season=(V_month==1 | V_month==2 | V_month==3 | V_month==10 | V_month==11 | V_month==12);
else
inds_season=(V_month==4 | V_month==5 | V_month==6 | V_month==7 | V_month==8 | V_month==9);
end
V_q_obs=quantile(M_Data_TargetIsland2_toplot(:,inds_season),my_quantile/100,2);
subplot(3,3,my_season)
hold on
Plot_coastline(1)
for my_gauge=1:length(V_q_obs)
my_ind_color=min(floor(V_q_obs(my_gauge)/my_max*255)+1,255);
my_color=my_colormap(my_ind_color,:);
plotm(V_Lat_TargetIsland2(my_gauge),V_Lon_TargetIsland2(my_gauge),'o','MarkerSize',5,'color','k','MarkerFaceColor',my_color)
end
colormap('jet')
caxis([0 my_max])
colorbar
if my_season==1
str_season='JFM+OND';
else
str_season='AMJJAS';
end
title(strcat('obs rain-',str_season,'- quantile:',num2str(my_quantile),'%'))
axis equal tight
M_q_sim=[];
for my_sim=1:nb_simul
M_sim=str_simulated_rain(my_sim).data;
V_q_sim=quantile(M_sim(:,inds_season),my_quantile/100,2);
M_q_sim=[M_q_sim V_q_sim];
end
V_q_sim=median(M_q_sim,2);
subplot(3,3,3+my_season)
hold on
Plot_coastline(1)
for my_gauge=1:length(V_q_sim)
my_ind_color=min(floor(V_q_sim(my_gauge)/my_max*255)+1,255);
my_color=my_colormap(my_ind_color,:);
plotm(V_Lat_TargetIsland2(my_gauge),V_Lon_TargetIsland2(my_gauge),'o','MarkerSize',5,'color','k','MarkerFaceColor',my_color)
end
colormap('jet')
caxis([0 my_max])
colorbar
title(strcat('sim rain-',str_season,'- quantile:',num2str(my_quantile),'%'))
axis equal tight
subplot(3,3,6+my_season)
hold on
Plot_coastline(1)
for my_gauge=1:length(V_q_sim)
my_ind_color=min(floor(abs(V_q_obs(my_gauge)-V_q_sim(my_gauge))/my_max_diff*255)+1,255);
my_color=my_colormap(my_ind_color,:);
plotm(V_Lat_TargetIsland2(my_gauge),V_Lon_TargetIsland2(my_gauge),'o','MarkerSize',5,'color','k','MarkerFaceColor',my_color)
end
colormap('jet')
caxis([0 my_max_diff])
colorbar
title('absolute error')
axis equal tight
end
end
end