Home > atmlab > collocations > Holl10Data.m

Holl10Data

PURPOSE ^

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

DOWNLOAD ^

Holl10Data.m

SOURCE CODE ^

0001 classdef Holl10Data < AssociatedDataset
0002     % CPR-MHS collocations (1 per CPR) for Holl et. al, 2010
0003     %
0004     % WORK IN PROGRESS!
0005     %
0006     % $Id: Holl10Data.m 7520 2012-04-17 15:48:20Z gerrit $
0007     
0008     properties (SetAccess = protected)
0009 
0010          members = struct(...
0011             'ROIWP', struct(...
0012                 'type', 'float', ...
0013                 'atts', struct(...
0014                     'long_name', 'CloudSat Radar-Only CPR IWP', ...
0015                     'units', 'g/m^2')), ...
0016             'dROIWP', struct(...
0017                 'type', 'float', ...
0018                 'atts', struct(...
0019                     'long_name', 'Cloudsat Radar-Only CPR IWP uncertainty', ...
0020                     'units', 'g/m^2')), ...
0021             'IOROIWP', struct(...
0022                 'type', 'float', ...
0023                 'atts', struct(...
0024                     'long_name', 'Cloudsat Ice-Only Radar-Only CPR IWP', ...
0025                     'units', 'g/m^2')), ...
0026             'dIOROIWP', struct(...
0027                 'type', 'float', ...
0028                 'atts', struct(...
0029                     'long_name', 'Cloudsat Ice-Only Radar-Only CPR IWP uncertainty', ...
0030                     'units', 'g/m^2')), ...
0031             'MHS', struct(...
0032               'type', 'float', ...
0033               'dims', {{'MHS_CHANS', 5}}, ...
0034               'atts', struct(...
0035                   'long_name', 'MHS brightness temperature', ...
0036                   'units', 'Kelvin')));
0037         
0038          parent = datasets_config('collocation_cpr_mhs');      
0039          dependencies = {};
0040      end
0041      
0042      methods
0043          function self = Holl10Data(varargin)
0044              self = self@AssociatedDataset(...
0045                  varargin{:});
0046          end
0047      end
0048      
0049      methods (Static)
0050          
0051          
0052          function args = primary_arguments()
0053              args = {'RO_ice_water_path'; ...
0054                  'RO_ice_water_path_uncertainty'; ...
0055                  'IO_RO_ice_water_path'; ...
0056                  'IO_RO_ice_water_path_uncertainty'};
0057          end
0058          
0059          function args = secondary_arguments()
0060              args = {};
0061          end
0062          
0063          function bool = needs_primary_data()
0064              bool = true;
0065          end
0066          
0067          function bool = needs_secondary_data()
0068              bool = true;
0069          end
0070          
0071      end
0072      
0073      methods
0074          
0075          function M = process_granule(self, processed_core, data_cpr, ~, ~, data_mhs, ~, ~, ~)
0076              % process_granule FIXME DOC
0077              %
0078              % WORK IN PROGRESS
0079              %
0080              % FIXME DOC
0081              
0082              self.members2cols(); % only here, because in some cases it happens after reading data
0083              % prepare
0084              n_collocs = size(processed_core, 1);
0085              n_fields = max(cell2mat(struct2cell(self.cols).'));
0086              M = nan*zeros(n_collocs, n_fields);
0087              if n_collocs==0
0088                  return % don't bother
0089              end
0090                           
0091              % row and columns
0092              cpr_i = processed_core(:, self.parent.cols.LINE1);
0093              mhs_r = processed_core(:, self.parent.cols.LINE2);
0094              mhs_c = processed_core(:, self.parent.cols.POS2);
0095              
0096              %% cloudsat data
0097              
0098              M(:, self.cols.ROIWP) = data_cpr.RO_ice_water_path(cpr_i);
0099              M(:, self.cols.dROIWP) = data_cpr.RO_ice_water_path_uncertainty(cpr_i);
0100              M(:, self.cols.IOROIWP) = data_cpr.IO_RO_ice_water_path(cpr_i);
0101              M(:, self.cols.dIOROIWP) = data_cpr.IO_RO_ice_water_path_uncertainty(cpr_i);
0102              
0103              %% AMSUB/MHS data
0104              
0105              % index for direct addressing
0106              mhs_i = sub2ind(size(data_mhs.lat), mhs_r, mhs_c);
0107              
0108              % reshape so that I can use direct addressing for brightness temperatures
0109              tb = reshape(data_mhs.tb, [numel(data_mhs.lat) 5]);
0110              
0111              M(:, self.cols.MHS) = tb(mhs_i, :);
0112              
0113          end  
0114 
0115      end
0116 end

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