%ADCP_Rot_Valley
%m-file to compare plots of ADCP data from each valley station (A-C,F) for the NY Bight
%Labels/Location of text in general was modified for appearance
%using Adobe Illustrator
%
%Soupy Alexander, 11/18/2001
%Requires NetCDF toolbox, Soupy's tools "singleJD.m" and "gregaxdNM.m", and Rich's
%tool "gregaxd.m"
%
%Modified 4/9/2002 to change to across and along valley coordiante system

%Determine the ADCP file corresponding to the station of interest

station_list = ['A';'B';'C';'F';];

for index = 1:4;
    station = station_list(index);
    subplot(4,1,index)

if station == 'A';
    ADCP_file = netcdf('5951adc-alp.nc','nowrite');
    rotAng = 0;
elseif station == 'B';
    ADCP_file = netcdf('5971adc-alp.nc','nowrite');
    rotAng = 15;    
elseif station == 'C';
    ADCP_file = netcdf('5991adc-alp.nc','nowrite');
    rotAng = 65;
elseif station == 'F';
    ADCP_file = netcdf('6041adc-alp.nc','nowrite');
    rotAng = 80;
end

ADCP_t1 = ADCP_file{'time'}(:);
ADCP_t2 = ADCP_file{'time2'}(:);
ADCP_singleJD = singleJD(ADCP_t1,ADCP_t2);

ADCP_depth = ADCP_file{'depth'}(:);
ADCP_u_1205_orig = ADCP_file{'u_1205'}(:);
ADCP_v_1206_orig = ADCP_file{'v_1206'}(:);
[ADCP_v_1206,ADCP_u_1205] = transformNY(ADCP_u_1205_orig,...
    ADCP_v_1206_orig,rotAng);

%set boundaries for interesting data for plot

crange = [-50 50];

startjd = julian(1999,12,01,00);
endjd = julian(2000,4,20,00);

imagesc(ADCP_singleJD,ADCP_depth,ADCP_v_1206',crange);
axis([startjd endjd 0 70])
set(gca, 'ytick',[0:10:70])
gregaxd(ADCP_singleJD,5)
ylabel('depth (m)')
title(['Station ' num2str(station)])

end

orient landscape
