%
%   ....NSA AERI data during ER-2 outbound overpass on 980518.
%
%c1 = rd_netcdf('c:\fireiii\public_html\data\aeri\ae980518\980518c1.cdr');
%c2 = rd_netcdf('c:\fireiii\public_html\data\aeri\ae980518\980518c2.cdr');
c1 = rd_netcdf('d:\fireiii\data\aeri\ae980518\aerinsa\980518c1.cdr');
c2 = rd_netcdf('d:\fireiii\data\aeri\ae980518\aerinsa\980518c2.cdr');

overpass = 204800;
ind = find(c1.timeHHMMSS > overpass-500 & c1.timeHHMMSS < overpass+500);

figure
plot(c1.wnum1,mean(c1.mean_rad(ind,:)),'b',c2.wnum1,mean(c2.mean_rad(ind,:)),'b')
axis([400 2800 0 120])
xlabel('Wavenumber (cm^{-1})')
ylabel('Downwelling Radiance [mW m^{-2} sr^{-1} (cm^{-1})^{-1}]')
title('Downwelling Spectra at the NSA ARM site, Barrow during 980518 Outbound Overflight')
set(gcf,'PaperPositionMode','auto');
print -djpeg aerinsa_radiance_outbound.jpg

figure
plot(c1.wnum1,brittemp(c1.wnum1,mean(c1.mean_rad(ind,:))'))
axis([800 950 265 275])
xlabel('Wavenumber (cm^{-1})')
ylabel('Brightness Temperature (K)')
title('Downwelling BT Spectra at the NSA ARM site, Barrow during 980518 Outbound Overflight')
set(gcf,'PaperPositionMode','auto');
print -djpeg aerinsa_bt_outbound.jpg

figure
ind = [1 10 50 169];
plot(c1.wnum1,c1.mean_rad(ind,:))
axis([400 1800 0 120])
xlabel('Wavenumber (cm^{-1})')
ylabel('Downwelling Radiance [mW m^{-2} sr^{-1} (cm^{-1})^{-1}]')
title('Sample  Downwelling Spectra at the NSA ARM site, Barrow: 980518')
co = get(gca,'ColorOrder');
h = text(1400,115,'0008 UTC');
set(h,'color',co(1,:))
h = text(1400,110,'0114 UTC');
set(h,'color',co(2,:))
h = text(1400,105,'0603 UTC');
set(h,'color',co(3,:))
h = text(1400,100,'2043 UTC');
set(h,'color',co(4,:))
set(gcf,'PaperPositionMode','auto');
print -djpeg aerinsa_radianceoutbounds.jpg

clear

%h5 = umereader('e:\ac980518\cal\hc5n6.ume');
%h3 = umereader('e:\ac980518\cal\hc3n4.ume');
%h1 = umereader('e:\ac980518\cal\hc1n2.ume');
h5 = umereader('d:\fireiii\data\HIS\ac980518\cal\hc5n6.ume');
h3 = umereader('d:\fireiii\data\HIS\ac980518\cal\hc3n4.ume');
h1 = umereader('d:\fireiii\data\HIS\ac980518\cal\hc1n2.ume');

i5 = find(h5.freq > 600  & h5.freq < 1080);
i3 = find(h3.freq > 1080 & h3.freq < 1850);
i1 = find(h1.freq > 2000 & h1.freq < 2450);
wn5 = h5.freq(i5);
wn3 = h3.freq(i3);
wn1 = h1.freq(i1);

ind = 324:333;
mrad5 = mean(h5.rad(ind,i5));
mrad3 = mean(h3.rad(ind,i3));
mrad1 = mean(h1.rad(ind,i1));
   
figure
plot(wn5,mrad5,wn3,mrad3,wn1,mrad1)
axis([600 2500 0 120])
xlabel('Wavenumber (cm^{-1})')
ylabel('Upwelling Radiance [mW m^{-2} sr^{-1} (cm^{-1})^{-1}]')
title('HIS spectra over the NSA ARM site, Barrow during 980518 Outbound Overflight');
text(1500,110,'20:46:47 - 20:48:34 UTC')
set(gcf,'PaperPositionMode','auto');
print -djpeg hisnsa_radiance_outbound.jpg

figure
plot(wn5,brittemp(wn5,mrad5),wn3,brittemp(wn3,mrad3),wn1,brittemp(wn1,mrad1))
axis([600 2500 220 300])
xlabel('Wavenumber (cm^{-1})')
ylabel('Brightness Temperature (K)')
title('HIS BT spectra over the NSA ARM site, Barrow during 980518 Outbound Overflight');
text(1000,290,'20:46:47 - 20:48:34 UTC')
set(gcf,'PaperPositionMode','auto');
print -djpeg hisnsa_btfull_outbound.jpg

figure
plot(wn5,brittemp(wn5,mrad5),wn3,brittemp(wn3,mrad3),wn1,brittemp(wn1,mrad1))
axis([800 950 265 275])
xlabel('Wavenumber (cm^{-1})')
ylabel('Brightness Temperature (K)')
title('HIS BT spectra over the NSA ARM site, Barrow during 980518 Outbound Overflight');
text(850,273,'20:46:47 - 20:48:34 UTC')
set(gcf,'PaperPositionMode','auto');
print -djpeg hisnsa_btwndw_outbound.jpg

%
%   ....End of good data, just before the alignment was lost and before the SHEBA Ice Camp.
%
ind = 570:579;
wn5 = h5.freq(i5);
wn3 = h3.freq(i3);
wn1 = h1.freq(i1);
mrad5 = mean(h5.rad(ind,i5));
mrad3 = mean(h3.rad(ind,i3));
mrad1 = mean(h1.rad(ind,i1));

figure
plot(wn5,mrad5,wn3,mrad3,wn1,mrad1)
axis([600 2500 0 120])
xlabel('Wavenumber (cm^{-1})')
ylabel('Upwelling Radiance [mW m^{-2} sr^{-1} (cm^{-1})^{-1}]')
title('HIS spectra near the SHEBA Ice Camp on 980518');
text(1500,110,'21:21:49 - 21:22:26 UTC')
set(gcf,'PaperPositionMode','auto');
print -djpeg hissheb_radiance_outbound.jpg

figure
plot(wn5,brittemp(wn5,mrad5),wn3,brittemp(wn3,mrad3),wn1,brittemp(wn1,mrad1))
axis([600 2500 220 300])
xlabel('Wavenumber (cm^{-1})')
ylabel('Brightness Temperature (K)')
title('HIS Brightness Temperature Spectra near the SHEBA Ice Camp on 980518');
text(1000,290,'21:21:49 - 21:22:26 UTC')
set(gcf,'PaperPositionMode','auto');
print -djpeg hissheb_bt_outbound.jpg



