
%   hoemework 02  IAM 550
%   plot the monthly time series of weather data
%   reference solution
%   j.raeder@unh.edu  2019-09-22

clear; 
infile='weather_data/2019_06_temp'; load(infile); N=length(t2);
taxis=datetime(t2,'ConvertFrom','posixtime');
ymin(1:N)=min(F); ymax(1:N)=max(F); ymean(1:N)=mean(F);
plot(taxis,F, taxis, ymin, taxis, ymax, taxis, ymean), title(infile); 
ylabel('Temperature');
saveas(gcf,'homework01_plot_temp.pdf');

infile='weather_data/2019_06_windspeed'; load(infile);   N=length(t2);
taxis=datetime(t2,'ConvertFrom','posixtime');
ymin(1:N)=min(F); ymax(1:N)=max(F); ymean(1:N)=mean(F);
plot(taxis,F, taxis, ymin, taxis, ymax, taxis, ymean), title(infile); 
ylabel('windspeed');
saveas(gcf,'homework01_plot_windspeed.pdf');

infile='weather_data/2019_06_radiation'; load(infile);   N=length(t2);
taxis=datetime(t2,'ConvertFrom','posixtime');
ymin(1:N)=min(F); ymax(1:N)=max(F); ymean(1:N)=mean(F);
plot(taxis,F, taxis, ymin, taxis, ymax, taxis, ymean), title(infile); 
ylabel('radiation');
saveas(gcf,'homework01_plot_radiation.pdf');
