function at_frat_plot(e,ep, Filename) % AT_FRAT_PLOT - Create plots of fouling ratios for the entire deployment % % This function is meant to be called from at_eqpac but will also % work as a standalone program. % % Use as: at_frat_plot(e,ep, Filename) % % Inputs: e = output from ep_cmpl % ep = Eqpac mooring ID (1 or 2) % Filename = Name of gif file to save plot as (optional: if not % specified no file is create % Brian Schlining % 13 Aug 1999 ep_ini i = strcmp(ColumnS,'Decimal_Year'); %======================================= % Get the dates, Correct for Y2K issues %======================================= sdn = e(ep).dat(:,i) + 1900; %y2k = find(sdn >= 85 & sdn <= 99.9999); %sdn(y2k) = sdn(y2k) + 1900; %y2k = find(sdn >= 0 & sdn < 85); %sdn(y2k) = sdn(y2k) + 2000; sdn = dy2date(sdn); % Get Dates %========================================================= % Refine the approximate dates to make them more accurate %========================================================= [Year Month Day Hour Minute Second] = datevec(sdn); i = strcmp(ColumnS,'Time'); Hour = e(ep).dat(:,i); Hour(find(Hour == 1200)) = 12/24; Hour(find(Hour == 1230)) = 12.5/24; Day = round(Day) + Hour; % Correct the day to the local time sdn = datenum(Year, Month, Day); %======================== % Fouling ration at 1.5m %======================== i = strmatch('Lu[1.5m]683',ColumnS); j = strmatch('Lu[1.5m]555',ColumnS); f = e(ep).dat(:,i)./e(ep).dat(:,j); %======================= % Fouling ration at 20m %======================= i = strmatch('Lu[20m]683',ColumnS); j = strmatch('Lu[20m]555',ColumnS); f(:,2) = e(ep).dat(:,i)./e(ep).dat(:,j); plot(sdn,f) datetick('x') set(gca,'YLim',[0 .35]) ylabel('Fouling ratio (Lu683/Lu555)') legend('1.5 m','20 m',0); %========================= % Make a gif if specified %========================= if nargin > 2 at_setfontsize PaperPosition = [.25 2.5 4.5 3.25]; set(gcf,'PaperPosition',PaperPosition); writegif(Filename); close all end