disp('eval_epi_rhb_07')
%changed by cwf to inlcde imet PIR  12/2004
U_ship=[];DIR_ship=[];GYRO_ship=[];TSEA_ship=[];TAIR_ship=[];Xaxis_ship=[];Xaxis_mean=[];RH_ship=[];
LW_ship=[];SOL_ship=[];LAT_ship=[];LON_ship=[];IR_ship=[];
Xaxis_sonic=[];T_sonic=[];U_sonic=[];V_sonic=[];
W_sonic=[];DIR_sonic=[];TAIR_mean=[];TSEA_mean=[];RH_mean=[];LW_mean=[];SOL_mean=[];QA_mean=[];

for hhh=0:23;
   disp(['hour = ',num2str(hhh)])
   eval_scs_rhb_07;
   U_ship=[U_ship 
       imum];
   Xaxis_ship=[Xaxis_ship 
       scstime];
   DIR_ship=[DIR_ship 
       imdm];
   GYRO_ship=[GYRO_ship 
       lrgm];
   TSEA_ship=[TSEA_ship 
       tsgm];
   RH_ship=[RH_ship 
       rhm];
   TAIR_ship=[TAIR_ship 
       tam];
   SOL_ship=[SOL_ship 
       solarm];
   LAT_ship=[LAT_ship 
       latm];
   LON_ship=[LON_ship 
       lonm];
   IR_ship=[IR_ship 
       irm];
   
   eval_pc_day_rhb_07;
   TAIR_mean=[TAIR_mean Tvais];
   TSEA_mean=[TSEA_mean Tsea];
   RH_mean=[RH_mean Rhvais];
   LW_mean=[LW_mean pir1];
   SOL_mean=[SOL_mean psp1];
   QA_mean=[QA_mean qvais];
   Xaxis_mean=[Xaxis_mean ddd+(hhh+(0:length(Rhvais)-1)./length(Rhvais))/24.];

   eval_son_rhb_07;
   T_sonic=[T_sonic Tslow];
   U_sonic=[U_sonic U];
   Xaxis_sonic=[Xaxis_sonic ddd+(hhh+(0:length(U)-1)./length(U))/24.];
   V_sonic=[V_sonic V];
   W_sonic=[W_sonic w];
   DIR_sonic=[DIR_sonic dir];
      
   if hhh==0 | hhh==12 | hhh==14;
      plot_f=1;
      eval_licor_rhb_07;
   end;

   imum=[]; imdm=[]; lrgm=[]; tsg=[]; imrh=[]; imta=[]; Tvais=[]; Tsea=[]; Rhvais=[]; Tslow=[]; U=[]; V=[]; w =[];irm=[];
   clear eval_ship_error eval_mean_error eval_son_error
end;
tdk=273.15;
jjx=min(length(Xaxis_ship),length(QA_mean));
rlclr=(.52+.13/60*abs(LAT_ship(1:jjx)')+(.082-.03/60*abs(LAT_ship(1:jjx)')).*sqrt(QA_mean(1:jjx))).*(5.67e-8*(TAIR_mean(1:jjx)+tdk).^4); 

clear jdy;
jdy=Xaxis_mean';qa=qmean(1)*ones(length(Xaxis_mean),1);
latd=mean(LAT_ship);
lond=mean(LON_ship);
iv=3.5;
qa=QA_mean(1:jjx);
iv=ones(length(qa),1)*NaN;
Xaxis_ship=Xaxis_ship./24+ddd;
jdys=Xaxis_ship;

epic01_Rsclear_1;


figure;plot(Xaxis_sonic,sqrt(U_sonic.^2+V_sonic.^2),'b',Xaxis_ship,U_ship,'.g');xlabel(['Time of day (', year, ')']);ylabel('Relative Wind Speed (m/s)');title('Relative Wind Speed ETL (blue), True Wind Speed SCS (green)');
    print('-djpeg90 ',[way_images '\rel_Wnd_speed_' num2str(ddd) '.jpg']);xlim([ddd ddd+1])
figure;plot(Xaxis_sonic,DIR_sonic,'.b',Xaxis_ship,DIR_ship,'.g');xlabel(['Time of day (', year, ')']);ylabel('Relative Wind Direction (Deg)');title('Relative Wind Dir ETL (blue), True Wind Dir Ship (green)');
    print('-djpeg90 ',[way_images '\rel_Wnd_dir_' num2str(ddd) '.jpg']);xlim([ddd ddd+1])
figure;plot(Xaxis_mean,RH_mean,'b',Xaxis_ship,RH_ship,'.g');ylabel('Relative Humidity in %');xlabel(['Time of day (', year, ')']);title('Rel Hum (%):  Blue=ETL, Green dots=Ship');
    print('-djpeg90 ',[way_images '\RH_' num2str(ddd) '.jpg']);xlim([ddd ddd+1])
figure;plot(Xaxis_mean,TSEA_mean,'b',Xaxis_ship,TSEA_ship,'.g');xlabel(['Time of day (', year, ')']);ylabel('Sea Temperature (C)');title('Sea Temperature:  Blue=ETL, Green dots=Ship');
    print('-djpeg90 ',[way_images '\SST_' num2str(ddd) '.jpg']);xlim([ddd ddd+1])
figure;plot(Xaxis_mean,TAIR_mean,'b',Xaxis_ship,TAIR_ship,'.g');ylabel('Air Temperature (C)');xlabel(['Time of day (', year, ')']);title('Air Temp:  Blue=ETL, Green=Ship');
    print('-djpeg90 ',[way_images '\Tair_' num2str(ddd) '.jpg']);xlim([ddd ddd+1])
figure;plot(Xaxis_mean,LW_mean,'b',Xaxis_ship(1:jjx),rlclr,'r',Xaxis_ship(1:jjx),IR_ship(1:jjx),'g');ylabel('IR Flux (W/m^2)');xlabel(['Time of day (', year, ')']);title('IR Flux:  Blue=ETL, Green=Ship, Red=Clearsky');
    print('-djpeg90 ',[way_images '\IRflux_' num2str(ddd) '.jpg']);xlim([ddd ddd+1])
figure;plot(Xaxis_mean,Rscl,'g',Xaxis_mean,SOL_mean,'.b',Xaxis_ship,SOL_ship,'.r');ylabel('Solar Flux (W/m^2)');xlabel(['Time of day (', year, ')']);title('Solar Flux:  Blue=ETL, Grn=Clear sky,  Red=Ship');
    print('-djpeg90 ',[way_images '\SOLflux_' num2str(ddd) '.jpg']);xlim([ddd ddd+1])
%clear Xaxis_ship Xaxis_mean Xaxis_sonic
