%plotMeteorNY.m
%
%Program to create a whisker plot of wind stress, a plot of wind speed,
%and a plot of wave height from a given data set for the NY data
%
%Soupy Alexander, 03/11/02

%Set the time limits for the plot
startjd = julian(1999,12,01,00);
endjd = julian(2000,4,20,00);

%Extract the Ambrose Lighthouse data
ambrosefile = 'alsn6-a.nc'; 
ambrose = netcdf(ambrosefile,'nowrite');
wu_ambrose = ambrose{'WU_422'}(:);
wv_ambrose = ambrose{'WV_423'}(:);
[speed_ambrose,dir_ambrose] = UVtoSpDir(wu_ambrose,wv_ambrose);
hs_ambrose = ambrose{'wh_4061'}(:);
atemp = ambrose{'AT_21'}(:);
bp = ambrose{'BP_915'}(:);
time_ambrose = ambrose{'time'}(:);
time2_ambrose = ambrose{'time2'}(:);

jdtime_ambrose = singleJD(time_ambrose,time2_ambrose);

speed_ambrose = ridfill(speed_ambrose);
hs_ambrose = ridfill(hs_ambrose);
atemp = ridfill(atemp);

%Plot the data

subplot(4,1,1)
plot(jdtime_ambrose,atemp)
axis([startjd endjd -20 40])
gregaxd(jdtime_ambrose,5)
text(min(jdtime_ambrose)+5,0,'Air Temperature')
ylabel('Deg. C')

subplot(4,1,2)
plot(jdtime_ambrose,bp)
axis([startjd endjd 980 1050])
gregaxd(jdtime_ambrose,5)
text(min(jdtime_ambrose)+5,1000,'Barometric Pressure')
ylabel('mbar')

subplot(4,1,3);
plot(jdtime_ambrose,speed_ambrose)
axis([julian(1999,12,01,00) julian(2000,4,20,00) 0 30]);
gregaxd(jdtime_ambrose,5)
ylabel('m/s')
text(min(jdtime_ambrose)+5,20,'Wind Speed, Ambrose');

subplot(4,1,4);
plot(jdtime_ambrose,hs_ambrose)
axis([julian(1999,12,01,00) julian(2000,4,20,00) 0 5]);
gregaxd(jdtime_ambrose,5)
ylabel('m')
text(min(jdtime_ambrose)+5,2,'Sig. Wave Height, Ambrose');

orient landscape