

stcmp=97.89; encmp=99.46;
% give 30 mins past end of argos
enm=datenum(2011,04,09,10,0,00); 
eny=enm-day1;

% truncate argos: times are all @ 30 minutes
load Argos.mat
fprintf('sys1: \n input %s ',prmmd(sys1));
ix=find(sys1.yday >= 97.5 & sys1.yday <= 99.5);
sys1=structtrunc(sys1,ix);
fprintf('  now %s ',prmmd(sys1));
fprintf('sys2:\n input %s ',prmmd(sys2));
ix=find(sys2.yday >= 97.5 & sys2.yday <= 99.5);
sys2=structtrunc(sys2,ix);
fprintf('  now %s ',prmmd(sys2));
stcmp=

% truncate
load gps.mat
gps.yday=gps.mday-day1;
fprintf('gps:\n input %s ',prmmd(gps));
ix=find(gps.yday > 97.89 & gps.yday < eny);
gps=structtrunc(gps,ix);
fprintf('  now %s', prmmd(gps));


load etl.mat
fprintf('etl:\n input %s ',prmmd(etl));
etl.yday=etl.mday-day1;
ix=find(etl.yday >= 97.5 & etl.yday <= eny);
etl=structtrunc(etl,ix);
fprintf('  now %s', prmmd(etl));

load etl_flux.mat
etl_flux=flux;
clear flux
fprintf('etl_flux:\n input %s ',prmmd(etl_flux));
etl_flux.yday=etl_flux.mday-day1;
ix=find(etl_flux.yday >= 97.5 & etl_flux.yday <= eny);
etl_flux=structtrunc(etl_flux,ix);
fprintf('  now %s', prmmd(etl_flux));

load vos.mat
fprintf('vos:\n input %s ',prmmd(vos));
vos.yday=vos.mday-day1;
ix=find(vos.yday >= 97.5 & vos.yday <= eny);
vos=structtrunc(vos,ix);
fprintf('  now %s\n', prmmd(vos));

save s11comp.mat gps sys1 sys2 vos etl etl_flux


% whats in that file (truncated times)
% gps:  2011/04/07 21:22 to 2011/04/09 09:59
% sys1: 2011/04/07 22:30 to 2011/04/09 09:30
% sys2: 2011/04/07 22:30 to 2011/04/09 09:30
% etl:  2011/04/07 12:00 to 2011/04/09 08:59
% flux: 2011/04/07 12:00 to 2011/04/09 09:54
% vos:  2011/04/07 12:01 to 2011/04/09 09:59


str= {'gps'; 'vos'; 'sys1'; 'sys2'; 'etl'; 'etl_flux'};
for ii=1:6;mst=char(str{ii}); fprintf('%s ',mst); 
    eval(['dst=prmmd(' mst ');' ]);
    fprintf('%s',dst);
end
% gps 2011/04/07 21:22 to 2011/04/09 09:59  why so late
% vos 2011/04/07 12:01 to 2011/04/09 09:59  
% sys1 2011/04/07 16:30 to 2011/04/09 10:30 these are the times
% sys2 2011/04/07 16:30 to 2011/04/09 10:30
% etl 2011/04/07 12:00 to 2011/04/09 08:59
% etl_flux 2011/04/07 12:00 to 2011/04/09 09:54


% gps:   2011/04/01 00:01 to 2011/04/11 11:00
% sys1:  2011/04/07 22:30 to 2011/04/09 09:30
% sys2:  2011/04/07 22:30 to 2011/04/09 09:30
% etl:   2011/03/31 00:00 to 2011/04/11 10:59
% flux:  2011/03/29 00:00 to 2011/04/10 23:55
% vos:   2011/03/29 15:35 to 2011/04/11 11:43
