-
Notifications
You must be signed in to change notification settings - Fork 0
/
graf_prom_mensual.m
37 lines (34 loc) · 1018 Bytes
/
graf_prom_mensual.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
clear all; close all; clc;
%%
cd D:\trabajo\IGP\CLIM_PEZ\Dra_Jaramillos
%%
[data,raw,j]=xlsread('promedios_caudales_correcto.xlsx','prom_mensual_caudales');
time=data(:,1)+693960;
[yr,mo,da,hr,min,sec]=datevec(time);
time=datenum(yr,mo,da,hr,min,sec);
data(:,1)=time;
%% plot
iter=1;
puertos=[j(1,2:end)];
for kk=1:1:length(puertos)
iter=iter+1;
jj=0;
disp(char(puertos(kk)))
figure
%subplot(2,4,kk)
for iy=1985:1:2020
jj=jj+1;
indxtime=find(yr==iy);
data_temp=data(indxtime,iter);
all_data(:,jj)=data_temp;
plot([1:12],data(indxtime,iter),'.:'); title(['Promedio Mensual ',char(puertos(kk))]);
grid on
xlabel('Meses'); ylabel('Caudal m^3/s');
legend(num2str(iy));
pause(1)
hold on
end
aa=plot([1:12],nanmean(all_data,2)','linewidth',2,'Color','k');
legend([aa],'Climatologia mensual');
%print(['prom_mensual-',char(puertos(kk))],'-dpng','-r500');
end