Commit 7fef61ce authored by renzo's avatar renzo

arreglado procesar_noaa

parents eaa4040b 68843e13
......@@ -2,8 +2,8 @@ function []=procesar_noaa(output_path, date, nctoolbox_path)
run(nctoolbox_path)
date = datenum(date,'yyyymmdd')
date = datevec(date)
mat_date = datenum(date,'yyyymmdd')
mat_date = datevec(mat_date)
url='gfs.t00z.pgrb2.0p25.f000'
......@@ -48,7 +48,7 @@ function []=procesar_noaa(output_path, date, nctoolbox_path)
hora(1)=squeeze(double(hora_var.data(:)));
clear hora_var
fecha(1)=datenum(date)+datenum(0,0,0,hora(1),0,0);
fecha(1)=datenum(mat_date)+datenum(0,0,0,hora(1),0,0);
% diflat=abs(max(latweb-lat));
% diflon=abs(max(lonweb-lon));
......@@ -83,7 +83,7 @@ function []=procesar_noaa(output_path, date, nctoolbox_path)
hora(i+1)=squeeze(double(hora_var.data(:)));
clear hora_var
fecha(i+1)=datenum(date)+datenum(0,0,0,hora(i+1),0,0);
fecha(i+1)=datenum(mat_date)+datenum(0,0,0,hora(i+1),0,0);
end
......@@ -116,7 +116,7 @@ function []=procesar_noaa(output_path, date, nctoolbox_path)
hora(i+1)=squeeze(double(hora_var.data(:)));
clear hora_var
fecha(i+1)=datenum(date)+datenum(0,0,0,hora(i+1),0,0);
fecha(i+1)=datenum(mat_date)+datenum(0,0,0,hora(i+1),0,0);
end
......@@ -149,7 +149,7 @@ function []=procesar_noaa(output_path, date, nctoolbox_path)
hora(i+1)=squeeze(double(hora_var.data(:)));
clear hora_var
fecha(i+1)=datenum(date)+datenum(0,0,0,hora(i+1),0,0);
fecha(i+1)=datenum(mat_date)+datenum(0,0,0,hora(i+1),0,0);
end
......@@ -159,10 +159,11 @@ function []=procesar_noaa(output_path, date, nctoolbox_path)
%datevec(fecha)
save(strcat(output_path, "/", formatted_date,'noaa00.mat'),'date','fecha','lat','lon','h','u_10','v_10','P_sup','hora')
save(strcat(output_path, "/", date,'noaa00.mat'),'date','fecha','lat','lon','h','u_10','v_10','P_sup','hora')
if day == "yesterday"
yesterday = datestr(datetime('now') - days(1), 'yyyymmdd')
if date == yesterday
%%
......@@ -208,7 +209,7 @@ function []=procesar_noaa(output_path, date, nctoolbox_path)
hora(1)=squeeze(double(hora_var.data(:)))+6;
clear hora_var
fecha(1)=datenum(date)+datenum(0,0,0,hora(1),0,0);
fecha(1)=datenum(mat_date)+datenum(0,0,0,hora(1),0,0);
% diflat=abs(max(latweb-lat));
% diflon=abs(max(lonweb-lon));
......@@ -243,7 +244,7 @@ function []=procesar_noaa(output_path, date, nctoolbox_path)
hora(i+1)=squeeze(double(hora_var.data(:)))+6;
clear hora_var
fecha(i+1)=datenum(date)+datenum(0,0,0,hora(i+1),0,0);
fecha(i+1)=datenum(mat_date)+datenum(0,0,0,hora(i+1),0,0);
end
......@@ -276,7 +277,7 @@ function []=procesar_noaa(output_path, date, nctoolbox_path)
hora(i+1)=squeeze(double(hora_var.data(:)))+6;
clear hora_var
fecha(i+1)=datenum(date)+datenum(0,0,0,hora(i+1),0,0);
fecha(i+1)=datenum(mat_date)+datenum(0,0,0,hora(i+1),0,0);
end
......@@ -309,7 +310,7 @@ function []=procesar_noaa(output_path, date, nctoolbox_path)
hora(i+1)=squeeze(double(hora_var.data(:)))+6;
clear hora_var
fecha(i+1)=datenum(date)+datenum(0,0,0,hora(i+1),0,0);
fecha(i+1)=datenum(mat_date)+datenum(0,0,0,hora(i+1),0,0);
end
......@@ -319,7 +320,7 @@ function []=procesar_noaa(output_path, date, nctoolbox_path)
%datevec(fecha)
save(strcat(output_path, "/", formatted_date,'noaa06.mat'),'date','fecha','lat','lon','h','u_10','v_10','P_sup','hora')
save(strcat(output_path, "/", date,'noaa06.mat'),'date','fecha','lat','lon','h','u_10','v_10','P_sup','hora')
%%
......@@ -366,7 +367,7 @@ function []=procesar_noaa(output_path, date, nctoolbox_path)
hora(1)=squeeze(double(hora_var.data(:)))+12;
clear hora_var
fecha(1)=datenum(date)+datenum(0,0,0,hora(1),0,0);
fecha(1)=datenum(mat_date)+datenum(0,0,0,hora(1),0,0);
% diflat=abs(max(latweb-lat));
% diflon=abs(max(lonweb-lon));
......@@ -401,7 +402,7 @@ function []=procesar_noaa(output_path, date, nctoolbox_path)
hora(i+1)=squeeze(double(hora_var.data(:)))+12;
clear hora_var
fecha(i+1)=datenum(date)+datenum(0,0,0,hora(i+1),0,0);
fecha(i+1)=datenum(mat_date)+datenum(0,0,0,hora(i+1),0,0);
end
......@@ -434,7 +435,7 @@ function []=procesar_noaa(output_path, date, nctoolbox_path)
hora(i+1)=squeeze(double(hora_var.data(:)))+12;
clear hora_var
fecha(i+1)=datenum(date)+datenum(0,0,0,hora(i+1),0,0);
fecha(i+1)=datenum(mat_date)+datenum(0,0,0,hora(i+1),0,0);
end
......@@ -467,7 +468,7 @@ function []=procesar_noaa(output_path, date, nctoolbox_path)
hora(i+1)=squeeze(double(hora_var.data(:)))+12;
clear hora_var
fecha(i+1)=datenum(date)+datenum(0,0,0,hora(i+1),0,0);
fecha(i+1)=datenum(mat_date)+datenum(0,0,0,hora(i+1),0,0);
end
......@@ -477,7 +478,7 @@ function []=procesar_noaa(output_path, date, nctoolbox_path)
%datevec(fecha)
save(strcat(output_path, "/", formatted_date,'noaa12.mat'),'date','fecha','lat','lon','h','u_10','v_10','P_sup','hora')
save(strcat(output_path, "/", date,'noaa12.mat'),'date','fecha','lat','lon','h','u_10','v_10','P_sup','hora')
......@@ -527,7 +528,7 @@ function []=procesar_noaa(output_path, date, nctoolbox_path)
hora(1)=squeeze(double(hora_var.data(:)))+18;
clear hora_var
fecha(1)=datenum(date)+datenum(0,0,0,hora(1),0,0);
fecha(1)=datenum(mat_date)+datenum(0,0,0,hora(1),0,0);
% diflat=abs(max(latweb-lat));
% diflon=abs(max(lonweb-lon));
......@@ -562,7 +563,7 @@ function []=procesar_noaa(output_path, date, nctoolbox_path)
hora(i+1)=squeeze(double(hora_var.data(:)))+18;
clear hora_var
fecha(i+1)=datenum(date)+datenum(0,0,0,hora(i+1),0,0);
fecha(i+1)=datenum(mat_date)+datenum(0,0,0,hora(i+1),0,0);
end
......@@ -595,7 +596,7 @@ function []=procesar_noaa(output_path, date, nctoolbox_path)
hora(i+1)=squeeze(double(hora_var.data(:)))+18;
clear hora_var
fecha(i+1)=datenum(date)+datenum(0,0,0,hora(i+1),0,0);
fecha(i+1)=datenum(mat_date)+datenum(0,0,0,hora(i+1),0,0);
end
......@@ -628,7 +629,7 @@ function []=procesar_noaa(output_path, date, nctoolbox_path)
hora(i+1)=squeeze(double(hora_var.data(:)))+18;
clear hora_var
fecha(i+1)=datenum(date)+datenum(0,0,0,hora(i+1),0,0);
fecha(i+1)=datenum(mat_date)+datenum(0,0,0,hora(i+1),0,0);
end
......@@ -638,7 +639,7 @@ function []=procesar_noaa(output_path, date, nctoolbox_path)
%datevec(fecha)
save(strcat(output_path, "/", formatted_date,'noaa18.mat'),'date','fecha','lat','lon','h','u_10','v_10','P_sup','hora')
save(strcat(output_path, "/", date,'noaa18.mat'),'date','fecha','lat','lon','h','u_10','v_10','P_sup','hora')
% [XX,YY]=meshgrid(lon,lat);
% figure;contourf(XX(:,:),YY(:,:),P_sup(:,:,1))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment