Home > atmlab > datasets > define_c2dp.m

define_c2dp

PURPOSE ^

Define CloudSat-2D-POES collapsed dataset

SYNOPSIS ^

function define_c2dp(tp)

DESCRIPTION ^

 Define CloudSat-2D-POES collapsed dataset

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

DOWNLOAD ^

define_c2dp.m

SOURCE CODE ^

0001 function define_c2dp(tp)
0002 % Define CloudSat-2D-POES collapsed dataset
0003 
0004 D = datasets();
0005 if isequal(tp, 'amsub')
0006     core = D.CollocatedDataset_amsub_cpr;
0007     add = D.associated_CPR_AMSUB_AMSUA_HIRS;
0008 else
0009     core = D.CollocatedDataset_mhs_cpr;
0010     add = D.associated_CPR_MHS_AMSU_HIRS;
0011 end
0012 
0013 global_lims = {@(X)(select_closest(X, core.cols, 15))};
0014 c2d.LINE2.processors.RANGE = @(x)(vec2row(x([1 end])));
0015 c2d.LINE2.incore = true;
0016 c2d.LINE2.dims = {'NO_CS', 2};
0017 c2d.LINE2.stored.RANGE.type = 'int'; % CS-granule 37081, too large for 'short'
0018 c2d.LINE2.stored.RANGE.atts.long_name = 'CloudSat profile range 15 closest within granule';
0019 c2d.LINE2.stored.RANGE.atts.valid_range = [1 40000];
0020 c2d.DIST.processors.MIN = @(x)min(x);
0021 c2d.DIST.processors.MAX = @(x)max(x);
0022 c2d.DIST.incore = true;
0023 c2d.DIST.stored.MIN.type = 'float';
0024 c2d.DIST.stored.MIN.atts.long_name = 'Distance closest CloudSat profile to AMSU-B/MHS centerpoint';
0025 c2d.DIST.stored.MIN.atts.units = 'km';
0026 c2d.DIST.stored.MIN.atts.valid_range = [0 15.02];
0027 c2d.DIST.stored.MAX.type = 'float';
0028 c2d.DIST.stored.MAX.atts.long_name = 'Distance furthest CloudSat profile to AMSU-B/MHS centerpoint';
0029 c2d.DIST.stored.MAX.atts.units = 'km';
0030 c2d.DIST.stored.MAX.atts.valid_range = [0 15.02];
0031 c2d.INT.incore = true;
0032 c2d.INT.processors.MIN = @(x)min(abs(x));
0033 c2d.INT.stored.MIN.type = 'short'; % [-900, 900]
0034 c2d.INT.stored.MIN.atts.long_name = 'Shortest time-interval CloudSat AMSU-B/MHS';
0035 c2d.INT.stored.MIN.atts.units = 'seconds';
0036 c2d.INT.stored.MIN.atts.valid_range = [0 900];
0037 c2d.INT.processors.MAX = @(x)max(abs(x));
0038 c2d.INT.stored.MAX.type = 'short';
0039 c2d.INT.stored.MAX.atts.long_name = 'Longest time-interval CloudSat AMSU-B/MHS';
0040 c2d.INT.stored.MAX.atts.units = 'seconds';
0041 c2d.INT.stored.MAX.atts.valid_range = [0 900];
0042 Collapser(add, c2d, global_lims, ...
0043     'name', ['c2dp_' tp]);
0044 
0045 
0046 end
0047 
0048 function III = select_closest(M, cols, N)
0049 % get logical with N closest collocs in M, described by cols
0050 M = M(:, cols.DIST);
0051 [~, I] = sort(M);
0052 II = sort(I(1:min(N, length(M))));
0053 III = false(size(M));
0054 III(II) = true;
0055 end
0056 
0057 % function y = range_from_sel(x, n, filler)
0058 % % ensure x is at least length n, fill rest with filler
0059 % y = filler * ones(1, n);
0060 % y(1:length(x)) = x;
0061 % end

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