Home > atmlab > datasets > +satreaders > isccp_dx.m

isccp_dx

PURPOSE ^

SATREADERS.ISCCP_DX reads the ISCCP DX dataset

SYNOPSIS ^

function S = isccp_dx(file,varargin)

DESCRIPTION ^

 SATREADERS.ISCCP_DX reads the ISCCP DX dataset

 Read ISCCP data and output the data in the format common to all
 satreaders.<dataset>.m readers in atmlab. Geodata and time data are
 always retrieved from the data file.
 
 For info on the common format, see <a href="matlab:help SatDataset/reader">SatDataset/reader</a>.

 FORMAT

   S = satreaders.isccp_dx(file,varargin)

 IN

   file    string      Path to file (may be zipped)
   extra   cell array (optional) extra fields.

 OUT

   data    struct  With fields:
                   time    time in seconds since 00:00 UT
                   lat     latitude in degrees, one column per viewing angle
                   lon     longitude in [-180, 180] degrees, colums as for lat

 FORMAT
          S = satreaders.isccp_dx(file,varargin)

 $Id: isccp_dx.m 8720 2013-10-21 20:41:39Z gerrit $
 Salomon Eliasson

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

isccp_dx.m

SOURCE CODE ^

0001 function S = isccp_dx(file,varargin)
0002 % SATREADERS.ISCCP_DX reads the ISCCP DX dataset
0003 %
0004 % Read ISCCP data and output the data in the format common to all
0005 % satreaders.<dataset>.m readers in atmlab. Geodata and time data are
0006 % always retrieved from the data file.
0007 %
0008 % For info on the common format, see <a href="matlab:help SatDataset/reader">SatDataset/reader</a>.
0009 %
0010 % FORMAT
0011 %
0012 %   S = satreaders.isccp_dx(file,varargin)
0013 %
0014 % IN
0015 %
0016 %   file    string      Path to file (may be zipped)
0017 %   extra   cell array (optional) extra fields.
0018 %
0019 % OUT
0020 %
0021 %   data    struct  With fields:
0022 %                   time    time in seconds since 00:00 UT
0023 %                   lat     latitude in degrees, one column per viewing angle
0024 %                   lon     longitude in [-180, 180] degrees, colums as for lat
0025 %
0026 % FORMAT
0027 %          S = satreaders.isccp_dx(file,varargin)
0028 %
0029 % $Id: isccp_dx.m 8720 2013-10-21 20:41:39Z gerrit $
0030 % Salomon Eliasson
0031 
0032 core_fields   = {'global_attributes','lon','lat'};
0033 extra_fields  = optargs(varargin, {{}});
0034 all_fields    = [core_fields(:); extra_fields(:)];
0035 
0036 S = read_isccp(file,struct('dataset','dx'));
0037 
0038 % all available fields are read from the binary file, so remove all fields,
0039 % but all_fields.
0040 flds = fieldnames(S)';
0041 S = rmfield(S,flds(~ismember(flds,all_fields)));
0042 
0043 % Since the data is from geostationary satellites, all times are
0044 % the same within one file
0045 S.time = ones(size(S.lon))*S.global_attributes.UTC*3600; %[s];
0046 S.version = 'DX';
0047 S.path = file;
0048 
0049 S = MaskInvalidGeoTimedataWithNaN(S);
0050 
0051 end

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