function f_name = get_file_list_bytimespan( start_time, end_time, ... dir_type, band, mytype); % Uses a start_time and end_time to find the full list of path/file % names for all scan types under the directory structure used for % S-Pol CfRadial data. This routine uses get_sorted_file_list to find % a full day of scans, concatenates days, then trims the start and end % of the file list to match the desired start/end times. % % The routine requires that the start/end times are strings in the % form 'ccyymmddhhmmss'. % % Remember that, within the S-PolKa scheme, scans are grouped first % by type of data (moments, covars, or whatever), then by % s or x band, then % by scan type. % % f_names = get_sorted_file_list('20110411120000','20110411175900', % 'moments', 'sband'); % % or % f_names = get_sorted_file_list('20110411120000','20110411175900', % 'moments', 'sband', {'sur'; 'sec'}); % % Note that the get_sorted_file_list routine requires that a global % root directory be set, but that this routine does not require % that global variable. % global rt_direc; % /export/d2/rilling/DYN_test/cfradial % Sanity checks on input times: if( length(start_time) ~= 14 || length(end_time) ~= 14 ); fprint(['Input Time values do not have correct length in ' ... 'get_file_list_bytimespan\n']); fprint('Aborting.\n'); return; end; entm = datenum(end_time,'yyyymmddHHMMSS'); sttm = datenum(start_time,'yyyymmddHHMMSS'); if( sttm >= entm ); fprint('Start time is greater than or equal to end time.\n'); fprint('Aborting\n'); return; end; start_date = start_time(1:8); end_date = end_time(1:8); f_name = []; my_date = start_date; while ( my_date <= end_date ); fn = get_sorted_file_list( my_date, dir_type, band, mytype ); f_name = [ f_name; fn ]; my_date = datestr((datenum(my_date,'yyyymmdd') + 1), 'yyyymmdd'); end;