Home > atmlab > deprecated > colloc_process_data_hirscs_poes.m

colloc_process_data_hirscs_poes

PURPOSE ^

colloc_process_data_hirscs_poes Gather collocation data to store for HIRSCS+MHS

SYNOPSIS ^

function M = colloc_process_data_hirscs_poes(~, M_c,~, ~, data1, ~, ~, data2)

DESCRIPTION ^

 colloc_process_data_hirscs_poes Gather collocation data to store for HIRSCS+MHS

 After collocating, and gathering information about the collocations, we
 want to collect some actual data: in this case, brightness temperatures.

 FORMAT

   M = colloc_process_data_hirscs_poes(collocations, M_c, ...
       name1, date1, data1, name2, date2, data2)

 IN

   collocations    Nx4 matrix  (not used here)
   M_c             matrix      As returned by colloc_process_poes_poes
   name1           string      name of satellite 1 (ignored here)
   date1           1x5 vector  Contains [year month day hour minute] for the
                               start of the primary granule (ignored here)
   data1           structure   Fields for brightness temperature should be
                               present
   name2           string      name of satellite 2 (ignored here)
   date2           1x5 vector  As date1, but for secondary granule
                               (ignored here)
   data2           structure   As data1, but for secondary granule.

 OUT

   M               Nxp matrix  Matrix containing p fields of information for
                               all N collocations.

 $Id: colloc_process_data_hirscs_poes.m 7553 2012-04-27 19:08:16Z gerrit $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

colloc_process_data_hirscs_poes.m

SOURCE CODE ^

0001 function M = colloc_process_data_hirscs_poes(~, M_c, ...
0002     ~, ~, data1, ~, ~, data2)
0003 
0004 % colloc_process_data_hirscs_poes Gather collocation data to store for HIRSCS+MHS
0005 %
0006 % After collocating, and gathering information about the collocations, we
0007 % want to collect some actual data: in this case, brightness temperatures.
0008 %
0009 % FORMAT
0010 %
0011 %   M = colloc_process_data_hirscs_poes(collocations, M_c, ...
0012 %       name1, date1, data1, name2, date2, data2)
0013 %
0014 % IN
0015 %
0016 %   collocations    Nx4 matrix  (not used here)
0017 %   M_c             matrix      As returned by colloc_process_poes_poes
0018 %   name1           string      name of satellite 1 (ignored here)
0019 %   date1           1x5 vector  Contains [year month day hour minute] for the
0020 %                               start of the primary granule (ignored here)
0021 %   data1           structure   Fields for brightness temperature should be
0022 %                               present
0023 %   name2           string      name of satellite 2 (ignored here)
0024 %   date2           1x5 vector  As date1, but for secondary granule
0025 %                               (ignored here)
0026 %   data2           structure   As data1, but for secondary granule.
0027 %
0028 % OUT
0029 %
0030 %   M               Nxp matrix  Matrix containing p fields of information for
0031 %                               all N collocations.
0032 %
0033 % $Id: colloc_process_data_hirscs_poes.m 7553 2012-04-27 19:08:16Z gerrit $
0034 
0035 % prepare
0036 c = colloc_constants('cols_hirscs_poes');
0037 co = c.overlap;
0038 c = c.data;
0039 n = size(M_c, 1);
0040 M = nan*zeros(n, c.NCOLS);
0041 
0042 % row and column numbers
0043 
0044 i1 = M_c(:, co.H_I);
0045 r2 = M_c(:, co.MHS_ROW);
0046 c2 = M_c(:, co.MHS_COL);
0047 
0048 % index for direct addressing
0049 i2 = sub2ind(size(data2.lat), r2, c2);
0050 
0051 c = colloc_constants('cols_hirscs_poes');
0052 c = c.data;
0053 
0054 % reshape so that I can use direct addressing for brightness temperatures
0055 
0056 tb2 = reshape(data2.tb, [numel(data2.lat) 5]);
0057 
0058 M(:, c.VIS) = data1.vis(i1);
0059 M(:, c.BT) = data1.bt(i1, :);
0060 M(:, c.LC) = data1.lc(i1, :);
0061 M(:, c.MHS) = tb2(i2, :);

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