Home > atmlab > deprecated > collocate_and_store_date_range.m

collocate_and_store_date_range

PURPOSE ^

collocate_and_store_date_range Collocate and store for all those dates

SYNOPSIS ^

function collocate_and_store_date_range(date_start, date_end,sat1, sensor1, sat2, sensor2)

DESCRIPTION ^

 collocate_and_store_date_range Collocate and store for all those dates

 FORMAT

   collocate_and_store_date(date_start, date_end, ...
       sat1, sensor1, sat2, sensor2)

 IN

   date_start  1x3 array   Starting date
   date_end    1x3 array   Ending date
   sat1        string      Primary satellite
   sensor1     string      Primary sensor
   sat2        string      Secondary satellite
   sensor2     string      Secondary sensor

 $Id$

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

collocate_and_store_date_range.m

SOURCE CODE ^

0001 function collocate_and_store_date_range(date_start, date_end, ...
0002         sat1, sensor1, sat2, sensor2)
0003 
0004 % collocate_and_store_date_range Collocate and store for all those dates
0005 %
0006 % FORMAT
0007 %
0008 %   collocate_and_store_date(date_start, date_end, ...
0009 %       sat1, sensor1, sat2, sensor2)
0010 %
0011 % IN
0012 %
0013 %   date_start  1x3 array   Starting date
0014 %   date_end    1x3 array   Ending date
0015 %   sat1        string      Primary satellite
0016 %   sensor1     string      Primary sensor
0017 %   sat2        string      Secondary satellite
0018 %   sensor2     string      Secondary sensor
0019 %
0020 % $Id$
0021 
0022 warning(['atmlab:' mfilename], 'old style function, being phased out, use OO way');
0023 
0024 logtext(atmlab('OUT'), 'Starting collocations\n');
0025 logtext(atmlab('OUT'), '%s %s vs. %s %s\n', sat1, sensor1, sat2, sensor2);
0026 logtext(atmlab('OUT'), 'From %s to %s\n', mat2str(date_start), mat2str(date_end));
0027 alldates = daterange(date_start, date_end);
0028 for i = 1:size(alldates, 1);
0029     year = alldates(i, 1);
0030     month = alldates(i, 2);
0031     day = alldates(i, 3);
0032     logtext(atmlab('OUT'), 'collocating %04d-%02d-%02d\n', ...
0033         year, month, day);
0034     collocate_and_store_date(year, month, day, sat1, sensor1, sat2, sensor2);
0035 end
0036 logtext(atmlab('OUT'), 'Finished!\n');

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005